2022-10-15 13:53:17 +02:00
|
|
|
{% macro render_outdated_packages(outdated_packages, current_user, show_config=False) -%}
|
2021-01-29 20:38:14 +01:00
|
|
|
<ul class="list-group mt-3">
|
|
|
|
{% for package in outdated_packages %}
|
2021-01-30 00:12:26 +01:00
|
|
|
{% set config = package.update_config %}
|
2021-01-29 20:38:14 +01:00
|
|
|
<li class="list-group-item">
|
|
|
|
<div class="row">
|
2023-06-18 23:00:24 +02:00
|
|
|
<a class="col-sm-auto text-muted" style="min-width: 200px;" href="{{ package.get_url('packages.view') }}">
|
2022-10-15 13:53:17 +02:00
|
|
|
<img
|
|
|
|
class="img-fluid"
|
|
|
|
style="max-height: 22px; max-width: 22px;"
|
2023-06-18 22:56:19 +02:00
|
|
|
src="{{ package.get_thumb_or_placeholder() }}" />
|
2022-10-15 13:53:17 +02:00
|
|
|
|
2023-08-22 20:58:43 +02:00
|
|
|
<span class="ps-2">
|
2022-10-15 13:53:17 +02:00
|
|
|
{{ package.title }}
|
|
|
|
</span>
|
|
|
|
</a>
|
2021-01-29 20:38:14 +01:00
|
|
|
|
|
|
|
<div class="col-sm">
|
2021-01-30 02:07:00 +01:00
|
|
|
{% if show_config %}
|
|
|
|
{% set action = "Make release" if config.make_release else "Notification" %}
|
|
|
|
{{ _("On %(trigger)s, do %(action)s", trigger=config.trigger.value, action=action) }}
|
2021-01-29 23:20:44 +01:00
|
|
|
{% else %}
|
2021-01-30 17:48:11 +01:00
|
|
|
{{ config.get_message() }}<br />
|
2024-07-05 02:19:33 +02:00
|
|
|
<span class="text-muted" title="{{ config.outdated_at | full_datetime }}">
|
2021-01-30 02:07:00 +01:00
|
|
|
{{ config.outdated_at | datetime }}
|
|
|
|
</span>
|
2021-01-29 23:20:44 +01:00
|
|
|
{% endif %}
|
2021-01-29 20:38:14 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-sm-auto">
|
2021-01-30 02:07:00 +01:00
|
|
|
{% if not show_config %}
|
2023-06-18 22:56:19 +02:00
|
|
|
{% if package.check_perm(current_user, "MAKE_RELEASE") %}
|
2023-08-22 20:58:43 +02:00
|
|
|
<a class="btn btn-sm btn-primary me-2" href="{{ config.get_create_release_url() }}">
|
|
|
|
<i class="fas fa-plus me-1"></i>
|
2021-01-30 02:07:00 +01:00
|
|
|
{{ _("Release") }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2021-01-30 01:50:50 +01:00
|
|
|
{% endif %}
|
2021-01-29 20:38:14 +01:00
|
|
|
|
2023-08-22 20:58:43 +02:00
|
|
|
<a class="btn btn-sm btn-secondary me-2" href="{{ package.repo }}">
|
|
|
|
<i class="fas fa-code-branch me-1"></i>
|
2021-01-29 20:38:14 +01:00
|
|
|
{{ _("Repo") }}
|
|
|
|
</a>
|
|
|
|
|
2023-06-18 22:56:19 +02:00
|
|
|
{% if package.check_perm(current_user, "MAKE_RELEASE") %}
|
2023-06-18 23:00:24 +02:00
|
|
|
<a class="btn btn-sm 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-01-30 01:50:50 +01:00
|
|
|
{{ _("Update settings") }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2021-01-29 20:38:14 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{% else %}
|
2022-01-08 00:27:00 +01:00
|
|
|
<p class="list-group-item"><i>{{ _("No outdated packages.") }}</i></p>
|
2021-01-29 20:38:14 +01:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endmacro %}
|
2022-10-15 13:53:17 +02:00
|
|
|
|
|
|
|
{% macro render_mtsupport_packages(packages, current_user, show_config=False) -%}
|
|
|
|
<div class="list-group mt-3">
|
|
|
|
{% for package in packages %}
|
2023-06-18 22:56:19 +02:00
|
|
|
<a class="list-group-item list-group-item-action" href="{{ package.get_url('packages.list_releases') }}">
|
2022-10-15 13:53:17 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-auto text-muted" style="min-width: 200px;">
|
|
|
|
<img
|
|
|
|
class="img-fluid"
|
|
|
|
style="max-height: 22px; max-width: 22px;"
|
2023-06-18 22:56:19 +02:00
|
|
|
src="{{ package.get_thumb_or_placeholder() }}" />
|
2022-10-15 13:53:17 +02:00
|
|
|
|
2023-08-22 20:58:43 +02:00
|
|
|
<span class="ps-2">
|
2022-10-15 13:53:17 +02:00
|
|
|
{{ package.title }}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-sm">
|
2023-06-18 22:56:19 +02:00
|
|
|
{% set release = package.get_download_release() %}
|
2022-10-15 13:53:17 +02:00
|
|
|
{% if release %}
|
|
|
|
{{ release.min_rel.name }} - {{ release.max_rel.name }}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
{% else %}
|
|
|
|
<p class="list-group-item"><i>{{ _("No outdated packages.") }}</i></p>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endmacro %}
|