86 lines
4.7 KiB
Twig
Executable File
86 lines
4.7 KiB
Twig
Executable File
<table class="table table-striped table-bordered table-hover" id="" style="width:100%">
|
|
<tbody>
|
|
{% for config in configs|sort((a, b) => a.order <=> b.order) %}
|
|
{% set continue = true %}
|
|
{% if not config.grouped is empty %}
|
|
|
|
{% if app.session.get(config.grouped)==0 %}
|
|
{% set continue = false %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{%if continue %}
|
|
<tr>
|
|
<td width="70px">
|
|
{% if config.changeable %}
|
|
<a href="{{path("app_admin_config_update",{id:config.id})}}"><i class="fa fa-file"></i></a>
|
|
{% endif %}
|
|
|
|
{% if not config.required %}
|
|
<a href="{{path("app_admin_config_delete",{id:config.id})}}"><i class="fa fa-trash"></i></a>
|
|
{% endif %}
|
|
</td>
|
|
<td width="50%">{{config.title}}</td>
|
|
|
|
{% set val = config.value %}
|
|
{% if val is empty %}
|
|
{% set val=app.session.get(config.id) %}
|
|
{% endif %}
|
|
|
|
{% set color = "" %}
|
|
{% set bgcolor = "" %}
|
|
{% set otherstyle = "" %}
|
|
{% if config.id=='colorbgbodydark' %}
|
|
{% set bgcolor = val %}
|
|
{% set color = app.session.get('colorftbodydark') %}
|
|
{% elseif config.id=='colorbgbodylight' %}
|
|
{% set bgcolor = val %}
|
|
{% set color = app.session.get('colorftbodylight') %}
|
|
{% elseif config.id=='colorfttitledark' %}
|
|
{% set bgcolor = app.session.get('colorbgbodydark') %}
|
|
{% set color = val %}
|
|
{% elseif config.id=='colorfttitlelight' %}
|
|
{% set bgcolor = app.session.get('colorbgbodylight') %}
|
|
{% set color = val %}
|
|
{% elseif config.id=='colorftbodydark' %}
|
|
{% set bgcolor = app.session.get('colorbgbodydark') %}
|
|
{% set color = val %}
|
|
{% elseif config.id=='colorftbodylight' %}
|
|
{% set bgcolor = app.session.get('colorbgbodylight') %}
|
|
{% set color = val %}
|
|
{% elseif config.id=='fonttitle' %}
|
|
{% set color = app.session.get('colorfttitlelight') %}
|
|
{% set otherstyle = "font-family: "~val~";" %}
|
|
{% elseif config.id=='logodark' %}
|
|
{% set bgcolor = app.session.get('colorbgbodydark') %}
|
|
{% set otherstyle = "text-align: center;" %}
|
|
{% elseif config.id=='logolight' %}
|
|
{% set bgcolor = app.session.get('colorbgbodylight') %}
|
|
{% set otherstyle = "text-align: center;" %}
|
|
{% endif %}
|
|
|
|
<td style="overflow-wrap: anywhere; background-color: {{ bgcolor }}; color: {{color}}; {{otherstyle}}" >
|
|
|
|
|
|
{% if config.type=="boolean" %}
|
|
{% if val=="0" %} Non
|
|
{% elseif val=="1" %} Oui
|
|
{%endif%}
|
|
{% elseif config.type=="logo" %}
|
|
{%if not val is empty %}
|
|
<img src="{{path("app_minio_image",{file:"logo/"~val}) }}" height=50px>
|
|
{% endif %}
|
|
{% elseif config.type=="header" %}
|
|
{%if not val is empty %}
|
|
<img src="{{ path("app_minio_image",{file:"header/"~val}) }}" width="100%">
|
|
{% endif %}
|
|
{% else %}
|
|
{{ val|raw }}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|