Add page with list of all update configs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{% macro render_outdated_packages(outdated_packages, current_player) -%}
|
||||
{% macro render_outdated_packages(outdated_packages, current_player, show_config=False) -%}
|
||||
<ul class="list-group mt-3">
|
||||
{% for package in outdated_packages %}
|
||||
{% set config = package.update_config %}
|
||||
@@ -18,24 +18,31 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="col-sm">
|
||||
{% if config.trigger == config.trigger.TAG and config.last_tag %}
|
||||
{{ _("New tag: %(tag)s", tag=config.last_tag) }}
|
||||
{% 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) }}
|
||||
{% else %}
|
||||
{{ _("Git repo has commit %(ref)s", ref=config.last_commit[0:5]) }}
|
||||
{% if config.trigger == config.trigger.TAG and config.last_tag %}
|
||||
{{ _("New tag: %(tag)s", tag=config.last_tag) }}
|
||||
{% else %}
|
||||
{{ _("Git repo has commit %(ref)s", ref=config.last_commit[0:5]) }}
|
||||
{% endif %}
|
||||
<span class="text-muted ml-3">
|
||||
{{ config.outdated_at | datetime }}
|
||||
</span>
|
||||
{% endif %}
|
||||
<span class="text-muted ml-3">
|
||||
{{ config.outdated_at | datetime }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-auto">
|
||||
{% set release_title = config.last_tag or (config.outdated_at | isodate) %}
|
||||
{% if package.checkPerm(current_player, "MAKE_RELEASE") %}
|
||||
<a class="btn btn-sm btn-primary mr-2"
|
||||
href="{{ package.getCreateReleaseURL(title=release_title, ref=config.last_tag or config.last_commit) }}">
|
||||
<i class="fas fa-plus mr-1"></i>
|
||||
{{ _("Release") }}
|
||||
</a>
|
||||
{% if not show_config %}
|
||||
{% set release_title = config.last_tag or (config.outdated_at | isodate) %}
|
||||
{% if package.checkPerm(current_player, "MAKE_RELEASE") %}
|
||||
<a class="btn btn-sm btn-primary mr-2"
|
||||
href="{{ package.getCreateReleaseURL(title=release_title, ref=config.last_tag or config.last_commit) }}">
|
||||
<i class="fas fa-plus mr-1"></i>
|
||||
{{ _("Release") }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<a class="btn btn-sm btn-secondary mr-2" href="{{ package.repo }}">
|
||||
|
||||
Reference in New Issue
Block a user