aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja')
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja34
1 files changed, 16 insertions, 18 deletions
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 151a8b3..54cb3cf 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
@@ -46,6 +46,15 @@ in a proprietary work, I am not going to enforce this in court.
TODO: add more info...
{% endblock %}
+ {% if display_info.active == ActiveStatus.REQUIRED %}
+ <div>{% block item_required_msg required %}{% endblock %}</div>
+ {% elif display_info.active == ActiveStatus.AUTO %}
+ <div>{% block item_auto_activated_msg required %}{% endblock %}</div>
+ {% else %}
+ {# display_info.active == ActiveStatus.NOT_ACTIVE #}
+ <div>{% block item_not_activated_msg required %}{% endblock %}</div>
+ {% endif %}
+
{% set install_but_classes = ['green-button', 'button-bordering-left'] %}
{% set uninstall_but_classes = ['green-button', 'button-bordering-right'] %}
{% if display_info.installed == InstalledStatus.FAILED_TO_INSTALL %}
@@ -57,7 +66,7 @@ in a proprietary work, I am not going to enforce this in court.
set uninstall_text =
_('web_ui.items.single_version.leave_uninstalled_button')
%}
- <div>{% block item_install_failed_msg %}{% endblock %}</div>
+ <div>{% block item_install_failed_msg required %}{% endblock %}</div>
{% else %}
{% set install_text = _('web_ui.items.single_version.install_button') %}
{% set uninstall_text = _('web_ui.items.single_version.uninstall_button') %}
@@ -74,21 +83,10 @@ in a proprietary work, I am not going to enforce this in court.
{% do uninstall_but_classes.append('disabled-button') %}
{% endif %}
{% endif %}{# else/ display_info.installed == InstalledStatus.FAILED_TO_I...#}
- <div class="button-row">
- {%
- for classes, text, action in [
- (uninstall_but_classes, uninstall_text, 'uninstall_item_version'),
- (install_but_classes, install_text, 'install_item_version')
- ]
- %}
- {% if 'disabled-button' in classes %}
- <button class="{{ classes|join(' ') }}">{{ text }}</button>
- {% else %}
- <form method="POST" class="inline-form">
- <input name="action" value="{{ action }}" type="hidden">
- <button class="{{ classes|join(' ') }}">{{ text }}</button>
- </form>
- {% endif %}
- {% endfor %}
- </div>
+ {{
+ button_row([
+ (uninstall_but_classes, uninstall_text, 'uninstall_item_version'),
+ (install_but_classes, install_text, 'install_item_version')
+ ])
+ }}
{% endblock main_info %}