Show whether backup, restores and updates are allowed or disabled by sysadmin on update manager

This commit is contained in:
Jan Böhmer 2026-03-07 19:25:41 +01:00
parent 6d43a979b8
commit 166c3b8546
3 changed files with 309 additions and 283 deletions

View file

@ -1,5 +1,7 @@
{% extends "main_card.html.twig" %}
{% import "helper.twig" as helper %}
{% block title %}Part-DB {% trans %}update_manager.title{% endtrans %}{% endblock %}
{% block card_title %}
@ -7,7 +9,7 @@
{% endblock %}
{% block card_content %}
<div>
<div>
{# Maintenance Mode Warning #}
{% if is_maintenance %}
@ -100,17 +102,23 @@
<tr>
<th scope="row">{% trans %}update_manager.auto_update_supported{% endtrans %}</th>
<td>
{% if status.can_auto_update %}
<span class="badge bg-success">
<i class="fas fa-check me-1"></i>{% trans %}Yes{% endtrans %}
</span>
{% else %}
<span class="badge bg-secondary">
<i class="fas fa-times me-1"></i>{% trans %}No{% endtrans %}
</span>
{% endif %}
{{ helper.boolean_badge(status.can_auto_update) }}
</td>
</tr>
<tr>
<th scope="row">{% trans %}update_manager.web_updates_allowed{% endtrans %}</th>
<td>{{ helper.boolean_badge(not web_updates_disabled) }}</td>
</tr>
<tr>
<th scope="row">{% trans %}update_manager.backup_restore_allowed{% endtrans %}</th>
<td>{{ helper.boolean_badge(not backup_restore_disabled) }}</td>
</tr>
<tr>
<th scope="row">{% trans %}update_manager.backup_download_allowed{% endtrans %}</th>
<td>{{ helper.boolean_badge(not backup_download_disabled) }}</td>
</tr>
</tbody>
</table>
</div>
@ -517,6 +525,6 @@
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -1,8 +1,8 @@
{% macro boolean(value) %}
{% if value %}
{% trans %}bool.true{% endtrans %}
{% trans %}Yes{% endtrans %}
{% else %}
{% trans %}bool.false{% endtrans %}
{% trans %}No{% endtrans %}
{% endif %}
{% endmacro %}
@ -14,9 +14,9 @@
{% macro bool_icon(bool) %}
{% if bool %}
<i class="fas fa-check-circle fa-fw" title="{% trans %}Yes{% endtrans %}"></i>
<i class="fas fa-check fa-fw" title="{% trans %}Yes{% endtrans %}"></i>
{% else %}
<i class="fas fa-times-circle fa-fw" title="{% trans %}No{% endtrans %}"></i>
<i class="fas fa-times fa-fw" title="{% trans %}No{% endtrans %}"></i>
{% endif %}
{% endmacro %}
@ -24,7 +24,7 @@
{% if value %}
{% set class = class ~ ' bg-success' %}
{% else %}
{% set class = class ~ ' bg-danger' %}
{% set class = class ~ ' bg-secondary' %}
{% endif %}
<span class="{{ class }}">{{ _self.bool_icon(value) }} {{ _self.boolean(value) }}</span>

View file

@ -12923,5 +12923,23 @@ Buerklin-API Authentication server:
<target>Cancel</target>
</segment>
</unit>
<unit id="jdpoFf2" name="update_manager.web_updates_allowed">
<segment>
<source>update_manager.web_updates_allowed</source>
<target>Web updates allowed</target>
</segment>
</unit>
<unit id="bdWa7is" name="update_manager.backup_restore_allowed">
<segment>
<source>update_manager.backup_restore_allowed</source>
<target>Backup restore allowed</target>
</segment>
</unit>
<unit id="kllGQEN" name="update_manager.backup_download_allowed">
<segment>
<source>update_manager.backup_download_allowed</source>
<target>Backup download allowed</target>
</segment>
</unit>
</file>
</xliff>