Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
85 righe
4.2 KiB
85 righe
4.2 KiB
<?php |
|
echo $this->Breadcrumb->render([ |
|
[ |
|
'title' => 'Home', |
|
'icon' => 'fa fa-home', |
|
'url' => '/', |
|
], |
|
[ |
|
'title' => __('Configurazioni'), |
|
'icon' => 'fa fa-wrench', |
|
], |
|
[ |
|
'title' => __('Gestione competenze'), |
|
'icon' => 'fa fa-pencil-alt', |
|
], |
|
]); |
|
?> |
|
|
|
<div class="card card-primary card-outline"> |
|
<div class="card-header d-sm-flex"> |
|
<h2 class="card-title"> |
|
<?= __('Lista delle competenze') ?> |
|
</h2> |
|
</div> |
|
<div class="box-tools"> |
|
<form action="<?php echo $this->Url->build(); ?>" method="GET"> |
|
<div class="input-group input-group-sm" style="width: 500px;"> |
|
<input type="text" name="capability_search" class="form-control pull-right" title="<?= __('Cerca per descrizione competenza o codice o nome del gruppo di competenze') ?>" placeholder="<?= __('Cerca') ?>" value="<?= $capability_search ?>"> |
|
<div class="input-group-btn"> |
|
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button> |
|
</div> |
|
</div> |
|
</form> |
|
</div> |
|
<div class="card-body table-responsive p-0"> |
|
<table class="table table-hover text-nowrap"> |
|
<thead> |
|
<tr> |
|
<th scope="col"><?= $this->Paginator->sort('description',__('Descrizione')) ?></th> |
|
<th scope="col"><?= $this->Paginator->sort('value', __('Codice')) ?></th> |
|
<th scope="col"><?= $this->Paginator->sort('priority', __('Priorità')) ?></th> |
|
<th scope="col"><?= $this->Paginator->sort('CapabilityGroups.description', __('Gruppo')) ?></th> |
|
<th scope="col" class="actions text-center"><?= __('Azioni') ?></th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
<?php foreach ($capabilities as $capability): ?> |
|
<?php |
|
$style = 'style="'; |
|
!$capability->is_configurable ? $style .= 'background-color:#bfbddc;' : ''; |
|
isset($capability->deleted) ? $style .= 'color:red; text-decoration:line-through;' : ''; |
|
$style .= '"'; |
|
|
|
$title = 'title="'; |
|
!$capability->is_configurable ? $title .= __('Competenza non visibile e non configurabile dai non SYSADMIN') . ' ' : ''; |
|
isset($capability->deleted) ? $title .= __('Competenza eliminata dal sistema') : ''; |
|
$title .= '"'; |
|
?> |
|
<tr <?= $style ?> <?= $title ?>> |
|
<td><?= h($capability->description) ?></td> |
|
<td><?= h($capability->value) ?></td> |
|
<td><?= h($capability->priority) ?></td> |
|
<td><?= h($capability->capability_group->description) ?></td> |
|
<td class="actions text-right"> |
|
<?= $this->Form->postLink($capability->is_configurable ? __('Nascondi') : __('Mostra'), ['action' => $capability->is_configurable ? 'hide' : 'show', $capability->id, '?' => $this->request->getQueryParams()], ['class'=>'btn btn-warning btn-xs']) ?> |
|
<?= $this->Form->postLink(isset($capability->deleted) ? __('Ripristina') : __('Cancella'), ['action' => isset($capability->deleted) ? 'restore' : 'delete', $capability->id, '?' => $this->request->getQueryParams()], ['class'=>'btn btn-danger btn-xs']) ?> |
|
</td> |
|
</tr> |
|
<?php endforeach; ?> |
|
</tbody> |
|
</table> |
|
</div> |
|
<div class="card-footer d-md-flex paginator"> |
|
<div class="mr-auto" style="font-size:.8rem"> |
|
<?= $this->Paginator->counter(__('Pagina {{page}} di {{pages}}, visualizzati {{current}} record(s) di {{count}} totali')) ?> |
|
</div> |
|
<ul class="pagination pagination-sm"> |
|
<?= $this->Paginator->first('<i class="fas fa-angle-double-left"></i>', ['escape' => false]) ?> |
|
<?= $this->Paginator->prev('<i class="fas fa-angle-left"></i>', ['escape' => false]) ?> |
|
<?= $this->Paginator->numbers() ?> |
|
<?= $this->Paginator->next('<i class="fas fa-angle-right"></i>', ['escape' => false]) ?> |
|
<?= $this->Paginator->last('<i class="fas fa-angle-double-right"></i>', ['escape' => false]) ?> |
|
</ul> |
|
</div> |
|
</div>
|
|
|