Templates for public id list render with rss feeds. Fixes #701
- Legacy-Id: 3521
This commit is contained in:
parent
ca75c24861
commit
c370ad0ffa
18
ietf/templates/community/customize_display.html
Normal file
18
ietf/templates/community/customize_display.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<h2>Display customization</h2>
|
||||
|
||||
<form action="#custom" method="POST" />
|
||||
<h3>Sort method</h2>
|
||||
{{ display_form.sort_method }}
|
||||
|
||||
<h3>Show fields</h2>
|
||||
<div>
|
||||
{% for field in dc.get_display_fields_config %}
|
||||
<div style="float: left; width: 30%;">
|
||||
<input id="id_{{ field.codename }}" type="checkbox" name="{{ field.codename }}"{% if field.active %} checked="checked"{% endif %} />
|
||||
<label for="id_{{ field.codename }}">{{ field.description }}</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div style="clear: both;"><br /></div>
|
||||
<input type="submit" value="Save configuration" name="save_display" />
|
||||
</form>
|
1
ietf/templates/community/display_field.html
Normal file
1
ietf/templates/community/display_field.html
Normal file
|
@ -0,0 +1 @@
|
|||
<span class="displayField displayField-{{ field.codename }}">{{ value|safe }}</span>
|
|
@ -1,20 +1,101 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block pagehead %}
|
||||
{{ block.super }}
|
||||
<script type="text/javascript" src="/js/lib/jquery-1.4.2.min.js"></script>
|
||||
<script type="text/javascript" src="/js/yui/yui-20100305.js"></script>
|
||||
<script type="text/javascript" src="/js/base.js"></script>
|
||||
{% endblock pagehead %}
|
||||
|
||||
{% block title %}{{ cl.long_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ cl.long_name }}</h1>
|
||||
<p>Feel free to share the following links if you need it.</p>
|
||||
<ul>
|
||||
<li><a href="">Read only view for {{ cl.long_name }}</a></li>
|
||||
<li><a href="">Feed for {{ cl.long_name }}</a></li>
|
||||
<div id="mytabs" class="yui-navset">
|
||||
<ul class="yui-nav">
|
||||
<li class="selected"><a href="#info"><em>Info</em></a></li>
|
||||
<li><a href="#rules"><em>Rules</em></a></li>
|
||||
<li><a href="#documents"><em>Documents</em></a></li>
|
||||
<li><a href="#custom"><em>Display customization</em></a></li>
|
||||
<li><a href="#view"><em>View list</em></a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Rules added to this list</h2>
|
||||
<div class="yui-content">
|
||||
<div id="info">
|
||||
<p>Feel free to share the following links if you need it.</p>
|
||||
<ul>
|
||||
<li><a href="view/">Read only view for {{ cl.long_name }}</a></li>
|
||||
<li><a href="changes/feed/">Feed for every change in status of {{ cl.long_name }}</a></li>
|
||||
<li><a href="changes/significant/feed/">Feed for significant change in status of {{ cl.long_name }}</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Documents added to this list</h2>
|
||||
{% for doc in cl.added_ids.all %}
|
||||
{{ doc }}
|
||||
<p>Export your list to CSV format</p>
|
||||
<ul>
|
||||
<li><a href="csv/">CSV for {{ cl.long_name }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="rules">
|
||||
<h2>Rules added to this list</h2>
|
||||
<table class="ietf-table">
|
||||
<tr><th>Rule</th><th>Value</th><th>Documents</th><th>Remove from list</th></tr>
|
||||
{% for rule in cl.rule_set.all %}
|
||||
<tr class="{% cycle oddrow,evenrow %}">
|
||||
<td>{{ rule.get_callable_rule.description }}</td>
|
||||
<td>{{ rule.value }}</td>
|
||||
<td>{% with rule.cached_ids.count as count %}{{ count }} document{{ count|pluralize }}{% endwith %}</td>
|
||||
<td><a href="{% url community_remove_rule cl.pk rule.pk %}">Remove</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<h3>Add a new rule</h3>
|
||||
<form method="post" action="#rules">
|
||||
{{ rule_form.as_p }}
|
||||
<input type="submit" name="save_rule" value="Add rule" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="documents">
|
||||
<h2>Documents manually added to this list</h2>
|
||||
<table class="ietf-table">
|
||||
<tr><th>Name</th><th>Title</th><th>Remove from list</th></tr>
|
||||
{% for doc in cl.added_ids.all %}
|
||||
<tr class="{% cycle oddrow,evenrow %}">
|
||||
<td>{{ doc }}</td>
|
||||
<td><a href="{{ doc.get_absolute_url }}"</a>{{ doc.title }}</td>
|
||||
<td><a href="{% url community_remove_document cl.pk doc.pk %}">Remove</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="custom">
|
||||
{% include "community/customize_display.html" %}
|
||||
</div>
|
||||
|
||||
<div id="view">
|
||||
{% include "community/view_list.html" %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var tabView = new YAHOO.widget.TabView('mytabs');
|
||||
var url = location.href.split('#');
|
||||
if (url[1]) {
|
||||
url[1] = "#"+url[1];
|
||||
var tabs = tabView.get('tabs');
|
||||
for (var i = 0; i < tabs.length; i++) {
|
||||
if (url[1].indexOf(tabs[i].get('href')) == 0) {
|
||||
tabView.set('activeIndex', i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
|
27
ietf/templates/community/public/atom.xml
Normal file
27
ietf/templates/community/public/atom.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title type="text">{{ title }}</title>
|
||||
<subtitle type="text">{{ subtitle }}</subtitle>
|
||||
<id>{{ id }}</id>
|
||||
<updated>{{ updated|date:"Y-m-d\TH:i:s" }}Z</updated>
|
||||
<link rel="alternate" type="text/html" hreflang="en" href="http://{{ request.get_host }}/"/>
|
||||
<link rel="self" type="application/atom+xml" href="http://{{ request.get_host }}{{ request.get_full_path }}"/>
|
||||
|
||||
{% for entry in entries %}
|
||||
<entry>
|
||||
<title>{{ entry.document.title }}</title>
|
||||
|
||||
<link href="{{ entry.document.get_absolute_url }}"/>
|
||||
|
||||
<id>{{ entry.id }}</id>
|
||||
|
||||
<updated>{{ entry.notification_date|date:"Y-m-d\TH:i:s" }}Z</updated>
|
||||
|
||||
<published>{{ entry.notification_date|date:"Y-m-d\TH:i:s" }}</published>
|
||||
|
||||
<summary>{{ entry.desc }}</summary>
|
||||
|
||||
</entry>
|
||||
{% endfor %}
|
||||
|
||||
</feed>
|
22
ietf/templates/community/public/subscribe.html
Normal file
22
ietf/templates/community/public/subscribe.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Subscribe to {{ cl.long_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Subscribe to {{ cl.long_name }}</h1>
|
||||
{% if success %}
|
||||
<p>
|
||||
We have sent and email to your email address with instructions to complete your subscription.
|
||||
</p>
|
||||
{% else %}
|
||||
<p>
|
||||
Subscribe to the email list for notifications of {% if significant %}significant {% endif %}changes on {{ cl.long_name }}.
|
||||
</p>
|
||||
<form action="" method="post">
|
||||
<table>
|
||||
{{ form }}
|
||||
</table>
|
||||
<input type="submit" value="Subscribe" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
9
ietf/templates/community/public/subscribe_email.txt
Normal file
9
ietf/templates/community/public/subscribe_email.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
Hello,
|
||||
|
||||
In order to complete your subscription for {% if significant %}significant {% endif %}changes on {{ clist.long_name }}, please follow this link or copy it and paste it in your web browser:
|
||||
|
||||
http://{{ domain }}{% if significant %}{% url confirm_significant_subscription clist.id to_email today auth %}{% else %}{% url confirm_subscription clist.id to_email today auth %}{% endif %}
|
||||
|
||||
Best,
|
||||
|
||||
Your {{ domain }} team.
|
13
ietf/templates/community/public/subscription_confirm.html
Normal file
13
ietf/templates/community/public/subscription_confirm.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Subscription to {{ cl.long_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Subscription to {{ cl.long_name }}</h1>
|
||||
<p>
|
||||
You email address {{ email }} has been successfully subscribed to {{ cl.long_name }}
|
||||
</p>
|
||||
<p>
|
||||
<a href="{{ cl.get_public_url }}">Return to the list view</a>
|
||||
</p>
|
||||
{% endblock %}
|
22
ietf/templates/community/public/unsubscribe.html
Normal file
22
ietf/templates/community/public/unsubscribe.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Cancel subscription to {{ cl.long_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Cancel subscription to {{ cl.long_name }}</h1>
|
||||
{% if success %}
|
||||
<p>
|
||||
You will receive a confirmation email shortly containing further instructions on how to cancel your subscription.
|
||||
</p>
|
||||
{% else %}
|
||||
<p>
|
||||
Cancel your subscription to the email list for notifications of {% if significant %}significant {% endif %}changes on {{ cl.long_name }}.
|
||||
</p>
|
||||
<form action="" method="post">
|
||||
<table>
|
||||
{{ form }}
|
||||
</table>
|
||||
<input type="submit" value="Cancel subscription" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
9
ietf/templates/community/public/unsubscribe_email.txt
Normal file
9
ietf/templates/community/public/unsubscribe_email.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
Hello,
|
||||
|
||||
In order to complete the cancelation of your subscription to {% if significant %}significant {% endif %}changes on {{ clist.long_name }}, please follow this link or copy it and paste it in your web browser:
|
||||
|
||||
http://{{ domain }}{% if significant %}{% url confirm_significant_unsubscription clist.id to_email today auth %}{% else %}{% url confirm_unsubscription clist.id to_email today auth %}{% endif %}
|
||||
|
||||
Best,
|
||||
|
||||
Your {{ domain }} team.
|
13
ietf/templates/community/public/unsubscription_confirm.html
Normal file
13
ietf/templates/community/public/unsubscription_confirm.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Canceled subscription to {{ cl.long_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Canceled subscription to {{ cl.long_name }}</h1>
|
||||
<p>
|
||||
You email address {{ email }} has been successfully removed form {{ cl.long_name }} {% if significant %}significant {% endif %}changes mailing list.
|
||||
</p>
|
||||
<p>
|
||||
<a href="{{ cl.get_public_url }}">Return to the list view</a>
|
||||
</p>
|
||||
{% endblock %}
|
20
ietf/templates/community/public/view_list.html
Normal file
20
ietf/templates/community/public/view_list.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block pagehead %}
|
||||
<link rel="alternate" type="application/rss+xml" title="Changes on {{ cl.long_name }} RSS Feed" href="../changes/feed/" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Significant changes on {{ cl.long_name }} RSS Feed" href="../changes/significant/feed/" />
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}{{ cl.long_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ cl.long_name }}</h1>
|
||||
<p>
|
||||
Subscribe to notification email list:
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="../subscribe/">All changes email list</a></li>
|
||||
<li><a href="../subscribe/significant/">Significant changes email list</a></li>
|
||||
</ul>
|
||||
{% include "community/view_list.html" %}
|
||||
{% endblock %}
|
20
ietf/templates/community/view_list.html
Normal file
20
ietf/templates/community/view_list.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{% load community_tags %}
|
||||
|
||||
{% with dc.get_active_fields as fields %}
|
||||
<table class="ietf-table">
|
||||
<tr>
|
||||
{% for field in fields %}
|
||||
<th>{{ field.description }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% for doc in cl.get_documents %}
|
||||
<tr class="{% cycle oddrow,evenrow %}">
|
||||
{% for field in fields %}
|
||||
<td>
|
||||
{% show_field field doc %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endwith %}
|
|
@ -35,6 +35,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
{% load ietf_filters %}
|
||||
{% load ballot_icon %}
|
||||
<tr class="{% cycle oddrow,evenrow %}">
|
||||
<td class="addtolist">
|
||||
<a href="{% url community_add_document doc.id.draft_name %}" title="Add to your personal ID list">+</a>
|
||||
</td>
|
||||
<td class="doc">
|
||||
{% if doc.rfc %}{{ doc.rfc.displayname_with_link|safe }}
|
||||
{% if doc.id %}<br />(<a href="{{ doc.id.get_absolute_url }}">{{doc.id.draft_name}}</a>){%endif%}
|
||||
|
@ -46,5 +49,4 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
{% include "idrfc/status_columns.html" %}
|
||||
{# <td class="ad">{% if doc.ad_name %}{{ doc.ad_name }}{% else %} {% endif %}</td> #}
|
||||
<td class="ad">{{ doc.ad_name|default:"" }}</td>
|
||||
|
||||
</tr>
|
||||
|
|
|
@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
{% else %}
|
||||
{% regroup docs by view_sort_group as grouped_docs %}
|
||||
<table class="ietf-table ietf-doctable">
|
||||
<tr><th class="doc">Document</th><th class="title">Title</th><th class="date">Date</th><th class="status" colspan="2">Status</th><th class="ad">Area Director</th></tr>
|
||||
<tr><th></th><th class="doc">Document</th><th class="title">Title</th><th class="date">Date</th><th class="status" colspan="2">Status</th><th class="ad">Area Director</th></tr>
|
||||
{% for doc_group in grouped_docs %}
|
||||
<tr class="header"><td colspan="6">{{doc_group.grouper}}s</td></tr>
|
||||
|
||||
|
|
Loading…
Reference in a new issue