PageRenderTime 20ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/treemenus/templates/admin/treemenus/menu/change_form.html

http://github.com/plushcms/PlushCMS
HTML | 68 lines | 60 code | 8 blank | 0 comment | 0 complexity | 685eb9f05aa7e5dc2e0166f7147aa8a3 MD5 | raw file
 1{% extends "admin/change_form.html" %}
 2{% load i18n adminmedia %}
 3
 4{% block after_related_objects %}
 5    {% if change %}
 6        <fieldset class="module aligned">
 7        <h2 style="background: url('/img/images/nav-bg.gif') repeat-x scroll left bottom #EEEEEE; color: #666666;">{% trans "Menu tree" %}</h2>
 8
 9        <div class="form-row" >
10            <img src="{% admin_media_prefix %}img/admin/icon_addlink.gif" width="10" height="10"/> <a href="items/add/">{% trans "Add submenu" %}</a>
11        </div>
12
13        <style type="text/css">
14            .form-row tbody tr:hover {
15            background-color: #ffffbe;
16            }
17        </style>
18
19        <div class="form-row" >
20            <table cellspacing="0" width="100%">
21                <thead>
22                    <tr>
23                        <th>{% trans "Name" %}</th>
24                        <th>{% trans "Address" %}</th>
25                        <th colspan="2">{% trans "Change the order" %}</th>
26                    </tr>
27                </thead>
28
29                <tbody>
30                    {% for menu_item in original.root_item.get_flattened %}
31                        <tr class="{% cycle 'row1' 'row2' %}">
32                        {% if forloop.first %}
33                            <td colspan="2">						
34                                {% trans "[Root]" %}
35                            </td>
36                        {% else %}
37                            <td width="39%">
38                                <a href="items/{{ menu_item.pk }}/">{{ menu_item.caption_with_spacer|safe }}</a>
39                            </td>
40
41                            <td width="50%">
42                                {{ menu_item.url }}
43                            </td>
44                        {% endif %}
45                    
46                        {% if menu_item.has_siblings %}
47                            {% ifnotequal menu_item.rank menu_item.siblings.count %}
48                                <td width="20" align="center"><a href="items/{{ menu_item.pk }}/move_down/"><img src="{% admin_media_prefix %}img/admin/arrow-down.gif" border="0" alt="{% trans 'W dół' %}"/></b></td>
49                            {% else %}
50                                <td width="20">&nbsp;</td>
51                            {% endifnotequal %}
52                            
53                            {% ifnotequal menu_item.rank 0 %}
54                                <td width="20" align="center"><a href="items/{{ menu_item.pk }}/move_up/"><img src="{% admin_media_prefix %}img/admin/arrow-up.gif" border="0" alt="{% trans 'W górę' %}"/></a></td>
55                            {% else %}
56                                <td width="20">&nbsp;</td>
57                            {% endifnotequal %}
58                        {% else %}
59                            <td width="20">&nbsp;</td><td width="20">&nbsp;</td>
60                        {% endif %}
61                        </tr>
62                    {% endfor %}
63                </tbody>
64            </table>
65        </div>
66        </fieldset>
67    {% endif %}
68{% endblock %}