zine-main / zine / templates / admin / edit_page.html

{% extends "admin/layout.html" %}
{% from "admin/_form_helpers.html" import render_formbox, render_post_actions %}
{% set title_suffix = _("New Page") if form.new else _("Edit Page") %}
{% block title %}{% if form.post.title %}{{ form.post.title|e }}{%
  endif %}​{{ title_suffix }}{% endblock %}
{% block contents %}
  {% if form.preview %}
    <h1>{{ _('Preview') }} (<a href="#form_start">{{ _('skip') }}</a>)</h1>
    <div class="preview" id="preview">
      <div class="text">
        {{ form.render_preview() }}
      </div>
    </div>
  {% endif %}
  <h1>{{ self.title() }}{% if not form.new %} <a href="{{ url_for(form.post)
    }}" class="preview">{{ _("View Page") }}</a>{% endif %}</h1>
  <a name="form_start" /></a>
  {% call form(id="post_form") %}
    {%- if form.parser_missing %}
      <ul class="errors">
        <li><strong>{{ _("Important:") }}</strong>
        {% trans %}This post was created with a parser that is no longer
        available.  You won't be able to save the post with the same parser
        unless you re-activate the plugin that provided it.{% endtrans %}
      </ul>
    {%- endif %}
    <div class="formbox formbox-title">
      <h3>{{ form.title.label() }}</h3>
      {{ form.title(size=36) }}
    </div>
    <div class="formbox">
      <h3>{{ form.text.label() }}</h3>
      {{ form.text(rows=12, class='resizable') }}
    </div>
    <div class="secondary">{{ render_post_actions(form) }}</div>
    {{ render_formbox(form.slug, collapsed=false) }}
    <div class="formbox toggleable">
      <h3>{{ form.status.label() }}</h3>
      {{ form.status()}}
      {%- if form.status.help_text %} <span class="explanation">{{ form.status.help_text }}</span>{%- endif %}
      {{ form.pub_date.label() }}
      {{ form.pub_date()}}
      {%- if form.pub_date.help_text %} <span class="explanation">{{ form.pub_date.help_text }}</span>{%- endif %}
    </div>
    {{ render_formbox(form.tags) }}
    {{ render_formbox(form.categories) }}
    {{ render_formbox(form.parser) }}
    <div class="formbox toggleable collapsed">
      <h3>{{ _("Discussion") }}</h3>
      <ul>
        {{ form.comments_enabled.as_li() }}
        {{ form.pings_enabled.as_li() }}
        {{ form.ping_links.as_li() }}
      </ul>
    </div>
    {{ render_formbox(form.author) }}
    {% if not form.new %}
      <p class="preview">
        <a href="{{ url_for(form.post) }}">{{ _("View Page") }}</a>
      </p>
    {% endif %}
    {{ render_post_actions(form) }}
  {% endcall %}
{% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.