Skip to content

Commit adeafe8

Browse files
committed
Changed the group link on the personal doc list page to use the group acronym instead of whole name, and made the acronym a link to the wg documents page.
- Legacy-Id: 4531
1 parent fdb1875 commit adeafe8

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

ietf/community/display.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import datetime
22

33
from django.db.models import Q
4-
from ietf.ietfworkflows.utils import get_state_for_draft
4+
from django.core.urlresolvers import reverse as urlreverse
55

6+
from ietf.ietfworkflows.utils import get_state_for_draft
67
from ietf.doc.models import DocAlias, DocEvent
78

89

@@ -62,7 +63,7 @@ class WGField(DisplayField):
6263
description = 'Associated WG or RG'
6364

6465
def get_value(self, document, raw=False):
65-
return document.group or ''
66+
return '<a href="%s">%s</a>' % (urlreverse('wg_docs', kwargs={'acronym':document.group.acronym}), document.group.acronym) if document.group else ''
6667

6768

6869
class ADField(DisplayField):

ietf/wginfo/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
(r'^chartering/create/$', edit.edit, {'action': "create"}, "wg_create"),
1818
(r'^chartering/$', views.chartering_wgs),
1919
(r'^(?P<acronym>[a-zA-Z0-9-]+)/documents/txt/$', views.wg_documents_txt),
20-
(r'^(?P<acronym>[a-zA-Z0-9-]+)/$', views.wg_documents_html),
20+
(r'^(?P<acronym>[a-zA-Z0-9-]+)/$', views.wg_documents_html, None, "wg_docs"),
2121
(r'^(?P<acronym>[a-zA-Z0-9-]+)/charter/$', views.wg_charter, None, 'wg_charter'),
2222
(r'^(?P<acronym>[a-zA-Z0-9-]+)/history/', views.history),
2323
(r'^(?P<acronym>[a-zA-Z0-9-]+)/edit/', edit.edit, {'action': "edit"}, "wg_edit"),

0 commit comments

Comments
 (0)