mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 14:32:25 +01:00
61 lines
1.8 KiB
HTML
61 lines
1.8 KiB
HTML
{% 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 %}
|
|
<li class="list-group-item">
|
|
<div class="row">
|
|
{% if package %}
|
|
<a class="col-sm-auto text-muted" style="min-width: 200px;" 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 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 %}
|
|
{{ config.get_message() }}<br />
|
|
<span class="text-muted">
|
|
{{ config.outdated_at | datetime }}
|
|
</span>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="col-sm-auto">
|
|
{% if not show_config %}
|
|
{% if package.checkPerm(current_player, "MAKE_RELEASE") %}
|
|
<a class="btn btn-sm btn-primary mr-2" href="{{ config.get_create_release_url() }}">
|
|
<i class="fas fa-plus mr-1"></i>
|
|
{{ _("Release") }}
|
|
</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<a class="btn btn-sm btn-secondary mr-2" href="{{ package.repo }}">
|
|
<i class="fas fa-code-branch mr-1"></i>
|
|
{{ _("Repo") }}
|
|
</a>
|
|
|
|
{% 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 %}
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{% else %}
|
|
<p class="list-group-item"><i>No outdated packages.</i></p>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endmacro %}
|