{# SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0 Proxy web UI base 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. -#} {% set settings = get_settings() %} {% macro button_row(buttons_data, common_fields={}) %}
{% for classes, text, extra_fields in buttons_data %} {% if not loop.first %}
{% do classes.append('button-bordering-left') %} {% endif %} {% if not loop.last %} {% do classes.append('button-bordering-right') %} {% endif %} {% if 'disabled-button' in classes %} {% set disabled_attr = ' disabled=""' %} {% else %} {% set disabled_attr = '' %} {% endif %}
{% for name, value in extra_fields.items() %} {% endfor %} {% for name, value in common_fields.items() %} {% endfor %}
{% endfor %}
{% endmacro %} {% macro error_note(note_text) %} {% endmacro %} {% macro label(label_text, label_name=none) %} {% set for_attr = label_name and (label_name + "_field") %} {% endmacro %} {% macro form_field(field_name, required=true, sep_after=true, height=none) %}
{% set attrs = { 'id': field_name + '_field', 'name': field_name, 'required': '' if required else none, 'rows': height } %} {% if height is none %} {% else %} {% endif %}
{% if sep_after %}
{% endif %} {% endmacro %} {% block head %} {% block title required %}{% endblock %} - {{ _('web_ui.base.title.haketilo_proxy') }} {% endblock %} {% set active_endpoint = get_current_endpoint() %} {% set navigation_bar = [ ('home', _('web_ui.base.nav.home'), false), ('rules.rules', _('web_ui.base.nav.rules'), false), ('items.packages', _('web_ui.base.nav.packages'), false), ('items.libraries', _('web_ui.base.nav.libraries'), true), ('repos.repos', _('web_ui.base.nav.repos'), false), ('import.items_import', _('web_ui.base.nav.import'), false) ] %}
{% block main required %}{% endblock %}