0 1 0
default
Branko Majic (branko) - 2 years ago 2017-12-22 10:41:15
branko@majic.rs
CONNT-25: Updated change_list.html admin template: - Enclose the object-tools-items block content with a permission check, same as in current version of Django Admin (1.11.x). - URL generation has _not_ been brought up to date.
1 file changed with 8 insertions and 6 deletions:
↑ Collapse Diff ↑
...
 
@@ -3,12 +3,14 @@
3 3
 
{% load admin_urls %}
4 4
 

	
5 5
 
{% block object-tools-items %}
6
 
            <li>
7
 
              {# Add the GET parameters from the admin's filter to 'Add entity' button #}
8
 
              {# so we can perform some filtering on source/destination interfaces. #}
9
 
              <a href="{% url cl.opts|admin_urlname:'add' %}?{% if is_popup %}_popup=1{% endif %}{% if 'location' in cl.params %}&amp;location={{ cl.params.location }}{% endif %}{% if 'project' in cl.params %}&amp;project={{ cl.params.project }}{% endif %}" class="addlink">
6
 
    {% if has_add_permission %}
7
 
        <li>
8
 
            {# Add the GET parameters from the admin's filter to 'Add entity' button #}
9
 
            {# so we can perform some filtering on source/destination interfaces. #}
10
 
            <a href="{% url cl.opts|admin_urlname:'add' %}?{% if is_popup %}_popup=1{% endif %}{% if 'location' in cl.params %}&amp;location={{ cl.params.location }}{% endif %}{% if 'project' in cl.params %}&amp;project={{ cl.params.project }}{% endif %}" class="addlink">
10 11
 
                {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
11
 
              </a>
12
 
            </li>
12
 
            </a>
13
 
        </li>
14
 
    {% endif %}
13 15
 
{% endblock %}
14 16
 

	
0 comments (0 inline, 0 general)