Commits

Luke Plant committed c17d02f

Added link to wiki where relevant

Comments (0)

Files changed (2)

cciw/officers/views.py

     return render(request, 'cciw/officers/crb_consent_problem.html', c)
 
 
-officer_info = staff_member_required(TemplateView.as_view(template_name='cciw/officers/info.html'))
+class OfficerInfo(TemplateView):
+    template_name='cciw/officers/info.html'
+    def get_context_data(self, *args, **kwargs):
+        return dict(show_wiki_link=is_wiki_user(self.request.user))
+
+
+officer_info = staff_member_required(OfficerInfo.as_view())

templates/cciw/officers/info.html

 <ul>
 <li><a href="{% url 'cciw.officers.views.officer_files' 'CCIW CPP.doc' %}">The
     camp manual and child protection policy</a></li>
+{% if show_wiki_link %}
+  <li><a href="/wiki/Index">CCIW wiki</a></li>
+{% endif %}
 </ul>
 
 {% endblock %}