2014-06-19 08:44:35 +02:00
|
|
|
<div class="templates index">
|
2018-07-20 09:29:50 +02:00
|
|
|
<h2><?php echo __('Templates');?></h2>
|
|
|
|
<div class="pagination">
|
|
|
|
<ul>
|
|
|
|
<?php
|
|
|
|
$this->Paginator->options(array(
|
|
|
|
'update' => '.span12',
|
|
|
|
'evalScripts' => true,
|
|
|
|
'before' => '$(".progress").show()',
|
|
|
|
'complete' => '$(".progress").hide()',
|
|
|
|
));
|
2014-06-19 08:44:35 +02:00
|
|
|
|
2018-07-20 09:29:50 +02:00
|
|
|
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
|
|
|
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
|
|
|
|
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<table class="table table-striped table-hover table-condensed">
|
|
|
|
<tr>
|
|
|
|
<th><?php echo $this->Paginator->sort('id');?></th>
|
|
|
|
<th><?php echo $this->Paginator->sort('org');?></th>
|
|
|
|
<th><?php echo $this->Paginator->sort('share');?></th>
|
|
|
|
<th><?php echo $this->Paginator->sort('name');?></th>
|
|
|
|
<th><?php echo $this->Paginator->sort('description');?></th>
|
|
|
|
<?php if ($isAclTemplate): ?>
|
|
|
|
<th class="actions"><?php echo __('Actions');?></th>
|
|
|
|
<?php endif; ?>
|
|
|
|
</tr><?php
|
2014-06-19 08:44:35 +02:00
|
|
|
foreach ($list as $item): ?>
|
2018-07-20 09:29:50 +02:00
|
|
|
<tr>
|
|
|
|
<td class="short" onclick="document.location.href ='<?php echo $baseurl."/templates/view/".$item['Template']['id']; ?>'"><?php echo h($item['Template']['id']); ?> </td>
|
|
|
|
<td class="short" onclick="document.location.href ='<?php echo $baseurl."/templates/view/".$item['Template']['id']; ?>'">
|
|
|
|
<?php
|
|
|
|
echo $this->OrgImg->getOrgImg(array('name' => $item['Template']['org'], 'size' => 24));
|
|
|
|
?>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
<td class="short" onclick="document.location.href ='<?php echo $baseurl."/templates/view/".$item['Template']['id']; ?>'"><?php if ($item['Template']['share']) echo 'Yes'; else echo 'No'; ?> </td>
|
|
|
|
<td onclick="document.location.href ='<?php echo $baseurl."/templates/view/".$item['Template']['id']; ?>'"><?php echo h($item['Template']['name']); ?> </td>
|
|
|
|
<td onclick="document.location.href ='<?php echo $baseurl."/templates/view/".$item['Template']['id']; ?>'"><?php echo h($item['Template']['description']); ?> </td>
|
|
|
|
<?php if ($isAclTemplate): ?>
|
|
|
|
<td class="short action-links">
|
Accessibility: added roles and aria labels for many icons and icon links (server list, tags, users, roles, attributes, ...)
There is still much work to be done. But we are on the road.
Ideally, and in order to avoid code dupplicates, we should have some utility functions to generate a proper and accessible yes/no icon, an accessible icon link, etc. This would prevent the code from being filled with "aria-label" tags, since the "title" and "aria-label" properties are nearly always the same.
2019-04-02 15:31:34 +02:00
|
|
|
<?php echo $this->Html->link('', array('action' => 'edit', $item['Template']['id']), array('class' => 'fa fa-edit', 'title' => 'Edit', 'aria-label' => 'Edit'));?>
|
|
|
|
<?php echo $this->Form->postLink('', array('action' => 'delete', $item['Template']['id']), array('class' => 'fa fa-trash', 'title' => 'Delete', 'aria-label' => 'Delete'), __('Are you sure you want to delete Template #' . $item['Template']['id'] . '?'));?>
|
2018-07-20 09:29:50 +02:00
|
|
|
</td>
|
|
|
|
<?php endif; ?>
|
|
|
|
</tr><?php
|
2014-06-19 08:44:35 +02:00
|
|
|
endforeach; ?>
|
2018-07-20 09:29:50 +02:00
|
|
|
</table>
|
|
|
|
<p>
|
|
|
|
<?php
|
|
|
|
echo $this->Paginator->counter(array(
|
|
|
|
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
|
|
|
));
|
|
|
|
?>
|
|
|
|
</p>
|
|
|
|
<div class="pagination">
|
|
|
|
<ul>
|
|
|
|
<?php
|
|
|
|
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
|
|
|
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
|
|
|
|
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2014-06-19 08:44:35 +02:00
|
|
|
|
|
|
|
</div>
|
2016-06-04 01:10:45 +02:00
|
|
|
<?php
|
2019-02-13 14:45:01 +01:00
|
|
|
echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'templates', 'menuItem' => 'index'));
|