view.ctp 6.99 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) == 0) {
        $mail_general = "Non";
    } else {
        $mail_general = "Oui";
    }

    if (h($configurationObj->envoi_mail_guests) == 0) {
        $mail_guests = "Non";
    } else {
        $mail_guests = "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";
    }
    if (h($configurationObj->metrologie) == 1) {
        $metro = "Oui";
    } else {
        $metro = "Non";
    }
    if (h($configurationObj->procedure_sur_accueil) == 1) {
        $procedure_acc = "Oui";
    } else {
        $procedure_acc = "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(__('Afficher la procédure à suivre sur l\'écran d\'accueil'), $procedure_acc);
    $displayElement(__('Imprimante disponible'), $print);
    $displayElement(__('Seuil (prix) Matériel administratif'), h($configurationObj->prix_inventaire_administratif));
    $displayElement(__('Taille max documents (octets)'), substr($configurationObj->taille_max_doc / (1024 * 1024), 0, 4) . ' Mo');
    $displayElement(__('Numero labo sans année'), $numLab);
    $displayElement(__('Champ date commande facultatif'), $dateObl);
    $displayElement(__('Label groupe thématique'), h($configurationObj->nom_groupe_thematique));
    $displayElement(__('Label groupe métier'), h($configurationObj->nom_groupe_metier));
    $displayElement(__('Module métrologie'), $metro);
    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(__('Activer l\'envoi des mails général'), $mail_general);
    $displayElement(__('Attribut "sender" (mail)'), h($configurationObj->sender_mail));
    $displayElement(__('Activer l\'envoi des mails pour la liste spécifique ci-dessous'), $mail_guests);
    $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_fichiers" style="cursor: pointer;">';
        echo '<i class="icon-chevron-down" style="font-size: 14px;" id="i_fichiers"></i>';
        echo '<span style="text-decoration: underline;">LDAP</span>';
        echo '</h3>';
        echo '<div id="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;

    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;">Affichage</span>';
    echo '</h3>';
    echo '<div id="emprunts" style="margin-bottom: 20px;">';
    echo '<table>';
    echo '<tr><th style="width: 250px;"></th><th></th></tr>';
    $displayElement(__('Nombre de materiel affichés par défaut'), h($configurationObj->aff_par_defaut));
    echo '</table>';
    echo '</div>';

    ?>


</div>

   <div class="actions">
		<?php

echo $this->element('menu')?>
		</div>