mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-24 20:09:31 +00:00
Added an page to view infos about the server (Part-DB, PHP and DB config
This commit is contained in:
parent
78d1dff40f
commit
34fbcec00f
10 changed files with 1287 additions and 1018 deletions
|
|
@ -6,6 +6,30 @@
|
|||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro array_to_tags(tags, class="badge bg-primary") %}
|
||||
{% for tag in tags %}
|
||||
<span class="{{ class }}">{{ tag | trim }}</span>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro bool_icon(bool) %}
|
||||
{% if bool %}
|
||||
<i class="fas fa-check-circle fa-fw" title="{% trans %}Yes{% endtrans %}"></i>
|
||||
{% else %}
|
||||
<i class="fas fa-times-circle fa-fw" title="{% trans %}No{% endtrans %}"></i>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro boolean_badge(value, class="badge") %}
|
||||
{% if value %}
|
||||
{% set class = class ~ ' bg-success' %}
|
||||
{% else %}
|
||||
{% set class = class ~ ' bg-danger' %}
|
||||
{% endif %}
|
||||
|
||||
<span class="{{ class }}">{{ _self.bool_icon(value) }} {{ _self.boolean(value) }}</span>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro string_to_tags(string, class="badge bg-info") %}
|
||||
{% for tag in string|split(',') %}
|
||||
<a href="{{ path('part_list_tags', {'tag': tag | trim | url_encode}) }}" class="{{ class }}" >{{ tag | trim }}</a>
|
||||
|
|
@ -106,14 +130,6 @@
|
|||
</nav>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro bool_icon(bool) %}
|
||||
{% if bool %}
|
||||
<i class="fas fa-check-circle fa-fw" title="{% trans %}Yes{% endtrans %}"></i>
|
||||
{% else %}
|
||||
<i class="fas fa-times-circle fa-fw" title="{% trans %}No{% endtrans %}"></i>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro date_user_combination(entity, lastModified, datetime_format = "short") %}
|
||||
{% if lastModified == true %}
|
||||
{{ entity.lastModified | format_datetime(datetime_format) }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue