ninegate/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/views/Config/list.html.twig

83 lines
3.6 KiB
Twig

{% extends '@CadolesCore/base.html.twig' %}
{% block pagewrapper %}
<form>
<h1 class="page-header">Configuration Générale</h1>
Attention, selon la configuration du portail, certains paramètres sont forcés au niveau du serveur et donc certains réglages peuvent être inopérants dans cette interface.
<br><br>
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-table fa-fw"></i> Liste des Configurations
</div>
<div class="panel-body">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead>
<tr>
<th width="90px">Action</th>
<th width="70px">Ordre</th>
<th width="200px">Clé</th>
<th>Description</th>
<th>Valeur</th>
</tr>
</thead>
{% for config in configs %}
{% if (config.required) and (config.value=="" ) %}
<tr class="danger">
{% else %}
<tr>
{% endif %}
<td>
<a style="cursor:pointer" onClick="showInfo('info-{{ config.id }}');" data-toggle="modal" data-target="#modalinfo"><i id="info-{{ config.id }}" class="fa fa-info-circle" data="{{ config.help }}"></i></a>
{% if config.changeable %}
<a href={{ path('cadoles_core_config_commun_update', {'id': config.id}) }}><i class="fa fa-file fa-fw"></i></a>
{% if not config.required %}
<a href={{ path('cadoles_core_config_commun_delete', {'id': config.id}) }}><i class="fa fa-trash fa-fw"></i></a>
{% endif %}
{% endif %}
</td>
<td>{{ config.order }}</td>
<td>{{ config.id }}</td>
<td>{{ config.help|raw }}</td>
<td>
{% if config.type == "boolean" %}
{% if config.value == "0" %}
non
{% else %}
oui
{% endif %}
{% elseif config.type == "logo" %}
<img src="/{{ alias }}/{{ config.value }}"" height="90px">
{% elseif config.type == "header" %}
<img src="/{{ alias }}/{{ config.value }}"" width="100%">
{% else %}
{{ config.value }}
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
</div>
</form>
{% endblock %}
{% block localjavascript %}
function showInfo(id) {
$("#modalinfo #modalinfotext").html($("#"+id).attr("data").replace(/\n/g, "<br />"));
}
$(document).ready(function() {
$('#dataTables').DataTable({
responsive: true,
order: [[ 1, "asc" ]]
});
});
{% endblock %}