X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/03460135dbc5d86b366424da72053a853db4ce34..dff98812a65470fde996fb07730e408382226c71:/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 9e6c194..997fab5 100644 --- a/forum/skins/default/templates/osqaadmin/nodeman.html +++ b/forum/skins/default/templates/osqaadmin/nodeman.html @@ -1,22 +1,181 @@ {% extends basetemplate %} -{% load i18n %} -{% load user_tags %} +{% load i18n user_tags extra_tags extra_filters %} {% block adminjs %} @@ -26,7 +185,76 @@ display: inline; margin-right: 12px; } + + #result_list tr td.deleted { + background-color: #FDD; + border-bottom: 1px solid #a9a9a9; + } + + #result_list tr td.accepted { + background-color: #DFD; + border-bottom: 1px solid #a9a9a9; + } + + span.question-deleted { + text-decoration: line-through; + } + + .col-resizer { + width: 2px; + min-width: 2px; + min-width: 2px; + cursor: col-resize; + padding: 0 0 0 0; + } + + + + {% endblock %} {% block subtitle %} @@ -41,61 +269,242 @@
-

{% trans "Filter" %}

+

{% trans "Filter" %} ({% trans "Click to show/hide" %})

+

{% trans "By type" %}

{% trans "By state" %}

+

{% 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 %} + + +

{% trans "Pre defined" %}

+ {% if not settings.NODE_MAN_FILTERS %} + {% trans "There are no saved filters. Click bellow to add." %} + {% endif %} + +
+ + +
+ + {% comment %}

{% trans "Show" %}

+
+
{{ show_form.show }}
+ +
{% endcomment %} +
-
+
+ + +
+ {% declare %} + current_sort = nodes.paginator.current_sort + added_at = current_sort == "added_at" and "ascending" or (current_sort == "added_at_asc" and "descending" or "") + author = current_sort == "author" and "ascending" or (current_sort == "author_asc" and "descending" or "") + score = current_sort == "score" and "ascending" or (current_sort == "score_asc" and "descending" or "") + act_at = current_sort == "act_at" and "ascending" or (current_sort == "act_at_asc" and "descending" or "") + act_by = current_sort == "act_by" and "ascending" or (current_sort == "act_by_asc" and "descending" or "") + + added_at_link = current_sort == "added_at" and nodes.paginator.added_at_asc_sort_link or nodes.paginator.added_at_sort_link + author_link = current_sort == "author_asc" and nodes.paginator.author_sort_link or nodes.paginator.author_asc_sort_link + score_link = current_sort == "score" and nodes.paginator.score_asc_sort_link or nodes.paginator.score_sort_link + act_at_link = current_sort == "act_at" and nodes.paginator.act_at_asc_sort_link or nodes.paginator.act_at_sort_link + act_by_link = current_sort == "act_by_asc" and nodes.paginator.act_by_sort_link or nodes.paginator.act_by_asc_sort_link + {% enddeclare %} + {% spaceless %} + + + + + - {% ifequal filter_form.node_type.data "all" %} - - {% endifequal %} - - + + + + + + {% endspaceless %} + {% with filter_form.state_type.data as state_type %} {% for node in nodes.paginator.page %} - - {% ifequal filter_form.node_type.data "all" %} - - {% endifequal %} - - + + + {% declare %} + is_root = node.abs_parent == None + title = is_root and node.title or node.abs_parent.title + + anchor = "%s" % html.hyperlink(node.get_absolute_url(), title) + anchor = ((not is_root) and node.abs_parent.nis.deleted) and "%s" % anchor or anchor + anchor = is_root and anchor or "(%s)" % anchor + anchor = html.mark_safe(anchor) + + td_class = "" + td_class = node.nis.accepted and "accepted" or td_class + td_class = node.nis.deleted and "deleted" or td_class + {% enddeclare %} + + + + + + + + {% endfor %} + {% endwith %}
+ {% trans "Type" %}{% trans "Summary" %}{% trans "State" %} + {% trans "Author" %} {% trans "Type" %}{% trans "Title" %}{% trans "Author" %} + {% trans "Added at" %} + + {% trans "Last activity by" %} + + {% trans "Last activity at" %} + {% trans "Tags" %}
{{ node.friendly_name }}{{ node.headline }}{{ node.author.username }}{{ node.friendly_name }} + {{ anchor }}
+ {{ node.summary }} +
+ {% for state in node.states.all %} + {{ state.state_type }} {% diff_date state.action.at %} {% trans "by" %} + {{ state.action.by.decorated_name }}
+ {% endfor %} +
{{ node.author.decorated_name }}{% diff_date node.added_at %}{{ node.last_activity_by.decorated_name }}{% diff_date node.last_activity_at %} + {% for t in node.tags.all %} + {% if t|contained_in:tags %}{{ t.name }} + {% else %}{{ t.name }}{% endif %} + {% endfor %} +
{{ nodes.paginator.page_numbers }}