2021-07-24 04:56:43 +02:00
|
|
|
{% macro render_releases_edit(releases, package) %}
|
|
|
|
{% for rel in releases %}
|
2023-06-18 22:56:19 +02:00
|
|
|
<a class="list-group-item list-group-item-action" href="{{ rel.get_edit_url() }}">
|
2021-07-24 04:56:43 +02:00
|
|
|
{{ rel.title }}
|
2023-08-22 20:58:43 +02:00
|
|
|
<span class="text-muted ms-1">
|
2021-07-24 04:56:43 +02:00
|
|
|
{% if rel.min_rel and rel.max_rel %}
|
|
|
|
[MT {{ rel.min_rel.name }}-{{ rel.max_rel.name }}]
|
|
|
|
{% elif rel.min_rel %}
|
|
|
|
[MT {{ rel.min_rel.name }}+]
|
|
|
|
{% elif rel.max_rel %}
|
|
|
|
[MT ≤{{ rel.max_rel.name }}]
|
|
|
|
{% endif %}
|
|
|
|
</span>
|
|
|
|
<br />
|
|
|
|
<small style="color:#999;">
|
|
|
|
{% if rel.commit_hash %}
|
|
|
|
[{{ rel.commit_hash | truncate(5, end='') }}]
|
|
|
|
{% endif %}
|
|
|
|
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("created %(date)s", date=rel.releaseDate | date) }}.
|
2021-07-24 04:56:43 +02:00
|
|
|
</small>
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
2021-07-24 17:47:41 +02:00
|
|
|
{% macro render_releases_download(releases, package, current_user) %}
|
2021-05-04 04:15:26 +02:00
|
|
|
{% for rel in releases %}
|
2023-06-18 22:56:19 +02:00
|
|
|
{% if rel.approved or package.check_perm(current_user, "MAKE_RELEASE") or rel.check_perm(current_user, "APPROVE_RELEASE") %}
|
|
|
|
<a class="list-group-item list-group-item-action" href="{{ rel.get_download_url() }}">
|
2021-07-24 04:56:43 +02:00
|
|
|
{{ rel.title }}
|
2023-08-22 20:58:43 +02:00
|
|
|
<span class="text-muted ms-1">
|
2021-07-24 04:56:43 +02:00
|
|
|
{% if rel.min_rel and rel.max_rel %}
|
|
|
|
[MT {{ rel.min_rel.name }}-{{ rel.max_rel.name }}]
|
|
|
|
{% elif rel.min_rel %}
|
|
|
|
[MT {{ rel.min_rel.name }}+]
|
|
|
|
{% elif rel.max_rel %}
|
|
|
|
[MT ≤{{ rel.max_rel.name }}]
|
2021-05-04 04:15:26 +02:00
|
|
|
{% endif %}
|
2021-07-24 04:56:43 +02:00
|
|
|
</span>
|
|
|
|
<br />
|
|
|
|
<small style="color:#999;">
|
|
|
|
{% if rel.commit_hash %}
|
|
|
|
[{{ rel.commit_hash | truncate(5, end='') }}]
|
|
|
|
{% endif %}
|
|
|
|
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("created %(date)s", date=rel.releaseDate | date) }}.
|
2021-07-24 04:56:43 +02:00
|
|
|
</small>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
{% macro render_releases(releases, package, current_user) -%}
|
|
|
|
{% for rel in releases %}
|
2021-07-24 17:47:41 +02:00
|
|
|
<div class="list-group-item">
|
2023-08-22 20:58:43 +02:00
|
|
|
<a class="btn btn-sm btn-primary float-end" href="{{ rel.get_edit_url() }}">
|
2023-06-18 22:56:19 +02:00
|
|
|
{% if not rel.task_id and not rel.approved and rel.check_perm(current_user, "APPROVE_RELEASE") %}
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("Edit / Approve") }}
|
|
|
|
{% else %}
|
|
|
|
{{ _("Edit") }}
|
2021-07-24 17:47:41 +02:00
|
|
|
{% endif %}
|
|
|
|
</a>
|
2021-05-04 04:15:26 +02:00
|
|
|
|
2021-07-24 17:47:41 +02:00
|
|
|
{% if not rel.approved %}<i>{% endif %}
|
2021-05-04 04:15:26 +02:00
|
|
|
|
2023-06-18 22:56:19 +02:00
|
|
|
<a href="{{ rel.get_download_url() }}" rel="nofollow" download="{{ rel.get_download_filename() }}">
|
2021-07-24 17:47:41 +02:00
|
|
|
{{ rel.title }}
|
|
|
|
</a>
|
2021-05-04 04:15:26 +02:00
|
|
|
|
2023-08-22 20:58:43 +02:00
|
|
|
<span class="text-muted ms-1">
|
2021-07-24 17:47:41 +02:00
|
|
|
{% if rel.min_rel and rel.max_rel %}
|
|
|
|
[MT {{ rel.min_rel.name }}-{{ rel.max_rel.name }}]
|
|
|
|
{% elif rel.min_rel %}
|
|
|
|
[MT {{ rel.min_rel.name }}+]
|
|
|
|
{% elif rel.max_rel %}
|
|
|
|
[MT ≤{{ rel.max_rel.name }}]
|
|
|
|
{% endif %}
|
|
|
|
</span>
|
2021-05-04 04:15:26 +02:00
|
|
|
|
2021-07-24 17:47:41 +02:00
|
|
|
<br>
|
2021-05-04 04:15:26 +02:00
|
|
|
|
2021-07-24 17:47:41 +02:00
|
|
|
<small style="color:#999;">
|
|
|
|
{% if rel.commit_hash %}
|
|
|
|
[{{ rel.commit_hash | truncate(5, end='') }}]
|
2021-05-04 04:15:26 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("created %(date)s", date=rel.releaseDate | date) }}.
|
2021-07-24 17:47:41 +02:00
|
|
|
</small>
|
2023-06-18 22:56:19 +02:00
|
|
|
{% if (package.check_perm(current_user, "MAKE_RELEASE") or rel.check_perm(current_user, "APPROVE_RELEASE")) and rel.task_id %}
|
2023-06-18 23:00:24 +02:00
|
|
|
<a href="{{ url_for('tasks.check', id=rel.task_id, r=package.get_url('packages.view')) }}">
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("Importing...") }}
|
|
|
|
</a>
|
2021-07-24 17:47:41 +02:00
|
|
|
{% elif not rel.approved %}
|
2022-01-08 00:27:00 +01:00
|
|
|
{{ _("Waiting for approval.") }}
|
2021-07-24 17:47:41 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if not rel.approved %}</i>{% endif %}
|
|
|
|
</div>
|
2021-05-04 04:15:26 +02:00
|
|
|
{% else %}
|
2022-01-08 00:27:00 +01:00
|
|
|
<div class="list-group-item">
|
|
|
|
{{ _("No releases available.") }}
|
|
|
|
</div>
|
2021-05-04 04:15:26 +02:00
|
|
|
{% endfor %}
|
|
|
|
{% endmacro %}
|