' % (snipped, full))
+ return full
+
def _test():
import doctest
doctest.testmod()
diff --git a/ietf/templates/wginfo/history.html b/ietf/templates/wginfo/history.html
new file mode 100644
index 000000000..d064b4a5d
--- /dev/null
+++ b/ietf/templates/wginfo/history.html
@@ -0,0 +1,25 @@
+{% extends "wginfo/wg_base.html" %}
+{% load ietf_filters %}
+
+{% block wg_titledetail %}History{% endblock %}
+
+{% block wg_content %}
+{% load ietf_filters %}
+
+
+ Date | By | Text |
+ {% for e in events %}
+
+ {{ e.time|date:"Y-m-d"}} |
+ {{ e.by.name }} |
+ {{ e.desc|format_history_text }} |
+
+ {% endfor %}
+
+{% endblock %}
+
+{% block content_end %}
+
+{% endblock %}
diff --git a/ietf/templates/wginfo/wg_base.html b/ietf/templates/wginfo/wg_base.html
index 26dfea424..7fcb6788a 100644
--- a/ietf/templates/wginfo/wg_base.html
+++ b/ietf/templates/wginfo/wg_base.html
@@ -58,9 +58,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-{% ifequal selected "documents" %}
Documents{% else %}
Documents{% endifequal %} |
-{% ifequal selected "charter" %}
Charter{% else %}
Charter{% endifequal %} |
+{% ifequal selected "documents" %}
Documents{% else %}
Documents{% endifequal %} |
+{% ifequal selected "charter" %}
Charter{% else %}
Charter{% endifequal %} |
{% wgchairs_admin_options wg %}
+
History |
{% if wg.clean_email_archive|startswith:"http:" or wg.clean_email_archive|startswith:"ftp:" %}
List Archive » |
{% endif %}
diff --git a/ietf/wgcharter/views.py b/ietf/wgcharter/views.py
index 92c32026a..b15a4c00f 100644
--- a/ietf/wgcharter/views.py
+++ b/ietf/wgcharter/views.py
@@ -84,7 +84,7 @@ def wg_main(request, name, rev, tab):
"charter-ietf-"+str(gh.acronym)+"-"+str(ch.rev)+".txt",
os.path.join(file_path, "charter-ietf-"+gh.acronym+"-"+ch.rev+".txt"))
active_ads = Person.objects.filter(email__role__name="ad", email__role__group__state="active").distinct()
- started_process = datetime.datetime.min
+ started_process = datetime.min
e = wg.charter.latest_event(type="started_iesg_process")
if e:
started_process = e.time
@@ -148,17 +148,6 @@ def wg_main(request, name, rev, tab):
def _get_history(wg, versions=None):
results = []
- for e in wg.groupevent_set.all().select_related('by').order_by('-time', 'id'):
- info = {}
-
- charter_history = find_history_active_at(wg.charter, e.time)
- info['version'] = charter_history.rev if charter_history else wg.charter.rev
- info['text'] = e.desc
- info['by'] = e.by.name
- info['textSnippet'] = truncatewords_html(format_textarea(fill(info['text'], 80)), 25)
- info['snipped'] = info['textSnippet'][-3:] == "..."
- results.append({'comment':e, 'info':info, 'date':e.time, 'group': wg, 'is_com':True})
-
for e in wg.charter.docevent_set.all().order_by('-time'):
info = {}
charter_history = find_history_active_at(wg.charter, e.time)
diff --git a/ietf/wginfo/urls.py b/ietf/wginfo/urls.py
index ce0663c26..62936669d 100644
--- a/ietf/wginfo/urls.py
+++ b/ietf/wginfo/urls.py
@@ -16,5 +16,6 @@ urlpatterns = patterns('',
(r'^(?P
[a-zA-Z0-9-]+)/documents/txt/$', views.wg_documents_txt),
(r'^(?P[a-zA-Z0-9-]+)/$', views.wg_documents_html),
(r'^(?P[a-zA-Z0-9-]+)/charter/$', views.wg_charter),
+ (r'^(?P[a-zA-Z0-9-]+)/history/', views.history),
(r'^(?P[^/]+)/management/', include('ietf.wgchairs.urls')),
)
diff --git a/ietf/wginfo/views.py b/ietf/wginfo/views.py
index 46c253e19..a274b9b28 100644
--- a/ietf/wginfo/views.py
+++ b/ietf/wginfo/views.py
@@ -40,6 +40,7 @@ from ietf.idtracker.models import Area, IETFWG
from ietf.idrfc.views_search import SearchForm, search_query
from ietf.idrfc.idrfc_wrapper import IdRfcWrapper
from ietf.ipr.models import IprDetail
+from redesign.group.models import Group
def fill_in_charter_info(wg, include_drafts=False):
@@ -156,3 +157,22 @@ def wg_charter(request, acronym):
RequestContext(request))
return render_to_response('wginfo/wg_charter.html', {'wg': wg, 'concluded':concluded, 'proposed': proposed, 'selected':'charter'}, RequestContext(request))
+
+def get_wg_menu_context(wg, selected):
+ # it would probably be better to refactor this file into rendering
+ # the menu separately instead of each view having to include the information
+
+ return dict(wg=wg, concluded=wg.state_id == "conclude", proposed=wg.state_id == "proposed", selected=selected)
+
+def history(request, acronym):
+ wg = get_object_or_404(Group, acronym=acronym)
+
+ events = wg.groupevent_set.all().select_related('by').order_by('-time', '-id')
+
+ context = get_wg_menu_context(wg, "history")
+ context.update(dict(events=events,
+ ))
+
+ wg.group_acronym = wg # hack for compatibility with old templates
+
+ return render_to_response('wginfo/history.html', context, RequestContext(request))
diff --git a/static/js/history.js b/static/js/history.js
new file mode 100644
index 000000000..843c8f79a
--- /dev/null
+++ b/static/js/history.js
@@ -0,0 +1,5 @@
+jQuery(function () {
+ jQuery("table.history .snipped .showAll").click(function () {
+ jQuery(this).parents("snipped").hide().siblings("full").show();
+ });
+});