aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-08-25 10:18:33 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-28 12:54:53 +0200
commitedbb8286146920583087080809f6e904ca856cc9 (patch)
tree0a7b3bf4c207707a211e66c45bafec7fab579e07 /src/hydrilla/proxy/web_ui/templates
parentf1204084f5fd377e66f15b3f23e81e13a063512e (diff)
downloadhaketilo-hydrilla-edbb8286146920583087080809f6e904ca856cc9.tar.gz
haketilo-hydrilla-edbb8286146920583087080809f6e904ca856cc9.zip
[proxy] make package version info page also display other versions; fix&improve some aspects of package loading and dependency recomputing
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates')
-rw-r--r--src/hydrilla/proxy/web_ui/templates/packages/index.html.jinja12
-rw-r--r--src/hydrilla/proxy/web_ui/templates/packages/show_single.html.jinja36
-rw-r--r--src/hydrilla/proxy/web_ui/templates/packages/show_single_version.html.jinja12
3 files changed, 37 insertions, 23 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/packages/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/packages/index.html.jinja
index bac774e..cbdd3d9 100644
--- a/src/hydrilla/proxy/web_ui/templates/packages/index.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/packages/index.html.jinja
@@ -35,11 +35,15 @@ in a proprietary work, I am not going to enforce this in court.
<div>
{{ info.identifier }}
</div>
- {% if info.active_version_ref is not none %}
+ {%-
+ if info.active_version is not none and
+ info.active_version.active == ActiveStatus.REQUIRED
+ %}
+ {%- set ver = info.active_version.info.version %}
+ {%- set ver_str = versions.version_string(ver) %}
+ {%- set ver_desc = ver_str + '@' + info.active_version.info.repo %}
<div class="small-print">
- {{ versions.version_string(info.active_version_info.version) }}
- @
- {{ info.active_version_info.repo }}
+ {{ _('web_ui.packages.enabled_version_{}').format(ver_desc) }}
</div>
{% endif %}
</a>
diff --git a/src/hydrilla/proxy/web_ui/templates/packages/show_single.html.jinja b/src/hydrilla/proxy/web_ui/templates/packages/show_single.html.jinja
index 17f958c..e362fa9 100644
--- a/src/hydrilla/proxy/web_ui/templates/packages/show_single.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/packages/show_single.html.jinja
@@ -27,22 +27,32 @@ in a proprietary work, I am not going to enforce this in court.
{% include 'include/item_list_style.css.jinja' %}
{% endblock %}
{% block main %}
- <h3>
- {{
- _('web_ui.packages.single.heading.name_{}')
- .format(display_info.identifier)
- }}
- </h3>
- TODO: add more info...
- <h4>{{ _('web_ui.packages.single.version_list_heading') }}</h4>
+ {% block main_info %}
+ <h3>
+ {{
+ _('web_ui.packages.single.heading.name_{}')
+ .format(display_info.identifier)
+ }}
+ </h3>
+ TODO: add more info...
+ {% endblock %}
+ <h4>
+ {% if version_display_infos|length > 0 %}
+ {% block version_list_heading %}
+ {{ _('web_ui.packages.single.version_list_heading') }}
+ {% endblock %}
+ {% endif %}
+ </h4>
<ul id="item_list">
{%- for info in version_display_infos %}
- {% if info.info.repo == '<local>' -%}
- {%- set entry_classes = 'version-entry-local' -%}
- {%- else -%}
- {%- set entry_classes = '' -%}
+ {%- set entry_classes = [] %}
+ {% if info.is_local %}
+ {%- do entry_classes.append('version-entry-local') %}
{%- endif %}
- <li class="{{ entry_classes }}">
+ {%- if info.is_orphan %}
+ {%- do entry_classes.append('version-entry-orphan') %}
+ {%- endif %}
+ <li class="{{ entry_classes|join(' ') }}">
{%-
set href = url_for(
'.show_package_version',
diff --git a/src/hydrilla/proxy/web_ui/templates/packages/show_single_version.html.jinja b/src/hydrilla/proxy/web_ui/templates/packages/show_single_version.html.jinja
index 1b46da7..9943521 100644
--- a/src/hydrilla/proxy/web_ui/templates/packages/show_single_version.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/packages/show_single_version.html.jinja
@@ -19,12 +19,9 @@ I, Wojtek Kosior, thereby promise not to sue for violation of this
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" %}
+{% extends "packages/show_single.html.jinja" %}
{% block title %} {{ _('web_ui.packages.single_version.title') }} {% endblock %}
-{% block style %}
- {{ super() }}
-{% endblock %}
-{% block main %}
+{% block main_info %}
{%- if uninstall_disallowed is defined %}
<aside class="error-note">
{{ _('web_ui.err.uninstall_disallowed') }}
@@ -86,4 +83,7 @@ in a proprietary work, I am not going to enforce this in court.
</form>
</div>
{%- endif %}
-{%- endblock %}
+{%- endblock main_info %}
+{% block version_list_heading %}
+ {{ _('web_ui.packages.single_version.version_list_heading') }}
+{% endblock %}