view MoinMoin/templates/ticket/base.html @ 2657:080673c3e60a

Now nameless items can also be downloaded and removed unnecessary blank spaces in items/content.py
author Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
date Sun, 06 Jul 2014 09:25:31 +0530
parents c05ad337ac22
children b41fae684e47
line wrap: on
line source
{% import "forms.html" as forms %}
{% extends theme("layout.html") %}

{% macro render_meta() %}
    {% for e in [
        'summary',
        'effort',
        'difficulty',
        'severity',
        'priority',
        'tags',
        ] %}
        {{ forms.render(form['meta'][e]) }}
    {% endfor %}
{% endmacro %}

{% macro render_selectlists() %}
    {% for e in [
        'assigned_to',
        'superseded_by',
        'depends_on',
        ] %}
        {{ forms.render(form['meta'][e]) }}
    {% endfor %}
{% endmacro %}

{% macro render_backref() %}
    {% for e in [
        'supersedes',
        'required_by',
        'subscribers',
        ] %}
        {{ forms.render(form['backrefs'][e]) }}
    {% endfor %}
{% endmacro %}

{% block head %}
    {{ super() }}
    <link media="all" rel="stylesheet" href="{{ url_for('static', filename='css/ticket.css') }}" />
{% endblock %}

{% set exists = item.fqname and storage.get_item(**item.fqname.query) %}
{% block local_panel %}
    {% if user.valid and exists %}
        <div class="list-group">
            <div class="list-group-item moin-list-heading">
                {{ _("User Actions") }}
                <a class="moin-showhide moin-useractions" href="#" >[+]</a>
            </div>
            <div id="user-actions" class="hidden">
                <a href="{{ url_for('frontend.quicklink_item', item_name=item.fqname) }}" class="list-group-item" rel="nofollow" title="Create or remove a navigation link to this item">
                    <i class="icon-star-empty icon-fixed-width"></i>
                    {%- if user.is_quicklinked_to([item.fqname]) %}
                        {{ _('Remove Link') }}
                    {%- else %}
                        {{ _('Add Link') }}
                    {%- endif %}
                </a>
                <a href="{{ url_for('frontend.subscribe_item', item_name=item.fqname) }}" class="list-group-item" rel="nofollow" title="witch notifications about item changes on or off">
                    <i class="icon-envelope icon-fixed-width"></i>
                    {%- if user.is_subscribed_to(item) %}
                        {{ _('Unsubscribe') }}
                    {%- else %}
                        {{ _('Subscribe') }}
                    {%- endif %}
                </a>
            </div>
        </div>
    {% endif %}
{% endblock %}

{% macro itemviews() %}
    {% if user.valid and exists %}
        <ul class="moin-itemviews panel">
            <li>
                <a href="{{ url_for('frontend.quicklink_item', item_name=item.fqname) }}" title="Create or remove a navigation link to this item" rel="nofollow">
                    {% if user.is_quicklinked_to([item.fqname]) %}
                        {{ _('Remove Link') }}
                    {%- else %}
                        {{ _('Add Link') }}
                    {%- endif %}
                </a>
            </li>
            <li>
                <a href="{{ url_for('frontend.subscribe_item', item_name=item.fqname) }}" title="Switch notifications about item changes on or off" rel="nofollow">
                    {%- if user.is_subscribed_to(item) %}
                        {{ _('Unsubscribe') }}
                    {%- else %}
                        {{ _('Subscribe') }}
                    {%- endif %}
                </a>
            </li>
        </ul>
    {% endif %}
{% endmacro %}

{% block header_itemviews %}
    {{ itemviews() }}
{% endblock %}

{% block content %}
<h1>
    {% block title_text %}
    {% endblock %}
    {% if closed %}
        {# TODO style .moin-ticket-closed #}
        <span class="moin-ticket-closed">{{ _("(Closed)") }}</span>
    {% endif %}
</h1>
<div class="moin-form" id="moin-ticket-form">
    {{ gen.form.open(form, method='post', enctype='multipart/form-data') }}

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

    {% block form_controls %}
    {% endblock %}

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

{% block footer_itemviews %}
    {{ itemviews() }}
{% endblock %}