From a1a3949a4d4edf725dd5de871846cfe6b4163ca4 Mon Sep 17 00:00:00 2001 From: Martin Qvist Date: Tue, 20 Sep 2011 06:41:13 +0000 Subject: [PATCH] Remove wgrecord after rename - Legacy-Id: 3433 --- ietf/templates/wgrecord/add_comment.html | 36 - .../templates/wgrecord/announcement_text.html | 25 - ietf/templates/wgrecord/approve_ballot.html | 37 - .../wgrecord/ballot_comment_mail.txt | 25 - ietf/templates/wgrecord/by_ad.html | 29 - ietf/templates/wgrecord/change_state.html | 121 ---- ietf/templates/wgrecord/charter_diffs.html | 34 - ietf/templates/wgrecord/conclude.html | 38 - ietf/templates/wgrecord/date_column.html | 5 - ietf/templates/wgrecord/edit_info.html | 102 --- ietf/templates/wgrecord/edit_position.html | 71 -- ietf/templates/wgrecord/email_secretariat.txt | 5 - ietf/templates/wgrecord/in_process.html | 29 - ietf/templates/wgrecord/record_ballot.html | 56 -- .../wgrecord/record_ballot_list.html | 6 - ietf/templates/wgrecord/record_history.html | 40 -- ietf/templates/wgrecord/record_main.html | 72 -- .../templates/wgrecord/record_tab_ballot.html | 11 - ietf/templates/wgrecord/record_tab_base.html | 59 -- .../wgrecord/record_tab_charter.html | 81 --- .../wgrecord/record_tab_history.html | 18 - .../wgrecord/record_tab_writeup.html | 37 - ietf/templates/wgrecord/search_form.html | 139 ---- ietf/templates/wgrecord/search_main.html | 25 - .../templates/wgrecord/search_result_row.html | 13 - ietf/templates/wgrecord/search_results.html | 22 - .../wgrecord/send_ballot_comment.html | 40 -- ietf/templates/wgrecord/states.html | 32 - ietf/templates/wgrecord/status_columns.html | 17 - ietf/templates/wgrecord/submit.html | 40 -- ietf/templates/wgrecord/table_header.html | 15 - ietf/templates/wgrecord/wg_description.html | 1 - ietf/templates/wgrecord/wg_title.html | 1 - ietf/wgrecord/__init__.py | 1 - ietf/wgrecord/feeds.py | 67 -- ietf/wgrecord/mails.py | 37 - ietf/wgrecord/markup_txt.py | 66 -- ietf/wgrecord/models.py | 0 ietf/wgrecord/templatetags/__init__.py | 1 - ietf/wgrecord/templatetags/wg_ballot_icon.py | 124 ---- ietf/wgrecord/tests.py | 654 ------------------ ietf/wgrecord/testurl.list | 55 -- ietf/wgrecord/urls.py | 30 - ietf/wgrecord/utils.py | 219 ------ ietf/wgrecord/views_ballot.py | 439 ------------ ietf/wgrecord/views_edit.py | 492 ------------- ietf/wgrecord/views_rec.py | 238 ------- ietf/wgrecord/views_search.py | 268 ------- ietf/wgrecord/views_submit.py | 93 --- 49 files changed, 4066 deletions(-) delete mode 100644 ietf/templates/wgrecord/add_comment.html delete mode 100644 ietf/templates/wgrecord/announcement_text.html delete mode 100644 ietf/templates/wgrecord/approve_ballot.html delete mode 100644 ietf/templates/wgrecord/ballot_comment_mail.txt delete mode 100644 ietf/templates/wgrecord/by_ad.html delete mode 100644 ietf/templates/wgrecord/change_state.html delete mode 100644 ietf/templates/wgrecord/charter_diffs.html delete mode 100644 ietf/templates/wgrecord/conclude.html delete mode 100644 ietf/templates/wgrecord/date_column.html delete mode 100644 ietf/templates/wgrecord/edit_info.html delete mode 100644 ietf/templates/wgrecord/edit_position.html delete mode 100644 ietf/templates/wgrecord/email_secretariat.txt delete mode 100644 ietf/templates/wgrecord/in_process.html delete mode 100644 ietf/templates/wgrecord/record_ballot.html delete mode 100644 ietf/templates/wgrecord/record_ballot_list.html delete mode 100644 ietf/templates/wgrecord/record_history.html delete mode 100644 ietf/templates/wgrecord/record_main.html delete mode 100644 ietf/templates/wgrecord/record_tab_ballot.html delete mode 100644 ietf/templates/wgrecord/record_tab_base.html delete mode 100644 ietf/templates/wgrecord/record_tab_charter.html delete mode 100644 ietf/templates/wgrecord/record_tab_history.html delete mode 100644 ietf/templates/wgrecord/record_tab_writeup.html delete mode 100644 ietf/templates/wgrecord/search_form.html delete mode 100644 ietf/templates/wgrecord/search_main.html delete mode 100644 ietf/templates/wgrecord/search_result_row.html delete mode 100644 ietf/templates/wgrecord/search_results.html delete mode 100644 ietf/templates/wgrecord/send_ballot_comment.html delete mode 100644 ietf/templates/wgrecord/states.html delete mode 100644 ietf/templates/wgrecord/status_columns.html delete mode 100644 ietf/templates/wgrecord/submit.html delete mode 100644 ietf/templates/wgrecord/table_header.html delete mode 100644 ietf/templates/wgrecord/wg_description.html delete mode 100644 ietf/templates/wgrecord/wg_title.html delete mode 100644 ietf/wgrecord/__init__.py delete mode 100644 ietf/wgrecord/feeds.py delete mode 100644 ietf/wgrecord/mails.py delete mode 100644 ietf/wgrecord/markup_txt.py delete mode 100644 ietf/wgrecord/models.py delete mode 100644 ietf/wgrecord/templatetags/__init__.py delete mode 100644 ietf/wgrecord/templatetags/wg_ballot_icon.py delete mode 100644 ietf/wgrecord/tests.py delete mode 100644 ietf/wgrecord/testurl.list delete mode 100644 ietf/wgrecord/urls.py delete mode 100644 ietf/wgrecord/utils.py delete mode 100644 ietf/wgrecord/views_ballot.py delete mode 100644 ietf/wgrecord/views_edit.py delete mode 100644 ietf/wgrecord/views_rec.py delete mode 100644 ietf/wgrecord/views_search.py delete mode 100644 ietf/wgrecord/views_submit.py diff --git a/ietf/templates/wgrecord/add_comment.html b/ietf/templates/wgrecord/add_comment.html deleted file mode 100644 index 1db80c507..000000000 --- a/ietf/templates/wgrecord/add_comment.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends "base.html" %} -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% block title %}Add comment on {{ wg.acronym }}{% endblock %} - -{% block morecss %} -form.add-comment #id_comment { - width: 600px; - height: 300px; -} - -form.add-comment .actions { - padding-top: 20px; -} -{% endblock %} - -{% block content %} -

Add comment on {{ wg.acronym }}

- -

The comment will be added to the history trail.

- -
- - {{ form.as_table }} - - - - -
- Back - -
-
-{% endblock %} diff --git a/ietf/templates/wgrecord/announcement_text.html b/ietf/templates/wgrecord/announcement_text.html deleted file mode 100644 index 7d8dde829..000000000 --- a/ietf/templates/wgrecord/announcement_text.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "base.html" %} - -{% block title %}WG {{ announcement }} announcement writeup for {{ charter.chartered_group.acronym }}{% endblock %} - -{% block morecss %} -form #id_announcement_text { - width: 700px; - height: 600px; -} -{% endblock %} - -{% block content %} -

WG {{ announcement }} announcement writeup for {{ charter.chartered_group.acronym }}

- -
- - {{ announcement_text_form.announcement_text }} - -
- Back - -
-
- -{% endblock%} diff --git a/ietf/templates/wgrecord/approve_ballot.html b/ietf/templates/wgrecord/approve_ballot.html deleted file mode 100644 index 01426c601..000000000 --- a/ietf/templates/wgrecord/approve_ballot.html +++ /dev/null @@ -1,37 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Approve ballot for {{ wg.acronym }}{% endblock %} - -{% block morecss %} -form.approve-ballot pre { - margin: 0; - padding: 4px; - border-top: 4px solid #eee; - border-bottom: 4px solid #eee; -} -form.approve-ballot .announcement { - overflow-x: auto; - overflow-y: scroll; - width: 800px; - height: 400px; - border: 1px solid #bbb; -} -{% endblock %} - -{% block content %} -

Approve Ballot for {{ wg.acronym }}

- -
IETF announcement:
- -
- -
-
{{ announcement }}
-
- -
- Back - -
-
-{% endblock %} diff --git a/ietf/templates/wgrecord/ballot_comment_mail.txt b/ietf/templates/wgrecord/ballot_comment_mail.txt deleted file mode 100644 index 748bf328f..000000000 --- a/ietf/templates/wgrecord/ballot_comment_mail.txt +++ /dev/null @@ -1,25 +0,0 @@ -{% autoescape off %}{{ ad }} has entered the following ballot position for -{{ charter.name }}-{{ charter.rev }}: {{ pos.name }} - -When responding, please keep the subject line intact and reply to all -email addresses included in the To and CC lines. (Feel free to cut this -introductory paragraph, however.) - -{% if not block_comment and not comment %} -There is no BLOCK or COMMENT text associated with this position. -{% endif %} - -{% if block_comment %}---------------------------------------------------------------------- -BLOCK: ----------------------------------------------------------------------- - -{{ block_comment|safe|wordwrap:73 }} - - -{% endif %}{% if comment %}---------------------------------------------------------------------- -COMMENT: ----------------------------------------------------------------------- - -{{ comment|safe|wordwrap:73 }} -{% endif %} -{% endautoescape %} diff --git a/ietf/templates/wgrecord/by_ad.html b/ietf/templates/wgrecord/by_ad.html deleted file mode 100644 index 433b48934..000000000 --- a/ietf/templates/wgrecord/by_ad.html +++ /dev/null @@ -1,29 +0,0 @@ -{% extends "base.html" %} -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% block title %}Working Groups for {{ ad_name }}{% endblock %} - -{% block content %} -

