summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-06-30 15:24:19 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-07-04 15:34:02 +0200
commit9a6981d289865b3a22c645718e0e90865ea14638 (patch)
tree5ef2e9c61d1a825c17b1c6394c16559ae06ff141 /ogcp/templates
parenteb61229b295c9157772e33004587b0df030f8c40 (diff)
Add Repositories section
In Repositories section/view, users can manage task related to repositories. For example: list, add, delete and edit them.
Diffstat (limited to 'ogcp/templates')
-rw-r--r--ogcp/templates/base.html3
-rw-r--r--ogcp/templates/repositories.html33
2 files changed, 36 insertions, 0 deletions
diff --git a/ogcp/templates/base.html b/ogcp/templates/base.html
index 0ec773c..dca6fda 100644
--- a/ogcp/templates/base.html
+++ b/ogcp/templates/base.html
@@ -36,6 +36,9 @@
<li class="nav-item {% block nav_images%}{% endblock %}">
<a class="nav-link" href="{{ url_for('images') }}">{{ _('Images') }}</a>
</li>
+ <li class="nav-item {% block nav_repositories %}{% endblock %}">
+ <a class="nav-link" href="{{ url_for('repositories') }}">{{ _('Repositories') }}</a>
+ </li>
{% if current_user.admin %}
<li class="nav-item {% block nav_users %}{% endblock %}">
<a class="nav-link" href="{{ url_for('users') }}">{{ _('Users') }}</a>
diff --git a/ogcp/templates/repositories.html b/ogcp/templates/repositories.html
new file mode 100644
index 0000000..3bed073
--- /dev/null
+++ b/ogcp/templates/repositories.html
@@ -0,0 +1,33 @@
+{% extends 'base.html' %}
+
+{% block nav_repositories %}active{% endblock %}
+
+{% block container %}
+ <form id="repositoriesForm">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
+ </form>
+ {{ super() }}
+</form>
+{% endblock %}
+
+{% block sidebar %}
+ <ul id="repositories-list" class="nav flex-column nav-pills">
+ {% for repository in repositories %}
+ <li id="repository-{{ repository['id'] }}" class="nav-item">
+ <input class="form-check-input" type="checkbox" form="repositoriesForm"
+ value="{{ repository['id'] }}"
+ name="{{ repository['name'] }}" />
+ {{ repository['name'] }}
+ </li>
+ {% endfor %}
+ </ul>
+{% endblock %}
+
+{% block commands %}
+ {% if btn_back %}
+ <button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">
+ {{ _("Back") }}
+ </button>
+ {% endif %}
+{% endblock %}
+