index.ctp
4.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/**
* @var \App\View\AppView $this
* @var \App\Model\Entity\Projet[]|\Cake\Collection\CollectionInterface $projets
*/
// Variables définies par le controleur
$projets = $projets;
//debug($projets);
?>
<b><u><?= $this->Html->link(__('Nouveau Projet'), ['action' => 'add']) ?></li></u></b>
<br />
<br />
<!--
<nav class="large-3 medium-4 columns" id="actions-sidebar">
<ul class="side-nav">
<li class="heading"><S= __('Actions :') S></li>
<li><S= $this->Html->link(__('New Projet'), ['action' => 'add']) ?></li>
<li><S= $this->Html->link(__('List Groupes Thematiques'), ['controller' => 'GroupesThematiques', 'action' => 'index']) S></li>
<li><S= $this->Html->link(__('New Groupes Thematique'), ['controller' => 'GroupesThematiques', 'action' => 'add']) S></li>
<li><S= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
<li><S= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
<li><S= $this->Html->link(__('List Materiels'), ['controller' => 'Materiels', 'action' => 'index']) ?></li>
<li><S= $this->Html->link(__('New Materiel'), ['controller' => 'Materiels', 'action' => 'add']) ?></li>
</ul>
</nav>
-->
<div class="projets index large-9 medium-8 columns content">
<h3><?= __('Projets') ?></h3>
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<!--
<th scope="col"><S= $this->Paginator->sort('id') ?></th>
-->
<th scope="col"><?= $this->Paginator->sort('nom') ?></th>
<th scope="col"><?= $this->Paginator->sort('groupes_thematique_id', 'Groupe thématique') ?></th>
<th scope="col"><?= $this->Paginator->sort('chef_science_id', 'Responsable scientifique') ?></th>
<th scope="col"><?= $this->Paginator->sort('chef_projet_id', 'Chef de projet') ?></th>
<th scope="col"><?= $this->Paginator->sort('date_start', 'Date début') ?></th>
<th scope="col"><?= $this->Paginator->sort('date_stop', 'Date fin') ?></th>
<th scope="col" class="actions"><?= __('Actions') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($projets as $projet): ?>
<tr>
<!--
<td><S= $this->Number->format($projet->id) ?></td>
<td><S= $this->Number->format($projet->chef_science_id) ?></td>
-->
<td><?= h($projet->nom) ?></td>
<td><?= $projet->has('groupe_thematique') ?
$this->Html->link($projet->groupe_thematique->nom, ['controller' => 'GroupesThematiques', 'action' => 'view', $projet->groupes_thematique_id])
: '' ?>
</td>
<td><?= $projet->has('chef_science_id') ? $this->Html->link($projet->Pi->nom, ['controller' => 'Users', 'action' => 'view', $projet->chef_science_id]) : '' ?></td>
<td><?= $projet->has('chef_projet_id') ? $this->Html->link($projet->Pm->nom, ['controller' => 'Users', 'action' => 'view', $projet->chef_projet_id]) : '' ?></td>
<td><?= h($projet->date_start) ?></td>
<td><?= h($projet->date_stop) ?></td>
<td class="actions">
<?= $this->Html->link(__('View'), ['action' => 'view', $projet->id]) ?>
<?= $this->Html->link(__('Edit'), ['action' => 'edit', $projet->id]) ?>
<?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $projet->id], ['confirm' => __('Are you sure you want to delete # {0}?', $projet->id)]) ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div class="paginator">
<ul class="pagination">
<?= $this->Paginator->first('<< ' . __('first')) ?>
<?= $this->Paginator->prev('< ' . __('previous')) ?>
<?= $this->Paginator->numbers() ?>
<?= $this->Paginator->next(__('next') . ' >') ?>
<?= $this->Paginator->last(__('last') . ' >>') ?>
</ul>
<p><?= $this->Paginator->counter(['format' => __('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')]) ?></p>
</div>
</div>