{# -*- 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. #} {%- import "invenio_github/settings/helpers.html" as helpers with context %} {%- from "invenio_github/helpers.html" import doi_badge with context -%} {%- extends config.GITHUB_SETTINGS_TEMPLATE %} {%- block settings_content %} {%- set github_rel_url = 'https://github.com/{0}/releases/new'.format(repo.name) %} {% set active = true %} {%- block repo_details_header scoped %}
{{ helpers.repo_switch(repo, repo.github_id) }}
{%- endblock %} {{ helpers.panel_start( _('Releases'), btn_text=_('Create release'), btn_icon='github icon', btn_href=github_rel_url, ) }}
{%- if not releases %} {%- if repo.enabled %} {%- block enabled_repo_get_started scoped %}

{{ _("Get started!") }}

{{ _("Go to GitHub and make your first release.") }}

{{ repo.name }}
{%- endblock enabled_repo_get_started %} {%- else -%} {%- block disabled_repo_getstarted scoped %}

{{ _("Get started!") }}

1 {{ _("Flip the switch") }}

{{ _("Toggle the switch below to turn on/off automatic preservation of your repository.") }}

{{ helpers.repo_switch(repo, repo.github_id) }}

2 {{ _("Create a release") }}

{{ _('Go to GitHub and create a release. {} will automatically download a .zip-ball of each new release and register a DOI.') .format(config.THEME_SITENAME | default('Invenio')) }}

{%- endblock disabled_repo_getstarted %} {%- endif -%} {%- else %} {%- block repo_releases scoped %} {%- endblock repo_releases %} {%- endif %}
{{ helpers.panel_end() }} {%- endblock %} {%- block javascript %} {{ super() }} {{ webpack['invenio-github-init.js'] }} {%- endblock javascript %}