{# SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0 Proxy web UI item version view page template. 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 of this code in a proprietary work, I am not going to enforce this in court. #} {% extends "items/item_view.html.jinja" %} {% macro item_file_list(file_specs, file_type) %} {% endmacro %} {% macro item_link_list(item_specs, make_url) %} {% endmacro %} {% block top_errors %} {% if not version_display_info.info.compatible %} {{ error_note(_('web_ui.err.item_not_compatible')) }} {% endif %} {% endblock %} {% block main_info %} {{ super() }} {{ label(_('web_ui.items.single_version.identifier_label')) }}

{{ version_display_info.info.identifier }}

{{ label(_('web_ui.items.single_version.version_label')) }}

{{ version_with_repo(version_display_info) }}

{% if version_display_info.info.uuid is not none %} {{ label(_('web_ui.items.single_version.uuid_label')) }}

{{ version_display_info.info.uuid }}

{% endif %} {% if version_display_info.info.description %} {{ label(_('web_ui.items.single_version.description_label')) }}

{{ version_display_info.info.description }}

{% endif %} {{ label(_('web_ui.items.single_version.licenses_label')) }} {% if version_display_info.info.source_copyright %} {{ item_file_list(version_display_info.info.source_copyright, 'license') }} {% else %}

{{ _('web_ui.items.single_version.no_license_files') }}

{% endif %}
{% if version_display_info.info.required_mappings %} {{ label(_('web_ui.items.single_version.required_mappings_label')) }} {% macro make_mapping_url(spec) -%} {{ url_for( '.show_required_mapping', item_type = version_display_info.type.alt_name, item_version_id = version_display_info.ref.id, required_identifier = spec.identifier ) }} {%- endmacro %} {% set required_specs = version_display_info.info.required_mappings %} {{ item_link_list(required_specs, make_mapping_url) }}
{% endif %} {% if version_display_info.info.min_haketilo_ver != versions.int_ver_min %} {{ label(_('web_ui.items.single_version.min_haketilo_ver_label')) }}

{{ versions.version_string(version_display_info.info.min_haketilo_ver) }}

{% endif %} {% if version_display_info.info.max_haketilo_ver != versions.int_ver_max %} {{ label(_('web_ui.items.single_version.max_haketilo_ver_label')) }}

{{ versions.version_string(version_display_info.info.max_haketilo_ver) }}

{% endif %} {% block main_info_rest required %}{% endblock %} {% if settings.advanced_user and version_display_info.active != ActiveStatus.REQUIRED %}
{{ label(_('web_ui.items.single_version.install_uninstall_label')) }} {% set install_but_classes = ['green-button'] %} {% set uninstall_but_classes = ['green-button'] %} {% if version_display_info.installed == InstalledStatus.FAILED_TO_INSTALL %} {% set install_text = _('web_ui.items.single_version.retry_install_button') %} {% set uninstall_text = _('web_ui.items.single_version.leave_uninstalled_button') %}

{% block item_install_failed_msg required %}{% endblock %}

{% else %} {% set install_text = _('web_ui.items.single_version.install_button') %} {% set uninstall_text = _('web_ui.items.single_version.uninstall_button') %} {% if version_display_info.installed == InstalledStatus.INSTALLED %} {% do install_but_classes.append('disabled-button') %} {% if uninstall_disallowed is defined or version_display_info.active == ActiveStatus.REQUIRED %} {% do uninstall_but_classes.append('disabled-button') %} {% endif %}

{% block item_is_installed_msg required %}{% endblock %}

{% else %} {# version_display_info.installed == InstalledStatus.NOT_INSTALLED #} {% do uninstall_but_classes.append('disabled-button') %}

{% block item_is_not_installed_msg required %}{% endblock %}

{% endif %} {% endif %}{# else/ version_display_info.installed == InstalledStatus.... #} {% set uninstall_fields = {'action': 'uninstall_item_version'} %} {% set install_fields = {'action': 'install_item_version'} %} {{ button_row([ (uninstall_but_classes, uninstall_text, uninstall_fields), (install_but_classes, install_text, install_fields) ]) }} {% endif %}{# settings.advanced_user #} {% endblock main_info %}