aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja
diff options
context:
space:
mode:
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.jinja60
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 %}