2021-05-04 04:15:26 +02:00
|
|
|
{% extends "packages/package_base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{{ _("Releases - %(title)s", title=package.title) }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2023-06-18 22:56:19 +02:00
|
|
|
{% if package.check_perm(current_user, "MAKE_RELEASE") %}
|
2023-08-22 20:58:43 +02:00
|
|
|
<p class="float-end">
|
2021-07-24 04:56:43 +02:00
|
|
|
{% if package.update_config %}
|
2023-06-18 23:00:24 +02:00
|
|
|
<a class="btn btn-secondary" href="{{ package.get_url('packages.update_config') }}">
|
2023-08-22 20:58:43 +02:00
|
|
|
<i class="fas fa-cog me-1"></i>
|
2021-07-24 04:56:43 +02:00
|
|
|
{{ _("Update settings") }}
|
|
|
|
</a>
|
|
|
|
{% elif package.repo %}
|
2023-06-18 23:00:24 +02:00
|
|
|
<a class="btn btn-secondary" href="{{ package.get_url('packages.setup_releases') }}">
|
2023-08-22 20:58:43 +02:00
|
|
|
<i class="fas fa-hat-wizard me-1"></i>
|
2021-07-24 04:56:43 +02:00
|
|
|
{{ _("Set up automatic releases") }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2021-05-04 04:15:26 +02:00
|
|
|
|
2023-08-22 20:58:43 +02:00
|
|
|
<a class="btn btn-secondary ms-1" href="{{ package.get_url('packages.bulk_change_release') }}">
|
|
|
|
<i class="fas fa-wrench me-1"></i>
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("Bulk update") }}
|
2021-07-24 04:56:43 +02:00
|
|
|
</a>
|
2021-05-04 04:15:26 +02:00
|
|
|
|
2023-08-22 20:58:43 +02:00
|
|
|
<a class="btn btn-primary ms-1" href="{{ package.get_url('packages.create_release') }}">
|
|
|
|
<i class="fas fa-plus me-1"></i>
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("Create") }}
|
2021-07-24 04:56:43 +02:00
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2021-05-04 04:15:26 +02:00
|
|
|
|
|
|
|
<h2 class="mt-0">{{ _("Releases") }}</h2>
|
|
|
|
|
2021-07-24 04:56:43 +02:00
|
|
|
<div class="list-group">
|
|
|
|
{% from "macros/releases.html" import render_releases_edit, render_releases_download %}
|
2023-06-18 22:56:19 +02:00
|
|
|
{% if package.check_perm(current_user, "MAKE_RELEASE") %}
|
2021-07-24 04:56:43 +02:00
|
|
|
{{ render_releases_edit(package.releases, package) }}
|
|
|
|
{% else %}
|
2021-07-24 17:47:41 +02:00
|
|
|
{{ render_releases_download(package.releases, package, current_user) }}
|
2021-07-24 04:56:43 +02:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2023-12-29 11:28:00 +01:00
|
|
|
|
|
|
|
<p class="mt-5 text-muted">
|
|
|
|
{% set release_size = ((package.releases | sum(attribute="file_size_bytes")) / 1048576) | round %}
|
|
|
|
{% set screenshot_size = ((package.screenshots | sum(attribute="file_size_bytes")) / 1048576) | round %}
|
|
|
|
{{ _("Total storage usage is %(total_size)d MB (releases %(release_size)d MB, screenshots %(screenshot_size)d MB)",
|
|
|
|
release_size=release_size, screenshot_size=screenshot_size, total_size=release_size + screenshot_size) }}
|
|
|
|
</p>
|
2021-05-04 04:15:26 +02:00
|
|
|
{% endblock %}
|