Working Groups for {{ ad_name }}

- -

-Create WG -

- -{% if not recs %} -

No WGs match your query.

-{% else %} - - - {% for hdr in meta.hdrs %} - {% include "wgrecord/table_header.html" %} - {% endfor %} - -{% for wg in recs %} -{% include "wgrecord/search_result_row.html" %} -{% endfor %} -
-{% endif %} -{% endblock content %} diff --git a/ietf/templates/wgrecord/change_state.html b/ietf/templates/wgrecord/change_state.html deleted file mode 100644 index 04ac30c66..000000000 --- a/ietf/templates/wgrecord/change_state.html +++ /dev/null @@ -1,121 +0,0 @@ -{% extends "base.html" %} - -{% block title %} -{% ifequal option "initcharter" %} -Initiate chartering of WG {{ wg.acronym }} -{% else %} -{% ifequal option "recharter" %} -Recharter WG {{ wg.acronym }} -{% else %} -{% ifequal option "abandon" %} -Abandon effort on WG {{ wg.acronym }} -{% else %} -Change state of WG {{ wg.acronym }} -{% endifequal %} -{% endifequal %} -{% endifequal %} -{% endblock %} - -{% block morecss %} -form.change-state select { - width: 22em; -} - -#id_message, #id_comment { - width: 40em; -} - -form.change-state .actions { - text-align: right; - padding-top: 10px; -} - -{% endblock %} - -{% block content %} -

{% ifequal option "initcharter" %} -Initiate chartering of WG {{ wg.acronym }} -{% else %} -{% ifequal option "recharter" %} -Recharter WG {{ wg.acronym }} -{% else %} -{% ifequal option "abandon" %} -Abandon effort on WG {{ wg.acronym }} -{% else %} -Change state of WG {{ wg.acronym }} -{% endifequal %} -{% endifequal %} -{% endifequal %} -

- -{% ifnotequal option "initcharter" %}{% ifnotequal option "recharter" %}{% ifnotequal option "abandon" %}

For help on the states, see the state table.

{% endifnotequal %}{% endifnotequal %}{% endifnotequal %} - -
- - {% for field in form.visible_fields %} - - {% ifequal field.name "initial_time" %} - {% ifequal option "recharter" %} - - - - - - {% endfor %} - - - -
{{ field.label_tag }}:{{ field }} - {% if field.help_text %}
{{ field.help_text }}
{% endif %} - {% else %} - {% ifequal option "initcharter" %} -
{{ field.label_tag }}:{{ field }} - {% if field.help_text %}
{{ field.help_text }}
{% endif %} - {% endifequal %} - {% endifequal %} - {% else %} -
{{ field.label_tag }}:{{ field }} - {% if field.help_text %}
{{ field.help_text }}
{% endif %} - {% endifequal %} - {% ifequal field.name "charter_state" %} - {% ifequal field.errors "warning" %} -
  • The initial review time hasn't elapsed. Select this checkbox to proceed anyway:
- {% endifequal %} - {% endifequal %} - {% ifnotequal field.name "charter_state" %} - {{ field.errors }} - {% endifnotequal %} -
- {% if option %} - - {% else %} - Back - - {% endif %} -
-
- -{% if prev_state %} -

Or revert to previous state

- -
-
- - - -
-
-{% endif %} -{% endblock %} - -{% block content_end %} - - -{% endblock %} diff --git a/ietf/templates/wgrecord/charter_diffs.html b/ietf/templates/wgrecord/charter_diffs.html deleted file mode 100644 index 413ffd4b5..000000000 --- a/ietf/templates/wgrecord/charter_diffs.html +++ /dev/null @@ -1,34 +0,0 @@ -
-

Diffs

-
- - - - - - - -
- - -Format: - -
- - -
-
-
diff --git a/ietf/templates/wgrecord/conclude.html b/ietf/templates/wgrecord/conclude.html deleted file mode 100644 index a66911cad..000000000 --- a/ietf/templates/wgrecord/conclude.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Request closing of WG {{ wg.acronym }}{% endblock %} - -{% block morecss %} -#id_instructions { - width: 40em; -} - -form.conclude .actions { - text-align: right; - padding-top: 10px; -} -{% endblock %} - -{% block content %} -

Request closing of {{ wg.acronym }}

- -

- Please provide instructions regarding the disposition of each - active Internet-Draft (such as to withdraw the draft, move it to - another WG, convert it to an individual submission, and so on), - wording for the closure announcement, and the status of the WG - mailing list (will it remain open or should it be closed). -

-
- - {{ form.as_table }} - - - -
- Back - -
-
- -{% endblock %} diff --git a/ietf/templates/wgrecord/date_column.html b/ietf/templates/wgrecord/date_column.html deleted file mode 100644 index 515e8d80a..000000000 --- a/ietf/templates/wgrecord/date_column.html +++ /dev/null @@ -1,5 +0,0 @@ -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} -{% load ietf_filters %}{{ wg.time|date:"Y-m-d" }} - diff --git a/ietf/templates/wgrecord/edit_info.html b/ietf/templates/wgrecord/edit_info.html deleted file mode 100644 index 876d65b45..000000000 --- a/ietf/templates/wgrecord/edit_info.html +++ /dev/null @@ -1,102 +0,0 @@ -{% extends "base.html" %} - -{% block title %} -{% if wg %} -Edit info on {{ wg.acronym }} -{% else %} -Create WG -{% endif %} -{% endblock %} - -{% block morecss %} -form.edit-info #id_name { - width: 396px; -} - -form.edit-info #id_list_email { - width: 396px; -} - -form.edit-info #id_list_subscribe { - width: 396px; -} - -form.edit-info #id_list_archive { - width: 396px; -} - -form.edit-info #id_urls { - width: 400px; -} - -form.edit-info #id_comments { - width: 400px; -} - -{% endblock %} - -{% block pagehead %} - -{% endblock %} - -{% block content %} -{% load ietf_filters %} -

{% if wg %} -Edit info on {{ wg.acronym }} -{% else %} -Create WG record -{% endif %} -

- -
- - {% for field in form.visible_fields %} - - - - - {% endfor %} - - - - -
{{ field.label_tag }}:{{ field }} - {% ifequal field.name "ad" %} - {% if user|in_group:"Area_Director" %} - - {% endif %} - {% endifequal %} - {% if field.help_text %}
{{ field.help_text }}
{% endif %} - {{ field.errors }} -
- {% if wg %} - Back - - {% else %} - - {% endif %} -
-
-{% endblock %} - -{% block scripts %} -$(document).ready(function () { - var chairs = eval($("#id_chairs").val()), - secretaries = eval($("#id_secretaries").val()), - techadv = eval($("#id_techadv").val()); - $("#id_chairs").tokenInput("/wgrecord/searchPerson/", { hintText: "", - preventDuplicates: true, - prePopulate: chairs }); - $("#id_secretaries").tokenInput("/wgrecord/searchPerson/", { hintText: "", - preventDuplicates: true, - prePopulate: secretaries }); - $("#id_techadv").tokenInput("/wgrecord/searchPerson/", { hintText: "", - preventDuplicates: true, - prePopulate: techadv }); - $("#id_name").focus(); -}); -{% endblock %} - -{% block content_end %} - -{% endblock %} diff --git a/ietf/templates/wgrecord/edit_position.html b/ietf/templates/wgrecord/edit_position.html deleted file mode 100644 index e9609ef27..000000000 --- a/ietf/templates/wgrecord/edit_position.html +++ /dev/null @@ -1,71 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Change position for {{ ad.name }} on {{ wg.acronym }}{% endblock %} - -{% block morecss %} -form.position-form .position ul { - padding: 0; - margin: 0; -} -form.position-form .position li { - list-style-type: none; - float: left; - padding-right: 10px; -} -form.position-form .last-edited { - font-style: italic; -} -form.position-form .block_comment { - padding-top: 20px -} -form.position-form #id_block_comment, -form.position-form #id_comment { - width: 700px; - height: 250px; -} -form.position-form .comment { - margin-top: 20px; -} -{% endblock %} - -{% block content %} -

Change position for {{ ad.name }} on {{ wg.acronym }}

- -
-
- {{ form.position }} - - - - -
- -
- -
-
- {{ form.block_comment.label_tag }}: - {% if old_pos and old_pos.block_comment_time %}(last edited {{ old_pos.block_comment_time }}){% endif %} -
- {{ form.block_comment.errors }} - {{ form.block_comment }} -
- -
- {{ form.comment.label_tag }}: - {% if old_pos and old_pos.comment_time %}(last edited {{ old_pos.comment_time }}){% endif %} -
- {{ form.comment }} - -
- Back -
- - {{ form.return_to_url }} - -
-{% endblock %} - -{% block content_end %} - -{% endblock %} diff --git a/ietf/templates/wgrecord/email_secretariat.txt b/ietf/templates/wgrecord/email_secretariat.txt deleted file mode 100644 index d489456fa..000000000 --- a/ietf/templates/wgrecord/email_secretariat.txt +++ /dev/null @@ -1,5 +0,0 @@ -{% autoescape off %} -{{ text }} - -WG Record URL: {{ url }} -{% endautoescape %} diff --git a/ietf/templates/wgrecord/in_process.html b/ietf/templates/wgrecord/in_process.html deleted file mode 100644 index 7c2c6c381..000000000 --- a/ietf/templates/wgrecord/in_process.html +++ /dev/null @@ -1,29 +0,0 @@ -{% extends "base.html" %} -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% block title %}Working Groups in IESG process{% endblock %} - -{% block content %} -

Working Groups in IESG process

- -

-Create WG -

- -{% if not recs %} -

No WGs match your query.

