{# -*- coding: utf-8 -*- This file is part of Invenio. Copyright (C) 2023 CERN. Invenio is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} {%- macro panel_start(title, icon="", btn_text='', btn='', btn_icon='', btn_href='', btn_class='', btn_id='', btn_name='', id="", with_body=True, panel_extra_class="secondary") %} {%- block panel_start scoped %}
{%- block panel_heading scoped %}
{% if icon %}{% endif %} {{ title }}
{%- if btn and (btn_href or btn_text) -%} {%- if btn_text %}{{ btn_text }}{%- endif %} {%- if btn_href %} {% if btn_icon %}{% endif %} {{ btn }} {%- elif btn_name and btn_id %} {%- endif %} {%- endif -%}
{%- endblock %}
{%- if with_body %}
{%- endif %} {%- endblock %} {%- endmacro %} {%- macro panel_end(with_body=True) %} {%- block panel_end scoped %} {%- if with_body %}
{%- endif %}
{%- endblock %} {%- endmacro %} {%- macro repo_switch(repo, repo_id) %} {%- block repo_switch scoped %} {%- set inaccessible = (repo and repo.user_id and (repo.user_id != current_user.id)) %}
{%- endblock %} {%- endmacro %}