/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. {% block after_related_objects %}
  4. {% if change %}
  5. <fieldset class="module aligned">
  6. <h2 style="background: url('/img/images/nav-bg.gif') repeat-x scroll left bottom #EEEEEE; color: #666666;">{% trans "Menu tree" %}</h2>
  7. <div class="form-row" >
  8. <img src="{% admin_media_prefix %}img/admin/icon_addlink.gif" width="10" height="10"/> <a href="items/add/">{% trans "Add submenu" %}</a>
  9. </div>
  10. <style type="text/css">
  11. .form-row tbody tr:hover {
  12. background-color: #ffffbe;
  13. }
  14. </style>
  15. <div class="form-row" >
  16. <table cellspacing="0" width="100%">
  17. <thead>
  18. <tr>
  19. <th>{% trans "Name" %}</th>
  20. <th>{% trans "Address" %}</th>
  21. <th colspan="2">{% trans "Change the order" %}</th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. {% for menu_item in original.root_item.get_flattened %}
  26. <tr class="{% cycle 'row1' 'row2' %}">
  27. {% if forloop.first %}
  28. <td colspan="2">
  29. {% trans "[Root]" %}
  30. </td>
  31. {% else %}
  32. <td width="39%">
  33. <a href="items/{{ menu_item.pk }}/">{{ menu_item.caption_with_spacer|safe }}</a>
  34. </td>
  35. <td width="50%">
  36. {{ menu_item.url }}
  37. </td>
  38. {% endif %}
  39. {% if menu_item.has_siblings %}
  40. {% ifnotequal menu_item.rank menu_item.siblings.count %}
  41. <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>
  42. {% else %}
  43. <td width="20">&nbsp;</td>
  44. {% endifnotequal %}
  45. {% ifnotequal menu_item.rank 0 %}
  46. <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>
  47. {% else %}
  48. <td width="20">&nbsp;</td>
  49. {% endifnotequal %}
  50. {% else %}
  51. <td width="20">&nbsp;</td><td width="20">&nbsp;</td>
  52. {% endif %}
  53. </tr>
  54. {% endfor %}
  55. </tbody>
  56. </table>
  57. </div>
  58. </fieldset>
  59. {% endif %}
  60. {% endblock %}