-{% else %} - - - {% for hdr in meta.hdrs %} - {% include "wgrecord/table_header.html" %} - {% endfor %} - -{% for wg in recs %} -{% include "wgrecord/search_result_row.html" %} -{% endfor %} -
-{% endif %} -{% endblock content %} diff --git a/ietf/templates/wgrecord/record_ballot.html b/ietf/templates/wgrecord/record_ballot.html deleted file mode 100644 index d3debdcd8..000000000 --- a/ietf/templates/wgrecord/record_ballot.html +++ /dev/null @@ -1,56 +0,0 @@ -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} -{% load ietf_filters %} - -
- -{% if user|in_group:"Area_Director,Secretariat" %} -{% if user|in_group:"Area_Director" %} - -{% endif %} -{% if user|in_group:"Secretariat" %} - -{% endif %} -{% endif %} - -

Blocking
-{% with info.pos_block as positions %}{% include "wgrecord/record_ballot_list.html" %}{% endwith %}

- -

Yes
-{% with info.pos_yes as positions %}{% include "wgrecord/record_ballot_list.html" %}{% endwith %}

- -

No
-{% with info.pos_no as positions %}{% include "wgrecord/record_ballot_list.html" %}{% endwith %}

- -

Abstain
-{% with info.pos_abstain as positions %}{% include "wgrecord/record_ballot_list.html" %}{% endwith %}

- -

No Record
-{% for p in info.pos_no_record %} -{{p.name}}{% if user|in_group:"Secretariat" %}{% endif %}
-{% empty %} -none -{% endfor %} -

- -
- -

Comments

- -{% for pos in info.positions %} -{% if pos.comment or pos.block_comment %} -

{{pos.ad|escape}}

- -{% if pos.block_comment %} -

Blocking ({{pos.block_comment_time}})

-
{{pos.block_comment|fill:"80"|escape }}
-{% endif %} - -{% if pos.comment %} -

Comment ({{pos.comment_time}})

-
{{pos.comment|fill:"80"|escape }}
-{% endif %} -{% endif %} -{% endfor %} -
diff --git a/ietf/templates/wgrecord/record_ballot_list.html b/ietf/templates/wgrecord/record_ballot_list.html deleted file mode 100644 index 3d5afb9bb..000000000 --- a/ietf/templates/wgrecord/record_ballot_list.html +++ /dev/null @@ -1,6 +0,0 @@ -{% load ietf_filters %} -{% for p in positions %} -{{p.ad}}{% if p.comment or p.block_comment %} *{% endif %}
-{% empty %} -none -{% endfor %} diff --git a/ietf/templates/wgrecord/record_history.html b/ietf/templates/wgrecord/record_history.html deleted file mode 100644 index f84fcc272..000000000 --- a/ietf/templates/wgrecord/record_history.html +++ /dev/null @@ -1,40 +0,0 @@ -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% load ietf_filters %} - - - -{% for c in history %} - - - -{% if c.is_rev %} - - - -{% endif %} - -{% if c.is_com %} - - - -{% endif %} - - -{% endfor %} - -
DateVersionByText
{{ c.date|date:"Y-m-d" }}{{ c.info.version }}(System)New version available: charter-ietf-{{ c.group.acronym }}-{{ c.charter.rev }} {% if c.prev_charter %}(diff from -{{ c.prev_charter.rev }}){% endif %}{{ c.info.version }}{{ c.info.by|escape }}{% if c.comment.ballot %} -[Ballot {{ c.comment.get_ballot_display }}]
-{% endif %} -{% if c.info.snipped %} -
{{ c.info.textSnippet|safe }}
-[show all] - -{% else %} -{{ c.info.text|fill:"80"|safe|linebreaksbr|keep_spacing|sanitize_html|safe }} -{% endif %} -
diff --git a/ietf/templates/wgrecord/record_main.html b/ietf/templates/wgrecord/record_main.html deleted file mode 100644 index 7b52cd1b0..000000000 --- a/ietf/templates/wgrecord/record_main.html +++ /dev/null @@ -1,72 +0,0 @@ -{% extends "base.html" %} - -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% load ietf_filters %} -{% block morecss %} -.metabox { width: 99%; margin-top:8px; padding:4px; margin-bottom:1em; } -#metatable { border: 0; border-spacing: 0; } -#metatable tr { vertical-align:top ;} -.comment_toggle { text-decoration: underline; color: blue; } -.comment_date { white-space: nowrap; } - -div.diffTool { padding: 8px 4px; margin: 8px 0;} -.diffTool label { float:left; width:50px; } - -.markup_draft pre {line-height: 1.2em; margin: 0; } -.m_hdr, .m_ftr { color: #808080; } -.m_ftr { border-bottom: 1px solid #a0a0a0; } -.m_h { font-family: arial; font-weight:bold;} -.ietf-concluded-bg {background-color: #F8F8D0; } -.ietf-concluded-warning { background:red;color:white;padding:2px 2px;} -.ietf-proposed-bg { } -.ietf-proposed-warning { background:green;color:white;padding:2px 2px;} -{% endblock %} - -{% block pagehead %} - - -{% endblock %} - -{% block title %}{% include "wgrecord/wg_title.html" %}{% endblock title %} - -{% block content %} -

{% include "wgrecord/wg_title.html" %} -{% ifequal wg.state_id "conclude" %}
(concluded WG){% endifequal %} -{% ifequal wg.state_id "proposed" %}
(proposed WG){% endifequal %} -

