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 %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.