X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/b9ad70bc652c43fb141313cdfb3256eb22e14e84..c76406e46e71cb86cfb440667bfbbe21b36e709e:/forum/skins/default/templates/osqaadmin/nodeman.html diff --git a/forum/skins/default/templates/osqaadmin/nodeman.html b/forum/skins/default/templates/osqaadmin/nodeman.html index d9576e5..5c5c44e 100644 --- a/forum/skins/default/templates/osqaadmin/nodeman.html +++ b/forum/skins/default/templates/osqaadmin/nodeman.html @@ -40,6 +40,65 @@ $boxes.removeAttr('checked'); } }); + + $('#author-selector').autocomplete('{% url matching_users %}', { + minChars: 1, + matchContains: true, + max: 10, + + formatItem: function(row, i, max, value) { + return row[1] + ' (' + row[2] + ' {% trans "rep" %})'; + }, + + formatResult: function(row, i, max, value){ + return row[1]; + } + }); + + $('#author-selector').result(function(event, data, formatted) { + if ($('#author-filter-container').find('input[value=' + data[0] + ']').length == 0) { + $('#author-filter-container').append($("")); + $form.submit(); + } + }); + + $('.author-filter-remover').click(function() { + var id = $(this).attr('rel'); + if ($('#author-filter-container').find('input[value=' + id + ']').length > 0) { + $('#author-filter-container').find('input[value=' + id + ']').remove(); + $form.submit(); + } + }); + + $('#tag-selector').autocomplete('{% url matching_tags %}', { + minChars: 1, + matchContains: true, + max: 10, + + formatItem: function(row, i, max, value) { + return row[1] + ' (' + row[2] + ' {% trans "uses" %})'; + }, + + formatResult: function(row, i, max, value){ + return row[1]; + } + }); + + $('#tag-selector').result(function(event, data, formatted) { + if ($('#tag-filter-container').find('input[value=' + data[0] + ']').length == 0) { + $('#tag-filter-container').append($("")); + $form.submit(); + } + }); + + $('.tag-filter-remover').click(function() { + var id = $(this).attr('rel'); + if ($('#tag-filter-container').find('input[value=' + id + ']').length > 0) { + $('#tag-filter-container').find('input[value=' + id + ']').remove(); + $form.submit(); + } + }); + }); + + + + {% endblock %} {% block subtitle %} @@ -63,12 +169,24 @@
@@ -91,6 +209,37 @@ {% endfor %} +

{% trans "By author(s)" %}

+ {% if not authors.count %} + {% trans "No users selected, use the box bellow to add users to the filter." %} + {% else %} + + {% trans "Click on the cross next to a user name to remove it from the filter." %} + {% endif %} + + +

{% trans "By tag(s)" %}

+ {% if not tags.count %} + {% trans "No tags selected, use the box bellow to add tags to the filter." %} + {% else %} + + {% trans "Click on the cross next to a tag name to remove it from the filter." %} + {% endif %} + {% comment %}

{% trans "Show" %}

{{ show_form.show }}
@@ -104,6 +253,8 @@ @@ -132,6 +283,8 @@ {% trans "Last activity at" %} + {% trans "Tags" %} + {% trans "State" %} {% endspaceless %} @@ -148,6 +301,13 @@ {{ node.score }} {{ node.last_activity_by.username }} {% diff_date node.last_activity_at %} + + {% for t in node.tags.all %} + {% if t in tags %}{{ t.name }} + {% else %}{{ t.name }}{% endif %} + {% endfor %} + + {{ node.state_list|join:", " }} {% endfor %}