Skip to content

Commit 6c6107b

Browse files
committed
Merged [5543] from ietf@augustcellars.com:
Working Group document page now allows for addition of documents to community lists. - Legacy-Id: 5562 Note: SVN reference [5543] has been migrated to Git commit 88ff873
1 parent 8d80e3b commit 6c6107b

1 file changed

Lines changed: 40 additions & 2 deletions

File tree

ietf/templates/wginfo/wg_documents.html

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,68 @@
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>
45+
</tr>
4346
{% for doc_group in grouped_docs %}
4447
<tr class="header"><td colspan="7">{{doc_group.grouper}}s</td></tr>
4548

49+
{% with 1 as show_add_to_list %}
4650
{% for doc in doc_group.list %}
4751
{% include "idrfc/search_result_row.html" %}
4852
{% endfor %}
53+
{% endwith %}
4954

5055
{% endfor %}
5156
</table>
5257

5358
{% regroup docs_related by view_sort_group as grouped_docs_related %}
5459

5560
<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>
61+
<tr>
62+
{% if user.is_authenticated %}<th></th>{% endif %}
63+
<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>
64+
</tr>
5765
{% for doc_group in grouped_docs_related %}
5866
<tr class="header"><td colspan="7">{{doc_group.grouper}}s</td></tr>
5967

68+
{% with 1 as show_add_to_list %}
6069
{% for doc in doc_group.list %}
6170
{% include "idrfc/search_result_row.html" %}
6271
{% endfor %}
72+
{% endwith %}
6373

6474
{% endfor %}
6575
</table>
6676

6777
{% endblock wg_content %}
6878

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

0 commit comments

Comments
 (0)