/modules/mod_admin_predicate/templates/admin_predicate.tpl

https://code.google.com/p/zotonic/ · Smarty Template · 56 lines · 47 code · 9 blank · 0 comment · 2 complexity · cc7408afc53250a3449317cf1e331638 MD5 · raw file

  1. {% extends "admin_base.tpl" %}
  2. {% block title %} Predicates {% endblock %}
  3. {% block content %}
  4. {% with m.acl.is_admin as editable %}
  5. <div id="content" class="zp-85">
  6. <div class="block clearfix">
  7. <h2>Predicates</h2>
  8. {% if editable %}
  9. <div class="clearfix">
  10. {% button text="make a new predicate" action={dialog_predicate_new title=""} %}
  11. </div>
  12. <hr />
  13. {% endif %}
  14. <p>A predicate denotes traits or aspects of a page and expresses a relationship between two pages.
  15. The relation is always directed, from the subject to the object.<br/>Predicates are defined in ontologies like <a href="http://sioc-project.org/">SIOC</a>. On this page you can define the predicates known to Zotonic.</p>
  16. <h3 class="above-list">Predicate overview</h3>
  17. <ul class="short-list">
  18. <li class="headers clearfix">
  19. <span class="zp-20">Title</span>
  20. <span class="zp-20">Name</span>
  21. <span class="zp-40">Uri</span>
  22. <span class="zp-10">Reversed?</span>
  23. <span class="zp-10">Actions</span>
  24. </li>
  25. {% for name,p in m.predicate %}
  26. <li id="{{ #li.name }}">
  27. <a href="{% url admin_edit_rsc id=p.id %}" class="clearfix">
  28. <span class="zp-20">{{ p.title|default:"&nbsp;" }}</span>
  29. <span class="zp-20">{{ p.name|default:"&nbsp;" }}</span>
  30. <span class="zp-40">{{ p.uri|default:"&nbsp;" }}</span>
  31. <span class="zp-10">{{ p.reversed|yesno:"reversed,&nbsp;" }}</span>
  32. <span class="zp-10">
  33. {% button disabled=p.is_protected text="delete" action={dialog_predicate_delete id=p.id on_success={slide_fade_out target=#li.name}} %}
  34. {% button text="edit" action={redirect dispatch="admin_edit_rsc" id=p.id} %}
  35. </span>
  36. </a>
  37. </li>
  38. {% empty %}
  39. <li>
  40. No predicates found.
  41. </li>
  42. {% endfor %}
  43. </ul>
  44. </div>
  45. </div>
  46. {% endwith %}
  47. {% endblock %}