/modules/mod_admin/templates/_admin_edit_content_publish.tpl

https://code.google.com/p/zotonic/ · Smarty Template · 58 lines · 46 code · 12 blank · 0 comment · 9 complexity · 8d3b251e03813e56388c1c40169d6247 MD5 · raw file

  1. {% extends "admin_edit_widget_std.tpl" %}
  2. {# Widget with main rsc controls: publish, delete, duplicate, etc #}
  3. {% block widget_title %}{_ Publish this page _}{% endblock %}
  4. {% block widget_show_minimized %}false{% endblock %}
  5. {% block widget_id %}sort-publish{% endblock %}
  6. {% block widget_content %}
  7. <div class="admin-form ">
  8. <div class="form-item clearfix">
  9. {% button type="submit" id="save_stay" class="save-resource do_tooltip" text=_"save" title=_"Save this page." disabled=not is_editable %}
  10. {% if is_editable %}
  11. {% button type="submit" id="save_view" class="save-resource do_tooltip" text=_"save &amp; view" title=_"Save and view the page." %}
  12. {% else %}
  13. {% button id="save_view" class="save-resource do_tooltip" text=_"view" title=_"View this page." action={redirect id=id} %}
  14. {% endif %}
  15. {% button class="discard-resource right do_tooltip" text=_"Cancel" action={redirect back} title=_"Go back." %}
  16. </div>
  17. <div class="form-item clearfix">
  18. <input type="checkbox" class="do_fieldreplace" id="is_published" name="is_published" value="1" {% if r.is_published %}checked="checked"{% endif %}/>
  19. <label for="is_published" class="left">{_ Published _}</label>
  20. <input type="checkbox" class="do_fieldreplace" id="is_featured" name="is_featured" value="1" {% if r.is_featured %}checked="checked"{% endif %}/>
  21. <label for="is_featured" class="left">{_ Featured _}</label>
  22. <input type="checkbox" class="do_fieldreplace" id="is_protected" name="is_protected" value="1" {% if r.is_protected %}checked="checked"{% endif %} {% ifequal id 1 %}disabled="disabled"{% endifequal %} />
  23. <label for="is_protected" class="left">{_ Protect from deletion _}</label>
  24. </div>
  25. <div class="form-item clearfix">
  26. {% ifnotequal id 1 %}
  27. {% button class="discard-resource do_tooltip" disabled=(r.is_protected or not m.rsc[id].is_deletable) id="delete-button" text=_"Delete" action={dialog_delete_rsc id=r.id on_success={redirect back}} title=_"Delete this page." %}
  28. {% endifnotequal %}
  29. {% if is_editable %}
  30. {% button type="submit" id="save_duplicate" class="save-resource do_tooltip" text=_"Duplicate" title=_"Duplicate this page." %}
  31. {% else %}
  32. {% button class="save-resource do_tooltip"
  33. text=_"Duplicate"
  34. action={dialog_duplicate_rsc id=id}
  35. title=_"Duplicate this page."
  36. disabled=(not m.acl.insert[r.category.name]) %}
  37. {% endif %}
  38. {% for id in m.search[{next id=id cat=m.rsc[id].category.name pagelen=1}] %}
  39. {% button class="goto-resource right do_tooltip" text="&raquo;" action={redirect dispatch="admin_edit_rsc" id=id} title=_"Next in category: "|append:m.rsc[id].title %}
  40. {% endfor %}
  41. {% for id in m.search[{previous id=id cat=m.rsc[id].category.name pagelen=1}] %}
  42. {% button class="goto-resource right do_tooltip" text="&laquo;" action={redirect dispatch="admin_edit_rsc" id=id} title=_"Previous in category: "|append:m.rsc[id].title %}
  43. {% endfor %}
  44. </div>
  45. </div>
  46. {% endblock %}