view MoinMoin/templates/show.html @ 2851:5a49eeb1f307

add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
author RogerHaase <haaserd@gmail.com>
date Wed, 19 Nov 2014 11:51:19 -0700
parents 22796e5b5361
children
line wrap: on
line source
{% extends theme("layout.html") %}

{% import "utils.html" as utils %}
{% import "snippets.html" as snippets with context %}

{% set footer_meta = snippets.footer_meta() %}

{% block head_links %}
    {{ super() }}
    <link rel="alternate" title="{{ item_name }} changes" href="{{ url_for('feed.atom', item_name=item_name) }}" type="application/atom+xml" />
    {# universal edit button support #}
    {%- if user.may.write(item_name) and 'frontend.modify_item' not in cfg.endpoints_excluded -%}
        <link rel="alternate" type="application/wiki" title="{{ _('Modify') }}" href="{{ url_for('frontend.modify_item', item_name=item_name) }}" />
    {%- endif %}
{% endblock %}

{% import "itemviews.html" as itemviews with context %}

{% block header_itemviews %}
    {{ itemviews }}
{% endblock %}

{% macro rev_navigation(view='frontend.show_item') %}
    <ul id="moin-rev-navigation">
        <li class="moin-rev-navigation-older">
            {% if rev.revid != 'current' -%}
                <a href="{{ url_for(view, rev=rev.revno-1, item_name=item_name) }}">&lt;-- {{ _('older') }}</a>
            {%- else -%}
                <span class="moin-disabled">{{ _('no older revision') }}</span>
            {%- endif %}
        </li>
        <li class="moin-rev-navigation-current">rev {{ rev.revid }}</li>
        <li class="moin-rev-navigation-newer">
            {% if rev.revno < last_rev_no -%}
                <a href="{{ url_for(view, rev=rev.revno+1, item_name=item_name) }}">{{ _('newer') }} --&gt;</a>
            {%- else -%}
                <span class="moin-disabled">{{ _('no newer revision') }}</span>
            {%- endif %}
        </li>
    </ul>
{% endmacro %}

{% block subitem_navigation %}
    {{ utils.render_subitem_navigation(fqname or item_name, False) }}
{% endblock %}

{% block content %}
    {% if show_navigation %}
        {% block rev_navigation %}
            {{ rev_navigation(view='frontend.show_item') }}
        {% endblock %}
    {% endif %}

    {% block headline %}
        {# <h1>{{ rev.item.name }} {% if show_revision %}(Revision {{ rev.revid }}){% endif %}</h1> #}
        {% if item.meta['summary'] %}
            <div id="moin-summary">
                {{ _('Summary: %(summary)s', summary=item.meta['summary']) }}
            </div>
        {% endif %}
    {% endblock %}
    {% block content_data %}
        {% if data_rendered %}
            <div id="moin-content-data">
                {{ data_rendered }}
            </div>
        {% endif %}
    {% endblock %}
{% endblock %}

{% block footer_hr %}{% endblock %}

{% block footer_itemviews %}
    {{ itemviews }}
{% endblock %}

{% block footer_meta %}
    {{ footer_meta }}
{% endblock %}

{% block options_for_javascript %}
    {%- if item_name and user.edit_on_doubleclick and user.may.write(item_name) -%}
        <br id="moin-edit-on-doubleclick" />
    {%- endif %}
    {%- if user.show_comments -%}
        <br id="moin-show-comments" />
    {%- endif %}
{% endblock %}