From 100f24baefab4fba05d6cdbe31ee5ac05a51df32 Mon Sep 17 00:00:00 2001 From: Bill Fenner <fenner@fenron.net> Date: Sun, 10 Jun 2007 03:02:01 +0000 Subject: [PATCH] Add help popup to MailingListForm. - Legacy-Id: 276 --- ietf/mailinglists/urls.py | 1 + ietf/mailinglists/views.py | 4 ++++ ietf/templates/mailinglists/list_help_base.html | 9 +++++++++ ietf/templates/mailinglists/list_help_long_desc.html | 9 +++++++++ ietf/templates/mailinglists/list_help_short_desc.html | 10 ++++++++++ .../mailinglists/list_wizard_MailingListForm.html | 9 ++++++++- ietf/templates/mailinglists/list_wizard_base.html | 1 + 7 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 ietf/templates/mailinglists/list_help_base.html create mode 100644 ietf/templates/mailinglists/list_help_long_desc.html create mode 100644 ietf/templates/mailinglists/list_help_short_desc.html diff --git a/ietf/mailinglists/urls.py b/ietf/mailinglists/urls.py index 51c817dc4..b41068576 100644 --- a/ietf/mailinglists/urls.py +++ b/ietf/mailinglists/urls.py @@ -11,5 +11,6 @@ urlpatterns = patterns('django.views.generic.list_detail', urlpatterns += patterns('', (r'^nonwg_lists/submit/$', views.non_wg_wizard), (r'^request/$', views.list_req_wizard), + (r'^request/help/(?P<field>[^/]+)/$', views.list_req_help), (r'^approve/(?P<object_id>[^/]+)/$', views.list_approve), ) diff --git a/ietf/mailinglists/views.py b/ietf/mailinglists/views.py index 635b20d0c..86901aef2 100644 --- a/ietf/mailinglists/views.py +++ b/ietf/mailinglists/views.py @@ -286,6 +286,10 @@ def list_req_wizard(request): wiz = ListReqWizard([ ListReqStep1 ]) return wiz(request) +def list_req_help(request, field): + return render_to_response('mailinglists/list_help_%s.html' % field, {}, + context_instance=RequestContext(request) ) + def list_approve(request, object_id): list = get_object_or_404(MailingList, mailing_list_id=object_id) if list.mail_type == 5 or list.mail_type == 6: diff --git a/ietf/templates/mailinglists/list_help_base.html b/ietf/templates/mailinglists/list_help_base.html new file mode 100644 index 000000000..a6f753cc0 --- /dev/null +++ b/ietf/templates/mailinglists/list_help_base.html @@ -0,0 +1,9 @@ +<html> +<head> +<title>Mailing List Form Field Help</title> +</head> +<body background="/images/ietf_waterbg.gif"> +{% block content %} +{% endblock %} +</body> +</html> diff --git a/ietf/templates/mailinglists/list_help_long_desc.html b/ietf/templates/mailinglists/list_help_long_desc.html new file mode 100644 index 000000000..37ab507e0 --- /dev/null +++ b/ietf/templates/mailinglists/list_help_long_desc.html @@ -0,0 +1,9 @@ +{% extends "mailinglists/list_help_base.html" %} + +{% block content %} +<br><b>Long description:</b> An introductory description - a few paragraphs - about the list. +It will be include, as html, at the top of the listinfo page. Carriage returns will end a paragraph.<br><br> +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> + +<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> +{% endblock %} diff --git a/ietf/templates/mailinglists/list_help_short_desc.html b/ietf/templates/mailinglists/list_help_short_desc.html new file mode 100644 index 000000000..39389cfc7 --- /dev/null +++ b/ietf/templates/mailinglists/list_help_short_desc.html @@ -0,0 +1,10 @@ +{% extends "mailinglists/list_help_base.html" %} + +{% block content %} +<br><b>Short description:</b> A terse phrase identifying this list.<br><br> +This description is used when the mailing list is listed with other mailing lists, or +in headers, and so forth. It should be as succinct as you can get it, while +still identifying what the list is.<br> + +<b><font color="blue">Example:</font> Media Gateway Control working group discussion list.</b> +{% endblock %} diff --git a/ietf/templates/mailinglists/list_wizard_MailingListForm.html b/ietf/templates/mailinglists/list_wizard_MailingListForm.html index 02d4630c7..47b4f71f2 100644 --- a/ietf/templates/mailinglists/list_wizard_MailingListForm.html +++ b/ietf/templates/mailinglists/list_wizard_MailingListForm.html @@ -24,7 +24,14 @@ function checkthis () { {# so don't render anything #} {% else %} <tr> -<th>{{ field.label_tag }}:</th> +<th>{{ field.label_tag }}: +{% ifequal field.name "short_desc" %} +<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')"> +{% endifequal %} +{% ifequal field.name "long_desc" %} +<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')"> +{% endifequal %} +</th> <td> {% if field.errors %} <ul class="errorlist">{% for error in field.errors %}<li>{{ error|escape }}</li>{% endfor %}</ul> diff --git a/ietf/templates/mailinglists/list_wizard_base.html b/ietf/templates/mailinglists/list_wizard_base.html index 3f0cd70c7..ea9bbb787 100644 --- a/ietf/templates/mailinglists/list_wizard_base.html +++ b/ietf/templates/mailinglists/list_wizard_base.html @@ -4,6 +4,7 @@ {% block css %} ul.errorlist { color: red; border: 1px solid red; } +th { text-align: left; vertical-align: top; font-weight: normal;} {% block mlcss %}{% endblock %} {% endblock %}