From 04853ff19450c5925a7c9bacc11abe90e75f8510 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 5 Sep 2022 13:58:34 +0200 Subject: [proxy] complete the text content and styling of web UI pages written so far --- .../web_ui/templates/repos/show_single.html.jinja | 143 +++++++++++---------- 1 file changed, 77 insertions(+), 66 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 604b38c..448c451 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 @@ -19,29 +19,28 @@ file's licenses. Although I request that you do not make use this code in a proprietary work, I am not going to enforce this in court. #} {% extends "base.html.jinja" %} + {% block title %} {{ _('web_ui.repos.single.title') }} {% endblock %} + {% block style %} {{ super() }} {% include 'include/checkbox_tricks_style.css.jinja' %} {% endblock %} + {% block main %} {% if file_installation_error is defined %} - + {{ error_note(_('web_ui.err.file_installation_error')) }} {% endif %} + {% if repo_communication_error is defined %} - + {{ error_note(_('web_ui.err.repo_communication_error')) }} {% endif %} + {% if repo_api_version_unsupported is defined %} - + {{ error_note(_('web_ui.err.repo_api_version_unsupported')) }} {% endif %} - {% set repo_id = display_info.ref.id %} + {% if display_info.is_local_semirepo %}

{{ _('web_ui.repos.local_packages_semirepo') }}

{% else %} @@ -56,42 +55,53 @@ in a proprietary work, I am not going to enforce this in court. {% if not display_info.deleted %} -
- -
+ +
+ {% if repo_name_invalid is defined %} - + {{ error_note(_('web_ui.err.repo_name_invalid')) }} {% endif %} + {% if repo_name_taken is defined %} - + {{ error_note(_('web_ui.err.repo_name_taken')) }} {% endif %} -
+ +
-
- -
+ +
{% endif %}{# not display_info.deleted #} {% endif %}{# else/ display_info.is_local_semirepo #} + {% if display_info.deleted and not display_info.is_local_semirepo %} -
+

{{ _('web_ui.repos.single.repo_is_deleted') }} -

+

+ +
{% elif not display_info.deleted %} +

+ {{ _('web_ui.repos.single.url_is_{}').format(display_info.url) }} +

+ {% if repo_url_invalid is defined %} {% set checked_attr = '' %} {% else %} @@ -99,53 +109,55 @@ in a proprietary work, I am not going to enforce this in court. {% endif %} -
-
- {{ display_info.url }} -
-
- -
-
+ +
+ {% if repo_url_invalid is defined %} - + {{ error_note(_('web_ui.err.repo_url_invalid')) }} {% endif %} -
+ +
-
- -
+ +
+
- {% if display_info.last_refreshed is none %} - {{ _('web_ui.repos.single.repo_never_refreshed') }} - {% else %} - {{ - _('web_ui.repos.single.last_refreshed_{}') - .format(display_info.last_refreshed.strftime('%F %H:%M')) - }} - {% endif %} -
- - -
+

+ {% if display_info.last_refreshed is none %} + {{ _('web_ui.repos.single.repo_never_refreshed') }} + {% else %} + {{ + _('web_ui.repos.single.last_refreshed_{}') + .format(display_info.last_refreshed.strftime('%F %H:%M')) + }} + {% endif %} +

+ + {% set button_text = _('web_ui.repos.single.refresh_now_button') %} + {{ button_row([[['green-button'], button_text, 'refresh_repo']]) }}
+ +
{% endif %}{# not display_info.deleted (elif) #} -
+

{{ _('web_ui.repos.item_count_{mappings}_{resources}') .format( @@ -153,13 +165,12 @@ in a proprietary work, I am not going to enforce this in court. resources = display_info.resource_count ) }} -

+

+ {% if not display_info.is_local_semirepo and not display_info.deleted %} -
- - -
+
+ + {% set button_text = _('web_ui.repos.single.remove_button') %} + {{ button_row([[['green-button'], button_text, 'remove_repo']]) }} {% endif %} {% endblock %} -- cgit v1.2.3