Add a waffle, for flipping and switching

This commit is contained in:
James Polley 2018-01-11 02:45:43 +11:00
parent b6af9e27d4
commit 54f53cd2c6
3 changed files with 21 additions and 15 deletions

View file

@ -162,6 +162,7 @@ MIDDLEWARE_CLASSES = [
"django.contrib.messages.middleware.MessageMiddleware", "django.contrib.messages.middleware.MessageMiddleware",
"debug_toolbar.middleware.DebugToolbarMiddleware", "debug_toolbar.middleware.DebugToolbarMiddleware",
"reversion.middleware.RevisionMiddleware", "reversion.middleware.RevisionMiddleware",
"waffle.middleware.WaffleMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware",
"django.contrib.flatpages.middleware.FlatpageFallbackMiddleware", "django.contrib.flatpages.middleware.FlatpageFallbackMiddleware",
'pinaxcon.monkey_patch.MonkeyPatchMiddleware', 'pinaxcon.monkey_patch.MonkeyPatchMiddleware',
@ -227,8 +228,9 @@ INSTALLED_APPS = [
"jquery", "jquery",
"djangoformsetjs", "djangoformsetjs",
# testing # testing and rollout
"django_nose", "django_nose",
"waffle",
] ]
DEBUG_TOOLBAR_PANELS = [ DEBUG_TOOLBAR_PANELS = [

View file

@ -1,4 +1,5 @@
{% load lca2018_tags %} {% load lca2018_tags %}
{% load waffle_tags %}
<table class="calendar table table-bordered"> <table class="calendar table table-bordered">
<thead> <thead>
<tr> <tr>
@ -35,20 +36,22 @@
<span class="speaker"> <span class="speaker">
{{ slot.content.speakers|join:", " }} {{ slot.content.speakers|join:", " }}
</span> </span>
{% if slot.sessions %} {% flag "session_chair" %}
<div> {% if slot.sessions %}
{% for session in slot.sessions.all %} <div>
{% if not session.chair %} {% for session in slot.sessions.all %}
<br /> {% if not session.chair %}
<a href="{% url "schedule_session_detail" session.id %}">Volunteer! 🙋</a> <br />
{% elif session.chair.user == request.user %} <a href="{% url "schedule_session_detail" session.id %}">Volunteer! 🙋</a>
<br /> {% elif session.chair.user == request.user %}
<a href="{% url "schedule_session_detail" session.id %}">(You are session chair)</a> <br />
{% endif %} <a href="{% url "schedule_session_detail" session.id %}">(You are session chair)</a>
</a> {% endif %}
{% endfor %} </a>
</div> {% endfor %}
{% endif %} </div>
{% endif %}
{% endflag %}
{% endif %} {% endif %}
{% elif slot.kind.label == "shortbreak" %} {% elif slot.kind.label == "shortbreak" %}
{% else %} {% else %}

View file

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