diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-07-04 15:29:49 +0200 |
---|---|---|
committer | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-07-04 15:34:03 +0200 |
commit | 9e386e5454ca6108e5c45664ca24aab79f41af48 (patch) | |
tree | daa2637021c13f434ab62d7bbb1ec612480d5a5f /ogcp/templates | |
parent | c068bd21448c2e202720a9daf2923a375c96370d (diff) |
Add "Delete Repository"
In "Repositories" view, users select a repository from the list on the
left and press "Delete repository".
Diffstat (limited to 'ogcp/templates')
-rw-r--r-- | ogcp/templates/actions/delete_repository.html | 23 | ||||
-rw-r--r-- | ogcp/templates/repositories.html | 2 |
2 files changed, 25 insertions, 0 deletions
diff --git a/ogcp/templates/actions/delete_repository.html b/ogcp/templates/actions/delete_repository.html new file mode 100644 index 0000000..82177a3 --- /dev/null +++ b/ogcp/templates/actions/delete_repository.html @@ -0,0 +1,23 @@ +{% extends 'repositories.html' %} +{% import "bootstrap/wtf.html" as wtf %} + +{% set sidebar_state = 'disabled' %} +{% set btn_back = true %} + +{% block content %} + +{{ args }} + +<h1 class="m-5"> + {{ _('Delete repository %(repo_name)s', repo_name=repo_name) }} +</h1> + +{{ wtf.quick_form(form, + action=url_for('repository_delete_post'), + method='post', + button_map={'submit': 'primary'}, + extra_classes="mx-5") }} + +{% endblock %} + + diff --git a/ogcp/templates/repositories.html b/ogcp/templates/repositories.html index 2333a88..7aa2d06 100644 --- a/ogcp/templates/repositories.html +++ b/ogcp/templates/repositories.html @@ -26,6 +26,8 @@ {% block commands %} <input class="btn btn-light {% block nav_repository_add %}{% endblock %}" type="submit" value="{{ _('Add repository') }}" form="repositoriesForm" formaction="{{ url_for('repository_add_get') }}" formmethod="get"> + <input class="btn btn-light {% block nav_repository_delete %}{% endblock %}" type="submit" value="{{ _('Delete repository') }}" + form="repositoriesForm" formaction="{{ url_for('repository_delete_get') }}" formmethod="get"> {% if btn_back %} <button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()"> {{ _("Back") }} |