| 1 |
lars |
1 |
<div class="sf_admin_list">
|
|
|
2 |
[?php if (!$pager->getNbResults()): ?]
|
|
|
3 |
<p>[?php echo __('No result', array(), 'sf_admin') ?]</p>
|
|
|
4 |
[?php else: ?]
|
|
|
5 |
<table cellspacing="0">
|
|
|
6 |
<thead>
|
|
|
7 |
<tr>
|
|
|
8 |
<?php if ($this->configuration->getValue('list.batch_actions')): ?>
|
|
|
9 |
<th id="sf_admin_list_batch_actions"><input id="sf_admin_list_batch_checkbox" type="checkbox" onclick="checkAll();" /></th>
|
|
|
10 |
<?php endif; ?>
|
|
|
11 |
[?php include_partial('<?php echo $this->getModuleName() ?>/list_th_<?php echo $this->configuration->getValue('list.layout') ?>', array('sort' => $sort)) ?]
|
|
|
12 |
<?php if ($this->configuration->getValue('list.object_actions')): ?>
|
|
|
13 |
<th id="sf_admin_list_th_actions">[?php echo __('Actions', array(), 'sf_admin') ?]</th>
|
|
|
14 |
<?php endif; ?>
|
|
|
15 |
</tr>
|
|
|
16 |
</thead>
|
|
|
17 |
<tfoot>
|
|
|
18 |
<tr>
|
|
|
19 |
<th colspan="<?php echo count($this->configuration->getValue('list.display')) + ($this->configuration->getValue('list.object_actions') ? 1 : 0) + ($this->configuration->getValue('list.batch_actions') ? 1 : 0) ?>">
|
|
|
20 |
[?php if ($pager->haveToPaginate()): ?]
|
|
|
21 |
[?php include_partial('<?php echo $this->getModuleName() ?>/pagination', array('pager' => $pager)) ?]
|
|
|
22 |
[?php endif; ?]
|
|
|
23 |
|
|
|
24 |
[?php echo format_number_choice('[0] no result|[1] 1 result|(1,+Inf] %1% results', array('%1%' => $pager->getNbResults()), $pager->getNbResults(), 'sf_admin') ?]
|
|
|
25 |
[?php if ($pager->haveToPaginate()): ?]
|
|
|
26 |
[?php echo __('(page %%page%%/%%nb_pages%%)', array('%%page%%' => $pager->getPage(), '%%nb_pages%%' => $pager->getLastPage()), 'sf_admin') ?]
|
|
|
27 |
[?php endif; ?]
|
|
|
28 |
</th>
|
|
|
29 |
</tr>
|
|
|
30 |
</tfoot>
|
|
|
31 |
<tbody>
|
|
|
32 |
[?php foreach ($pager->getResults() as $i => $<?php echo $this->getSingularName() ?>): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?]
|
|
|
33 |
<tr class="sf_admin_row [?php echo $odd ?]">
|
|
|
34 |
<?php if ($this->configuration->getValue('list.batch_actions')): ?>
|
|
|
35 |
[?php include_partial('<?php echo $this->getModuleName() ?>/list_td_batch_actions', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'helper' => $helper)) ?]
|
|
|
36 |
<?php endif; ?>
|
|
|
37 |
[?php include_partial('<?php echo $this->getModuleName() ?>/list_td_<?php echo $this->configuration->getValue('list.layout') ?>', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>)) ?]
|
|
|
38 |
<?php if ($this->configuration->getValue('list.object_actions')): ?>
|
|
|
39 |
[?php include_partial('<?php echo $this->getModuleName() ?>/list_td_actions', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'helper' => $helper)) ?]
|
|
|
40 |
<?php endif; ?>
|
|
|
41 |
</tr>
|
|
|
42 |
[?php endforeach; ?]
|
|
|
43 |
</tbody>
|
|
|
44 |
</table>
|
|
|
45 |
[?php endif; ?]
|
|
|
46 |
</div>
|
|
|
47 |
<script type="text/javascript">
|
|
|
48 |
/* <![CDATA[ */
|
|
|
49 |
function checkAll()
|
|
|
50 |
{
|
|
|
51 |
var boxes = document.getElementsByTagName('input'); for(var index = 0; index < boxes.length; index++) { box = boxes[index]; if (box.type == 'checkbox' && box.className == 'sf_admin_batch_checkbox') box.checked = document.getElementById('sf_admin_list_batch_checkbox').checked } return true;
|
|
|
52 |
}
|
|
|
53 |
/* ]]> */
|
|
|
54 |
</script>
|