- -
- -
- -{% block tab_content %}{% endblock %} - -
-
- -{% endblock content %} - -{% block scripts %} -function toggleComment(n) { - var el = document.getElementById("commentF"+n); - var el2 = document.getElementById("commentS"+n); - var el3 = document.getElementById("commentT"+n); - if (el.style.display == 'none') { - el.style.display = 'block'; - el2.style.display = 'none'; - el3.innerHTML = ""; //[hide]"; - } else { - el.style.display = 'none'; - el2.style.display= 'block'; - el3.innerHTML = "[show all]"; - } -} -{% endblock scripts %} diff --git a/ietf/templates/wgrecord/record_tab_ballot.html b/ietf/templates/wgrecord/record_tab_ballot.html deleted file mode 100644 index 7a99ce0ad..000000000 --- a/ietf/templates/wgrecord/record_tab_ballot.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "wgrecord/record_main.html" %} -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% load ietf_filters %} - -{% block tab_content %} -{% include "wgrecord/record_ballot.html" %} -{% endblock tab_content %} - diff --git a/ietf/templates/wgrecord/record_tab_base.html b/ietf/templates/wgrecord/record_tab_base.html deleted file mode 100644 index c3c90eb11..000000000 --- a/ietf/templates/wgrecord/record_tab_base.html +++ /dev/null @@ -1,59 +0,0 @@ -{% extends "wgrecord/record_main.html" %} - -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% load ietf_filters %} - -{% block tab_content %} -{% block record_revision %}{% endblock %} -
- -{% block record_metatable %}{% endblock %} -
- -
-{% block record_metalinks %}{% endblock %} -
- -{% block record_metabuttons %} -{% if user|in_group:"Area_Director,Secretariat" %} -{% if not snapshot %} -
-{% ifnotequal wg.charter.charter_state_id "notrev" %} -{% ifnotequal wg.charter.charter_state_id "approved" %} -Abandon effort -Change state -{% ifnotequal wg.state_id "conclude" %} -Edit charter -{% endifnotequal %} -{% else %} -Recharter -{% endifnotequal %} -{% else %} -Recharter -{% endifnotequal %} - -{% ifequal wg.state_id "active" %}{% ifequal wg.charter.charter_state_id "approved" %} -Conclude WG -{% endifequal %}{% endifequal %} - -{% ifnotequal wg.state_id "conclude" %} -Edit WG -{% endifnotequal %} - - -
-{% endif %}{# if not snapshot #} -{% endif %}{# if user in group #} -{% endblock record_metabuttons%} -
- -
-{% block charter_text %}{% endblock %} -
-{% endblock tab_content %} - -{% block content_end %} -{% endblock content_end %} diff --git a/ietf/templates/wgrecord/record_tab_charter.html b/ietf/templates/wgrecord/record_tab_charter.html deleted file mode 100644 index 71acf0bed..000000000 --- a/ietf/templates/wgrecord/record_tab_charter.html +++ /dev/null @@ -1,81 +0,0 @@ -{% extends "wgrecord/record_tab_base.html" %} - -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% load ietf_filters %} - -{% block record_revision %} -Snapshots: {% for d in versions reversed %}{% ifequal active_rev d.rev %}{% endifequal %}{% ifequal rev d.rev %}{% else %}{% ifequal active_rev d.rev %}{% else %}{% endifequal %}{% endifequal %}{{ d.rev }}{% ifequal rev d.rev %}{% else %}{% endifequal %}{% ifequal active_rev d.rev %}{% endifequal %} {% endfor %} -{% endblock %} - -{% block record_metatable %} -WG name:{% if not snapshot %}{{ wg.name }}{% else %} {{ gh.name }} {% endif %} -WG acronym:{% if not snapshot %}{{ wg.acronym }} {% if info.prev_acronyms %}(previous acronyms: {% for a in info.prev_acronyms %}{{ a }}{% if not forloop.last %}, {% endif %}{% endfor %}){% endif %}{% else %}{{ gh.acronym }}{% endif %} -IETF area:{% if not snapshot %}{{ wg.parent|default:"-" }}{% else %}{{ gh.parent|default:"-" }}{% endif %} - -
- -WG chairs:{% if not snapshot %}{% for n in info.chairs %}{{ n }}{% if not forloop.last %}, {% endif %}{% endfor %}{% else %}{% for n in info.history_chairs %}{{ n }}{% if not forloop.last %}, {% endif %}{% endfor %}{% endif %} -{% if not snapshot %} -WG secretaries:{% for n in info.secr %}{{ n }}{% if not forloop.last %}, {% endif %}{% endfor %} -WG technical advisors:{% for n in info.techadv %}{{ n }}{% if not forloop.last %}, {% endif %}{% endfor %} -{% endif %} -Assigned AD:{% if not snapshot %}{{ wg.ad }}{% else %}{{ gh.ad }}{% endif %} - -{% if not snapshot %} -
- -Mailing list:{{ wg.list_email }}{% if info.prev_list_email %}
(previous lists: {% for a in info.prev_list_email %}{{ a }}{% if not forloop.last %}, {% else %}){% endif %}{% endfor %}{% endif %} -Mailing list subscribe:{{ wg.list_subscribe }}{% if info.prev_list_subscribe %}
(previous archives: {% for a in info.prev_list_subscribe %}{{ a }}{% if not forloop.last %}, {% endif %}{% endfor %}){% endif %} -Mailing list archive:{{ wg.list_archive }}{% if info.prev_list_archive %}
(previous archives: {% for a in info.prev_list_archive %}{{ a }}{% if not forloop.last %}, {% endif %}{% endfor %}){% endif %} -Other web sites:{% for a in wg.groupurl_set.all %}{{ a.url }} {% if a.name %}({{ a.name }}){% endif %}{% if not forloop.last %}
{% endif %}{% endfor %} - -
- -WG State: {{ wg.state|safe }} -{% ifnotequal wg.state_id "conclude" %}Charter State: {{ wg.charter.charter_state|safe }} {% ifequal wg.state_id "proposed" %}{% ifnotequal wg.charter.charter_state_id "notrev" %}(Initial Chartering){% endifnotequal %}{% else %}{% ifnotequal wg.charter.charter_state_id "approved" %}(Rechartering){% endifnotequal %}{% endifequal %}{% endifnotequal %} -{% ifequal wg.state_id "proposed" %} -{% if wg.comments %} -Reason for chartering:{{ wg.comments }} -{% endif %} -{% endifequal %} -{% ifequal wg.state_id "active" %} -{% ifnotequal wg.charter.charter_state_id "approved" %} -{% if wg.comments %} -Reason for rechartering:{{ wg.comments }} -{% endif %} -{% endifnotequal %} -{% endifequal %} - -
- -Last updated: {{ info.last_update|date:"Y-m-d"|default:"(data missing)" }} -
- -{% endif %}{# if not snapshot #} - -{% endblock record_metatable %} - -{% block record_metalinks %} -{% if not snapshot %} -
Atom feed -{% endif %} -{% endblock %} - -{% block charter_text %} -{% ifnotequal charter.rev "" %} -

Other versions: plain text

- -

Charter {{ charter.name }}-{{ rev }}

- -
-{{ content|fill:"80"|safe|linebreaksbr|keep_spacing|sanitize_html|safe }} -
- -{% else %} -

The WG does not yet have a charter

-{% endifnotequal %} -{% endblock %}{# charter_text #} - diff --git a/ietf/templates/wgrecord/record_tab_history.html b/ietf/templates/wgrecord/record_tab_history.html deleted file mode 100644 index f681ad914..000000000 --- a/ietf/templates/wgrecord/record_tab_history.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "wgrecord/record_main.html" %} -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% load ietf_filters %} - -{% block tab_content %} -{% include "wgrecord/charter_diffs.html" %} -

WG History

-{% if user|in_group:"Area_Director,Secretariat" %} - -{% endif %} - -{% include "wgrecord/record_history.html" %} -{% endblock tab_content %} diff --git a/ietf/templates/wgrecord/record_tab_writeup.html b/ietf/templates/wgrecord/record_tab_writeup.html deleted file mode 100644 index f080021d1..000000000 --- a/ietf/templates/wgrecord/record_tab_writeup.html +++ /dev/null @@ -1,37 +0,0 @@ -{% extends "wgrecord/record_main.html" %} -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% load ietf_filters %} - -{% block tab_content %} -

WG Review Announcement

-{% if user|in_group:"Area_Director,Secretariat" %} -
-

- -Edit WG Review Announcement - -

-{% endif %} -
-{{ info.review_text|escape|urlize }}
-
-
- -

WG Action Announcement

-{% if user|in_group:"Area_Director,Secretariat" %} -
-

- -Edit WG Action Announcement - -

-{% endif %} -
-{{ info.action_text|escape|urlize }}
-
- -
-{% endblock tab_content %} diff --git a/ietf/templates/wgrecord/search_form.html b/ietf/templates/wgrecord/search_form.html deleted file mode 100644 index d9f06c2ba..000000000 --- a/ietf/templates/wgrecord/search_form.html +++ /dev/null @@ -1,139 +0,0 @@ -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -
- -
- {{ form.nameacronym }} -
-
- - - - -
{{ form.inprocess }} WGs (in chartering process)
{{ form.active }} WGs (approved charter)
-
- - Advanced - -
- Additional search criteria: - -
- {{ form.state }} :: {{ form.charter_state }} -
-
- {{ form.ad }} -
-
- {{ form.area }} -
-
- {{ form.anyfield }} -
-
- {{ form.eacronym }} -
-
- -
- - - -
- -
- - diff --git a/ietf/templates/wgrecord/search_main.html b/ietf/templates/wgrecord/search_main.html deleted file mode 100644 index 5e01acb17..000000000 --- a/ietf/templates/wgrecord/search_main.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "base.html" %} -{% comment %} -Copyright 2011 The IETF Trust. All rights reserved. -{% endcomment %} - -{% block title %}Working Group Records{% endblock %} - -{% block content %} -

Working Group Records

- -
-{% include "wgrecord/search_form.html" %} -
- -
-{% if meta.searching %} -{% include "wgrecord/search_results.html" %} -{% endif %} -
-{% endblock content %} -{% block scripts %} -YAHOO.util.Event.onContentReady("search_submit_button", function () { - var oButton = new YAHOO.widget.Button("search_submit_button", {}); -}); -{% endblock scripts %} diff --git a/ietf/templates/wgrecord/search_result_row.html b/ietf/templates/wgrecord/search_result_row.html deleted file mode 100644 index 695940dba..000000000 --- a/ietf/templates/wgrecord/search_result_row.html +++ /dev/null @@ -1,13 +0,0 @@ -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% load ietf_filters %} - - -{{ wg.acronym|safe }} - -{{ wg.name }} -{% include "wgrecord/date_column.html" %} -{% include "wgrecord/status_columns.html" %} - diff --git a/ietf/templates/wgrecord/search_results.html b/ietf/templates/wgrecord/search_results.html deleted file mode 100644 index 84bc25bbd..000000000 --- a/ietf/templates/wgrecord/search_results.html +++ /dev/null @@ -1,22 +0,0 @@ -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} - -{% if meta.max %} -

Too many WGs match the query! Returning partial result only.

-{% endif %} -{% if not recs %} -

No WGs match your query.

