/doc/tpl/admin/_admin_widget_std.tpl

https://code.google.com/p/zotonic/ · Smarty Template · 42 lines · 31 code · 11 blank · 0 comment · 4 complexity · 2e0842a73d194448320c6f1305908e26 MD5 · raw file

  1. {% extends "admin_edit_widget_std.tpl" %}
  2. {#
  3. Example of standard and simple widget for /admin/edit/N page.
  4. Similar skeleton also used for basis of sidebar widgets.
  5. #}
  6. {# Title data for widget headline. #}
  7. {% block widget_title %}{_ Edit title _}{% endblock %}
  8. {# Widget may be displayed to user as minimized by default
  9. NOTE: content precense in this block is mandatory #}
  10. {% block widget_show_minimized %}true{% endblock %}
  11. {# Some tags, that will be rendered before widget contained.
  12. Do NOT include other widgets here, because dtl compiler will throw recursion error #}
  13. {% block widget_before %}{% endblock %}
  14. {# The content. The body of widget. #}
  15. {% block widget_content %}
  16. {% with m.rsc[id] as r %}
  17. <fieldset class="admin-form">
  18. <div class="form-item clearfix">
  19. <label for="title">{_ Title _}</label>
  20. <input id="title" type="text" name="title" value="{{ r.title }}" />
  21. </div>
  22. </fieldset>
  23. {% endwith %}
  24. {% endblock %}
  25. {# Some optional tags, that will be rendered immediately after widget container.
  26. For example, some javascript: #}
  27. {% block widget_after %}
  28. <script type="text/javascript">
  29. alert("Hello World!");
  30. </script>
  31. {% endblock %}