From e1344ae7017b28a54d7714895bd54c8431a20bc6 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Thu, 18 Aug 2022 19:18:00 +0200 Subject: allow adding, removing and altering repositories This commit also temporarily breaks package import from files :/ --- .../web_ui/templates/repos__show_single.html.jinja | 40 +++++++++++++--------- 1 file changed, 24 insertions(+), 16 deletions(-) (limited to 'src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja') diff --git a/src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja index 9abb00d..96100ce 100644 --- a/src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja @@ -27,21 +27,19 @@ in a proprietary work, I am not going to enforce this in court. {% include 'include/checkbox_tricks_style.css.jinja' %} {% endblock %} {% block main %} + {% set repo_id = display_info.ref.id -%}

- {% if display_info.ref.id != '1' %} - {{ - _('web_ui.repos.single.heading.name_{}') - .format(display_info.info.long_name) - }} - {% else %} + {% if display_info.is_local_semirepo -%} {{ _('web_ui.repos.local_packages_semirepo') }} - {% endif %} + {% else -%} + {{ _('web_ui.repos.single.heading.name_{}').format(display_info.name) }} + {% endif -%}

- {% if display_info.deleted == True %} + {% if display_info.deleted and not display_info.is_local_semirepo -%}
{{ _('web_ui.repos.single.repo_is_deleted') }}
- {% elif display_info.deleted == False %} + {% elif not display_info.deleted -%}
@@ -54,7 +52,8 @@ in a proprietary work, I am not going to enforce this in court.
-
+ {% set action_url = url_for('.update_repo_url', repo_id=repo_id) -%} +
@@ -69,22 +68,23 @@ in a proprietary work, I am not going to enforce this in court.
- {% if display_info.last_refreshed is None %} + {% if display_info.last_refreshed is none -%} {{ _('web_ui.repos.single.repo_never_refreshed') }} - {% else %} + {% else -%} {{ _('web_ui.repos.single.last_refreshed_{}') .format(display_info.last_refreshed.strftime('%F %H:%M')) }} - {% endif %} -
+ {% endif -%} + {% set action_url = url_for('.refresh_repo', repo_id=repo_id) -%} +
- {% endif %} + {% endif -%}
{{ _('web_ui.repos.item_count_{mappings}_{resources}') @@ -94,4 +94,12 @@ in a proprietary work, I am not going to enforce this in court. ) }}
-{% endblock %} + {% if not display_info.is_local_semirepo -%} + {% set action_url = url_for('.remove_repo', repo_id=repo_id) -%} +
+ +
+ {% endif -%} +{% endblock -%} -- cgit v1.2.3