Skip to content

Commit 100f24b

Browse files
committed
Add help popup to MailingListForm.
- Legacy-Id: 276
1 parent 20334bc commit 100f24b

7 files changed

Lines changed: 42 additions & 1 deletion

File tree

ietf/mailinglists/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
urlpatterns += patterns('',
1212
(r'^nonwg_lists/submit/$', views.non_wg_wizard),
1313
(r'^request/$', views.list_req_wizard),
14+
(r'^request/help/(?P<field>[^/]+)/$', views.list_req_help),
1415
(r'^approve/(?P<object_id>[^/]+)/$', views.list_approve),
1516
)

ietf/mailinglists/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ def list_req_wizard(request):
286286
wiz = ListReqWizard([ ListReqStep1 ])
287287
return wiz(request)
288288

289+
def list_req_help(request, field):
290+
return render_to_response('mailinglists/list_help_%s.html' % field, {},
291+
context_instance=RequestContext(request) )
292+
289293
def list_approve(request, object_id):
290294
list = get_object_or_404(MailingList, mailing_list_id=object_id)
291295
if list.mail_type == 5 or list.mail_type == 6:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<html>
2+
<head>
3+
<title>Mailing List Form Field Help</title>
4+
</head>
5+
<body background="/images/ietf_waterbg.gif">
6+
{% block content %}
7+
{% endblock %}
8+
</body>
9+
</html>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{% extends "mailinglists/list_help_base.html" %}
2+
3+
{% block content %}
4+
<br><b>Long description:</b> An introductory description - a few paragraphs - about the list.
5+
It will be include, as html, at the top of the listinfo page. Carriage returns will end a paragraph.<br><br>
6+
The text will be treated as html <i>except</i> that newlines will be translated to <br> - so you can use links, preformatted text, etc, but don't put in carriage returns except where you mean to separate paragraphs. And review your changes - bad html (like some unterminated HTML constructs) can prevent display of the entire listinfo page.<br><br>
7+
8+
<b><font color="blue">Example:</font> This list is for discussions relating to the development, clarification, and implementation of the media gateway control protocol defined in RFC 3015 (and ITU-T Recommendation H.248). Standardization related to this protocol is carried out jointly by the IETF Megaco Working Group and ITU-T Stydy Group 16 Question 3.</b>
9+
{% endblock %}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% extends "mailinglists/list_help_base.html" %}
2+
3+
{% block content %}
4+
<br><b>Short description:</b> A terse phrase identifying this list.<br><br>
5+
This description is used when the mailing list is listed with other mailing lists, or
6+
in headers, and so forth. It should be as succinct as you can get it, while
7+
still identifying what the list is.<br>
8+
9+
<b><font color="blue">Example:</font> Media Gateway Control working group discussion list.</b>
10+
{% endblock %}

ietf/templates/mailinglists/list_wizard_MailingListForm.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@
2424
{# so don't render anything #}
2525
{% else %}
2626
<tr>
27-
<th>{{ field.label_tag }}:</th>
27+
<th>{{ field.label_tag }}:
28+
{% ifequal field.name "short_desc" %}
29+
<img src="/images/icon_help.gif" border="0" title="Click for help" onClick="window.open('help/{{ field.name }}',null,'height=200,width=500,status=no,toolbar=no,menubar=no,location=no')">
30+
{% endifequal %}
31+
{% ifequal field.name "long_desc" %}
32+
<img src="/images/icon_help.gif" border="0" title="Click for help" onClick="window.open('help/{{ field.name }}',null,'height=300,width=600,status=no,toolbar=no,menubar=no,location=no')">
33+
{% endifequal %}
34+
</th>
2835
<td>
2936
{% if field.errors %}
3037
<ul class="errorlist">{% for error in field.errors %}<li>{{ error|escape }}</li>{% endfor %}</ul>

ietf/templates/mailinglists/list_wizard_base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
{% block css %}
66
ul.errorlist { color: red; border: 1px solid red; }
7+
th { text-align: left; vertical-align: top; font-weight: normal;}
78
{% block mlcss %}{% endblock %}
89
{% endblock %}
910

0 commit comments

Comments
 (0)