aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates/repos
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-09-03 11:57:09 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-09 13:55:05 +0200
commit22b6538ed828dcc779d3c5179bb3751ea1fe434e (patch)
treeb06f2da3abe26d5f19cadd43b5c55cd4b495f08f /src/hydrilla/proxy/web_ui/templates/repos
parent781770b26a6387d7cdd5b3fc1ec56036dc62fc5b (diff)
downloadhaketilo-hydrilla-22b6538ed828dcc779d3c5179bb3751ea1fe434e.tar.gz
haketilo-hydrilla-22b6538ed828dcc779d3c5179bb3751ea1fe434e.zip
[proxy] improve the look of item lists in web UI
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates/repos')
-rw-r--r--src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja34
1 files changed, 22 insertions, 12 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja
index c0cc6cb..07506e8 100644
--- a/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja
@@ -35,9 +35,13 @@ in a proprietary work, I am not going to enforce this in court.
<ul id="item_list">
{% for info in display_infos %}
{% set entry_classes = [] %}
+
{% if info.deleted %}
- {% do entry_classes.append('repo-entry-deleted') %}
+ {% do entry_classes.append('entry-line-red') %}
+ {% else %}
+ {% do entry_classes.append('entry-line-green') %}
{% endif %}
+
<li class="{{ entry_classes|join(' ') }}">
<a href="{{ url_for('.show_repo', repo_id=info.ref.id) }}">
<div>
@@ -54,16 +58,22 @@ in a proprietary work, I am not going to enforce this in court.
</a>
</li>
{% endfor %}
- <li>
- <a href="{{ url_for('.show_repo', repo_id=local_semirepo_info.ref.id) }}">
- {{ _('web_ui.repos.local_packages_semirepo') }}
- <div class="small-print">
- {{
- _('web_ui.repos.package_count_{}')
- .format(local_semirepo_info.mapping_count)
- }}
- </div>
- </a>
- </li>
+ {%
+ if local_semirepo_info.mapping_count > 0 or
+ local_semirepo_info.resource_count > 0
+ %}
+ {% set url = url_for('.show_repo', repo_id=local_semirepo_info.ref.id) %}
+ <li>
+ <a href="{{ url }}">
+ {{ _('web_ui.repos.local_packages_semirepo') }}
+ <div class="small-print">
+ {{
+ _('web_ui.repos.package_count_{}')
+ .format(local_semirepo_info.mapping_count)
+ }}
+ </div>
+ </a>
+ </li>
+ {% endif %}
</ul>
{% endblock %}