Commit fc9f191c authored by Michal Čihař's avatar Michal Čihař

Use new helper for accessing repository status

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 9052a6fe
{% extends "base.html" %}
{% load i18n %}
{% load translations %}
{% load permissions %}
{% load crispy_forms_tags %}
{% block breadcrumbs %}
......@@ -12,6 +13,9 @@
{% endblock %}
{% block content %}
{% can_see_repository_status user object as user_can_see_repository_status %}
<ul class="nav nav-pills">
<li class="active"><a href="#overview" data-toggle="tab">{% trans "Overview" %}</a></li>
<li><a href="#history" data-toggle="tab">{% trans "History" %}</a></li>
......@@ -25,7 +29,7 @@
{% if perms.trans.commit_translation %}
<li><a href="{{ object.get_commit_url }}">{% trans "Commit" %}</a></li>
{% endif %}
{% if perms.trans.commit_translation or perms.trans.update_translation %}
{% if user_can_see_repository_status %}
<li><a href="#repository" data-toggle="tab" data-href="{% url 'git_status_project' project=object.slug %}">{% trans "Repository maintenance" %}</a></li>
{% endif %}
<li><a href="{% url 'checks' %}?project={{ object.slug }}">{% trans "Failing checks" %}</a></li>
......@@ -131,7 +135,7 @@
{% include "activity-tab.html" %}
{% if perms.trans.commit_translation or perms.trans.update_translation %}
{% if user_can_see_repository_status %}
<div class="tab-pane" id="repository">
<p>{% trans "Loading…" %}</p>
</div>
......
{% extends "base.html" %}
{% load i18n %}
{% load permissions %}
{% load crispy_forms_tags %}
{% block breadcrumbs %}
......@@ -12,6 +13,8 @@
{% endblock %}
{% block content %}
{% can_see_repository_status user object.project as user_can_see_repository_status %}
{% include "show-lock.html" %}
<ul class="nav nav-pills">
......@@ -27,7 +30,7 @@
{% if perms.trans.commit_translation %}
<li><a href="{{ object.get_commit_url }}">{% trans "Commit" %}</a></li>
{% endif %}
{% if perms.trans.commit_translation or perms.trans.update_translation %}
{% if user_can_see_repository_status %}
<li><a href="#repository" data-toggle="tab" data-href="{% url 'git_status_subproject' project=object.project.slug subproject=object.slug %}">{% trans "Repository maintenance" %}</a></li>
{% endif %}
<li><a href="{% url 'show_source' project=object.project.slug subproject=object.slug %}">{% trans "Source strings review" %}</a></li>
......@@ -118,7 +121,7 @@
{% include "activity-tab.html" %}
{% if perms.trans.commit_translation or perms.trans.update_translation %}
{% if user_can_see_repository_status %}
<div class="tab-pane" id="repository">
<p>{% trans "Loading…" %}</p>
</div>
......
{% extends "base.html" %}
{% load translations %}
{% load permissions %}
{% load crispy_forms_tags %}
{% load i18n %}
......@@ -13,6 +14,7 @@
{% endblock %}
{% block content %}
{% can_see_repository_status user object.subproject.project as user_can_see_repository_status %}
{% include "show-lock.html" %}
......@@ -46,7 +48,7 @@
{% if perms.trans.commit_translation %}
<li><a href="{{ object.get_commit_url }}">{% trans "Commit" %}</a></li>
{% endif %}
{% if perms.trans.commit_translation or perms.trans.update_translation %}
{% if user_can_see_repository_status %}
<li><a href="#repository" data-toggle="tab" data-href="{% url 'git_status_translation' project=object.subproject.project.slug subproject=object.subproject.slug lang=object.language.code %}">{% trans "Repository maintenance" %}</a></li>
{% endif %}
{% if autoform %}
......@@ -208,7 +210,7 @@
</div>
{% endif %}
{% if perms.trans.commit_translation or perms.trans.update_translation %}
{% if user_can_see_repository_status %}
<div class="tab-pane" id="repository">
<p>{% trans "Loading…" %}</p>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment