diff options
Diffstat (limited to 'ogcp/templates/repos.html')
-rw-r--r-- | ogcp/templates/repos.html | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/ogcp/templates/repos.html b/ogcp/templates/repos.html index ef56d2a..06bee58 100644 --- a/ogcp/templates/repos.html +++ b/ogcp/templates/repos.html @@ -50,14 +50,22 @@ {% endblock %} {% block commands %} - <input class="btn btn-light {% block nav_repo_info %}{% endblock %}" type="submit" value="{{ _('Repo details') }}" - form="reposForm" formaction="{{ url_for('action_repo_info') }}" formmethod="get"> - <input class="btn btn-light {% block nav_repo_add %}{% endblock %}" type="submit" value="{{ _('Add repo') }}" - form="reposForm" formaction="{{ url_for('action_repo_add') }}" formmethod="get"> - <input class="btn btn-light {% block nav_repo_delete %}{% endblock %}" type="submit" value="{{ _('Delete repo') }}" - form="reposForm" formaction="{{ url_for('action_repo_delete') }}" formmethod="get"> - <input class="btn btn-light {% block nav_repo_update %}{% endblock %}" type="submit" value="{{ _('Update repo') }}" - form="reposForm" formaction="{{ url_for('action_repo_update') }}" formmethod="get"> +{% if current_user.is_authenticated %} + <input class="btn btn-light {% block nav_repo_info %}{% endblock %}" type="submit" value="{{ _('Repo details') }}" + form="reposForm" formaction="{{ url_for('action_repo_info') }}" formmethod="get"> + {% if current_user.get_permission('REPOSITORY', 'ADD') %} + <input class="btn btn-light {% block nav_repo_add %}{% endblock %}" type="submit" value="{{ _('Add repo') }}" + form="reposForm" formaction="{{ url_for('action_repo_add') }}" formmethod="get"> + {% endif %} + {% if current_user.get_permission('REPOSITORY', 'DELETE') %} + <input class="btn btn-light {% block nav_repo_delete %}{% endblock %}" type="submit" value="{{ _('Delete repo') }}" + form="reposForm" formaction="{{ url_for('action_repo_delete') }}" formmethod="get"> + {% endif %} + {% if current_user.get_permission('REPOSITORY', 'UPDATE') %} + <input class="btn btn-light {% block nav_repo_update %}{% endblock %}" type="submit" value="{{ _('Update repo') }}" + form="reposForm" formaction="{{ url_for('action_repo_update') }}" formmethod="get"> + {% endif %} +{% endif %} {% if btn_back %} <button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()"> |