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 88ff873c457f40f2addbfe14550e65f990d3284f
This commit is contained in:
Henrik Levkowetz 2013-03-13 17:50:29 +00:00
parent 8d80e3b392
commit 6c6107b6d5

View file

@ -39,13 +39,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{% regroup docs by view_sort_group as grouped_docs %}
<table class="ietf-table ietf-doctable" style="margin-top:16px;">
<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>
<tr>
{% if user.is_authenticated %}<th></th>{% endif %}
<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>
{% for doc_group in grouped_docs %}
<tr class="header"><td colspan="7">{{doc_group.grouper}}s</td></tr>
{% with 1 as show_add_to_list %}
{% for doc in doc_group.list %}
{% include "idrfc/search_result_row.html" %}
{% endfor %}
{% endwith %}
{% endfor %}
</table>
@ -53,16 +58,49 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{% regroup docs_related by view_sort_group as grouped_docs_related %}
<table class="ietf-table ietf-doctable" style="margin-top:16px;">
<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>
<tr>
{% if user.is_authenticated %}<th></th>{% endif %}
<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>
{% for doc_group in grouped_docs_related %}
<tr class="header"><td colspan="7">{{doc_group.grouper}}s</td></tr>
{% with 1 as show_add_to_list %}
{% for doc in doc_group.list %}
{% include "idrfc/search_result_row.html" %}
{% endfor %}
{% endwith %}
{% endfor %}
</table>
{% endblock wg_content %}
{% block scripts %}
YAHOO.util.Event.onContentReady("search_submit_button", function () {
var oButton = new YAHOO.widget.Button("search_submit_button", {});
});
(function ($) {
$(document).ready(function () {
$('.addtolist a').click(function() {
var trigger = $(this);
$.ajax({
url: trigger.attr('href'),
type: 'GET',
cache: false,
dataType: 'json',
success: function(response){
if (response.success) {
trigger.replaceWith('added');
}
}
});
return false;
});
});
})(jQuery);
{% endblock scripts %}
{% block js %}
<script type="text/javascript" src="/js/doc-search.js"></script>
{% endblock %}