/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
- {% extends "admin/change_form.html" %}
- {% load i18n adminmedia %}
-
- {% block after_related_objects %}
- {% if change %}
- <fieldset class="module aligned">
- <h2 style="background: url('/img/images/nav-bg.gif') repeat-x scroll left bottom #EEEEEE; color: #666666;">{% trans "Menu tree" %}</h2>
-
- <div class="form-row" >
- <img src="{% admin_media_prefix %}img/admin/icon_addlink.gif" width="10" height="10"/> <a href="items/add/">{% trans "Add submenu" %}</a>
- </div>
-
- <style type="text/css">
- .form-row tbody tr:hover {
- background-color: #ffffbe;
- }
- </style>
-
- <div class="form-row" >
- <table cellspacing="0" width="100%">
- <thead>
- <tr>
- <th>{% trans "Name" %}</th>
- <th>{% trans "Address" %}</th>
- <th colspan="2">{% trans "Change the order" %}</th>
- </tr>
- </thead>
-
- <tbody>
- {% for menu_item in original.root_item.get_flattened %}
- <tr class="{% cycle 'row1' 'row2' %}">
- {% if forloop.first %}
- <td colspan="2">
- {% trans "[Root]" %}
- </td>
- {% else %}
- <td width="39%">
- <a href="items/{{ menu_item.pk }}/">{{ menu_item.caption_with_spacer|safe }}</a>
- </td>
-
- <td width="50%">
- {{ menu_item.url }}
- </td>
- {% endif %}
-
- {% if menu_item.has_siblings %}
- {% ifnotequal menu_item.rank menu_item.siblings.count %}
- <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>
- {% else %}
- <td width="20"> </td>
- {% endifnotequal %}
-
- {% ifnotequal menu_item.rank 0 %}
- <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>
- {% else %}
- <td width="20"> </td>
- {% endifnotequal %}
- {% else %}
- <td width="20"> </td><td width="20"> </td>
- {% endif %}
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </fieldset>
- {% endif %}
- {% endblock %}