contentdb/app/templates/macros/todo.html
2021-01-29 23:12:26 +00:00

56 lines
1.7 KiB
HTML

{% macro render_outdated_packages(outdated_packages) -%}
<ul class="list-group mt-3">
{% for package in outdated_packages %}
{% set config = package.update_config %}
<li class="list-group-item">
<div class="row">
{% if package %}
<a class="col-sm-4 text-muted" href="{{ package.getDetailsURL() }}">
<img
class="img-fluid"
style="max-height: 22px; max-width: 22px;"
src="{{ package.getThumbnailOrPlaceholder() }}" />
<span class="pl-2">
{{ package.title }}
</span>
</a>
{% endif %}
<div class="col-sm">
{% 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>
</div>
<div class="col-sm-auto">
{% set release_title = config.last_tag or (config.outdated_at | isodate) %}
<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>
<a class="btn btn-sm btn-secondary mr-2" href="{{ package.repo }}">
<i class="fas fa-code-branch mr-1"></i>
{{ _("Repo") }}
</a>
<a class="btn btn-sm btn-secondary" href="{{ package.getUpdateConfigURL() }}">
<i class="fas fa-cog mr-1"></i>
{{ _("Update settings") }}
</a>
</div>
</div>
</li>
{% else %}
<p class="list-group-item"><i>No outdated packages.</i></p>
{% endfor %}
</ul>
{% endmacro %}