diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-09-02 13:51:25 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-09-28 12:54:55 +0200 |
commit | 5cdb4c29ea9e736ea5a52483c2e62009c4c7d27e (patch) | |
tree | 0ccdec4cff3fb7b507a085a81322d2cfce1288d8 /src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja | |
parent | b533fa5c5bdd88fa1ea4980ff0c1828d692e5319 (diff) | |
download | haketilo-hydrilla-5cdb4c29ea9e736ea5a52483c2e62009c4c7d27e.tar.gz haketilo-hydrilla-5cdb4c29ea9e736ea5a52483c2e62009c4c7d27e.zip |
[proxy] allow packages to be frozen and unfrozen in the web UI
This commit also makes some minor changes and fixes in other parts of the web UI.
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja')
-rw-r--r-- | src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja | 60 |
1 files changed, 34 insertions, 26 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja index 861d5ef..1ad8df3 100644 --- a/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja @@ -19,6 +19,15 @@ 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" %} + +{% macro versioned_identifier_with_repo(info) %} + {{ info.info.versioned_identifier }} + {% if not info.is_local %} + @ + {{ info.info.repo }} + {% endif %} +{% endmacro %} + {% block style %} {{ super() }} @@ -28,38 +37,37 @@ in a proprietary work, I am not going to enforce this in court. {% block main_info %} <h3>{% block heading required %}{% endblock %}</h3> {% endblock %} - {% if version_display_infos|length > 0 %} + {% if display_info.all_versions|length > 0 %} <h4> {% block version_list_heading required %} {% endblock %} </h4> <ul id="item_list"> - {% for info in version_display_infos %} - {% set entry_classes = [] %} - {% if info.is_local %} - {% do entry_classes.append('version-entry-local') %} - {% endif %} - {% if info.is_orphan %} - {% do entry_classes.append('version-entry-orphan') %} + {% for info in display_info.all_versions %} + {% + if version_display_info is not defined or + version_display_info.ref != info.ref + %} + {% set entry_classes = [] %} + {% if info.is_local %} + {% do entry_classes.append('version-entry-local') %} + {% endif %} + {% if info.is_orphan %} + {% do entry_classes.append('version-entry-orphan') %} + {% endif %} + <li class="{{ entry_classes|join(' ') }}"> + {% + set href = url_for( + '.show_{}_version'.format(info.type.alt_name), + item_version_id = info.ref.id + ) + %} + <a href="{{ href }}"> + <div> {{ versioned_identifier_with_repo(info) }} </div> + </a> + </li> {% endif %} - <li class="{{ entry_classes|join(' ') }}"> - {% - set href = url_for( - '.show_{}_version'.format(info.type.alt_name), - item_version_id = info.ref.id - ) - %} - <a href="{{ href }}"> - <div> - {{ info.info.version_string }} - {% if not info.is_local %} - @ - {{ info.info.repo }} - {% endif %} - </div> - </a> - </li> {% endfor %} </ul> - {% endif %}{# version_display_infos|length > 0 #} + {% endif %}{# display_info.all_versions|length > 0 #} {% endblock main %} |