diff options
Diffstat (limited to 'ogcp/templates')
-rw-r--r-- | ogcp/templates/base.html | 3 | ||||
-rw-r--r-- | ogcp/templates/repositories.html | 33 |
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 %} + |