view.ctp 5.72 KB

<div class="configurations view">
    <h2>Configuration générale de l'application</h2>
    
    <?php 
    echo $this->Html->link(__('<i class="icon-pencil"></i> Editer la configuration'),
    		['action' => 'edit', $configurationObj->id],
    		['escape' => false,'onclick' => 'return true;']
    		);
    echo '<br><br>';
    
    if(h($configurationObj->mode_install) == 1) {
    	$install="Oui";
    }else {
    	$install="Non";
    }
    
    if(h($configurationObj->mode_debug) == 1) {
    	$debug="Oui";
    }else {
    	$debug="Non";
    }
    
    if(h($configurationObj->hasPrinter) == 1) {
    	$print="Oui";
    }else {
    	$print="Non";
    }
    
    if(h($configurationObj->use_ldap) == 1) {
    	$ldap="Oui";
    }else {
    	$ldap="Non";
    }
    if(h($configurationObj->envoi_mail_management_dev) == 1) {
    	$local="Non";
    }else {
    	$local="Oui";
    }
    
    if(h($configurationObj->numero_labo_sans_annee) == 1) {
    	$numLab="Oui";
    }else {
    	$numLab="Non";
    }
    if(h($configurationObj->date_commande_facultative) == 1) {
    	$dateObl="Oui";
    }else {
    	$dateObl="Non";
    }

    	echo '<h3 id="t_informations" style="cursor: pointer;">';
    	echo '<i class="icon-chevron-down" style="font-size: 14px;" id="i_informations"></i>';
    	echo '<span style="text-decoration: underline;">Modes</span>';
    	echo '</h3>';
    	echo '<div id="informations" style="margin-bottom: 20px;">';
    	echo '<table>';
    	echo '<tr><th style="width: 250px;"></th><th></th></tr>';
    	$displayElement(__('Mode install'), $install);
    	$displayElement(__('Mode debug'), $debug);
    	echo '</table>';
    	echo '</div>';
    	
    	
    	echo '<h3 id="t_informations_admin" style="cursor: pointer;">';
    	echo '<i class="icon-chevron-down" style="font-size: 14px;" id="i_informations_admin"></i>';
    	echo '<span style="text-decoration: underline;">Laboratoire</span>';
    	echo '</h3>';
    	echo '<div id="informations_admin" style="margin-bottom: 20px;">';
    	echo '<table>';
    	echo '<tr><th style="width: 250px;"></th><th></th></tr>';
    	$displayElement(__('Nom complet du Labo'), h($configurationObj->labName));
    	$displayElement(__('Nom court du Labo'), h($configurationObj->labNameShort));
    	$displayElement(__('Liaison présentation nom du Labo'), h($configurationObj->labPresent));
    	$displayElement(__('UMR du Labo'), h($configurationObj->labUmr));
    	echo '</table>';
    	echo '</div>';
    	 
    	
    	echo '<h3 id="t_suivis" style="cursor: pointer;">';
    	echo '<i class="icon-chevron-down" style="font-size: 14px;" id="i_suivis"></i>';
    	echo '<span style="text-decoration: underline;">Divers</span>';
    	echo '</h3>';
    	echo '<div id="suivis" style="margin-bottom: 20px;">';
    	echo '<table>';
    	echo '<tr><th style="width: 250px;"></th><th></th></tr>';
		$displayElement(__('Imprimante disponible'), $print);
		$displayElement(__('Seuil (prix) Matériel administratif'), h($configurationObj->prix_inventaire_administratif));
   		$displayElement(__('Numero labo sans année'), $numLab);
    	$displayElement(__('Champ date commande non obligatoire'), $dateObl);
    	$displayElement(__('Label groupe thématique'), h($configurationObj->nom_groupe_thematique));
    	$displayElement(__('Label groupe métier'), h($configurationObj->nom_groupe_metier));
    	echo '</table>';
    	echo '</div>';
    

    	echo '<h3 id="t_emprunts" style="cursor: pointer;">';
    	echo '<i class="icon-chevron-down" style="font-size: 14px;" id="i_emprunts"></i>';
    	echo '<span style="text-decoration: underline;">Emails</span>';
    	echo '</h3>';
    	echo '<div id="emprunts" style="margin-bottom: 20px;">';
    	echo '<table>';
    	echo '<tr><th style="width: 250px;"></th><th></th></tr>';
        $displayElement(__('Envoi des mails de management en local'), $local);
    	$displayElement(__('Attribut "sender" (mail)'), h($configurationObj->sender_mail));
    	$displayElement(__('Mail guest 1'), h($configurationObj->emailGuest1));
    	$displayElement(__('Mail guest 2'), h($configurationObj->emailGuest2));
    	$displayElement(__('Mail guest 3'), h($configurationObj->emailGuest3));
    	$displayElement(__('Mail guest 4'), h($configurationObj->emailGuest4));
   		$displayElement(__('Mail guest 5'), h($configurationObj->emailGuest5));
    	$displayElement(__('Mail guest 6'), h($configurationObj->emailGuest6));
    	$displayElement(__('Mail guest 7'), h($configurationObj->emailGuest7));
    	$displayElement(__('Mail guest 8'), h($configurationObj->emailGuest8));
    	$displayElement(__('Mail guest 9'), h($configurationObj->emailGuest9));
    	$displayElement(__('Mail guest 10'), h($configurationObj->emailGuest10));
    	echo '</table>';
    	echo '</div>';

    if ($configuration->use_ldap):
    	echo '<h3 id="t_informations_fichiers" style="cursor: pointer;">';
    	echo '<i class="icon-chevron-down" style="font-size: 14px;" id="i_informations_fichiers"></i>';
    	echo '<span style="text-decoration: underline;">LDAP</span>';
    	echo '</h3>';
    	echo '<div id="informations_fichiers" style="margin-bottom: 20px;">';
    	echo '<table>';
    	echo '<tr><th style="width: 250px;"></th><th></th></tr>';
    	$displayElement(__('Utilisation du LDAP'), $ldap);
    	$displayElement(__('Host du LDAP'), h($configurationObj->host_ldap));
    	$displayElement(__('Port du LDAP'), h($configurationObj->port_ldap));
   		$displayElement(__('Type d\'authentification du LDAP'), h($configurationObj->authentificationType_ldap));
    	$displayElement(__('Base DN du LDAP'), h($configurationObj->baseDn_ldap));
   		$displayElement(__('Filtre du LDAP'), h($configurationObj->filter_ldap));
    
    	echo '</table>';
    	echo '</div>';
	endif;


    ?>
        
        
</div>

   <div class="actions">
		<?php echo $this->element('menu') ?>
		</div>