Added photo page support for individual groups, and tweaked some names. This provides a photo page for the IAB, but also as a benefit photo pages for other groups.
- Legacy-Id: 11287
This commit is contained in:
parent
dd781c9367
commit
7edecaee27
|
@ -19,6 +19,6 @@ urlpatterns = patterns('',
|
||||||
(r'^bofs/$', views.bofs),
|
(r'^bofs/$', views.bofs),
|
||||||
(r'^email-aliases/$', 'ietf.group.views.email_aliases'),
|
(r'^email-aliases/$', 'ietf.group.views.email_aliases'),
|
||||||
(r'^bofs/create/$', views_edit.edit, {'action': "create"}, "bof_create"),
|
(r'^bofs/create/$', views_edit.edit, {'action': "create"}, "bof_create"),
|
||||||
(r'^photos/$', views.photos),
|
(r'^photos/$', views.all_photos),
|
||||||
(r'^(?P<acronym>[a-zA-Z0-9-._]+)/', include('ietf.group.urls_info_details')),
|
(r'^(?P<acronym>[a-zA-Z0-9-._]+)/', include('ietf.group.urls_info_details')),
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from django.conf.urls import patterns, url
|
from django.conf.urls import patterns, url
|
||||||
from django.views.generic import RedirectView
|
from django.views.generic import RedirectView
|
||||||
|
import views
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
(r'^$', 'ietf.group.views.group_home', None, "group_home"),
|
(r'^$', 'ietf.group.views.group_home', None, "group_home"),
|
||||||
|
@ -28,5 +29,6 @@ urlpatterns = patterns('',
|
||||||
(r'^materials/new/$', 'ietf.doc.views_material.choose_material_type'),
|
(r'^materials/new/$', 'ietf.doc.views_material.choose_material_type'),
|
||||||
(r'^materials/new/(?P<doc_type>[\w-]+)/$', 'ietf.doc.views_material.edit_material', { 'action': "new" }, "group_new_material"),
|
(r'^materials/new/(?P<doc_type>[\w-]+)/$', 'ietf.doc.views_material.edit_material', { 'action': "new" }, "group_new_material"),
|
||||||
(r'^archives/$', 'ietf.group.views.derived_archives'),
|
(r'^archives/$', 'ietf.group.views.derived_archives'),
|
||||||
|
(r'^photos/$', views.group_photos),
|
||||||
url(r'^email-aliases/$', RedirectView.as_view(pattern_name='ietf.group.views.email',permanent=False),name='old_group_email_aliases'),
|
url(r'^email-aliases/$', RedirectView.as_view(pattern_name='ietf.group.views.email',permanent=False),name='old_group_email_aliases'),
|
||||||
)
|
)
|
||||||
|
|
|
@ -871,9 +871,16 @@ def derived_archives(request, acronym=None, group_type=None):
|
||||||
'list_acronym':list_acronym,
|
'list_acronym':list_acronym,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
def photos(request, group_type=None):
|
def all_photos(request, group_type=None):
|
||||||
roles = sorted(Role.objects.filter(group__type=group_type, group__state='active', name_id='chair'),key=lambda x: x.person.last_name()+x.person.name+x.group.acronym)
|
roles = sorted(Role.objects.filter(group__type=group_type, group__state='active', name_id='chair'),key=lambda x: x.person.last_name()+x.person.name+x.group.acronym)
|
||||||
for role in roles:
|
for role in roles:
|
||||||
role.last_initial = role.person.last_name()[0]
|
role.last_initial = role.person.last_name()[0]
|
||||||
return render(request, 'group/photos.html', {'group_type': group_type, 'role': 'Chair', 'roles': roles })
|
return render(request, 'group/photos.html', {'group_type': group_type, 'role': 'Chair', 'roles': roles })
|
||||||
|
|
||||||
|
def group_photos(request, group_type=None, acronym=None):
|
||||||
|
group = get_object_or_404(Group, acronym=acronym)
|
||||||
|
roles = sorted(Role.objects.filter(group__acronym=acronym),key=lambda x: x.name.name+x.person.last_name())
|
||||||
|
for role in roles:
|
||||||
|
role.last_initial = role.person.last_name()[0]
|
||||||
|
return render(request, 'group/group_photos.html', {'group_type': group_type, 'roles': roles, 'group':group })
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<h2>Active research groups</h2>
|
<h2>Active research groups</h2>
|
||||||
<a class="btn btn-default" href="{% url "ietf.group.views.all_status" %}">Status Reports</a>
|
<a class="btn btn-default" href="{% url "ietf.group.views.all_status" %}">Status Reports</a>
|
||||||
<a class="btn btn-default" href="{% url "ietf.group.views.photos" group_type="rg" %}">Chair Photos</a>
|
<a class="btn btn-default" href="{% url "ietf.group.views.all_photos" group_type="rg" %}">Chair Photos</a>
|
||||||
|
|
||||||
<table class="table table-striped table-condensed tablesorter">
|
<table class="table table-striped table-condensed tablesorter">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<a class="btn btn-default" href="{% url "ietf.group.views.concluded_groups" %}">Concluded WGs</a>
|
<a class="btn btn-default" href="{% url "ietf.group.views.concluded_groups" %}">Concluded WGs</a>
|
||||||
<a class="btn btn-default" href="https://www.ietf.org/dyn/wg/charter/history/">Historic charters</a>
|
<a class="btn btn-default" href="https://www.ietf.org/dyn/wg/charter/history/">Historic charters</a>
|
||||||
<a class="btn btn-default" href="{% url "ietf.group.views.all_status" %}">Status Reports</a>
|
<a class="btn btn-default" href="{% url "ietf.group.views.all_status" %}">Status Reports</a>
|
||||||
<a class="btn btn-default" href="{% url "ietf.group.views.photos" group_type="wg" %}">Chair Photos</a>
|
<a class="btn btn-default" href="{% url "ietf.group.views.all_photos" group_type="wg" %}">Chair Photos</a>
|
||||||
|
|
||||||
{% for area in areas %}
|
{% for area in areas %}
|
||||||
<h2 class="anchor-target" id="{{area.acronym}}">{{ area.name }} ({{ area.acronym }})</h2>
|
<h2 class="anchor-target" id="{{area.acronym}}">{{ area.name }} ({{ area.acronym }})</h2>
|
||||||
|
|
Loading…
Reference in a new issue