Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 31 additions & 29 deletions src/moin/templates/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,50 +154,52 @@
<tr>
<td>Item Links</td>
<td>
{%- if meta['itemlinks'] -%}
{%- for item in meta['itemlinks']|sort -%}
<a href="{{ url_for('frontend.show_item', item_name=item) }}" {% if not theme_supp.itemlink_exists(item) %}class="moin-nonexistent"{% endif %}>{{ item }}</a>
{%- if not loop.last %}, {% endif -%}
{%- endfor -%}
{%- else -%}
(None)
{%- endif -%}
{%- if meta['itemlinks'] -%}
{%- for item in meta['itemlinks']|sort -%}
<a href="{{ url_for('frontend.show_item', item_name=item) }}" {% if not theme_supp.itemlink_exists(item) %}class="moin-nonexistent"{% endif %}>{{ item }}</a>
{%- if not loop.last %}, {% endif -%}
{%- endfor -%}
{%- else -%}
(None)
{%- endif -%}
</td>
</tr>
<tr>
<td>Item Transclusions</td>
<td>
{%- if meta['itemtransclusions'] -%}
{%- for item in meta['itemtransclusions']|sort -%}
<a href="{{ url_for('frontend.show_item', item_name=item) }}" {% if not theme_supp.item_exists(item) %}class="moin-nonexistent"{% endif %}>{{ item }}</a>
{%- if not loop.last %}, {% endif -%}
{%- endfor -%}
{%- else -%}
(None)
{%- endif -%}
{%- if meta['itemtransclusions'] -%}
{%- for item in meta['itemtransclusions']|sort -%}
<a href="{{ url_for('frontend.show_item', item_name=item) }}" {% if not theme_supp.item_exists(item) %}class="moin-nonexistent"{% endif %}>{{ item }}</a>
{%- if not loop.last %}, {% endif -%}
{%- endfor -%}
{%- else -%}
(None)
{%- endif -%}
</td>
</tr>
<tr><td>Item Type</td><td>{{ meta['itemtype'] }}</td></tr>
<tr><td>Language</td><td>{{ meta['language'] }}</td></tr>
<tr><td>Modified Time</td><td>{{ meta['mtime']|time_datetime }}</td></tr>
<tr><td>Name</td><td>
{%- if meta['name'] -%}
{%- set names = ' <i class="fa fa-circle moin-tiny"></i> '.join(meta['name']) -%}
{{ names|safe }}
{%- else -%}
(None)
{%- endif -%}
<tr>
<td>Name</td>
<td>
{%- if meta['name'] -%}
{%- set names = ' <i class="fa fa-circle moin-tiny"></i> '.join(meta['name']) -%}
{{ names|safe }}
{%- else -%}
(None)
{%- endif -%}
</td>
</tr>
<tr>
<td>Old Name</td>
<td>
{%- if meta['name_old'] -%}
{%- set names = ' <i class="fa fa-circle moin-tiny"></i> '.join(meta['name_old']) -%}
{{ names|safe }}
{%- else -%}
(None)
{%- endif -%}
{%- if meta['name_old'] -%}
{%- set names = ' <i class="fa fa-circle moin-tiny"></i> '.join(meta['name_old']) -%}
{{ names|safe }}
{%- else -%}
(None)
{%- endif -%}
</td>
</tr>
<tr><td>Namespace</td><td>{{ meta['namespace'] }}</td></tr>
Expand Down
12 changes: 6 additions & 6 deletions src/moin/themes/basic/templates/itemviews.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
{% if navtabs %}
<ul class="nav nav-tabs moin-nav moin-shadow">
{% for endpoint, href, maincls, iconcls, linkcls, title, label in navtabs %}
<li class="nav-item">
<a class="nav-link{% if maincls %} {{ maincls }}{% endif %}{% if linkcls %} {{ linkcls }}{% endif %}" href="{{ href }}" title="{{ title }}" rel="nofollow">
<span class="{{ iconcls }}"></span>
<span class="hidden-sm hidden-xs">{{ label }}</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link{% if maincls %} {{ maincls }}{% endif %}{% if linkcls %} {{ linkcls }}{% endif %}" href="{{ href }}" title="{{ title }}" rel="nofollow">
<span class="{{ iconcls }}"></span>
<span class="hidden-sm hidden-xs">{{ label }}</span>
</a>
</li>
{% endfor %}
</ul>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion src/moin/themes/basic/templates/modify.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h1>{{ title }}</h1>
<li class="nav-item"><a class="nav-link active" href="#editor" data-toggle="tab">Edit Content</a></li>
<li class="nav-item"><a class="nav-link" href="#meta" data-toggle="tab">Edit Meta</a></li>
{% if user.may.admin(fqname) %}
<li class="nav-item"><a class="nav-link" href="#acl" data-toggle="tab">Edit ACL</a></li>
<li class="nav-item"><a class="nav-link" href="#acl" data-toggle="tab">Edit ACL</a></li>
{% endif %}
<li class="nav-item"><a class="nav-link" href="#help" data-toggle="tab">Help</a></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion src/moin/themes/focus/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ window.onload = function () {
toggleVisibility(navibar, "flex")
toggleVisibility(breadcrumb)
})
}
}
200 changes: 100 additions & 100 deletions src/moin/themes/focus/templates/itemviews.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,117 +45,117 @@
</div>
<div id="top-bar-menu-content">
{%- for endpoint, label, title, check_exists in cfg.item_views if not endpoint in cfg.endpoints_excluded %}
{% set icon_class = icon_classes[endpoint] %}
{%- if may.write
and not_trash
and endpoint == 'frontend.modify_item'
and current_path.startswith("/+")
and not current_path.startswith("/+modify/")
%}
<div>
<a class="moin-modify-button" href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}
{%- if endpoint in [
'frontend.show_item_meta',
'frontend.history',
'frontend.download_item',
] %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}
{% set icon_class = icon_classes[endpoint] %}
{%- if may.write
and not_trash
and endpoint == 'frontend.modify_item'
and current_path.startswith("/+")
and not current_path.startswith("/+modify/")
%}
<div>
<a class="moin-modify-button" href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}
{%- if endpoint in [
'frontend.show_item_meta',
'frontend.history',
'frontend.download_item',
] %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}

