view MoinMoin/themes/basic/templates/modify.html @ 2945:72c5a7d688b5

trivial change to fix indentation on modify.html
author RogerHaase <haaserd@gmail.com>
date Sun, 10 May 2015 14:05:56 -0700
parents 4ab27780d078
children
line wrap: on
line source
{% extends theme("layout.html") %}
{% import "forms.html" as forms %}
{% import "utils.html" as utils %}
{% from theme(form.meta_template) import basic_meta_editor %}
{% import theme("itemviews.html") as itemviews with context %}
{% import theme(form['content_form'].template) as content_template %}
{% set extra_head = content_template.extra_head %}
{% if content_template.basic_data_editor is defined %}
    {% set data_editor = content_template.basic_data_editor %}
{% else %}
    {% set data_editor = content_template.data_editor %}
{% endif %}
{% set title = _("Modifying '%(item_name)s'", item_name=item_name) %}

{% block head %}
    {{ super() }}
    {% if extra_head %}
        {{ extra_head() }}
    {% endif %}
{% endblock %}

{% block views %}
    {{ itemviews }}
{% endblock %}

{% block content %}
    <h1>{{ title }}</h1>
    <div id="moin-modify" class="moin-form">
        <a class="btn btn-success" style="float: right" href="{{ url_for('.download_item', item_name=item_name, mimetype='application/x.moin.download') }}">
            <span class="fa fa-download"></span> {{ _('Download') }}
        </a>
        {{ gen.form.open(form, method='post', enctype='multipart/form-data') }}
            {{ forms.render_errors(form) }}
            {{ forms.render_errors(form['meta_form']['acl']) }}
            {#
               Workaround:
               For *Draw content, hide submit button and form['comment'], since *Draw
               POSTs originate from their respective applets.
            #}
            <ul class="moin-nav nav-tabs moin-shadow">
                <li class="active"><a href="#editor" data-toggle="tab">Edit Content</a></li>
                <li><a href="#meta" data-toggle="tab">Edit Meta</a></li>
                {% if user.may.admin(fqname) %}
                    <li><a href="#acl" data-toggle="tab">Edit ACL</a></li>
                {% endif %}
                <li><a href="#help" data-toggle="tab">Help</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active" id="editor">
                    {{ data_editor(form['content_form'], item_name) }}
                </div>
                <div class="tab-pane active" id="meta">
                    <div class="row">
                        <div class="col-md-6">
                            {{ basic_meta_editor(form['meta_form']) }}
                        </div>
                        {% set field = form['extra_meta_text'] %}
                        <div class="col-md-6">
                            <div class="form-group">
                                {{ gen.label(field) }}
                                {{ gen.textarea(field, rows=field.properties.rows|string, cols=field.properties.cols|string, class='form-control') }}
                            </div>
                        </div>
                    </div>
                </div>

                {% set field = form['meta_form']['acl'] %}
                {% if user.may.admin(fqname) %}
                    <div class="tab-pane active" id="acl">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    {{ gen.label(field) }}
                                    {{ gen.textarea(field, rows='1', class='form-control') }}
                                </div>
                            </div>
                        </div>
                    </div>
                {% else %}
                    {{ gen.input(field, type='hidden', class='form-control') }}
                {% endif %}

                <div class="tab-pane active" id="help">
                    {{ utils.help_on_editing(help) }}
                </div>
            </div>
            {#
            {{ gen.textarea(form['meta_text'], lang='en', dir='ltr', rows=rows_meta, cols=cols) }}
            <br />
            {{ forms.render_errors(form['meta_text']) }}
            #}
            {% if not form['content_form'].is_draw %}
                <div class="form-group">
                    {{ forms.render_textcha(gen, form) }}
                    {{ gen.input(form['comment'], type="text", class="form-control") }}
                </div>
                <div class="form-group">
                    {{ forms.render_submit(form, value='Save', class='btn btn-primary', id='moin-save-text-button') }}
                </div>
            {% endif %}

        {{ gen.form.close() }}
    </div>
{% endblock %}

{% block options_for_javascript %}
    {%- if user.scroll_page_after_edit -%}
        <br id="moin-scroll-page-after-edit" />
    {%- endif %}
{% endblock %}