Chrisjrn/session chair (#94)

* Adds session_detail page

* Adds session chairing information to the schedule grid

* Adds session_list.html

* Nicer volunteer text

Conflicts:
	pinaxcon/templates/symposion/schedule/_grid.html

Conflict and migration performed by Sachi King <nakato@nakato.io>
Emoji changed, lca2017_tags to lca2018_tags, remove needless dependency
on django-user-account, use request instead like the remainder of the
calls n the template do anyways.

Remove blocktrans from a number of texts as they break {{ templating }}
and we don't translate anyways.

Modified-by: Sachi King <nakato@nakato.io>
This commit is contained in:
Christopher Neugebauer 2017-01-10 21:31:18 +11:00 committed by Sachi King
parent 23f4a38126
commit 9a25ca1754
4 changed files with 159 additions and 1 deletions

View file

@ -14,7 +14,7 @@
{% for room in timetable.rooms %}
{% with room|trackname:timetable.day as track_name %}
<th class="track-name">{% if track_name %}<p>{{ track_name }}{% endif %}</th>
{% endwith %}
{% endwith %}
{% endfor %}
</tr>
{% endif %}
@ -35,6 +35,20 @@
<span class="speaker">
{{ slot.content.speakers|join:", " }}
</span>
{% if slot.sessions %}
<div>
{% for session in slot.sessions.all %}
{% if not session.chair %}
<br />
<a href="{% url "schedule_session_detail" session.id %}">Volunteer! 🙋</a>
{% elif session.chair.user == request.user %}
<br />
<a href="{% url "schedule_session_detail" session.id %}">(You are session chair)</a>
{% endif %}
</a>
{% endfor %}
</div>
{% endif %}
{% endif %}
{% elif slot.kind.label == "shortbreak" %}
{% else %}

View file

@ -0,0 +1,80 @@
{% extends "symposion/schedule/public_base.html" %}
{% load lca2018_tags %}
{% load sitetree %}
{% load staticfiles %}
{% load thumbnail %}
{% load i18n %}
{% block head_title %}Session: {{ session }}{% endblock %}
{% block breadcrumbs %}{% sitetree_breadcrumbs from "main" %}{% endblock %}
{% block header_inset_image %}{{ block.super }}{% endblock %}
{% block header_background_image %}{{ block.super }}{% endblock %}
{% block header_title %}Session: {{ session }}{% endblock %}
{% block header_paragraph %}
{% endblock %}
{% block content %}
<dl class="dl-horizontal">
<dt>{% trans "Session Chair" %}</dt>
<dd>
{% if chair %}
{{ chair.attendee.attendeeprofilebase.attendeeprofile.name }}
{% if request.user == chair %}
<form method="POST">
{% csrf_token %}
<input type="hidden" name="role" value="un-chair" />
<input type="submit" value="Opt out" class="btn"/>
</form>
{% endif %}
{% else %}
{% if request.user.is_authenticated %}
{% if request.user.attendee.completed_registration %}
{% if not chair_denied %}
<form method="POST">
{% csrf_token %}
<input type="hidden" name="role" value="chair" />
<input type="submit" class="btn" value="Volunteer to be session chair"/>
</form>
{% endif %}
{% else %}
{% url 'guided_registration' as guided_registration %}
<a href="{{ guided_registration }}">Click here to get a ticket for the conference,</a> and enable volunteering for session roles.
{% endif %}
{% else %}
Sign up and <a href="/saml2/login/?next={{ request.path }}">log in</a> to volunteer to be session chair.
{% endif %}
{% endif %}
</dd>
<dt>{% trans "Session Runner" %}</dt>
<dd>
{% if runner %}
{{ runner.profile.display_name }}
{% else %}
{% blocktrans %}Session runner not assigned.{% endblocktrans %}
{% endif %}
</dd>
</dl>
<h2>Slots</h2>
<table class="table">
{% for slot in session.slots.all %}
<tr>
<td>{{ slot }}</td>
<td>{% if slot.content %}<a href="{% url 'schedule_presentation_detail' slot.content.pk %}">{{ slot.content }}</a>{% endif %}</td>
</tr>
{% empty %}
<li>{% trans "No slots in session." %}</li>
{% endfor %}
</table>
{% endblock %}

View file

@ -0,0 +1,63 @@
{% extends "symposion/schedule/public_base.html" %}
{% load lca2018_tags %}
{% load sitetree %}
{% load staticfiles %}
{% load thumbnail %}
{% load i18n %}
{% block head_title %}Sessions{% endblock %}
{% block breadcrumbs %}{% sitetree_breadcrumbs from "main" %}{% endblock %}
{% block header_inset_image %}{{ block.super }}{% endblock %}
{% block header_background_image %}{{ block.super }}{% endblock %}
{% block header_title %}Sessions{% endblock %}
{% block header_paragraph %}
{% endblock %}
{% block content %}
<ul class="unstyled">
{% for session in sessions %}
{% if session.sorted_slots %}
<li>
<a href="{% url 'schedule_session_detail' session.pk %}">{% blocktrans %}Session #{% endblocktrans %}{{ forloop.counter }}</a>
<div class="well">
<ul class="unstyled">
{% for role in session.sessionrole_set.all %}
<li>
<b>{{ role.get_role_display }}</b>: {{ role.user.attendee.attendeeprofilebase.attendeeprofile.name }}
</li>
{% empty %}
<li>
<a href="{% url 'schedule_session_detail' session.pk %}">{% blocktrans %}No volunteers signed up. Sign up!{% endblocktrans %}</a>
</li>
{% endfor %}
</ul>
<h4>{% trans "Slots" %}</h4>
<table class="table">
{% for slot in session.sorted_slots %}
<tr>
<td>{{ slot }}</td>
<td>
{% if slot.content %}<a href="{% url 'schedule_presentation_detail' slot.content.pk %}">{{ slot.content }}</a>{% endif %}
</td>
</tr>
{% empty %}
<tr>{% trans "No slots in session." %}</tr>
{% endfor %}
</table>
</div>
</li>
{% endif %}
{% empty %}
<li>{% trans "No sessions defined." %}</li>
{% endfor %}
</ul>
{% endblock %}

View file

@ -42,3 +42,4 @@ pinax-stripe==3.2.1
requests>=2.11.1
stripe==1.38.0
django-user-accounts