view.ctp 1.36 KB

<div class="typeDocuments view">
	<h2>Détail du type de Document</h2>
	<table style="margin-bottom: 30px;">

		<tr>
			<th style="width: 250px;"></th>
			<th></th>
		</tr>
    	
    	<?php
    if (in_array($role, [
        'Administration Plus',
        'Super Administrateur'
    ])) {
        echo $this->Html->link(__('<i class="icon-pencil"></i> Editer ce type de Document'), [
            'action' => 'edit',
            $typeDocument->id
        ], [
            'style' => 'margin-right: 40px; display: inline-block',
            'escape' => false,
            'onclick' => 'return true;'
        ]);
    }
    
    if (in_array($role, [
        'Super Administrateur'
    ])) {
        echo $this->Form->postLink(__('<i class="icon-trash"></i> Supprimer ce type de Document'), [
            'action' => 'delete',
            $typeDocument->id
        ], [
            'style' => 'display: inline-block',
            'escape' => false,
            'confirm' => __('Êtes-vous sur de vouloir supprimer # {0}?', $typeDocument->id)
        ]);
    }
    
    $displayElement(__('Nom'), h($typeDocument->nom));
    ?>


    </table>


</div>

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

echo $this->element('menu_view', [
    'pluralHumanName' => 'Types Documents',
    'singularHumanName' => 'Type Document',
    'lien' => $typeDocument->id
])?>
		</div>
-->