Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #52 from transifex/maintainer_tab_perms

Maintainer tab perms
  • Loading branch information...
commit 0a3c332042952ba4eae5044094f9bc2fd5920f9c 2 parents 46b61c7 + ace4a47
@sawidis sawidis authored
View
2  transifex/templates/projects/project_detail_languages.html
@@ -27,7 +27,7 @@ <h3 class="sh-label notopmargin">
<a class="i16 language-add" id="request-team-button" href="javascript:;">{% trans "Request language" %}</a>
{% endif %}
{% if not project.anyone_submit and not project.outsource %}
- {% if perms.projects.change_team or is_maintainer %}
+ {% if is_maintainer %}
<a class="i16 nude-button add" href="{% url team_create project.slug %}">{% trans "Create language" %}</a>
{% endif %}
{% endif %}
View
10 transifex/templates/teams/team_menu.html
@@ -6,6 +6,7 @@
{% load permissions %}
{% load txpermissions %}
+
{% block extra_head %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{% url project_feed param=project.slug %}" />
{% endblock %}
@@ -62,6 +63,8 @@ <h2 class="pagetitle{% if short_desc %} with_description{% endif %}">
{% block header_menu %}
+{% get_permission "project_perm.maintain" for request.user and project as "is_maintainer" %}
+{% get_permission "project_perm.coordinate_team" for request.user and project,language as "is_coordinator" %}
{% if not project.anyone_submit %}
<div id="teamcode-arrow"><div id="teamcode">{{ language.code }}</div><span></span></div>
<div class="tab-wrapper grid_10">
@@ -71,16 +74,13 @@ <h2 class="pagetitle{% if short_desc %} with_description{% endif %}">
<li class="{% if project_team_members %}selected{% endif %}"><a href="{% url team_members project.slug language.code %}">{% trans "Members" %}</a></li>
{% endif %}
{% hook "team.html" menu %}
- {% if perms.projects.change_team or is_coordinator %}
- <li class="{% if project_team_form %}selected{% endif %}"><a href="{% url team_update project.slug language.code %}">{% trans "Edit language-team" %}</a></li>
+ {% if is_maintainer or is_coordinator %}
+ <li class="{% if project_team_form %}selected{% endif %}"><a href="{% url team_update project.slug language.code %}">{% trans "Edit language team" %}</a></li>
{% endif %}
</ul>
</div>
{% endif %}
{% endblock %}
-
-
-
{% block content_main %}{% endblock %}
{% block content_footer %}{% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.