From 7fc6312d6df526b8eb49288aecf88d04668e7c45 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 29 Aug 2022 13:05:35 +0200 Subject: [proxy] make it possible to also view and install/uninstall libraries (resources) through the web UI --- .../web_ui/templates/libraries/index.html.jinja | 39 +++++++++ .../templates/libraries/index.html.jinja.license | 7 ++ .../templates/libraries/show_single.html.jinja | 76 +++++++++++++++++ .../libraries/show_single.html.jinja.license | 7 ++ .../libraries/show_single_version.html.jinja | 94 ++++++++++++++++++++++ .../show_single_version.html.jinja.license | 7 ++ 6 files changed, 230 insertions(+) create mode 100644 src/hydrilla/proxy/web_ui/templates/libraries/index.html.jinja create mode 100644 src/hydrilla/proxy/web_ui/templates/libraries/index.html.jinja.license create mode 100644 src/hydrilla/proxy/web_ui/templates/libraries/show_single.html.jinja create mode 100644 src/hydrilla/proxy/web_ui/templates/libraries/show_single.html.jinja.license create mode 100644 src/hydrilla/proxy/web_ui/templates/libraries/show_single_version.html.jinja create mode 100644 src/hydrilla/proxy/web_ui/templates/libraries/show_single_version.html.jinja.license (limited to 'src/hydrilla/proxy/web_ui/templates/libraries') diff --git a/src/hydrilla/proxy/web_ui/templates/libraries/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/libraries/index.html.jinja new file mode 100644 index 0000000..5cdda04 --- /dev/null +++ b/src/hydrilla/proxy/web_ui/templates/libraries/index.html.jinja @@ -0,0 +1,39 @@ +{# +Proxy web UI library list page. + +This file is part of Hydrilla&Haketilo. + +Copyright (C) 2022 Wojtek Kosior + +Dual licensed under +* GNU General Public License v3.0 or later and +* Creative Commons Attribution Share Alike 4.0 International. + +You can choose to use either of these licenses or both. + + +I, Wojtek Kosior, thereby promise not to sue for violation of this +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" %} +{% block title %} {{ _('web_ui.libraries.title') }} {% endblock %} +{% block style %} + {{ super() }} + + {% include 'include/item_list_style.css.jinja' %} +{% endblock %} +{% block main %} +

{{ _('web_ui.libraries.heading') }}

+ +{% endblock %} diff --git a/src/hydrilla/proxy/web_ui/templates/libraries/index.html.jinja.license b/src/hydrilla/proxy/web_ui/templates/libraries/index.html.jinja.license new file mode 100644 index 0000000..bb2e0af --- /dev/null +++ b/src/hydrilla/proxy/web_ui/templates/libraries/index.html.jinja.license @@ -0,0 +1,7 @@ +Spdx-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0 + +Copyright (C) 2022 Wojtek Kosior + +I, Wojtek Kosior, thereby promise not to sue for violation of this +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. diff --git a/src/hydrilla/proxy/web_ui/templates/libraries/show_single.html.jinja b/src/hydrilla/proxy/web_ui/templates/libraries/show_single.html.jinja new file mode 100644 index 0000000..8ee96ba --- /dev/null +++ b/src/hydrilla/proxy/web_ui/templates/libraries/show_single.html.jinja @@ -0,0 +1,76 @@ +{# +Proxy web UI library show page. + +This file is part of Hydrilla&Haketilo. + +Copyright (C) 2022 Wojtek Kosior + +Dual licensed under +* GNU General Public License v3.0 or later and +* Creative Commons Attribution Share Alike 4.0 International. + +You can choose to use either of these licenses or both. + + +I, Wojtek Kosior, thereby promise not to sue for violation of this +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" %} +{% block title %} {{ _('web_ui.libraries.single.title') }} {% endblock %} +{% block style %} + {{ super() }} + + {% include 'include/item_list_style.css.jinja' %} +{% endblock %} +{% block main %} + {% block main_info %} +

+ {{ + _('web_ui.libraries.single.heading.name_{}') + .format(display_info.identifier) + }} +

+ TODO: add more info... + {% endblock %} +

+ {% if version_display_infos|length > 0 %} + {% block version_list_heading %} + {{ _('web_ui.libraries.single.version_list_heading') }} + {% endblock %} + {% endif %} +

+ +{% endblock %} diff --git a/src/hydrilla/proxy/web_ui/templates/libraries/show_single.html.jinja.license b/src/hydrilla/proxy/web_ui/templates/libraries/show_single.html.jinja.license new file mode 100644 index 0000000..bb2e0af --- /dev/null +++ b/src/hydrilla/proxy/web_ui/templates/libraries/show_single.html.jinja.license @@ -0,0 +1,7 @@ +Spdx-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0 + +Copyright (C) 2022 Wojtek Kosior + +I, Wojtek Kosior, thereby promise not to sue for violation of this +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. diff --git a/src/hydrilla/proxy/web_ui/templates/libraries/show_single_version.html.jinja b/src/hydrilla/proxy/web_ui/templates/libraries/show_single_version.html.jinja new file mode 100644 index 0000000..448a9bc --- /dev/null +++ b/src/hydrilla/proxy/web_ui/templates/libraries/show_single_version.html.jinja @@ -0,0 +1,94 @@ +{# +Proxy web UI library version show page. + +This file is part of Hydrilla&Haketilo. + +Copyright (C) 2022 Wojtek Kosior + +Dual licensed under +* GNU General Public License v3.0 or later and +* Creative Commons Attribution Share Alike 4.0 International. + +You can choose to use either of these licenses or both. + + +I, Wojtek Kosior, thereby promise not to sue for violation of this +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 "libraries/show_single.html.jinja" %} +{% block title %} {{ _('web_ui.libraries.single_version.title') }} {% endblock %} +{% block main_info %} + {% if file_installation_error is defined %} + + {% endif %} + {% if uninstall_disallowed is defined %} + + {% endif %} + {% if repo_communication_error is defined %} + + {% endif %} +

+ {{ + _('web_ui.libraries.single_version.heading.name_{}') + .format(display_info.info.long_name) + }} +

+
+ {{ display_info.info.versioned_identifier }} +
+ TODO: add more info... + {% if display_info.installed == InstalledStatus.INSTALLED %} +
+ {{ _('web_ui.libraries.single_version.library_is_installed') }} +
+ {% + if uninstall_disallowed is not defined and + display_info.active != ActiveStatus.REQUIRED + %} +
+ + +
+ {% endif %} + {% elif display_info.installed == InstalledStatus.NOT_INSTALLED %} +
+ {{ _('web_ui.libraries.single_version.library_is_not_installed') }} +
+
+ + +
+ {% else %} +
+ {{ _('web_ui.libraries.single_version.library_install_failed') }} +
+
+
+ + +
+
+ + +
+
+ {% endif %} +{% endblock main_info %} +{% block version_list_heading %} + {{ _('web_ui.libraries.single_version.version_list_heading') }} +{% endblock %} diff --git a/src/hydrilla/proxy/web_ui/templates/libraries/show_single_version.html.jinja.license b/src/hydrilla/proxy/web_ui/templates/libraries/show_single_version.html.jinja.license new file mode 100644 index 0000000..bb2e0af --- /dev/null +++ b/src/hydrilla/proxy/web_ui/templates/libraries/show_single_version.html.jinja.license @@ -0,0 +1,7 @@ +Spdx-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0 + +Copyright (C) 2022 Wojtek Kosior + +I, Wojtek Kosior, thereby promise not to sue for violation of this +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. -- cgit v1.2.3