From ed85c1ce79b2a562f27649e3a2abd518e507ad62 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 26 Sep 2022 19:38:49 +0200 Subject: [proxy] make web UI messages regarding item's status more precise --- .../web_ui/templates/items/item_viewversion.html.jinja | 13 +++++++++---- .../web_ui/templates/items/library_viewversion.html.jinja | 6 ++++++ .../web_ui/templates/items/package_viewversion.html.jinja | 4 ++++ 3 files changed, 19 insertions(+), 4 deletions(-) (limited to 'src/hydrilla/proxy/web_ui/templates/items') diff --git a/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja index 569d46e..952c6b7 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja @@ -55,11 +55,16 @@ code in a proprietary work, I am not going to enforce this in court.

{% if version_display_info.active == ActiveStatus.REQUIRED %} {% block item_required_msg required %}{% endblock %} - {% elif version_display_info.active == ActiveStatus.AUTO %} - {% block item_auto_activated_msg required %}{% endblock %} - {% else %} - {# version_display_info.active == ActiveStatus.NOT_ACTIVE #} + {% + elif version_display_info.active == ActiveStatus.NOT_ACTIVE or + settings.mapping_use_mode == MappingUseMode.WHEN_ENABLED + %} {% block item_not_activated_msg required %}{% endblock %} + {% elif settings.mapping_use_mode == MappingUseMode.QUESTION %} + {% block item_will_be_asked_about_msg required %}{% endblock %} + {% else %} + {# settings.mapping_use_mode == MappingUseMode.AUTO #} + {% block item_auto_activated_msg required %}{% endblock %} {% endif %}

diff --git a/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja index a1066b3..f1d1b74 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja @@ -50,6 +50,10 @@ code in a proprietary work, I am not going to enforce this in court. {{ _('web_ui.items.single_version.library.item_not_activated') }} {% endblock %} +{% block item_will_be_asked_about_msg %} + {{ _('web_ui.items.single_version.library.item_will_be_asked_about') }} +{% endblock %} + {% block item_install_failed_msg %} {{ _('web_ui.items.single_version.library.install_failed') }} {% endblock %} @@ -62,4 +66,6 @@ code in a proprietary work, I am not going to enforce this in court.

TODO: add more info...

+ +
{% endblock %} diff --git a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja index 112ebc3..04caf8c 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja @@ -50,6 +50,10 @@ code in a proprietary work, I am not going to enforce this in court. {{ _('web_ui.items.single_version.package.item_not_activated') }} {% endblock %} +{% block item_will_be_asked_about_msg %} + {{ _('web_ui.items.single_version.package.item_will_be_asked_about') }} +{% endblock %} + {% block item_install_failed_msg %} {{ _('web_ui.items.single_version.package.install_failed') }} {% endblock %} -- cgit v1.2.3