Skip to content

Commit 88ff873

Browse files
committed
Working Group document page now allows for addition of documents to community lists.
- Legacy-Id: 5543
1 parent 0a0c479 commit 88ff873

1 file changed

Lines changed: 38 additions & 2 deletions

File tree

ietf/templates/wginfo/wg_documents.html

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,66 @@
3939
{% regroup docs by view_sort_group as grouped_docs %}
4040

4141
<table class="ietf-table ietf-doctable" style="margin-top:16px;">
42-
<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="ipr">ipr</th><th class="ad">Area Director</th></tr>
42+
<tr>
43+
{% if user.is_authenticated %}<th></th>{% endif %}
44+
<th class="doc">Document</th><th class="title">Title</th><th class="date">Date</th><th class="status" colspan="2">Status</th><th class="ipr">ipr</th><th class="ad">Area Director</th></tr>
4345
{% for doc_group in grouped_docs %}
4446
<tr class="header"><td colspan="7">{{doc_group.grouper}}s</td></tr>
4547

48+
{% with 1 as show_add_to_list %}
4649
{% for doc in doc_group.list %}
4750
{% include "idrfc/search_result_row.html" %}
4851
{% endfor %}
52+
{% endwith %}
4953

5054
{% endfor %}
5155
</table>
5256

5357
{% regroup docs_related by view_sort_group as grouped_docs_related %}
5458

5559
<table class="ietf-table ietf-doctable" style="margin-top:16px;">
56-
<tr><th class="doc">Related Documents</th><th class="title">Title</th><th class="date">Date</th><th class="status" colspan="2">Status</th><th class="ipr">ipr</th><th class="ad">Area Director</th></tr>
60+
<tr>
61+
{% if user.is_authenticated %}<th></th>{% endif %}
62+
<th class="doc">Related Documents</th><th class="title">Title</th><th class="date">Date</th><th class="status" colspan="2">Status</th><th class="ipr">ipr</th><th class="ad">Area Director</th></tr>
5763
{% for doc_group in grouped_docs_related %}
5864
<tr class="header"><td colspan="7">{{doc_group.grouper}}s</td></tr>
5965

66+
{% with 1 as show_add_to_list %}
6067
{% for doc in doc_group.list %}
6168
{% include "idrfc/search_result_row.html" %}
6269
{% endfor %}
70+
{% endwith %}
6371

6472
{% endfor %}
6573
</table>
6674

6775
{% endblock wg_content %}
6876

77+
{% block scripts %}
78+
YAHOO.util.Event.onContentReady("search_submit_button", function () {
79+
var oButton = new YAHOO.widget.Button("search_submit_button", {});
80+
});
81+
(function ($) {
82+
$(document).ready(function () {
83+
$('.addtolist a').click(function() {
84+
var trigger = $(this);
85+
$.ajax({
86+
url: trigger.attr('href'),
87+
type: 'GET',
88+
cache: false,
89+
dataType: 'json',
90+
success: function(response){
91+
if (response.success) {
92+
trigger.replaceWith('added');
93+
}
94+
}
95+
});
96+
return false;
97+
});
98+
});
99+
})(jQuery);
100+
{% endblock scripts %}
101+
102+
{% block js %}
103+
<script type="text/javascript" src="/js/doc-search.js"></script>
104+
{% endblock %}

0 commit comments

Comments
 (0)