*/
$displaySearchField = function($params, $searchfor, $html, $form) {
/*
echo $html->link('Chercher', [
'action' => 'index',
'?' => $params
], [
'title' => 'Tous',
'style' => 'margin-right: 5px',
'escape' => false
]);
echo "
";
*/
//echo $this->Form->create('Materiel', ['url' => '/materiels/find']);
/*
echo $this->Form->create('Materiel', ['action' => 'index', '?'=>$params]);
echo '
';
echo "Afficher les matériels : ";
echo '';
echo '';
$b_all = $b_cre = $b_val = $b_toarc = $b_arc = '';
$SELECTED = '';
//if (isset($SELECTED_STATUS)) {
if ($SELECTED_STATUS) {
if ($SELECTED_STATUS == 'CREATED')
$b_cre = $SELECTED;
else if ($SELECTED_STATUS == 'VALIDATED')
$b_val = $SELECTED;
else if ($SELECTED_STATUS == 'TOBEARCHIVED')
$b_toarc = $SELECTED;
else if ($SELECTED_STATUS == 'ARCHIVED')
$b_arc = $SELECTED;
} else $b_all = $SELECTED;
//debug($params);
/*
* Affichage des boutons de filtrage par statut (en haut de la page)
*/
$statuses = [
'TOUS' => [$b_all, 'TOUS', 'Tous les matériels', 5],
'CREATED' => [$b_cre, 'A valider', 'Seulement les matériels créés', 5],
'VALIDATED' => [$b_val, 'Validés', "Seulement les matériels validés", 5],
'TOBEARCHIVED' => [$b_toarc, 'A sortir', "Seulement les matériels à archiver", 5],
'ARCHIVED' => [$b_arc, 'Archivés', "Seulement les matériels sortis de l'inventaire", 0],
];
// https://book.cakephp.org/3/en/views/helpers/html.html#creating-links
foreach ($statuses as $status=>$status_params) {
$i=-1;
if ($status=='TOUS') {
$status=null;
$color = 'black';
}
else
$color = $statuses_color[$status];
echo $html->link($status_params[++$i].' '.$status_params[++$i], [
//'action' => 'index',
//'CREATED',
//'?' => ['height' => 400, 'width' => 500]
//'?' => $params + ['status'=>'CREATED']
'?' => array_merge($params, ['status'=>$status])
//'?' => null
//[$args],
//"http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']
], [
'title' => $status_params[++$i],
//'style' => 'margin-right: 5px',
'style' => 'color:'.$color.' ; margin-right: '.$status_params[++$i].'px',
'escape' => false
]);
}
/*
//echo $this->Html->link($b_all . ' Tous', [
echo $html->link($b_all . ' TOUS', [
//'action' => 'index',
//'?' => $params
'?' => array_merge($params, ['status'=>null])
], [
'title' => 'Tous',
'style' => 'margin-right: 5px',
'escape' => false
]);
$status = 'CREATED';
echo $html->link($b_cre . ' A valider', [
//'action' => 'index',
//'CREATED',
// https://book.cakephp.org/3/en/views/helpers/html.html#creating-links
//'?' => ['height' => 400, 'width' => 500]
//'?' => $params + ['status'=>'CREATED']
'?' => array_merge($params, ['status'=>$status])
//'?' => null
//[$args],
//"http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']
], [
'title' => 'Liste des matériels créés',
'style' => 'margin-right: 5px',
'escape' => false
]);
$status = 'VALIDATED';
echo $html->link($b_val . ' Validés', [
//'action' => 'index',
//'VALIDATED',
//'?' => $params
'?' => array_merge($params, ['status'=>$status])
], [
'title' => "Liste des materiels qu'on peut archiver",
'style' => 'margin-right: 5px',
'escape' => false
]);
$status = 'TOBEARCHIVED';
echo $html->link($b_toarc . ' A sortir', [
//'action' => 'index',
//'TOBEARCHIVED',
//'?' => $params
'?' => array_merge($params, ['status'=>$status])
], [
'title' => "A sortir de l'inventaire",
'style' => 'margin-right: 5px',
'escape' => false
]);
$status = 'ARCHIVED';
echo $html->link($b_arc . ' Archivés', [
//'action' => 'index',
//'ARCHIVED',
//'?' => $params
'?' => array_merge($params, ['status'=>$status])
], [
'title' => "Sortis de l'inventaire",
'style' => 'margin-right: 0px',
'escape' => false
]);
*/
echo '';
// ACTIONS : buttons "Tout selectionner", "Tout decocher"
// - show only with "A valider" and "A sortir"
if ($SELECTED_STATUS && $nbMateriels>0) {
echo $html->link(' Tout cocher', '#all', [
'onclick' => 'selectAll()',
'title' => 'Sélectionner tout les matériels',
'style' => ': 400px; margin-right: 50px',
'escape' => false
]);
echo $html->link(' Tout décocher', '#none', [
'onclick' => 'selectNone()',
'title' => 'Sélectionner aucun matériel',
'style' => 'margin-right: 50px',
'escape' => false
]);
}
echo "
";
}; // displayStatusButtons()
//$displaySelectors = function($form, $request,
$displayFilters = function($form, $request,
$df,
/*
$displayNbLinesSelector,
$displayAgeSelector,
*/
//$f1_func,
//$f1_func,
$f1_name, $f1_label, $f1_options,
//$f2_func, $f2_options,
$f2_name, $f2_label, $f2_options,
//$displayDomaineSelector, $domain_options,
//$displayProjetSelector, $projet_options
$f3_name, $f3_label, $f3_options,
$f4_name, $f4_label, $f4_options
) {
//echo '';
echo '
';
echo '
';
// Filtre 1
echo '';
//$displayNbLinesSelector($form, $request);
//$f1_func($form, $request);
$df($f1_name, $f1_label, $form, $request, $f1_options);
echo ' | ';
// Filtre 2
echo '';
//$displayAgeSelector($form, $request);
//$f2_func($form, $request, $f2_options);
$df($f2_name, $f2_label, $form, $request, $f2_options);
echo ' | ';
// Filtre 3
echo '';
//$displayDomaineSelector($form, $request, $domain_options);
//$df('domain', $form, $request, $domain_options);
$df($f3_name, $f3_label, $form, $request, $f3_options);
echo ' | ';
// Filtre 4
echo '';
//$displayProjetSelector('projet', $form, $request, $projet_options);
//$df('projet', $form, $request, $projet_options);
$df($f4_name, $f4_label, $form, $request, $f4_options);
echo ' | ';
echo '
';
echo '
';
};
/*
$displayNbLinesSelector = function($form, $request, $options) {
//echo '
';
//echo $this->Form->create('materiels', [
// echo $this->Form->create('materiels', ['url' => '/materiels/execActions?page=index']);
//echo $this->Form->control('aff_par_defaut', [
echo $form->control('aff_par_defaut', [
'label' => 'Nombre lignes',
'onchange' => "updateUrlWithSelectedValue('aff-par-defaut', 'aff')",
'options' => $options,
]);
//echo '
';
}; // displayNbLinesSelector()
$age_options = [
'0' => 'Tous',
'5' => 'Récents (5 ans max)',
'10' => '5-10 ans',
'15' => '10-15 ans',
'20' => '15-20 ans',
//'20plus' => '+ 20 ans',
'21' => '+ 20 ans',
//'unknown' => 'inconnu',
'-1' => 'inconnu',
];
$displayAgeSelector = function($form, $request, $options) {
//echo '
';
echo $form->control('age_selector', [
'label' => 'Age',
'onchange' => "updateUrlWithSelectedValue('age-selector', 'age')",
'options' => $options,
'default' => '0',
// Inutile car géré via javascript
//'default' => '5',
]);
//echo '
';
}; // $displayAgeSelector()
$displayDomaineSelector = function($form, $request, $options) {
//echo '
';
echo $form->control('domain_selector', [
'label' => 'Domaine',
'onchange' => "updateUrlWithSelectedValue('domain-selector', 'domain')",
'options' => $options,
// Inutile car géré via javascript
'default' => 0,
]);
//echo '
';
};
$displayProjetSelector = function($form, $request, $options) {
//echo '
';
echo $form->control('projet_selector', [
'label' => 'Projet',
'onchange' => "updateUrlWithSelectedValue('projet-selector', 'projet')",
'options' => $options,
// Inutile car géré via javascript
'default' => 0,
]);
//echo '
';
};
$displayProjetSelector = function($filter_name, // 'projet'
$form, $request, $options
) {
//echo '
';
$html_filter_name = $filter_name.'-selector';
//echo $form->control('projet_selector', [
echo $form->control($filter_name.'_selector', [ // 'projet_selector'
//'label' => 'Projet',
'label' => ucfirst($filter_name), // 'Projet'
//'onchange' => "updateUrlWithSelectedValue('projet-selector', 'projet')",
//'onchange' => "updateUrlWithSelectedValue($filter_name.'-selector', $filter_name)", // ('projet-selector', 'projet')
'onchange' => "updateUrlWithSelectedValue('$html_filter_name', '$filter_name')", // ('projet-selector', 'projet')
'options' => $options,
// Inutile car géré via javascript
'default' => 0,
]);
//echo '
';
};
*/
$displayFilter = function($filter_name, $filter_label,// 'projet'
$form, $request, $options
) {
//echo '
';
$html_filter_name = $filter_name.'-selector';
//echo $form->control('projet_selector', [
echo $form->control($filter_name.'_selector', [ // 'projet_selector'
//'label' => 'Projet',
'label' => $filter_label ? $filter_label : ucfirst($filter_name), // 'Projet'
//'onchange' => "updateUrlWithSelectedValue('projet-selector', 'projet')",
//'onchange' => "updateUrlWithSelectedValue($filter_name.'-selector', $filter_name)", // ('projet-selector', 'projet')
'onchange' => "updateUrlWithSelectedValue('$html_filter_name', '$filter_name')", // ('projet-selector', 'projet')
'options' => $options,
// Inutile car géré via javascript
'default' => 0,
]);
//echo '
';
};
$displayActionButtonsForSelectedOrAllElements = function(
$form,
$SELECTED_STATUS,
$USER_IS_RESPONSABLE, $USER_IS_ADMIN_OR_MORE, $USER_IS_SUPERADMIN,
$displayExportCurrentButton, $params) {
//if (isset($SELECTED_STATUS)) {
if ($SELECTED_STATUS) {
switch ($SELECTED_STATUS) {
case 'CREATED':
$action = 'Valider les';
break;
case 'VALIDATED':
$action = "Demander l'archivage des";
break;
case 'TOBEARCHIVED':
$action = "Sortir les";
break;
}
if ($SELECTED_STATUS != 'ARCHIVED') {
//if (! ($role == 'Super Administrateur' && $SELECTED_STATUS == 'TOBEARCHIVED')) {
if (! ($USER_IS_SUPERADMIN && $SELECTED_STATUS=='TOBEARCHIVED') ) {
//echo $this->Form->submit($action . ' matériels cochés', [
// 'name' => 'updateSelectedStatus',
// 'id' => 'updateSelectedStatus',
// 'style' => 'margin: 0px'
//]);
//echo $this->Form->button($action . ' matériels cochés', [ 'class'=>'btn btn-outline-success', 'type'=>'submit', 'name' => 'updateSelectedStatus', 'id' => 'updateSelectedStatus', 'style' => 'margin: 0px']);
echo $form->button($action . ' matériels cochés', [ 'class'=>'btn btn-outline-success', 'type'=>'submit', 'name' => 'updateSelectedStatus', 'id' => 'updateSelectedStatus', 'style' => 'margin: 0px']);
echo "
";
}
}
//echo $this->Form->submit('Exporter la liste des matériels cochés', [
// 'name' => 'export',
// 'id' => 'export',
// 'style' => 'margin: 0px;'
//]);
echo $form->button('Exporter la liste des matériels cochés', ['class'=>'btn btn-outline-success', 'type'=>'submit', 'name' => 'export', 'id' => 'export', 'style' => 'margin: 0px;' ]);
echo "
";
} // if $SELECTED_STATUS
if ($USER_IS_ADMIN_OR_MORE || $USER_IS_RESPONSABLE) {
//echo $this->Form->submit('Exporter la liste complete', [
// 'name' => 'exportAll',
// 'id' => 'exportAll',
// 'style' => 'margin: 0px;'
//]);
$displayExportCurrentButton($params, $this->Html);
echo '
';
echo $form->button('Exporter la liste complète (tous les matériels NON archivés)', ['class'=>'btn btn-outline-success', 'type'=>'submit', 'name' => 'exportAll', 'id' => 'exportAll', 'style' => 'margin: 0px;']);
}
}; // $displayActionButtonsForSelectedOrAllElements()
/*
* Couleurs en fonction du statut du matos
*
*/
$displayLegend = function() {
// CREATED => bleu
// VALIDATED => vert
// TBA => orange
// ARCHIVED => rouge
//echo "
Couleur :
bleu=à valider
; vert=validé ; orange=à sortir ; rouge=archivé (couleur date rouge = fin garantie)";
//echo "
Statut : C(réé)=Matériel à commander ; V(alidé)=Matériel livré ; TBA=à sortir ; A=Archivé ;
";
//echo "
Couleur : bleu=à valider ; vert=validé ; orange=à sortir ; rouge=archivé ; couleur date rouge = fin garantie
";
echo "
Couleur : bleu=à commander ; noir=livré (validé) ; orange=à sortir ; rouge=archivé ; couleur date rouge = fin garantie
";
};
$displayActionButtonsForMateriel = function($materiel, $statuses_color, $username, $USER_IS_RESPONSABLE, $USER_IS_ADMIN_OR_MORE, $USER_IS_SUPERADMIN, $controller, $html) {
// TODO: Dans l'idéal, ces variables doivent etre définies par le controleur et passées à la vue
// (sous forme d'un tableau contenant ces droits pour CHAQUE materiel)
// Car la vue doit être la moins "intelligente" possible, la plus simple possible
$IS_CREATED = ($materiel->status == 'CREATED');
$IS_VALIDATED = ($materiel->status == 'VALIDATED');
$IS_TOBEARCHIVED = ($materiel->status == 'TOBEARCHIVED');
$IS_ARCHIVED = ($materiel->status == 'ARCHIVED');
/*
* Couleurs en fonction du statut du matos
*
// CREATED => bleu
if ($IS_CREATED) $color = 'blue';
// VALIDATED => noir
if ($IS_VALIDATED) $color = 'black';
//if ($IS_VALIDATED) $color = 'green';
// TBA => orange
if ($IS_TOBEARCHIVED) $color = 'orange';
// ARCHIVED => rouge
if ($IS_ARCHIVED) $color = 'red';
*/
$color = $statuses_color[$materiel->status];
$color = "style='color: $color'";
$USER_IS_CREATOR_OR_OWNER = in_array($username, [$materiel->nom_createur, $materiel->nom_responsable]);
$USER_IS_SAME_GROUP_AS_MATERIEL = (
( isset($priviledgedUser->groupes_metier_id) && $priviledgedUser->groupes_metier_id!=$idGmNa && $materiel->groupes_metier_id==$priviledgedUser->groupes_metier_id )
||
( isset($priviledgedUser->groupes_thematique_id) && $priviledgedUser->groupes_thematique_id!=$idGtNa && $materiel->groupes_thematique_id==$priviledgedUser->groupes_thematique_id )
);
$USER_IS_RESPONSABLE_AND_SAME_GROUP_AS_MATERIEL = $USER_IS_RESPONSABLE && $USER_IS_SAME_GROUP_AS_MATERIEL;
$CONTEXT1 = $USER_IS_ADMIN_OR_MORE || $USER_IS_CREATOR_OR_OWNER || $USER_IS_RESPONSABLE_AND_SAME_GROUP_AS_MATERIEL;
// Détermination des autorisations pour tous les boutons "éditer", "supprimer", "valider", ...
$id = $materiel->id;
$CAN_EDIT = $controller->isAuthorizedAction('edit', $id);
//$CAN_EDIT = $IS_CREATED && ($USER_IS_ADMIN_OR_MORE || $USER_IS_CREATOR_OR_OWNER || $USER_IS_RESPONSABLE_AND_SAME_GROUP_AS_MATERIEL);
//$CAN_EDIT = $IS_CREATED && ($USER_IS_ADMIN_OR_MORE || $USER_IS_UTILISATEUR_AND_CREATOR_OR_OWNER || $USER_IS_RESPONSABLE_AND_SAME_GROUP_AS_MATERIEL || $USER_IS_RESPONSABLE_AND_CREATOR_OR_OWNER);
$CAN_DELETE = $controller->isAuthorizedAction('delete', $id);
//$CAN_DELETE = $CAN_EDIT;
/*
$CAN_VALIDATE_OR_INVALIDATE = $USER_IS_ADMIN_OR_MORE || ( ($materiel->materiel_administratif == 0) && $USER_IS_RESPONSABLE && $USER_IS_SAME_GROUP_AS_MATERIEL );
$CAN_VALIDATE = $IS_CREATED && $CAN_VALIDATE_OR_INVALIDATE;
$CAN_INVALIDATE = !$IS_CREATED && $CAN_VALIDATE_OR_INVALIDATE;
$CAN_TBA = $IS_VALIDATED && ($USER_IS_ADMIN_OR_MORE || $USER_IS_CREATOR_OR_OWNER || ($USER_IS_RESPONSABLE && $USER_IS_SAME_GROUP_AS_MATERIEL));
$CAN_ARCHIVE = $IS_TOBEARCHIVED && $CAN_VALIDATE_OR_INVALIDATE;
*/
$CAN_INVALIDATE = $controller->isAuthorizedAction('statusCreated', $id);
$CAN_VALIDATE = $controller->isAuthorizedAction('statusValidated', $id);
$CAN_TBA = $controller->isAuthorizedAction('statusTobearchived', $id);
$CAN_ARCHIVE = $controller->isAuthorizedAction('statusArchived', $id);
echo '
';
// 1) EDIT icon
/*
if (
in_array($materiel->status, [
'CREATED',
// (EP 17/5/19) ben non, on peut pas si c'est validé !!!
//'VALIDATED'
])
&&
(
$USER_IS_ADMIN_OR_MORE
||
$USER_IS_CREATOR_OR_OWNER
||
($USER_IS_RESPONSABLE && $USER_IS_SAME_GROUP_AS_MATERIEL)
)
)
*/
if ($CAN_EDIT) echo $html->link(__(''), ['action' => 'edit', $materiel->id], ['title' => 'Editer', 'style' => 'margin: 0 2px', 'escape' => false ]);
// 2) VALIDER/TBA/ARCHIVER icon
/*
if (
$USER_IS_ADMIN
||
($USER_IS_RESPONSABLE && $USER_IS_SAME_GROUP_AS_MATERIEL)
) {
*/
//if ($materiel->status=='CREATED' && !$USER_IS_RESPONSABLE) {
if ($CAN_VALIDATE)
echo $html->link('', [
'action' => 'statusValidated',
$materiel->id
],
[
'title' => 'Valider',
'style' => 'margin: 0 2px',
'escape' => false,
'confirm' => 'Êtes-vous sur de vouloir valider ' . $materiel->designation . ' ?'
]
);
//else if (h($materiel->status) == 'VALIDATED') {
if ($CAN_TBA)
echo $html->link('', [
'action' => 'statusTobearchived',
$materiel->id
],
[
'title' => 'Demander la sortie de l\'inventaire',
'style' => 'margin: 0 2px',
'escape' => false,
'confirm' => 'Êtes-vous sur de vouloir faire une demande d\'archive ' . $materiel->designation . ' ?'
]
);
//else if ($materiel->status=='TOBEARCHIVED' && !$USER_IS_RESPONSABLE)
if ($CAN_ARCHIVE)
echo $html->link('', [
'action' => 'statusArchived',
$materiel->id
],
[
'title' => 'Sortir de l\'inventaire',
'style' => 'margin: 0 2px',
'escape' => false,
'confirm' => 'Êtes-vous sur de vouloir archiver ' . $materiel->designation . ' ?'
]
);
// 3) DELETE icon
/*
if (h($materiel->status) == 'CREATED') {
if (
$USER_IS_ADMIN_OR_MORE
||
$USER_IS_CREATOR_OR_OWNER
||
($USER_IS_RESPONSABLE && $USER_IS_SAME_GROUP_AS_MATERIEL)
)
*/
if ($CAN_DELETE)
echo $html->link(__(''), [
'action' => 'delete',
$materiel->id
],
[
'title' => 'Supprimer',
'style' => 'margin: 0 2px',
'escape' => false,
'confirm' => __('Êtes-vous sur de vouloir supprimer {0} ?', $materiel->designation)
]
);
echo " | ";
return $color;
}; // displayActionButtonsForMateriel
/*
* On récupère les paramètres passés actuellement à l'URL (age, domain, searchfor...)
* afin de les rappeler quand on clique sur les boutons de filtrage
*/
//$args = explode('?',$_SERVER['REQUEST_URI']);
//$args = count($args)==2 ? '?'.$args[1] : null;
$params = $this->request->getParam('?');
if (!$params) $params=[];
// S'il y a des paramètres, supprimer le paramètre 'page' car inapproprié
if ($params) unset($params['page']);
?>
Liste des matériels ('.$nbMateriels.')'; ?>
';
echo $this->Html->link(' Nouveau Matériel', [
'action' => 'add'
], [
'title' => 'Ajouter un matériel',
'escape' => false
]);
echo '';*/
//if ($USER_IS_ADMIN_OR_MORE) $displayExportCurrentButton($SELECTED_STATUS, $params, $nbMateriels, $this->Html);
if ($USER_IS_ADMIN_OR_MORE) $displayStatusButtons($SELECTED_STATUS, $params, $nbMateriels, $statuses_color, $this->Html);
//
//
//$displaySelectors(
$displayFilters(
$this->Form, $this->request,
$displayFilter,
//$displayNbLinesSelector,
'nblines', 'Lignes par page', $nblines_options,
//$displayAgeSelector, $age_options,
'age', '', $age_options,
//$displayDomaineSelector, $domain_options,
//$displayProjetSelector, $projet_options
'domaine', '', $domaine_options,
'projet', '', $projet_options
);
//$displayNbLinesSelector($this->Form, $this->request);
// Formulaire de RECHERCHE de materiels
// Search field
echo "\n";
echo "\n";
$displaySearchField($params, $searchfor, $this->Html, $this->Form);
echo "\n";
echo "\n";
// DEBUT FORMULAIRE
echo $this->Form->create('materiels', [
'url' => '/materiels/execActions?page='.$this->request->getQuery('page')
]);
//
if ($nbMateriels == 0) echo 'Aucun matériel';
else {
// $form2 = $this->Form;
// /echo $this->Form->create('materiels', ['url' => '/materiels/execActions']);
if ($SELECTED_STATUS) echo $this->Form->hidden('what', ['value'=>$SELECTED_STATUS]);
?>
'; }?>
= __('') ?> |
= $this->Paginator->sort('designation','Désignation') ?> |
= $this->Paginator->sort('numero_laboratoire', 'N° inventaire') ?> |
= $this->paginator->sort('hors_service', ' ') ?> |
= $this->Paginator->sort('Categories.nom', 'Catégorie') ?> |
= $this->Paginator->sort('Organismes.nom', 'Org.') ?> |
= $this->Paginator->sort('numero_inventaire_organisme', 'N° inv. compt.') ?> |
= $this->Paginator->sort('nom_user', "Nom de l'utilisateur") ?> |
= $this->Paginator->sort('date_acquisition', 'Date Achat') ?> |
= $this->Paginator->sort('etiquette', 'Et') ?> |
".$this->Paginator->sort('metrologie', 'Metro')."" ?>
year-$time->month-$time->day"); // On extrait la date pour la vérification de fin de garantie
//$today = $today->format('Ydm'); // On formatte la date initialement en 31-12-2000 (par exemple) en un format qui pourra etre comparé : 20001231
$today = $today->format('Ymd'); // On formatte la date initialement en 31-12-2000 (par exemple) en un format qui pourra etre comparé : 20001231
// BOUCLE SUR CHAQUE MATERIEL, ligne par ligne
//$mc = new MaterielsController();
foreach ($materiels as $materiel) :
// Date fin garantie ?
$date_color = '';
if ($materiel->date_fin_garantie !== NULL) {
//debug("today $today");
$timeFin = new time($materiel->date_fin_garantie);
$dateFin = new date("$timeFin->year-$timeFin->month-$timeFin->day");
//$dateFin = $dateFin->format('Ydm');
$dateFin = $dateFin->format('Ymd');
//debug("datefin $dateFin");
if ($today>=$dateFin) $date_color = 'style="color: #FF0000"';
//debug("couleur $date_color");
}
?>
;">
// (1) COLONNE SELECTION (checkbox)
if ($SELECTED_STATUS) {
echo '' . $this->Form->checkbox($materiel->id, [
'style' => 'margin: 3px',
'id' => $materiel->id
]) . ' | ';
}
//
$color = $displayActionButtonsForMateriel($materiel, $statuses_color, $username, $USER_IS_RESPONSABLE, $USER_IS_ADMIN_OR_MORE, $USER_IS_SUPERADMIN, $controller, $this->Html);
?>
= $materiel->has('designation') ?
$this->Html->link(
$materiel->designation,
['controller' => 'Materiels', 'action' => 'view', $materiel->id],[$color]
)
: '' ?>
|
= h($materiel->numero_laboratoire) ?> |
= ($materiel->hors_service) ? 'HS' : '' ?> |
= $materiel->has('category') ? h($materiel->category->nom) : '' ?> |
= $materiel->has('organisme') ? h($materiel->organisme->nom) : '' ?> |
= h($materiel->numero_inventaire_organisme) ?> |
= h($materiel->nom_user) ?> |
>= h($materiel->date_acquisition) ?> |
= h($materiel->etiquette)=='1' ? 'O':'N' ?> |
'. (h($materiel->metrologie)=='1' ? 'Y':'N').'';
?>
Form,
$SELECTED_STATUS,
$USER_IS_RESPONSABLE, $USER_IS_ADMIN_OR_MORE, $USER_IS_SUPERADMIN,
$displayExportCurrentButton, $params, $nbMateriels
);
echo $this->element('pagination_with_first_and_last');
$this->Form->end();
} // (nbMateriels>0)
?>