-{% else %} - - - {% for hdr in meta.hdrs %} - {% include "wgrecord/table_header.html" %} - {% endfor %} - -{% for wg in recs %} -{% include "wgrecord/search_result_row.html" %} -{% endfor %} - -
-{% endif %} diff --git a/ietf/templates/wgrecord/send_ballot_comment.html b/ietf/templates/wgrecord/send_ballot_comment.html deleted file mode 100644 index 9539494f5..000000000 --- a/ietf/templates/wgrecord/send_ballot_comment.html +++ /dev/null @@ -1,40 +0,0 @@ -{% extends "base.html" %} -{% load ietf_filters %} -{% block title %}Send ballot position email for {{ ad }}{% endblock %} - -{% block morecss %} -form.send-ballot pre { - margin: 0; - padding: 4px; - border-top: 4px solid #eee; - border-bottom: 4px solid #eee; -} -{% endblock %} - -{% block content %} -

Send ballot position email for {{ ad }}

- -
- - - - - - - - - - - - - - - - -
From: {{ frm }}
To: {{ to }}
Cc:
- separated
by comma
Subject: {{ subject }}
Body:
{{ body|wrap_text }}
- Back - -
-
-{% endblock %} diff --git a/ietf/templates/wgrecord/states.html b/ietf/templates/wgrecord/states.html deleted file mode 100644 index e8950bb5b..000000000 --- a/ietf/templates/wgrecord/states.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "base.html" %} -{# Copyright The IETF Trust 2011, All Rights Reserved #} - -{% block title %}Charter States{% endblock %} - -{% block morecss %} - .state_column { - width: 13em; - } -{% endblock %} - -{% block content %} - -

Charter States

- - - - - - - - - - {% for state in states %} - - - - - {% endfor %} -
StateDescription
{{ state.name|escape }}{{ state.desc|escape }}
- -{% endblock %} diff --git a/ietf/templates/wgrecord/status_columns.html b/ietf/templates/wgrecord/status_columns.html deleted file mode 100644 index ee2a9b9b3..000000000 --- a/ietf/templates/wgrecord/status_columns.html +++ /dev/null @@ -1,17 +0,0 @@ -{% comment %} -Copyright The IETF Trust 2011, All Rights Reserved -{% endcomment %} -{% load ietf_filters ietf_streams %}{% load wg_ballot_icon %} - -{% if wg.charter %} -{{ wg.charter.charter_state|safe }} {% ifequal wg.state_id "proposed" %}{% ifnotequal wg.charter.charter_state_id "notrev" %}(Initial Chartering){% endifnotequal %}{% else %}{% ifnotequal wg.charter.charter_state_id "approved" %}(Rechartering){% endifnotequal %}{% endifequal %} -{% else %} -(data missing) -{% endif %} -{% if wg.charter.telechat_date %}
IESG Telechat: {{ wg.charter.telechat_date }}{% endif %} - -{% block extra_status %}{% endblock %} - - -{% ifequal wg.charter.charter_state_id "iesgrev" %}{% wg_ballot_icon wg.acronym %}{% endifequal %} - diff --git a/ietf/templates/wgrecord/submit.html b/ietf/templates/wgrecord/submit.html deleted file mode 100644 index 36cc12a10..000000000 --- a/ietf/templates/wgrecord/submit.html +++ /dev/null @@ -1,40 +0,0 @@ -{% extends "base.html" %} - -{% block morecss %} -form #id_content { - width: 40em; - height: 600px; -} -{% endblock %} - -{% block title %} -Charter submission for {{ wg.acronym }} -{% endblock %} - -{% block content %} -

Charter submission for {{ wg.acronym }}

- -

The text will be submitted as charter-ietf-{{ wg.acronym }}-{{ next_rev }}

-
- - {% for field in form.visible_fields %} - - - - - {% endfor %} - - - - -
{{ field.label_tag }}: - {{ field }} - {% if field.help_text %}
{{ field.help_text }}
{% endif %} - {{ field.errors }} -
- Back - -
-
- -{% endblock %} diff --git a/ietf/templates/wgrecord/table_header.html b/ietf/templates/wgrecord/table_header.html deleted file mode 100644 index 604a92536..000000000 --- a/ietf/templates/wgrecord/table_header.html +++ /dev/null @@ -1,15 +0,0 @@ -{# Copyright The IETF Trust 2011, All Rights Reserved #} - - - - - {% if hdr.selected %} - - {% else %} - - {% endif %} - - diff --git a/ietf/templates/wgrecord/wg_description.html b/ietf/templates/wgrecord/wg_description.html deleted file mode 100644 index 3084834d0..000000000 --- a/ietf/templates/wgrecord/wg_description.html +++ /dev/null @@ -1 +0,0 @@ -IETF Working Group {{ wg.name }} ({{ wg.acronym }}){% if wg.parent %} under the {{ wg.parent }}{% endif %} diff --git a/ietf/templates/wgrecord/wg_title.html b/ietf/templates/wgrecord/wg_title.html deleted file mode 100644 index 3b101b9e0..000000000 --- a/ietf/templates/wgrecord/wg_title.html +++ /dev/null @@ -1 +0,0 @@ -{{ wg.name }} ({{wg.acronym}}) diff --git a/ietf/wgrecord/__init__.py b/ietf/wgrecord/__init__.py deleted file mode 100644 index 792d60054..000000000 --- a/ietf/wgrecord/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/ietf/wgrecord/feeds.py b/ietf/wgrecord/feeds.py deleted file mode 100644 index 1a5fdd1e3..000000000 --- a/ietf/wgrecord/feeds.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright The IETF Trust 2011, All Rights Reserved - -from django.conf import settings -from django.contrib.syndication.feeds import Feed, FeedDoesNotExist -from django.utils.feedgenerator import Atom1Feed -from django.core.exceptions import ObjectDoesNotExist -from django.core.urlresolvers import reverse -from ietf.utils.history import find_history_active_at - -from redesign.group.models import Group -from ietf.wgrecord.views_rec import _get_history, _get_html -from wgrecord import markup_txt -import datetime -import re, os - -class GroupComments(Feed): - feed_type = Atom1Feed - title_template = "feeds/wg_record_title.html" - description_template = "feeds/wg_record_description.html" - def get_object(self, bits): - if len(bits) != 1: - raise ObjectDoesNotExist - return Group.objects.get(acronym=bits[0]) - - def title(self, obj): - return "WG Record changes for %s" % obj.acronym - - def link(self, obj): - if obj is None: - raise FeedDoesNotExist - return reverse('wg_view_record', kwargs={'name': obj.acronym}) - - def description(self, obj): - return self.title(obj) - - def items(self, obj): - history = _get_history(obj) - for h in history: - gh = find_history_active_at(obj, h['date']) - if gh: - h['chairs'] = [x.email.person.name for x in gh.rolehistory_set.filter(name__slug="chair")] - h['secr'] = [x.email.person.name for x in gh.rolehistory_set.filter(name__slug="secr")] - h['techadv'] = [x.email.person.name for x in gh.rolehistory_set.filter(name__slug="techadv")] - else: - h['chairs'] = [x.email.person.name for x in obj.role_set.filter(name__slug="chair")] - h['secr'] = [x.email.person.name for x in obj.role_set.filter(name__slug="secr")] - h['techadv'] = [x.email.person.name for x in obj.role_set.filter(name__slug="techadv")] - dh = find_history_active_at(obj.charter, h['date']) - if dh: - h['rev'] = dh.rev - h['charter'] = _get_html( - str(dh.name)+"-"+str(dh.rev)+",html", - os.path.join(dh.get_file_path(), dh.name+"-"+dh.rev+".txt")) - else: - h['rev'] = obj.charter.rev - h['charter'] = _get_html( - "charter-ietf-"+str(obj.acronym)+"-"+str(obj.charter.rev)+",html", - os.path.join(obj.charter.get_file_path(), "charter-ietf-"+obj.acronym+"-"+obj.charter.rev+".txt")) - return history - - def item_link(self, obj): - return reverse('wg_view_record', kwargs={'name': obj['group'].acronym}) - - def item_pubdate(self, obj): - return obj['date'] - - diff --git a/ietf/wgrecord/mails.py b/ietf/wgrecord/mails.py deleted file mode 100644 index 18cc1fa28..000000000 --- a/ietf/wgrecord/mails.py +++ /dev/null @@ -1,37 +0,0 @@ -# generation of mails - -import textwrap -from datetime import datetime, date, time, timedelta - -from django.template.loader import render_to_string -from django.utils.html import strip_tags -from django.conf import settings -from django.core.urlresolvers import reverse as urlreverse - -from ietf.utils.mail import send_mail, send_mail_text -from ietf.idtracker.models import * -from ietf.ipr.search import iprs_from_docs -from redesign.doc.models import WriteupDocEvent, BallotPositionDocEvent, LastCallDocEvent, DocAlias -from redesign.person.models import Person - -# These become part of the subject of the email -types = {} -types['state'] = "State changed" -types['state-notrev'] = "State changed to Not currently under review" -types['state-infrev'] = "State changed to Informal review" -types['state-intrev'] = "State changed to Internal review" -types['state-extrev'] = "State changed to External review" -types['state-iesgrev'] = "State changed to IESG review" -types['state-approved'] = "Charter approved" -types['conclude'] = "Request closing of WG" - -def email_secretariat(request, wg, type, text): - to = ["iesg-secretary@ietf.org"] - - text = strip_tags(text) - send_mail(request, to, None, - "Regarding WG %s: %s" % (wg.acronym, types[type]), - "wgrecord/email_secretariat.txt", - dict(text=text, - url=settings.IDTRACKER_BASE_URL + urlreverse('wg_view_record', kwargs=dict(name=wg.acronym)))) - diff --git a/ietf/wgrecord/markup_txt.py b/ietf/wgrecord/markup_txt.py deleted file mode 100644 index 7fa7ff5c9..000000000 --- a/ietf/wgrecord/markup_txt.py +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. Contact: Pasi Eronen -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# * Neither the name of the Nokia Corporation and/or its -# subsidiary(-ies) nor the names of its contributors may be used -# to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -from django.utils.html import escape -import string -import re - -def markup(content): - # normalize line endings to LF only - content = content.replace("\r\n", "\n") - content = content.replace("\r", "\n") - - # at this point, "content" is normal string - # fix most common non-ASCII characters - t1 = string.maketrans("\x91\x92\x93\x94\x95\x96\x97\xc6\xe8\xe9", "\'\'\"\"o--\'ee") - # map everything except printable ASCII, TAB, LF, FF to "?" - t2 = string.maketrans('','') - t3 = "?"*9 + "\t\n?\f" + "?"*19 + t2[32:127] + "?"*129 - t4 = t1.translate(t3) - content = content.translate(t4) - - # remove leading white space - content = content.lstrip() - # remove runs of blank lines - content = re.sub("\n\n\n+", "\n\n", content) - - # expand tabs + escape - content = escape(content.expandtabs()) - - content = re.sub("\n(.+\[Page \d+\])\n\f\n(.+)\n", """\n\g<1>\n\g<2>\n""", content) - content = re.sub("\n(.+\[Page \d+\])\n\s*$", """\n\g<1>\n""", content) - # remove remaining FFs (to be valid XHTML) - content = content.replace("\f","\n") - - content = re.sub("\n\n([0-9]+\\.|[A-Z]\\.[0-9]|Appendix|Status of|Abstract|Table of|Full Copyright|Copyright|Intellectual Property|Acknowled|Author|Index)(.*)(?=\n\n)", """\n\n\g<1>\g<2>""", content) - - return "
"+content+"
\n" diff --git a/ietf/wgrecord/models.py b/ietf/wgrecord/models.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/ietf/wgrecord/templatetags/__init__.py b/ietf/wgrecord/templatetags/__init__.py deleted file mode 100644 index 792d60054..000000000 --- a/ietf/wgrecord/templatetags/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/ietf/wgrecord/templatetags/wg_ballot_icon.py b/ietf/wgrecord/templatetags/wg_ballot_icon.py deleted file mode 100644 index 712e36e4f..000000000 --- a/ietf/wgrecord/templatetags/wg_ballot_icon.py +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright The IETF Trust 2011, All Rights Reserved - -from django import template -from django.core.urlresolvers import reverse as urlreverse -from django.conf import settings -from ietf.idtracker.templatetags.ietf_filters import in_group, timesince_days -from redesign.doc.models import GroupBallotPositionDocEvent -from redesign.person.models import Person -from redesign.group.models import Group - -register = template.Library() - -def get_user_adid(context): - if 'user' in context and in_group(context['user'], "Area_Director"): - return context['user'].get_profile().id - else: - return None - -def get_user_name(context): - if 'user' in context and context['user'].is_authenticated(): - from person.models import Person - try: - return context['user'].get_profile().name - except Person.DoesNotExist: - return None - -def render_ballot_icon(context, name): - wg = Group.objects.get(acronym=name) - doc = wg.charter - adId = get_user_adid(context) - red = 0 - green = 0 - yellow = 0 - gray = 0 - blank = 0 - my = None - - active_ads = list(Person.objects.filter(email__role__name="ad", - email__role__group__type="area", - email__role__group__state="active").distinct()) - started_process = doc.latest_event(type="started_iesg_process") - latest_positions = [] - for p in active_ads: - p_pos = list(GroupBallotPositionDocEvent.objects.filter(doc=doc, ad=p).order_by("-time")) - if p_pos != []: - latest_positions.append(p_pos[0]) - for p in latest_positions: - if not p.pos_id: - blank = blank + 1 - elif (p.pos_id == "yes"): - green = green + 1 - elif (p.pos_id == "no"): - green = green + 1 - elif (p.pos_id == "block"): - red = red + 1 - elif (p.pos_id == "abstain"): - yellow = yellow + 1 - else: - blank = blank + 1 - if adId and (p.ad_id == adId): - my = p.pos.name - return render_ballot_icon2(wg.acronym, red,yellow,green,gray,blank, my, adId)+"" - -def render_ballot_icon2(acronym, red,yellow,green,gray,blank, my, adId): - edit_position_url = urlreverse('wg_edit_position', kwargs=dict(name=acronym)) - if adId: - res_cm = ' oncontextmenu="editWGBallot(\''+str(edit_position_url)+'\');return false;"' - else: - res_cm = '' - res = '' - for y in range(3): - res = res + "" - for x in range(5): - myMark = False - if red > 0: - c = "ballot_icon_red" - red = red - 1 - myMark = (my == "Block") - elif yellow > 0: - c = "ballot_icon_yellow" - yellow = yellow - 1 - myMark = (my == "Abstain") - elif green > 0: - c = "ballot_icon_green" - green = green - 1 - myMark = (my == "Yes") or (my == "No") - else: - c = "" - myMark = (y == 2) and (x == 4) and (my == "No Record") - if myMark: - res = res + '' - res = res + '
' - my = None - else: - res = res + '' - res = res + '
' - return res - - -class BallotIconNode(template.Node): - def __init__(self, doc_var): - self.doc_var = doc_var - def render(self, context): - doc = template.resolve_variable(self.doc_var, context) - return render_ballot_icon(context, doc) - -def do_ballot_icon(parser, token): - try: - tagName, docName = token.split_contents() - except ValueError: - raise template.TemplateSyntaxError, "%r tag requires exactly two arguments" % token.contents.split()[0] - return BallotIconNode(docName) - -register.tag('wg_ballot_icon', do_ballot_icon) - -@register.filter -def my_position(doc, user): - user_name = get_user_name({'user':user}) - p_pos = list(GroupBallotPositionDocEvent.objects.filter(doc=doc, ad=Person.objects.get(user__name=user_name)).order_by("-time")) - if p_pos == []: - return "No record" - else: - return p_pos[0].pos.name - diff --git a/ietf/wgrecord/tests.py b/ietf/wgrecord/tests.py deleted file mode 100644 index c6076ebce..000000000 --- a/ietf/wgrecord/tests.py +++ /dev/null @@ -1,654 +0,0 @@ -# Copyright The IETF Trust 2011, All Rights Reserved - -import os -import unittest -import django.test -from django.conf import settings -from ietf.utils.test_utils import SimpleUrlTestCase -from ietf.utils.test_runner import mail_outbox -from ietf.utils.test_data import make_test_data -from ietf.utils.test_utils import SimpleUrlTestCase, RealDatabaseTest, login_testing_unauthorized - -import datetime -from pyquery import PyQuery -from tempfile import NamedTemporaryFile - -from django.contrib.auth.models import User -from doc.models import * -from group.models import * -from name.models import * -from person.models import * -from name.utils import name - -from utils import * - -class WgUrlTestCase(SimpleUrlTestCase): - def testUrls(self): - self.doTestUrls(__file__) - - def setUp(self, *args, **kwargs): - super(WgUrlTestCase, self).setUp(*args, **kwargs) - # Make test data (because we use the new schema) - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - active = name(GroupStateName, "active", "Active") - approved = name(CharterDocStateName, "approved", "Approved") - -class WgFileTestCase(django.test.TestCase): - def testFileExistence(self): - print " Testing if WG charter texts exist locally" - fpath = os.path.join(settings.CHARTER_PATH, "charter-ietf-core-01.txt") - if not os.path.exists(fpath): - print "\nERROR: charter text not found in "+settings.CHARTER_PATH - print "Needed for testing WG record pages." - print "Remember to set CHARTER_PATH in settings.py\n" - else: - print "OK (seem to exist)" - -class WgStateTestCase(django.test.TestCase): - fixtures = ['names'] - - def test_change_state(self): - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - active = name(GroupStateName, "active", "Active") - notrev=name(CharterDocStateName, slug="notrev", name="Not currently under review") - infrev=name(CharterDocStateName, slug="infrev", name="Informal IESG review") - intrev=name(CharterDocStateName, slug="intrev", name="Internal review") - extrev=name(CharterDocStateName, slug="extrev", name="External review") - iesgrev=name(CharterDocStateName, slug="iesgrev", name="IESG review") - approved=name(CharterDocStateName, slug="approved", name="Approved") - - # And make a charter for group - group = Group.objects.get(acronym="mars") - charter = set_or_create_charter(group) - - charter.charter_state = infrev - charter.save() - - # -- Test change state -- - url = urlreverse('wg_change_state', kwargs=dict(name=group.acronym)) - login_testing_unauthorized(self, "secretary", url) - - first_state = charter.charter_state - - # normal get - r = self.client.get(url) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertEquals(len(q('form select[name=state]')), 1) - - # faulty post - r = self.client.post(url, dict(state="foobarbaz")) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertTrue(len(q('form ul.errorlist')) > 0) - self.assertEquals(charter.charter_state, first_state) - - # change state - for s in ("intrev", "extrev", "iesgrev", "approved"): - events_before = charter.docevent_set.count() - mailbox_before = len(mail_outbox) - - r = self.client.post(url, dict(state="active", charter_state=s, message="test message")) - self.assertEquals(r.status_code, 302) - - charter = Document.objects.get(name="charter-ietf-%s" % group.acronym) - self.assertEquals(charter.charter_state_id, s) - self.assertEquals(charter.docevent_set.count(), events_before + 1) - self.assertTrue("State changed" in charter.docevent_set.all()[0].desc) - if s == "extrev": - self.assertEquals(len(mail_outbox), mailbox_before + 2) - self.assertTrue("State changed" in mail_outbox[-1]['Subject']) - self.assertTrue("State changed" in mail_outbox[-2]['Subject']) - else: - self.assertEquals(len(mail_outbox), mailbox_before + 1) - if s == "approved": - self.assertTrue("Charter approved" in mail_outbox[-1]['Subject']) - else: - self.assertTrue("State changed" in mail_outbox[-1]['Subject']) - - def test_conclude(self): - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - active = name(GroupStateName, "active", "Active") - notrev=name(CharterDocStateName, slug="notrev", name="Not currently under review") - infrev=name(CharterDocStateName, slug="infrev", name="Informal IESG review") - intrev=name(CharterDocStateName, slug="intrev", name="Internal review") - extrev=name(CharterDocStateName, slug="extrev", name="External review") - iesgrev=name(CharterDocStateName, slug="iesgrev", name="IESG review") - approved=name(CharterDocStateName, slug="approved", name="Approved") - - # And make a charter for group - group = Group.objects.get(acronym="mars") - charter = set_or_create_charter(group) - - charter.charter_state = approved - charter.save() - - # -- Test conclude WG -- - url = urlreverse('wg_conclude', kwargs=dict(name=group.acronym)) - login_testing_unauthorized(self, "secretary", url) - - # normal get - r = self.client.get(url) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertEquals(len(q('form textarea[name=instructions]')), 1) - - # faulty post - r = self.client.post(url, dict(instructions="")) # No instructions - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertTrue(len(q('form ul.errorlist')) > 0) - group = Group.objects.get(acronym="mars") - - # conclusion request - r = self.client.post(url, dict(instructions="Test instructions")) - self.assertEquals(r.status_code, 302) - # The WG remains active until the state is set to conclude via change_state - self.assertEquals(group.state_id, "active") - -class WgInfoTestCase(django.test.TestCase): - fixtures = ['names'] - - def test_create(self): - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - active = name(GroupStateName, "active", "Active") - notrev=name(CharterDocStateName, slug="notrev", name="Not currently under review") - infrev=name(CharterDocStateName, slug="infrev", name="Informal IESG review") - intrev=name(CharterDocStateName, slug="intrev", name="Internal review") - extrev=name(CharterDocStateName, slug="extrev", name="External review") - iesgrev=name(CharterDocStateName, slug="iesgrev", name="IESG review") - approved=name(CharterDocStateName, slug="approved", name="Approved") - - # -- Test WG creation -- - url = urlreverse('wg_create') - login_testing_unauthorized(self, "secretary", url) - - num_wgs = len(Group.objects.filter(type="wg")) - - # normal get - r = self.client.get(url) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertEquals(len(q('form input[name=acronym]')), 1) - - # faulty post - r = self.client.post(url, dict(acronym="foobarbaz")) # No name - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertTrue(len(q('form ul.errorlist')) > 0) - self.assertEquals(len(Group.objects.filter(type="wg")), num_wgs) - - # creation - r = self.client.post(url, dict(acronym="testwg", name="Testing WG")) - self.assertEquals(r.status_code, 302) - self.assertEquals(len(Group.objects.filter(type="wg")), num_wgs + 1) - group = Group.objects.get(acronym="testwg") - self.assertEquals(group.name, "Testing WG") - # check that a charter was created with the correct name - self.assertEquals(group.charter.name, "charter-ietf-testwg") - # and that it has no revision - self.assertEquals(group.charter.rev, "") - - - def test_edit_info(self): - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - active = name(GroupStateName, "active", "Active") - notrev=name(CharterDocStateName, slug="notrev", name="Not currently under review") - infrev=name(CharterDocStateName, slug="infrev", name="Informal IESG review") - intrev=name(CharterDocStateName, slug="intrev", name="Internal review") - extrev=name(CharterDocStateName, slug="extrev", name="External review") - iesgrev=name(CharterDocStateName, slug="iesgrev", name="IESG review") - approved=name(CharterDocStateName, slug="approved", name="Approved") - - # And make a charter for group - group = Group.objects.get(acronym="mars") - charter = set_or_create_charter(group) - - url = urlreverse('wg_edit_info', kwargs=dict(name=group.acronym)) - login_testing_unauthorized(self, "secretary", url) - - # normal get - r = self.client.get(url) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertEquals(len(q('form select[name=parent]')), 1) - self.assertEquals(len(q('form input[name=acronym]')), 1) - - # faulty post - Group.objects.create(name="Collision Test Group", acronym="collide") - r = self.client.post(url, dict(acronym="collide")) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertTrue(len(q('form ul.errorlist')) > 0) - - # Create old acronym - group.acronym = "oldmars" - group.save() - save_group_in_history(group) - group.acronym = "mars" - group.save() - - # post with warning - r = self.client.post(url, dict(acronym="oldmars")) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertTrue(len(q('form ul.errorlist')) > 0) - - # edit info - r = self.client.post(url, - dict(name="Mars Not Special Interest Group", - acronym="mnsig", - parent=2, - ad=1, - chairs="aread@ietf.org", - secr="aread@ietf.org", - techadv="aread@ietf.org", - list_email="mars@mail", - list_subscribe="subscribe.mars", - list_archive="archive.mars", - urls="http://mars.mars (MARS site)" - )) - self.assertEquals(r.status_code, 302) - - group = Group.objects.get(acronym="mnsig") - self.assertEquals(group.name, "Mars Not Special Interest Group") - self.assertEquals(group.parent_id, 2) - self.assertEquals(group.ad.name, "Aread Irector") - for k in ("chair", "secr", "techadv"): - self.assertEquals(group.role_set.filter(name="chair")[0].email.address, "aread@ietf.org") - self.assertEquals(group.list_email, "mars@mail") - self.assertEquals(group.list_subscribe, "subscribe.mars") - self.assertEquals(group.list_archive, "archive.mars") - self.assertEquals(group.groupurl_set.all()[0].url, "http://mars.mars") - self.assertEquals(group.groupurl_set.all()[0].name, "MARS site") - - def test_edit_telechat_date(self): - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - active = name(GroupStateName, "active", "Active") - notrev=name(CharterDocStateName, slug="notrev", name="Not currently under review") - infrev=name(CharterDocStateName, slug="infrev", name="Informal IESG review") - intrev=name(CharterDocStateName, slug="intrev", name="Internal review") - extrev=name(CharterDocStateName, slug="extrev", name="External review") - iesgrev=name(CharterDocStateName, slug="iesgrev", name="IESG review") - approved=name(CharterDocStateName, slug="approved", name="Approved") - - # And make a charter for group - group = Group.objects.get(acronym="mars") - charter = set_or_create_charter(group) - - url = urlreverse('wg_edit_info', kwargs=dict(name=group.acronym)) - login_testing_unauthorized(self, "secretary", url) - - from ietf.iesg.models import TelechatDates - - # add to telechat - self.assertTrue(not charter.latest_event(TelechatDocEvent, "scheduled_for_telechat")) - telechat_date = TelechatDates.objects.all()[0].date1.isoformat() - r = self.client.post(url, dict(name=group.name, acronym=group.acronym, telechat_date=telechat_date)) - self.assertEquals(r.status_code, 302) - - charter = Document.objects.get(name=charter.name) - self.assertTrue(charter.latest_event(TelechatDocEvent, "scheduled_for_telechat")) - self.assertEquals(charter.latest_event(TelechatDocEvent, "scheduled_for_telechat").telechat_date, TelechatDates.objects.all()[0].date1) - - # change telechat - telechat_date = TelechatDates.objects.all()[0].date2.isoformat() - r = self.client.post(url, dict(name=group.name, acronym=group.acronym, telechat_date=telechat_date)) - self.assertEquals(r.status_code, 302) - - charter = Document.objects.get(name=charter.name) - self.assertEquals(charter.latest_event(TelechatDocEvent, "scheduled_for_telechat").telechat_date, TelechatDates.objects.all()[0].date2) - - # remove from agenda - telechat_date = "" - r = self.client.post(url, dict(name=group.name, acronym=group.acronym, telechat_date=telechat_date)) - self.assertEquals(r.status_code, 302) - - charter = Document.objects.get(name=charter.name) - self.assertTrue(not charter.latest_event(TelechatDocEvent, "scheduled_for_telechat").telechat_date) - - def test_submit_charter(self): - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - active = name(GroupStateName, "active", "Active") - notrev=name(CharterDocStateName, slug="notrev", name="Not currently under review") - infrev=name(CharterDocStateName, slug="infrev", name="Informal IESG review") - intrev=name(CharterDocStateName, slug="intrev", name="Internal review") - extrev=name(CharterDocStateName, slug="extrev", name="External review") - iesgrev=name(CharterDocStateName, slug="iesgrev", name="IESG review") - approved=name(CharterDocStateName, slug="approved", name="Approved") - - # And make a charter for group - group = Group.objects.get(acronym="mars") - charter = set_or_create_charter(group) - - url = urlreverse('wg_submit', kwargs=dict(name=group.acronym)) - login_testing_unauthorized(self, "secretary", url) - - # normal get - r = self.client.get(url) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertEquals(len(q('form input[name=txt]')), 1) - - prev_rev = charter.rev - - file = NamedTemporaryFile() - file.write("Test content") - file.seek(0) - - r = self.client.post(url, dict(txt=file)) - self.assertEquals(r.status_code, 302) - - file.close() - - charter = Document.objects.get(name="charter-ietf-mars") - self.assertEquals(charter.rev, next_revision(prev_rev)) - self.assertTrue("new_revision" in charter.latest_event().type) - -class WgAddCommentTestCase(django.test.TestCase): - fixtures = ['names'] - - def test_add_comment(self): - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - active = name(GroupStateName, "active", "Active") - notrev=name(CharterDocStateName, slug="notrev", name="Not currently under review") - infrev=name(CharterDocStateName, slug="infrev", name="Informal IESG review") - intrev=name(CharterDocStateName, slug="intrev", name="Internal review") - extrev=name(CharterDocStateName, slug="extrev", name="External review") - iesgrev=name(CharterDocStateName, slug="iesgrev", name="IESG review") - approved=name(CharterDocStateName, slug="approved", name="Approved") - - group = Group.objects.get(acronym="mars") - url = urlreverse('wg_add_comment', kwargs=dict(name=group.acronym)) - login_testing_unauthorized(self, "secretary", url) - - # normal get - r = self.client.get(url) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertEquals(len(q('form textarea[name=comment]')), 1) - - # request resurrect - comments_before = group.groupevent_set.filter(type="added_comment").count() - - r = self.client.post(url, dict(comment="This is a test.")) - self.assertEquals(r.status_code, 302) - - self.assertEquals(group.groupevent_set.filter(type="added_comment").count(), comments_before + 1) - self.assertTrue("This is a test." in group.groupevent_set.filter(type="added_comment").order_by('-time')[0].desc) - -class WgEditPositionTestCase(django.test.TestCase): - fixtures = ['names', 'ballot'] - - def test_edit_position(self): - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - active = name(GroupStateName, "active", "Active") - notrev=name(CharterDocStateName, slug="notrev", name="Not currently under review") - infrev=name(CharterDocStateName, slug="infrev", name="Informal IESG review") - intrev=name(CharterDocStateName, slug="intrev", name="Internal review") - extrev=name(CharterDocStateName, slug="extrev", name="External review") - iesgrev=name(CharterDocStateName, slug="iesgrev", name="IESG review") - approved=name(CharterDocStateName, slug="approved", name="Approved") - no = name(GroupBallotPositionName, 'no', 'No'), - yes = name(GroupBallotPositionName, 'yes', 'Yes'), - abstain = name(GroupBallotPositionName, 'abstain', 'Abstain'), - block = name(GroupBallotPositionName, 'block', 'Block'), - norecord = name(GroupBallotPositionName, 'norecord', 'No record'), - - group = Group.objects.get(acronym="mars") - url = urlreverse('wg_edit_position', kwargs=dict(name=group.acronym)) - login_testing_unauthorized(self, "ad", url) - - charter = set_or_create_charter(group) - - p = Person.objects.get(name="Aread Irector") - - e = DocEvent() - e.type = "started_iesg_process" - e.by = p - e.doc = charter - e.desc = "IESG process started" - e.save() - - charter.charter_state = iesgrev - charter.save() - - # normal get - r = self.client.get(url) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertTrue(len(q('form input[name=position]')) > 0) - self.assertEquals(len(q('form textarea[name=comment]')), 1) - - # vote - pos_before = charter.docevent_set.filter(type="changed_ballot_position").count() - self.assertTrue(not charter.docevent_set.filter(type="changed_ballot_position", by__name="Aread Irector")) - - r = self.client.post(url, dict(position="block", - block_comment="This is a blocking test.", - comment="This is a test.")) - self.assertEquals(r.status_code, 302) - - self.assertEquals(charter.docevent_set.filter(type="changed_ballot_position").count(), pos_before + 1) - e = charter.latest_event(GroupBallotPositionDocEvent) - self.assertTrue("This is a blocking test." in e.block_comment) - self.assertTrue("This is a test." in e.comment) - self.assertTrue(e.pos_id, "block") - - # recast vote - pos_before = charter.docevent_set.filter(type="changed_ballot_position").count() - - r = self.client.post(url, dict(position="yes")) - self.assertEquals(r.status_code, 302) - - self.assertEquals(charter.docevent_set.filter(type="changed_ballot_position").count(), pos_before + 1) - e = charter.latest_event(GroupBallotPositionDocEvent) - self.assertTrue(e.pos_id, "yes") - - # clear vote - pos_before = charter.docevent_set.filter(type="changed_ballot_position").count() - - r = self.client.post(url, dict(position="norecord")) - self.assertEquals(r.status_code, 302) - - self.assertEquals(charter.docevent_set.filter(type="changed_ballot_position").count(), pos_before + 1) - e = charter.latest_event(GroupBallotPositionDocEvent) - self.assertTrue(e.pos_id, "norecord") - - def test_edit_position_as_secretary(self): - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - active = name(GroupStateName, "active", "Active") - notrev=name(CharterDocStateName, slug="notrev", name="Not currently under review") - infrev=name(CharterDocStateName, slug="infrev", name="Informal IESG review") - intrev=name(CharterDocStateName, slug="intrev", name="Internal review") - extrev=name(CharterDocStateName, slug="extrev", name="External review") - iesgrev=name(CharterDocStateName, slug="iesgrev", name="IESG review") - approved=name(CharterDocStateName, slug="approved", name="Approved") - no = name(GroupBallotPositionName, 'no', 'No'), - yes = name(GroupBallotPositionName, 'yes', 'Yes'), - abstain = name(GroupBallotPositionName, 'abstain', 'Abstain'), - block = name(GroupBallotPositionName, 'block', 'Block'), - norecord = name(GroupBallotPositionName, 'norecord', 'No record'), - - group = Group.objects.get(acronym="mars") - url = urlreverse('wg_edit_position', kwargs=dict(name=group.acronym)) - p = Person.objects.get(name="Aread Irector") - url += "?ad=%d" % p.id - login_testing_unauthorized(self, "secretary", url) - - charter = set_or_create_charter(group) - - e = DocEvent() - e.type = "started_iesg_process" - e.by = p - e.doc = charter - e.desc = "IESG process started" - e.save() - - charter.charter_state = iesgrev - charter.save() - - # normal get - r = self.client.get(url) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertTrue(len(q('form input[name=position]')) > 0) - - # vote for rhousley - pos_before = charter.docevent_set.filter(type="changed_ballot_position").count() - self.assertTrue(not charter.docevent_set.filter(type="changed_ballot_position", by__name="Sec Retary")) - - r = self.client.post(url, dict(position="no")) - self.assertEquals(r.status_code, 302) - - self.assertEquals(charter.docevent_set.filter(type="changed_ballot_position").count(), pos_before + 1) - e = charter.latest_event(GroupBallotPositionDocEvent) - self.assertTrue(e.pos_id, "no") - - def test_send_ballot_comment(self): - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - active = name(GroupStateName, "active", "Active") - notrev=name(CharterDocStateName, slug="notrev", name="Not currently under review") - infrev=name(CharterDocStateName, slug="infrev", name="Informal IESG review") - intrev=name(CharterDocStateName, slug="intrev", name="Internal review") - extrev=name(CharterDocStateName, slug="extrev", name="External review") - iesgrev=name(CharterDocStateName, slug="iesgrev", name="IESG review") - approved=name(CharterDocStateName, slug="approved", name="Approved") - no = name(GroupBallotPositionName, 'no', 'No'), - yes = name(GroupBallotPositionName, 'yes', 'Yes'), - abstain = name(GroupBallotPositionName, 'abstain', 'Abstain'), - block = name(GroupBallotPositionName, 'block', 'Block'), - norecord = name(GroupBallotPositionName, 'norecord', 'No record'), - - group = Group.objects.get(acronym="mars") - url = urlreverse('wg_send_ballot_comment', kwargs=dict(name=group.acronym)) - login_testing_unauthorized(self, "ad", url) - - charter = set_or_create_charter(group) - - p = Person.objects.get(name="Aread Irector") - - e = DocEvent() - e.type = "started_iesg_process" - e.by = p - e.doc = charter - e.desc = "IESG process started" - e.save() - - charter.charter_state = iesgrev - charter.save() - - GroupBallotPositionDocEvent.objects.create( - doc=charter, - by=p, - type="changed_ballot_position", - pos=GroupBallotPositionName.objects.get(slug="block"), - ad=p, - block_comment="This is a block test", - comment="This is a test", - ) - - # normal get - r = self.client.get(url) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertTrue(len(q('form input[name="cc"]')) > 0) - - # send - p = Person.objects.get(name="Aread Irector") - mailbox_before = len(mail_outbox) - - r = self.client.post(url, dict(cc="test@example.com", cc_state_change="1")) - self.assertEquals(r.status_code, 302) - - self.assertEquals(len(mail_outbox), mailbox_before + 1) - self.assertTrue("BLOCKING COMMENT" in mail_outbox[-1]['Subject']) - self.assertTrue("COMMENT" in mail_outbox[-1]['Subject']) - -class WgApproveBallotTestCase(django.test.TestCase): - fixtures = ['base', 'names', 'ballot'] - - def test_approve_ballot(self): - make_test_data() - # Make sure all relevant names are created - type_charter = name(DocTypeName, "charter", "Charter") - proposed = name(GroupStateName, "proposed", "Proposed") - active = name(GroupStateName, "active", "Active") - notrev=name(CharterDocStateName, slug="notrev", name="Not currently under review") - infrev=name(CharterDocStateName, slug="infrev", name="Informal IESG review") - intrev=name(CharterDocStateName, slug="intrev", name="Internal review") - extrev=name(CharterDocStateName, slug="extrev", name="External review") - iesgrev=name(CharterDocStateName, slug="iesgrev", name="IESG review") - approved=name(CharterDocStateName, slug="approved", name="Approved") - no = name(GroupBallotPositionName, 'no', 'No'), - yes = name(GroupBallotPositionName, 'yes', 'Yes'), - abstain = name(GroupBallotPositionName, 'abstain', 'Abstain'), - block = name(GroupBallotPositionName, 'block', 'Block'), - norecord = name(GroupBallotPositionName, 'norecord', 'No record'), - - group = Group.objects.get(acronym="mars") - url = urlreverse('wg_approve_ballot', kwargs=dict(name=group.acronym)) - login_testing_unauthorized(self, "secretary", url) - - charter = set_or_create_charter(group) - - p = Person.objects.get(name="Aread Irector") - - e = DocEvent() - e.type = "started_iesg_process" - e.by = p - e.doc = charter - e.desc = "IESG process started" - e.save() - - charter.charter_state = iesgrev - charter.save() - - # normal get - r = self.client.get(url) - self.assertEquals(r.status_code, 200) - q = PyQuery(r.content) - self.assertTrue("Send out the announcement" in q('input[type=submit]')[0].get('value')) - self.assertEquals(len(q('pre')), 1) - - # approve - mailbox_before = len(mail_outbox) - - # Dont copy the actual txt file - from django.conf import settings - settings.DONT_COPY_CHARTER_ON_APPROVE = True - - r = self.client.post(url, dict()) - self.assertEquals(r.status_code, 302) - - charter = Document.objects.get(name=charter.name) - self.assertEquals(charter.charter_state_id, "approved") - - self.assertEquals(charter.rev, "01") - - self.assertEquals(len(mail_outbox), mailbox_before + 2) - - self.assertTrue("WG Action" in mail_outbox[-1]['Subject']) - self.assertTrue("Charter approved" in mail_outbox[-2]['Subject']) diff --git a/ietf/wgrecord/testurl.list b/ietf/wgrecord/testurl.list deleted file mode 100644 index 7d1eb8c91..000000000 --- a/ietf/wgrecord/testurl.list +++ /dev/null @@ -1,55 +0,0 @@ -200 / -200 /wgrecord/ - -# In IESG process -200 /wgrecord/in_process/ - -# by AD -# current AD -- needs to be updated at some point -200 /wgrecord/ad/aread.irector/ -# former AD -200 /wgrecord/ad/exaread.irector/ -404 /wgrecord/ad/no.body/ - -# create -302 /wgrecord/create/ - -# WG -200 /wgrecord/mars/ -200 /wgrecord/mars/00-00/ -200 /wgrecord/mars/_ballot.data - -# Edit WG -302 /wgrecord/mars/edit/state/ -302 /wgrecord/mars/edit/info/ -302 /wgrecord/mars/edit/conclude/ -302 /wgrecord/mars/edit/addcomment/ -302 /wgrecord/mars/edit/action/ -302 /wgrecord/mars/edit/review/ - -# ballots -302 /wgrecord/mars/edit/position/ -302 /wgrecord/mars/edit/sendballotcomment/ -302 /wgrecord/mars/edit/approveballot/ - -# submission of charters -302 /wgrecord/mars/submit/ - -# search -200 /wgrecord/search/ -302 /wgrecord/search/?name=martian -200 /wgrecord/search/?name=something -200 /wgrecord/search/?name=something&by=acronym&acronym=some -200 /wgrecord/search/?name=something&by=state&state=active&charter_state= -200 /wgrecord/search/?name=something&by=state&state=&charter_state=approved -200 /wgrecord/search/?name=something&by=ad&ad=1 -200 /wgrecord/search/?name=something&by=area&area=2 -200 /wgrecord/search/?name=something&by=anyfield&anyfield=something -200 /wgrecord/search/?name=something&by=eacronym&eacronym=someold - -# searchPerson (ajax) -200 /wgrecord/searchPerson/ - -# - - diff --git a/ietf/wgrecord/urls.py b/ietf/wgrecord/urls.py deleted file mode 100644 index c22fbe1d6..000000000 --- a/ietf/wgrecord/urls.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright The IETF Trust 2011, All Rights Reserved - -from django.conf.urls.defaults import patterns, url -from ietf.wgrecord import views_rec, views_search, views_edit, views_ballot, views_submit -from redesign.name.models import CharterDocStateName - -urlpatterns = patterns('django.views.generic.simple', - url(r'^help/state/$', 'direct_to_template', { 'template': 'wgrecord/states.html', 'extra_context': { 'states': CharterDocStateName.objects.all() } }, name='help_charter_states'), -) -urlpatterns += patterns('', - (r'^/?$', views_search.search_main), - url(r'^create/$', views_edit.edit_info, name="wg_create"), - (r'^search/$', views_search.search_results), - (r'^searchPerson/$', views_search.search_person), - url(r'^ad/(?P[A-Za-z0-9.-]+)/$', views_search.by_ad, name="wg_search_by_ad"), - url(r'^in_process/$', views_search.in_process, name="wg_search_in_process"), - url(r'^(?P[A-Za-z0-9._+-]+)/((?P[0-9][0-9](-[0-9][0-9])?)/)?((?Pballot|writeup|history)/)?$', views_rec.wg_main, name="wg_view_record"), - (r'^(?P[A-Za-z0-9._+-]+)/_ballot.data$', views_rec.wg_ballot), - url(r'^(?P[A-Za-z0-9._+-]+)/edit/state/$', views_edit.change_state, name='wg_change_state'), - url(r'^(?P[A-Za-z0-9._+-]+)/edit/(?P