{% extends 'layout.twig' %}
     
{% block body %}

	<div class="contenu clearfix"  id="fournisseurs">
	
    	<h1>{{ 'Paramétrage portail fournisseur' | trad }}</h1>
    
        {{ ariane() }}
        
        <div id="oxalink" class="tab-content clearfix" style="margin-top:15px;">
        
            {{ arianeSub() }}
            
            <div class="padding15 clearfix" id="tabPAGE">
                <table class="table table-hover">
                  	<thead class="thead-dark">
                      	<tr>
                      		<th>{{ 'Titre' | trad }}</th>
                      		<th>{{ 'Publique ?' | trad }}</th>
                      		<th width="100px;">
								<a class="ajouter_blanc_v2  white-tooltip"  href="{{ path('Parametrage.ParametrageOxalink.ajouterPage') }}" style="float: right;">
                        			<span id="addChamps" class="infos_tooltip left">
                        				{{ 'Nouvelle page' | trad }}
                                    </span>
                      		 	</a>
							</th>
                  		</tr>
                  	</thead>
                  	<tbody>
              			<tr id="CGU">
                  			<td class="toggleSlide" onclick="toggleSlide('{{ path('Parametrage.ParametrageOxalink.ajaxDetailCGU') }}' , 'CGUdetail');">
                  			    {{ "Conditions générales d'utilisation" | trad }}
              			    </td>
                  			<td width="100px"></td>
							<td>
								{% if CGU.LIBELLE %}{{ hover_action('CGU', 'download_v2' , "window.location.href ='"~path('Parametrage.ParametrageOxalink.downloadCGU')~"';", 'float: right;') }}{% endif %}
								{{ hover_action('CGU', 'modifier_v2' , "window.location.href ='"~path('Parametrage.ParametrageOxalink.modificationCGU')~"';", 'float: right;') }}
							</td>	
              			</tr>	
                      	<tr id="CGUdetail" class="detail_ligne hide_detail">
                      	</tr>
                  		{% for page in listePage %}
                      		<tr id="page{{ loop.index }}">
                      			<td class="toggleSlide" onclick="toggleSlide('{{ path('Parametrage.ParametrageOxalink.ajaxDetailPage', {page: page.CODE}) }}' , 'page{{ loop.index }}detail');">{{ page.TITRE }}</td>
                      			<td width="100px">{{ page.PAGE_PUBLIC | boolSql | boolTrad }}</td>
								<td>
									{{ hover_action('page'~loop.index, 'Supprimer_v2' , "popupConfirmation(\'"~path('Ajax.Erreur.popupConfirmationSuppresion')~"\', \'\', \'"~path('Parametrage.ParametrageOxalink.suppresionPage', {page: page.CODE})~"\', \'"~('Êtes-vous sur de vouloir supprimez la page' | trad |e('js')|raw)~" "~(page.TITRE |e('js')|raw)~" ?\', \'tabPAGE\', '', '', '', '', '', '')", 'float: right;margin-right:5px;') }}
									{{ hover_action('page'~loop.index, 'modifier_v2' , "window.location.href ='"~path('Parametrage.ParametrageOxalink.modificationPage', {page: page.CODE})~"';", 'float: right;') }}
								</td>
                      		</tr>
                      		<tr id="page{{ loop.index }}detail"  class="detail_ligne hide_detail">
                      		<tr>
                  		{% endfor %}
                  	</tbody>
                </table>
            </div>
        </div>
    </div>
    
{% endblock %}