{# -*- 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. #} {%- from "invenio_github/helpers.html" import doi_badge with context -%} {%- macro panel_start( title, icon="", btn_help_text='', btn_text='', btn_loading_text='', btn_icon='', btn_href='', btn_class='', btn_id='', btn_name='', loaded_message_id='', id="", panel_extra_class="secondary" ) %} {%- block panel_start scoped %}
{%- block panel_heading scoped %}
{% if latest_release %}
{% endif %}

{% if icon %}{% endif %}{{ title }}

{% if latest_release %}
{%- if latest_release.record %} {%- set latest_release_record_doi = latest_release.record.pids.get('doi', {}).get('identifier') %} {%- set conceptid_doi_url = latest_release.record.links.parent_doi %} {%- endif %} {%- if latest_release_record_doi %} {{ doi_badge(latest_release_record_doi, doi_url=conceptid_doi_url, github_id=repo.github_id) }} {%- endif %}
{% endif %}
{%- if btn_text and (btn_href or btn_help_text) -%} {%- if btn_help_text %}

{{ btn_help_text }}

{%- endif %} {%- if btn_href %} {% if btn_icon %} {% endif %} {{ btn_text }} {%- elif btn_name and btn_id %} {%- endif %} {%- endif -%}
{%- endblock %}
{%- endblock %} {%- endmacro %} {%- macro panel_end() %} {%- block panel_end scoped %}
{%- 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 %}