Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
0598a471
Commit
0598a471
authored
12 years ago
by
Bridger Maxwell
Browse files
Options
Downloads
Patches
Plain Diff
Wiki menu no longer shows edit for users who can't edit. Changed template to mako for convenience.
parent
3fc59b3d
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/templates/wiki/includes/article_menu.html
+37
-38
37 additions, 38 deletions
lms/templates/wiki/includes/article_menu.html
with
37 additions
and
38 deletions
lms/templates/wiki/includes/article_menu.html
+
37
−
38
View file @
0598a471
{% load i18n wiki_tags %}{% load url from future %}
## mako
<
%!
from
django.core.urlresolvers
import
reverse
%
>
{% with selected_tab as selected %}
<li
class=
"{% if selected == "
view
"
%}
active
{%
endif
%}"
>
<a
href=
"{% url 'wiki:get' article_id=article.id path=urlpath.path %}"
>
<span
class=
"icon icon-view"
></span>
{% trans "View" %}
<li
class=
"${"
active
"
if
selected_tab =
=
"
view
"
else
""}"
>
<a
href=
"${reverse('wiki:get', kwargs={'article_id' : article.id, 'path' : urlpath.path})}"
>
<span
class=
"icon-home"
></span>
View
</a>
</li>
<li
class=
"{% if selected == "
edit
"
%}
active
{%
endif
%}"
>
<a
href=
"{% url 'wiki:edit' article_id=article.id path=urlpath.path %}"
>
<span
class=
"icon icon-edit"
></span>
{% trans "Edit" %}
</a>
</li>
<li
class=
"{% if selected == "
history
"
%}
active
{%
endif
%}"
>
<a
href=
"{% url 'wiki:history' article_id=article.id path=urlpath.path %}"
>
<span
class=
"icon icon-changes"
></span>
{% trans "Changes" %}
</a>
</li>
{% for plugin in article_tabs %}
<li
class=
"{% if selected == plugin.slug %} active{% endif %}"
>
<a
href=
"{% url 'wiki:plugin' slug=plugin.slug article_id=article.id path=urlpath.path %}"
>
<span
class=
"icon icon-attachments {{ plugin.article_tab.1 }}"
></span>
{{ plugin.article_tab.0 }}
%if article.can_write(user):
<li
class=
"${"
active
"
if
selected_tab =
=
"
edit
"
else
""}"
>
<a
href=
"${reverse('wiki:edit', kwargs={'article_id' : article.id, 'path' : urlpath.path})}"
>
<span
class=
"icon-edit"
></span>
Edit
</a>
</li>
{% endfor %}
%endif
<li
class=
"${"
active
"
if
selected_tab =
=
"
history
"
else
""}"
>
<a
href=
"${reverse('wiki:history', kwargs={'article_id' : article.id, 'path' : urlpath.path})}"
>
<span
class=
"icon-time"
></span>
Changes
</a>
</li>
<li
class=
"{% if selected == "
settings
"
%}
active
{%
endif
%}"
>
{% if not user.is_anonymous %}
<a
href=
"{% url 'wiki:settings' article_id=article.id path=urlpath.path %}"
>
<span
class=
"icon icon-settings"
></span>
{% trans "Settings" %}
%for plugin in article_tabs:
%if hasattr(plugin, "article_tab"):
<li
class=
"${"
active
"
if
selected_tab =
=
plugin.slug
else
""}"
>
<a
href=
"${reverse('wiki:plugin', kwargs={'slug' : plugin.slug, 'article_id' : article.id, 'path' : urlpath.path}) }"
>
<span
class=
"${plugin.article_tab[1]}"
></span>
${plugin.article_tab[0]}
</a>
</li>
%endif
%endfor
%if not user.is_anonymous():
<li
class=
"${"
active
"
if
selected_tab =
=
"
settings
"
else
""}"
>
<a
href=
"${reverse('wiki:settings', kwargs={'article_id' : article.id, 'path' : urlpath.path})}"
>
<span
class=
"icon-wrench"
></span>
Settings
</a>
{% endif %}
</li>
%endif
{% endwith %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment