/modules/mod_admin/templates/_admin_edit_content.query.tpl

https://code.google.com/p/zotonic/ · Smarty Template · 30 lines · 23 code · 7 blank · 0 comment · 1 complexity · 655901a767703742e52057d21be662ad MD5 · raw file

  1. {% extends "admin_edit_widget_std.tpl" %}
  2. {# To edit the stored search query #}
  3. {% block widget_title %}{_ Search query _}{% endblock %}
  4. {% block widget_show_minimized %}false{% endblock %}
  5. {% block widget_content %}
  6. {% with m.rsc[id] as r %}
  7. <fieldset class="admin-form">
  8. <div class="notification notice">
  9. {_ Here you can edit the arguments of the search query. Every argument goes on its own line. For more information, see the
  10. <a href="http://zotonic.com/documentation/761/the-query-search-model">documentation on the query arguments</a> on the Zotonic website. _}
  11. </div>
  12. <div class="form-item clearfix">
  13. <label for="query">{_ Query _}</label>
  14. <textarea id="{{ #query }}" name="query" rows="15">{{ r.query }}</textarea>
  15. {% wire id=#query type="change" postback={query_preview rsc_id=id div_id=#querypreview} delegate="resource_admin_edit" %}
  16. </div>
  17. <h3>{_ Query preview _}</h3>
  18. <div class="query-results" id="{{ #querypreview }}">
  19. {% include "_admin_query_preview.tpl" result=m.search[{query query_id=id}] %}
  20. </div>
  21. </fieldset>
  22. {% endwith %}
  23. {% endblock %}