Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
cecdc34f
Commit
cecdc34f
authored
Aug 18, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wiki menu no longer shows edit for users who can't edit. Changed template to mako for convenience.
parent
9854bd13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
38 deletions
+37
-38
lms/templates/wiki/includes/article_menu.html
+37
-38
No files found.
lms/templates/wiki/includes/article_menu.html
View file @
cecdc34f
{% load i18n wiki_tags %}{% load url from future %}
## mako
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
{% with selected_tab as selected %}
<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
<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" %}
</a>
</a>
</li>
</li>
<li
class=
"{% if selected == "
edit
"
%}
active
{%
endif
%}"
>
<a
href=
"{% url 'wiki:edit' article_id=article.id path=urlpath.path %}"
>
%if article.can_write(user):
<span
class=
"icon icon-edit"
></span>
<li
class=
"${"
active
"
if
selected_tab =
=
"
edit
"
else
""}"
>
{% trans "Edit" %}
<a
href=
"${reverse('wiki:edit', kwargs={'article_id' : article.id, 'path' : urlpath.path})}"
>
</a>
<span
class=
"icon-edit"
></span>
</li>
Edit
<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 }}
</a>
</a>
</li>
</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
%}"
>
%for plugin in article_tabs:
{% if not user.is_anonymous %}
%if hasattr(plugin, "article_tab"):
<a
href=
"{% url 'wiki:settings' article_id=article.id path=urlpath.path %}"
>
<li
class=
"${"
active
"
if
selected_tab =
=
plugin
.
slug
else
""}"
>
<span
class=
"icon icon-settings"
></span>
<a
href=
"${reverse('wiki:plugin', kwargs={'slug' : plugin.slug, 'article_id' : article.id, 'path' : urlpath.path}) }"
>
{% trans "Settings" %}
<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>
</a>
{% endif %}
</li>
</li>
%endif
{% endwith %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment