]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/osqaadmin/nodeman.html
Remove ADMIN_MEDIA_PREFIX since it has been deprecated in Django 1.4
[osqa.git] / forum / skins / default / templates / osqaadmin / nodeman.html
index 500e05bf2f883d5186d598263653f7cc3162722b..784d49aa7a8f8b57a2cc089b0da379e2a89ded33 100644 (file)
@@ -1,6 +1,6 @@
 {% extends basetemplate %}
 
-{% load i18n user_tags extra_tags %}
+{% load i18n user_tags extra_tags extra_filters admin_static %}
 
 {% block adminjs %}
     <script type="text/javascript">
@@ -64,7 +64,7 @@
                 }
             });
 
-            $('#author-selector').autocomplete('{% url matching_users %}', {
+            $('#author-selector').autocomplete('{% url "matching_users" %}', {
                 minChars: 1,
                 matchContains: true,
                 max: 10,
@@ -93,7 +93,7 @@
                 }
             });
 
-            $('#tag-selector').autocomplete('{% url matching_tags %}', {
+            $('#tag-selector').autocomplete('{% url "matching_tags" %}', {
                 minChars: 1,
                 matchContains: true,
                 max: 10,
             margin-right: 12px;
         }
 
-        #result_list tr.row1 td.deleted {
+        #result_list tr td.deleted {
             background-color: #FDD;
+            border-bottom: 1px solid #a9a9a9;
         }
 
-        #result_list tr.row2 td.deleted {
-            background-color: #FEE;
-        }
-
-        #result_list tr.row1 td.accepted {
+        #result_list tr td.accepted {
             background-color: #DFD;
-        }
-
-        #result_list tr.row2 td.accepted {
-            background-color: #EFD;
+            border-bottom: 1px solid #a9a9a9;
         }
 
         span.question-deleted {
             padding: 0 0 0 0;
         }
     </style>
-    <script type="text/javascript">window.__admin_media_prefix__ = "{{ settings.ADMIN_MEDIA_PREFIX }}";</script>
-    <link href="{{ settings.ADMIN_MEDIA_PREFIX }}css/base.css" rel="stylesheet" type="text/css" media="screen" />
+    <link href="{% static 'admin/css/base.css' %}" rel="stylesheet" type="text/css" media="screen" />
     <script type="text/javascript">
     /* gettext identity library */
 
     }
     
     </script>
-    <script type="text/javascript" src="{{ settings.ADMIN_MEDIA_PREFIX }}js/core.js"></script>
+    <script type="text/javascript" src="{% static 'admin/js/core.js' %}"></script>
 {% endblock %}
 
 {% block subtitle %}
     <div id="changelist" class="module filtered">
         <div id="toolbar">
             <form method="get" action="" id="changelist-search">
+            {% csrf_token %}
             <div>
                 <div>
-                    <label><img alt="Search" src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon_searchbox.png"></label>
+                    <label><img alt="Search" src="{% static 'admin/img/admin/icon_searchbox.png' %}"></label>
                     <input type="text" size="40" name="text" id="text-filter-input" value="{{ text }}">
                     <input type="submit" value="{% trans "Search" %}">
                     {% if text %}
                     <a id="all-node-type-link" href="#all" title="{% trans "click to clear the type filter" %}">{% trans "all" %}</a>
                 </li>
                 {% for type, name in node_types %}
-                <li{% if type in type_filter %} class="selected" title="{% trans "click to remove from the filter" %}"{% else %} title="{% trans "click to add to the filter" %}"{% endif %}>
+                <li{% if type|contained_in:type_filter %} class="selected" title="{% trans "click to remove from the filter" %}"{% else %} title="{% trans "click to add to the filter" %}"{% endif %}>
                     <a class="node-type-link" href="#{{ type }}">{{ name }}</a>
                 </li>
                 {% endfor %}
                     <a id="all-state-link" href="#any" title="{% trans "click to clear the state filter" %}">{% trans "any" %}</a>
                 </li>
                 {% for state_type in state_types %}
-                    <li{% if state_type in state_filter %} class="selected" title="{% trans "click to remove from the filter" %}"{% else %} title="{% trans "click to add to the filter" %}"{% endif %}>
+                    <li{% if state_type|contained_in:state_filter %} class="selected" title="{% trans "click to remove from the filter" %}"{% else %} title="{% trans "click to add to the filter" %}"{% endif %}>
                         <a class="state-type-link" href="#{{ state_type }}">{{ state_type }}</a>
                     </li>
                 {% endfor %}
             {% endif %}
             <ul id="pre-filter-container">
                 {% for name, uri in settings.NODE_MAN_FILTERS %}
-                <li class="selected"><a href="{% url admin_tools "nodeman" %}?{{ uri }}">{{ name }}</a></li>
+                <li class="selected"><a href="{% url "admin_tools" "nodeman" %}?{{ uri }}">{{ name }}</a></li>
                 {% endfor %}
             </ul>
             <form action="" method="POST">
+                {% csrf_token %}
                 <input name="filter_name" type="text" size="20" id="filter-name-box" style="color: #AAA;" value="{% trans "Filter name..." %}" />
                 <button name="save_filter" value="0" style="color: #AAA;" title="{% trans "Click to save the current filter" %}" id="save-filter-button" disabled="disabled" class="button">{% trans "Save" %}</button>
             </form>
 
             {% comment %}<h3>{% trans "Show" %}</h3>
             <form action="" method="get">
+                {% csrf_token %}
                 <div>{{ show_form.show }}</div>
                 <input type="submit" value="{% trans "Refresh" %}" />
             </form>{% endcomment %}
             </div>
         </div>
         <form id="changelist-form" method="POST" action="">
+            {% csrf_token %}
             <div class="actions">
                 <label>
                     {% trans "Action" %}:
                         <option selected="selected" value="">---------</option>
                         <option value="delete_selected">{% trans "Mark deleted" %}</option>
                         <option value="undelete_selected">{% trans "Undelete" %}</option>
-                        <option value="hard_delete_selected">{% trans "Delete completelly" %}</option>
+                        <option value="hard_delete_selected">{% trans "Delete completely" %}</option>
                         <option value="close_selected">{% trans "Close (questions only)" %}</option>
                     </select>
                 </label>
 
                             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 %}
                         <th class="sorted {{ added_at }}">
                             <a href="{{ added_at_link }}">{% trans "Added at" %}</a>
                         </th>
-                        <!--<th class="sorted {{ score }}">
+                        {% comment %}
+                        <th class="sorted {{ score }}">
                             <a href="{{ score_link }}">{% trans "Score" %}</a>
-                        </th>-->
+                        </th>
+                        {% endcomment %}
                         <th class="sorted {{ act_by }}">
                             <a href="{{ act_by_link }}">{% trans "Last activity by" %}</a>
                         </th>
                         <td>{% diff_date node.last_activity_at %}</td>
                         <td>
                             {% for t in node.tags.all %}
-                                {% if t in tags %}<b>{{ t.name }}</b>
+                                {% if t|contained_in:tags %}<b>{{ t.name }}</b>
                                 {% else %}{{ t.name }}{% endif %}
                             {% endfor %}
                         </td>
             {{ nodes.paginator.page_numbers }}
         </form>
     </div>
-{% endblock %}
\ No newline at end of file
+{% endblock %}