view.ctp 1.51 KB


<div class="documents view">
    <h2>Détail document</h2>
    
    <table style="margin-bottom: 30px;">
    <tr><th style="width: 250px;"></th><th></th></tr>

    	<?php 
    	
    	echo $this->Html->link(__('<i class="icon-pencil"></i> Editer ce document'),
    				['action' => 'edit', $document->id],
    				['escape' => false,'onclick' => 'return true;']
    				);
    	echo $this->Form->postLink(__('<i class="icon-trash"></i> Supprimer ce document'),
    				['action' => 'delete', $document->id],
    				['style'=>'margin-left: 110px', 'escape' => false, 'confirm' => __('Êtes-vous sur de vouloir supprimer # {0}?', $document->id)]
    				);
    	
    	if(isset($materiel)) {
    		$displayElement(__('Materiel'), $this->Html->link($materiel->designation, ['controller' => 'Materiels', 'action' => 'view', $materiel->id]));
    	}
    	else if(isset($suivi)) {
    		$displayElement(__('Suivi'), $this->Html->link('Suivi '.$suivi->id, ['controller' => 'Suivis', 'action' => 'view', $suivi->id]));
    	}

    	$displayElement(__('N°'), 'Fichier '.$this->Number->format($document->id));
    	$displayElement(__('Type'), h($document->type_doc));
    	$displayElement(__('Description'), h($document->chemin));
    	$displayElement(__('Chemin'), h($document->chemin));

    	

    	?>

    </table>
</div>

    	<div class="actions">
			<?php echo $this->element('menu') ?>
			<?php echo $this->element('menu_view', 
			[ 'pluralHumanName' => 'Documents',
			'singularHumanName' => 'Document',
			'lien' => $document->id ]) ?>
		</div>