Changeset 4bf8692


Ignore:
Timestamp:
Sep 24, 2012, 12:50:48 AM (13 years ago)
Author:
Alex Dehnert <adehnert@…>
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)
Message:

Add and use constitution linkifying filter (ASA-#146)

Location:
asadb
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/views.py

    rab17953 r4bf8692  
    8282        context = super(GroupDetailView, self).get_context_data(**kwargs)
    8383        group = context['group']
    84 
    85         const_link = None
    86         const_url = group.constitution_url
    87         if const_url.startswith("http://") or const_url.startswith("https://"):
    88             const_link = const_url
    89         context['constitution_link'] = const_link
    9084
    9185        # Indicate whether this person should be able to see "private" info
  • asadb/template/groups/group_detail.html

    r8f46374 r4bf8692  
    11{% extends "base.html" %}
     2{% load groupdisplay %}
    23
    34{% block title %}{{group.name}}{% endblock %}
     
    7273<tr class='private-info'>
    7374    <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>
    7876</tr>
    7977{% endif %}
  • asadb/template/groups/groups_constitutions.reason.html

    r0f60d8b r4bf8692  
     1{% load groupdisplay %}
    12<h3><a name='{{reason|slugify}}'></a>{{reason}} (total: {{consts|length}})</h3>
    23<table class='pretty-table'>
     
    1617    <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>
    1718    <td>{{const.pk}}</td>
    18     <td>{{const.source_url}}</td>
     19    <td>{{const.source_url|format_constitution_link}}</td>
    1920    <td>{{const.failure_date}}</td>
    2021</tr>
Note: See TracChangeset for help on using the changeset viewer.