{%- if not_trash and endpoint in [
'frontend.index',
'frontend.refs',
'frontend.sitemap',
'frontend.similar_names',
'frontend.copy_item',
] %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}
{%- if not_trash and endpoint in [
'frontend.index',
'frontend.refs',
'frontend.sitemap',
'frontend.similar_names',
'frontend.copy_item',
] %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}

{%- if endpoint == 'frontend.highlight_item' and item and ('text' in item.contenttype or 'docbook' in item.contenttype) %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}
{%- if endpoint == 'frontend.highlight_item' and item and ('text' in item.contenttype or 'docbook' in item.contenttype) %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}

{%- if endpoint in [
'frontend.rename_item', 'frontend.delete_item',
] and may.write and not_trash %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}
{%- if endpoint in [
'frontend.rename_item', 'frontend.delete_item',
] and may.write and not_trash %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}

{%- if endpoint in [
'frontend.convert_item',
] and may.write and item and theme_supp.is_markup_or_text(item.contenttype) and not_trash %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}
{%- if endpoint in [
'frontend.convert_item',
] and may.write and item and theme_supp.is_markup_or_text(item.contenttype) and not_trash %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}

{%- if endpoint == 'frontend.destroy_item' and may.destroy %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}
{%- if endpoint == 'frontend.destroy_item' and may.destroy %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}

{%- if endpoint == 'frontend.quicklink_item' and user.valid and not_trash %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">
{%- if user.is_quicklinked_to([fqname]) %}
{{ a_label(icon_class, _('Remove Link')) }}
{%- else %}
{{ a_label(icon_class, _('Add Link')) }}
{%- endif %}
</a>
</div>
{%- endif %}
{%- if endpoint == 'frontend.quicklink_item' and user.valid and not_trash %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">
{%- if user.is_quicklinked_to([fqname]) %}
{{ a_label(icon_class, _('Remove Link')) }}
{%- else %}
{{ a_label(icon_class, _('Add Link')) }}
{%- endif %}
</a>
</div>
{%- endif %}

{%- if endpoint == 'frontend.subscribe_item' and user.valid and not_trash %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">
{%- if user.is_subscribed_to(item) %}
{{ a_label(icon_class, _('Unsubscribe')) }}
{%- else %}
{{ a_label(icon_class, _('Subscribe')) }}
{%- endif %}
</a>
</div>
{%- endif %}
{%- if endpoint == 'frontend.subscribe_item' and user.valid and not_trash %}
<div>
<a href="{{ url_for(endpoint, item_name = fqname) }}" title="{{ title }}" rel="nofollow">
{%- if user.is_subscribed_to(item) %}
{{ a_label(icon_class, _('Unsubscribe')) }}
{%- else %}
{{ a_label(icon_class, _('Subscribe')) }}
{%- endif %}
</a>
</div>
{%- endif %}

{%- if endpoint == 'special.comments' and not_trash %}
<div class="moin-toggle-comments-button">
<a class="moin-toggle-comments-tooltip" href="#" title="{{ title }}">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}
{%- if endpoint == 'special.comments' and not_trash %}
<div class="moin-toggle-comments-button">
<a class="moin-toggle-comments-tooltip" href="#" title="{{ title }}">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}

{% if endpoint == 'special.transclusions' and not_trash -%}
<div class="moin-transclusions-button">
<a class="moin-transclusions-tooltip" href="#" title="{{ title }}">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}
{% if endpoint == 'special.transclusions' and not_trash -%}
<div class="moin-transclusions-button">
<a class="moin-transclusions-tooltip" href="#" title="{{ title }}">{{ a_label(icon_class, label) }}</a>
</div>
{%- endif %}

{%- if endpoint == 'special.supplementation' and fqname %}
{%- for sub_item_name in cfg.supplementation_item_names %}
{%- set current_sub = item_name.rsplit('/', 1)[-1] %}
{%- if not current_sub in cfg.supplementation_item_names %}
{%- set supp_name = '%s/%s/%s' % (fqname.namespace, item_name, sub_item_name) %}
{%- if not_trash and (storage.has_item(supp_name) or user.may.write(supp_name)) %}
{% set title = _('Discuss contents of this item') %}
<div>
<a class="moin-subitem-discuss" href="{{ url_for('frontend.show_item', item_name=supp_name) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, _(sub_item_name)) }}</a>
</div>
{%- if endpoint == 'special.supplementation' and fqname %}
{%- for sub_item_name in cfg.supplementation_item_names %}
{%- set current_sub = item_name.rsplit('/', 1)[-1] %}
{%- if not current_sub in cfg.supplementation_item_names %}
{%- set supp_name = '%s/%s/%s' % (fqname.namespace, item_name, sub_item_name) %}
{%- if not_trash and (storage.has_item(supp_name) or user.may.write(supp_name)) %}
{% set title = _('Discuss contents of this item') %}
<div>
<a class="moin-subitem-discuss" href="{{ url_for('frontend.show_item', item_name=supp_name) }}" title="{{ title }}" rel="nofollow">{{ a_label(icon_class, _(sub_item_name)) }}</a>
</div>
{%- endif %}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endfor %}
</div>
</div>
Expand Down
Loading