view MoinMoin/themes/basic/templates/show.html @ 2844:4560747c4506

if item view has no comments or transclusions, hide buttons on basic theme rework templates and JS so buttons are visible per templates and hidden by JS as required
author RogerHaase <haaserd@gmail.com>
date Thu, 23 Oct 2014 09:38:41 -0700
parents 60d98f1d7f5e
children 22796e5b5361
line wrap: on
line source
{% extends theme("layout.html") %}
{% import "utils.html" as utils %}
{% import theme("itemviews.html") as itemviews with context %}
{% set exists = storage.has_item(item_name) %}

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

{% block content %}

    {% block content_data %}
        {% if data_rendered %}
            <div id="moin-content-data">
                {{ data_rendered }}
            </div>
        {% endif %}
    {% endblock %}

{% endblock %}

{% block user_actions %}
    {{ local_panel_main(user_actions) }}
{% endblock %}

{% block item_actions %}
    {{ local_panel_main(item_actions) }}
{% endblock %}

{% block local_panel %}

    <div class="moin-list-heading">
        <div class="list-group-item-heading">
            {{ _("View Options") }}
            <a class="moin-showhide moin-viewoptions" href="#">
                <i class="fa fa-lg fa-caret-right"></i>
            </a>
        </div>
        <div id="moin-view-options" class="hidden">
            {# TODO: review themes/init.py and config/default.py to improve support #}
            {{ local_panel_main(item_navigation) }} {# Discussion #}
            <div class="moin-toggle-comments-button list-group-item">
                <a class="moin-toggle-comments-tooltip" href="#" title="Hide comments">
                    <i class="fa fa-comment-o"></i>
                    Comments
                </a>
            </div>
            <div class="moin-transclusions-button list-group-item">
                <a class="moin-transclusions-tooltip" href="#" title="Show transclusions">
                    <i class="fa fa-paste"></i>
                    Transclusions
                </a>
            </div>
        </div>
    </div>

    {% if user_actions %}
        <div class="moin-list-heading">
            <div class="list-group-item-heading">
                {{ _("User Actions") }}
                <a class="moin-showhide moin-useractions" href="#" >
                    <i class="fa fa-lg fa-caret-right"></i>
                </a>
            </div>
            <div id="moin-user-actions" class="hidden">{{ self.user_actions() }}</div>
        </div>
    {% endif %}

    {% if item_actions %}
        <div class="moin-list-heading">
            <div class="list-group-item-heading">
                {{ _("Item Actions") }}
                <a class="moin-showhide moin-itemactions" href="#" >
                    <i class="fa fa-lg fa-caret-right"></i>
                </a>
            </div>
            <div id="moin-item-actions" class="hidden">{{ self.item_actions() }}</div>
        </div>
    {% endif %}
{% 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 %}