2021-01-30 02:07:00 +01:00
|
|
|
{% macro render_outdated_packages(outdated_packages, current_player, 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">
|
|
|
|
{% if package %}
|
2021-01-30 01:15:07 +01:00
|
|
|
<a class="col-sm-auto text-muted" style="min-width: 200px;" href="{{ package.getDetailsURL() }}">
|
2021-01-29 20:38:14 +01:00
|
|
|
<img
|
|
|
|
class="img-fluid"
|
|
|
|
style="max-height: 22px; max-width: 22px;"
|
2021-01-29 21:21:17 +01:00
|
|
|
src="{{ package.getThumbnailOrPlaceholder() }}" />
|
2021-01-29 20:38:14 +01:00
|
|
|
|
|
|
|
<span class="pl-2">
|
|
|
|
{{ package.title }}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<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 />
|
|
|
|
<span class="text-muted">
|
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 %}
|
|
|
|
{% if package.checkPerm(current_player, "MAKE_RELEASE") %}
|
2021-01-30 17:48:11 +01:00
|
|
|
<a class="btn btn-sm btn-primary mr-2" href="{{ config.get_create_release_url() }}">
|
2021-01-30 02:07:00 +01:00
|
|
|
<i class="fas fa-plus mr-1"></i>
|
|
|
|
{{ _("Release") }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2021-01-30 01:50:50 +01:00
|
|
|
{% endif %}
|
2021-01-29 20:38:14 +01:00
|
|
|
|
|
|
|
<a class="btn btn-sm btn-secondary mr-2" href="{{ package.repo }}">
|
|
|
|
<i class="fas fa-code-branch mr-1"></i>
|
|
|
|
{{ _("Repo") }}
|
|
|
|
</a>
|
|
|
|
|
2021-01-30 01:50:50 +01:00
|
|
|
{% if package.checkPerm(current_player, "MAKE_RELEASE") %}
|
|
|
|
<a class="btn btn-sm btn-secondary" href="{{ package.getUpdateConfigURL() }}">
|
|
|
|
<i class="fas fa-cog mr-1"></i>
|
|
|
|
{{ _("Update settings") }}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2021-01-29 20:38:14 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{% else %}
|
|
|
|
<p class="list-group-item"><i>No outdated packages.</i></p>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endmacro %}
|