Commits

Luke Plant committed 96f7d14

Added booking secretary links to officer home page

  • Participants
  • Parent commits 73445b6
  • Branches bookings

Comments (0)

Files changed (2)

cciw/officers/views.py

 from django.views.decorators.cache import never_cache
 from django.views.generic.base import TemplateView
 
-from cciw.auth import is_camp_admin, is_wiki_user, is_cciw_secretary, is_camp_officer
+from cciw.auth import is_camp_admin, is_wiki_user, is_cciw_secretary, is_camp_officer, is_booking_secretary
 from cciw.cciwmain import common
 from cciw.cciwmain.decorators import json_response
 from cciw.cciwmain.models import Camp
     if is_cciw_secretary(user):
         c['show_secretary_links'] = True
         c['show_admin_link'] = True
+    if is_booking_secretary(user):
+        c['show_booking_secretary_links'] = True
 
     return render(request, 'cciw/officers/index.html', c)
 

templates/cciw/officers/index.html

 
 <h2>Menu:</h2>
 <ul>
+  {% if show_booking_secretary_links %}
+  <li><a href="/admin/bookings/">Manage bookings</a></li>
+  {% endif %}
   <li><a href="{% url 'cciw.officers.views.applications' %}">Submit/view applications</a></li>
   <li><a href="{% url 'cciw.officers.views.info' %}">Information about camp</a></li>
   {% if show_leader_links %}