view MoinMoin/themes/basic/templates/modify.html @ 2440:3000fd5b0e29

adds div to modify view to check if modify view, instead of checking the URL
author sharky93 <rishabhr123@gmail.com>
date Sun, 01 Sep 2013 14:48:35 +0530
parents 1422a4849787
children 76098dbcb43c
line wrap: on
line source
{% extends theme("layout.html") %}
{% import "forms.html" as forms %}
{% import "utils.html" as utils %}
{% from theme("modify_meta.html") import basic_meta_editor %}
{% from theme("modify_text.html") import basic_data_editor %}
{% import theme("itemviews.html") as itemviews with context %}

{% set title = _("Modifying '%(item_name)s'", item_name=item_name) %}

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

{% block content %}
<h2>{{ title }}</h2>
<div id="moin-modify" class="moin-form">
    <div id="checkmodifyview"> </div>
    {{ gen.form.open(form, method='post', enctype='multipart/form-data') }}
    {{ forms.render_errors(form) }}
    {#
       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>
        <li><a href="#help" data-toggle="tab">Help</a></li>
    </ul>    
    <div class="tab-content">
        <div class="tab-pane active" id="editor">
            {{ basic_data_editor(form['content_form'], item_name, class='form-control') }}
        </div>
        <div class="tab-pane active" id="meta">
            <div class="row">
                <div class="col-lg-6">
                    {{ basic_meta_editor(form['meta_form']) }}
                </div>
                {% set field = form['extra_meta_text'] %}
                <div class="col-lg-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>
        <div class="tab-pane active" id="help">
            {% if form['content_form'].help %}
                <pre id="moin-editor-help">{{ form['content_form'].help }}</pre>
            {% endif %}
        </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 %}