aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja')
-rw-r--r--src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja40
1 files changed, 24 insertions, 16 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja
index 9abb00d..96100ce 100644
--- a/src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/repos__show_single.html.jinja
@@ -27,21 +27,19 @@ in a proprietary work, I am not going to enforce this in court.
{% include 'include/checkbox_tricks_style.css.jinja' %}
{% endblock %}
{% block main %}
+ {% set repo_id = display_info.ref.id -%}
<h3>
- {% if display_info.ref.id != '1' %}
- {{
- _('web_ui.repos.single.heading.name_{}')
- .format(display_info.info.long_name)
- }}
- {% else %}
+ {% if display_info.is_local_semirepo -%}
{{ _('web_ui.repos.local_packages_semirepo') }}
- {% endif %}
+ {% else -%}
+ {{ _('web_ui.repos.single.heading.name_{}').format(display_info.name) }}
+ {% endif -%}
</h3>
- {% if display_info.deleted == True %}
+ {% if display_info.deleted and not display_info.is_local_semirepo -%}
<div>
{{ _('web_ui.repos.single.repo_is_deleted') }}
</div>
- {% elif display_info.deleted == False %}
+ {% elif not display_info.deleted -%}
<input id="show_url_edit_form" type="checkbox" class="chbx-tricks-show-hide"
checked="">
<div>
@@ -54,7 +52,8 @@ in a proprietary work, I am not going to enforce this in court.
</label>
</div>
</div>
- <form method="POST">
+ {% set action_url = url_for('.update_repo_url', repo_id=repo_id) -%}
+ <form method="POST" action="{{ action_url }}">
<input type="hidden" name="action" value="update_url">
<div>
<input name="url" value="{{ display_info.url }}">
@@ -69,22 +68,23 @@ in a proprietary work, I am not going to enforce this in court.
</div>
</form>
<div>
- {% if display_info.last_refreshed is None %}
+ {% if display_info.last_refreshed is none -%}
{{ _('web_ui.repos.single.repo_never_refreshed') }}
- {% else %}
+ {% else -%}
{{
_('web_ui.repos.single.last_refreshed_{}')
.format(display_info.last_refreshed.strftime('%F %H:%M'))
}}
- {% endif %}
- <form method="POST">
+ {% endif -%}
+ {% set action_url = url_for('.refresh_repo', repo_id=repo_id) -%}
+ <form method="POST" action="{{ action_url }}">
<input type="hidden" name="action" value="refresh_repo">
<button class="green-button">
{{ _('web_ui.repos.single.refresh_now_button') }}
</button>
</form>
</div>
- {% endif %}
+ {% endif -%}
<div>
{{
_('web_ui.repos.item_count_{mappings}_{resources}')
@@ -94,4 +94,12 @@ in a proprietary work, I am not going to enforce this in court.
)
}}
</div>
-{% endblock %}
+ {% if not display_info.is_local_semirepo -%}
+ {% set action_url = url_for('.remove_repo', repo_id=repo_id) -%}
+ <form method="POST" action="{{ action_url }}">
+ <button class="green-button">
+ {{ _('web_ui.repos.single.remove_button') }}
+ </button>
+ </form>
+ {% endif -%}
+{% endblock -%}