Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3919 from MatonAnthony/bug-1289589
Browse files Browse the repository at this point in the history
Fix bug 1289589 : Remove edit button from templates if the user cannot edit them
  • Loading branch information
jwhitlock committed Aug 9, 2016
2 parents da50e6b + 901fc4c commit ac827d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kuma/wiki/jinja2/wiki/includes/buttons.html
Expand Up @@ -37,7 +37,9 @@
</div>
</li>{% endif %}

{% if (not document.is_template) or (user.has_perm('wiki.change_template_document')) %}
<li class="page-buttons-edit"><a href="{{ edit_link }}" class="button" data-optimizely-hook="button-edit-doc" id="edit-button">{{ _('Edit') }}<i aria-hidden="true" class="icon-pencil"></i></a></li>
{% endif %}

{% if user.is_authenticated() and document %}
<li><button id="watch-menu" class="only-icon" aria-haspopup="true" aria-owns="watch-menu-submenu" aria-expanded="false"><span>{{ _('Watch') }}</span><i aria-hidden="true" class="icon-eye"></i></button>
Expand All @@ -57,8 +59,6 @@
<div class="title">{{ _('Advanced') }}</div>
<ul>
<li><a href="{{ url('wiki.document_revisions', document.slug) }}" rel="nofollow, noindex">{{_('History')}}</a></li>
{% if user.is_authenticated() and document %}
</li>{% endif %}
{% if user.is_authenticated() and not document.is_template %}
<li><a href="{{ url('wiki.create') }}?parent={{ document.id }}" rel="nofollow, noindex">{{ _('New sub-article') }}</a></li>
<li><a href="{{ url('wiki.create') }}?clone={{ document.id }}{% if document.parent_topic %}&amp;parent={{ document.parent_topic.id }}{% endif %}" rel="nofollow, noindex">{{ _('Clone this article') }}</a></li>
Expand Down

0 comments on commit ac827d1

Please sign in to comment.