Add a waffle, for flipping and switching
This commit is contained in:
parent
b6af9e27d4
commit
54f53cd2c6
3 changed files with 21 additions and 15 deletions
|
@ -162,6 +162,7 @@ MIDDLEWARE_CLASSES = [
|
|||
"django.contrib.messages.middleware.MessageMiddleware",
|
||||
"debug_toolbar.middleware.DebugToolbarMiddleware",
|
||||
"reversion.middleware.RevisionMiddleware",
|
||||
"waffle.middleware.WaffleMiddleware",
|
||||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||
"django.contrib.flatpages.middleware.FlatpageFallbackMiddleware",
|
||||
'pinaxcon.monkey_patch.MonkeyPatchMiddleware',
|
||||
|
@ -227,8 +228,9 @@ INSTALLED_APPS = [
|
|||
"jquery",
|
||||
"djangoformsetjs",
|
||||
|
||||
# testing
|
||||
# testing and rollout
|
||||
"django_nose",
|
||||
"waffle",
|
||||
]
|
||||
|
||||
DEBUG_TOOLBAR_PANELS = [
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{% load lca2018_tags %}
|
||||
{% load waffle_tags %}
|
||||
<table class="calendar table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -35,20 +36,22 @@
|
|||
<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 %}
|
||||
{% flag "session_chair" %}
|
||||
{% 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 %}
|
||||
{% endflag %}
|
||||
{% endif %}
|
||||
{% elif slot.kind.label == "shortbreak" %}
|
||||
{% else %}
|
||||
|
|
|
@ -42,3 +42,4 @@ pinax-stripe==3.2.1
|
|||
requests>=2.11.1
|
||||
stripe==1.38.0
|
||||
|
||||
django-waffle>=0.12.0
|
||||
|
|
Loading…
Reference in a new issue