{# vim: set ts=2 et sts=2 sw=2: #}
{% if not discard_href %}
  {% if document %}
    {% set discard_href = url('wiki.document', document.full_path) %}
  {% else %}
    {% set discard_href = url('wiki.new_document') %}
  {% endif %}
{% endif %}
<ul id="page-buttons" 
    data-new-page-href="{{ url('wiki.new_document') }}"
    data-new-page-label="{{ _('New Page') }}"
    data-new-page-msg="{{ _('Discard changes and create a new document?') }}">
  {% if document %}
    <li>
      <iframe id="save-and-edit-target" name="save-and-edit-target"></iframe>
      <button type="submit" id="btn-save-and-edit" class="btn-save"><span>{{ _('Save and Keep Editing') }}</span></button>
    </li>
  {% endif %}
  <li><button type="submit" id="btn-save" class="btn-save">{{ _('Save Changes') }}</button></li>
  <li><button type="button" id="btn-preview" class="btn-preview" data-preview-url="{{ url('wiki.preview') }}">{{ _('Preview Changes') }}</button></li>
  <li><a href="{{ discard_href }}" id="btn-discard" class="btn-discard">{{ _('Discard Changes') }}</a></li>
</ul>
