From 615aba463752d05bed4fc0959e020281028cdcc2 Mon Sep 17 00:00:00 2001
From: Henrik Levkowetz <henrik@levkowetz.com>
Date: Sat, 4 Nov 2017 16:14:16 +0000
Subject: [PATCH] The iesg past docs template.  - Legacy-Id: 14301

---
 ietf/templates/iesg/past_documents.html | 101 ++++++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 ietf/templates/iesg/past_documents.html

diff --git a/ietf/templates/iesg/past_documents.html b/ietf/templates/iesg/past_documents.html
new file mode 100644
index 000000000..eb8993a0f
--- /dev/null
+++ b/ietf/templates/iesg/past_documents.html
@@ -0,0 +1,101 @@
+{% extends "base.html" %}
+{# Copyright The IETF Trust 2015, All Rights Reserved #}
+{% load origin staticfiles %}
+
+{% load ballot_icon %}
+{% load ietf_filters %}
+
+{% block pagehead %}
+<link rel="stylesheet" href="{% static "jquery.tablesorter/css/theme.bootstrap.min.css" %}">
+{% endblock %}
+
+{% block title %}Documents on recent agendas{% endblock %}
+
+{% block content %}
+  {% origin %}
+  <h1>Documents on recent agendas <small>in states {% for state in states %}{{state.name}}{% if not forloop.last %}, {% endif %} {% endfor %}</small></h1>
+
+  <ul class="nav nav-tabs" role="tablist">
+    <li class="      "><a href="{% url 'ietf.iesg.views.agenda' %}">IESG Agenda</a></li>
+    <li class="      "><a href="{% url 'ietf.iesg.views.agenda_documents' %}">Documents on future agendas</a></li>
+    <li class="      "><a href="{% url 'ietf.iesg.views.discusses' %}">DISCUSS positions</a></li>
+    <li class="active"><a href="{% url 'ietf.iesg.views.past_documents' %}">Documents on recent agendas</a></li>
+    <li class="      "><a href="{% url 'ietf.iesg.views.photos' %}">IESG Photos</a></li>
+  </ul>
+
+
+
+  <!-- 
+  {% if user|has_role:"Area Director" %}
+    <p class="btn-group" data-toggle="buttons">
+      <label class="btn btn-default active discuss">
+        <input type="radio" value="all">All
+      </label>
+      <label class="btn btn-default discuss">
+        <input type="radio" value="byme">By me
+      </label>
+      <label class="btn btn-default discuss">
+        <input type="radio" value="forme">For me
+      </label>
+    </p>
+  {% endif %}
+  -->
+  <table class="table table-condensed table-striped tablesorter">
+    <thead>
+      <tr>
+        <th class="col-md-4">Document</th>
+        <th>Telechat Date</th>
+        <th>Status</th>
+        <th>Responsible AD</th>
+        <th>Discusses</th>
+      </tr>
+    </thead>
+
+    <tbody>
+      {% for doc in docs %}
+        <tr class="{% if doc.by_me %}byme{% endif %} {% if doc.for_me %}forme{% endif %}">
+          <td>
+	    {{ doc.displayname_with_link }}
+	    <br>
+	    {{ doc.title }}
+          </td>
+	  <td>
+	    {{ doc.telechat }}
+          </td>
+          {% include "doc/search/status_columns.html" %}
+          <td>{{ doc.ad|default:"" }}</td>
+          <td>
+	    {% for p in doc.blocking_positions %}
+	      {% if p.old_ad %}
+	        <span class="text-muted">
+	      {% endif %}
+	      {{ p.ad }}
+	      ({% if p.discuss_time %}{{ p.discuss_time|timesince_days }}{% endif %}
+	      days ago{% if doc.get_state_url != "rfc" and p.rev != doc.rev %}
+	        for -{{ p.rev }}{% endif %})<br>
+	      {% if p.old_ad %}
+	        </span>
+	      {% endif %}
+	    {% endfor %}
+          </td>
+        </tr>
+      {% endfor %}
+    </tbody>
+  </table>
+{% endblock %}
+
+{% block js %}
+  <script src="{% static "jquery.tablesorter/js/jquery.tablesorter.combined.min.js" %}"></script>
+  <script>
+    $(".discuss").click(function () {
+        var x = $(this).find("input").val();
+        if (x === "all") {
+            $("tbody tr").removeClass("hidden");
+        } else {
+            $("tbody tr." + x).removeClass("hidden");
+            $("tbody tr:not(." + x + ")").addClass("hidden");
+        }
+    });
+  </script>
+{% endblock %}
+