Changeset 4bf8692
- Timestamp:
- Sep 24, 2012, 12:50:48 AM (13 years ago)
- Branches:
- master, space-access, stable, stage
- Children:
- 43d4ccb
- Parents:
- 75238d5
- git-author:
- Alex Dehnert <adehnert@…> (09/24/12 00:35:52)
- git-committer:
- Alex Dehnert <adehnert@…> (09/24/12 00:50:48)
- Location:
- asadb
- Files:
-
- 2 added
- 3 edited
-
groups/templatetags/__init__.py (added)
-
groups/templatetags/groupdisplay.py (added)
-
groups/views.py (modified) (1 diff)
-
template/groups/group_detail.html (modified) (2 diffs)
-
template/groups/groups_constitutions.reason.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
asadb/groups/views.py
rab17953 r4bf8692 82 82 context = super(GroupDetailView, self).get_context_data(**kwargs) 83 83 group = context['group'] 84 85 const_link = None86 const_url = group.constitution_url87 if const_url.startswith("http://") or const_url.startswith("https://"):88 const_link = const_url89 context['constitution_link'] = const_link90 84 91 85 # Indicate whether this person should be able to see "private" info -
asadb/template/groups/group_detail.html
r8f46374 r4bf8692 1 1 {% extends "base.html" %} 2 {% load groupdisplay %} 2 3 3 4 {% block title %}{{group.name}}{% endblock %} … … 72 73 <tr class='private-info'> 73 74 <th>Constitution</th> 74 <td>{% if group.constitution_url %} 75 {% if constitution_link %}<a href='{{group.constitution_url}}'>{{group.constitution_url}}</a> 76 {%else%}{{group.constitution_url}}{%endif%} 77 {%else%}<i>not provided</i>{%endif%}</td> 75 <td>{{group.constitution_url|format_constitution_link}}</td> 78 76 </tr> 79 77 {% endif %} -
asadb/template/groups/groups_constitutions.reason.html
r0f60d8b r4bf8692 1 {% load groupdisplay %} 1 2 <h3><a name='{{reason|slugify}}'></a>{{reason}} (total: {{consts|length}})</h3> 2 3 <table class='pretty-table'> … … 16 17 <td><a href='{% url groups:group-detail const.group.pk %}'>{{const.group.name}}</a>{% if const.group.group_status.slug != "active" %} ({{const.group.group_status}}){%endif%}</td> 17 18 <td>{{const.pk}}</td> 18 <td>{{const.source_url }}</td>19 <td>{{const.source_url|format_constitution_link}}</td> 19 20 <td>{{const.failure_date}}</td> 20 21 </tr>
Note: See TracChangeset
for help on using the changeset viewer.