From d516b9decad07b940b3cd117fc4e353dd8bbe7d2 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 24 Aug 2022 10:47:33 +0200 Subject: make repo packages (mappings) load as uninstalled; make them installable through the web UI --- .../proxy/web_ui/templates/base.html.jinja | 6 +++ .../packages/show_single_version.html.jinja | 53 +++++++++++++++++++++- .../proxy/web_ui/templates/repos/add.html.jinja | 6 +-- .../web_ui/templates/repos/show_single.html.jinja | 10 ++-- 4 files changed, 66 insertions(+), 9 deletions(-) (limited to 'src/hydrilla/proxy/web_ui/templates') diff --git a/src/hydrilla/proxy/web_ui/templates/base.html.jinja b/src/hydrilla/proxy/web_ui/templates/base.html.jinja index b41a106..a34d538 100644 --- a/src/hydrilla/proxy/web_ui/templates/base.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/base.html.jinja @@ -45,6 +45,12 @@ in a proprietary work, I am not going to enforce this in court. color: inherit; } + .inline-form { + display: inline-block; + padding: 0; + margin: 0; + } + .small-print { font-size: 80%; color: #555; 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 beedd43..1b46da7 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 @@ -25,6 +25,16 @@ in a proprietary work, I am not going to enforce this in court. {{ super() }} {% endblock %} {% block main %} + {%- if uninstall_disallowed is defined %} + + {%- endif %} + {%- if repo_communication_error is defined %} + + {%- endif %}

{{ _('web_ui.packages.single_version.heading.name_{}') @@ -35,4 +45,45 @@ in a proprietary work, I am not going to enforce this in court. {{ display_info.info.versioned_identifier }} TODO: add more info... -{% endblock %} + {%- if display_info.installed == InstalledStatus.INSTALLED %} +
+ {{ _('web_ui.packages.single_version.package_is_installed') }} +
+ {%- if uninstall_disallowed is not defined %} +
+ + +
+ {%- endif %} + {%- elif display_info.installed == InstalledStatus.NOT_INSTALLED %} +
+ {{ _('web_ui.packages.single_version.package_is_not_installed') }} +
+
+ + +
+ {%- else %} +
+ {{ _('web_ui.packages.single_version.package_install_failed') }} +
+
+
+ + +
+
+ + +
+
+ {%- endif %} +{%- endblock %} diff --git a/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja index 3fdcbd3..1b618cf 100644 --- a/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja @@ -31,12 +31,12 @@ in a proprietary work, I am not going to enforce this in court. {% if repo_name_invalid is defined -%} {%- endif %} {% if repo_name_taken is defined -%} {%- endif %}
@@ -49,7 +49,7 @@ in a proprietary work, I am not going to enforce this in court.
{% if repo_url_invalid is defined -%} {%- endif %}
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 b3a4f32..a5998b8 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 @@ -29,12 +29,12 @@ in a proprietary work, I am not going to enforce this in court. {% block main %} {%- if repo_communication_error is defined %} {%- endif %} {%- if repo_api_version_unsupported is defined %} {%- endif %} {%- set repo_id = display_info.ref.id %} @@ -61,12 +61,12 @@ in a proprietary work, I am not going to enforce this in court. {%- if repo_name_invalid is defined %} {%- endif %} {%- if repo_name_taken is defined %} {%- endif %}
@@ -109,7 +109,7 @@ in a proprietary work, I am not going to enforce this in court. {%- if repo_url_invalid is defined %} {%- endif %}
-- cgit v1.2.3