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
|
<!-- Entête du tableau -->
<tr>
<?php foreach ($fields as $field) : ?>
<th class="<?php echo 'col_' . $field['name'] ?>">
<?php if ($field['sort']) :?>
<?php if($sort == $field['name']): ?>
<a href="<?php echo url_for($route . '?sort=' . $field['name'] . '&sort_type=' . ($sort_type == 'asc' ? 'desc' : 'asc')) ?>" class="<?php echo $sort_type ?> active" title="<?php echo __('X_tries_X', '', $translate) . __($field['name'], '', $translate) ?>">
<?php echo __($field['name'], '', $translate) ?>
<?php if($sort_type == 'asc'): ?>
<img src="/images/arr_up.gif" alt="Up" title="Up" />
<?php else: ?>
<img src="/images/arr_down.gif" alt="Dw" title="Dw" />
<?php endif ; ?>
</a>
<?php else: ?>
<a href="<?php echo url_for($route . '?sort=' . $field['name'] . '&sort_type=asc') ?>" class="<?php echo $sort_type ?>" title="<?php echo __('X_tries_X', '', $translate) . __($field['name'], '', $translate) ?>">
<?php echo __($field['name'], '', $translate) ?>
</a>
<?php endif ; ?>
<?php else: ?>
<?php echo __($field['name'], '', $translate) ?>
<?php endif ; ?>
</th>
<?php endforeach ; ?>
<th>
<?php echo __('Actions', '', $translate) ?>
</th>
<?php if ($filter->hasGlobalErrors() || $filter->hasErrors()): ?>
<tr>
<th colspan="<?php count($fields) ?>">
<?php echo $filter->renderGlobalErrors() ?>
<p>error</p>
</th>
</tr>
<?php endif; ?>
<tr class="filter">
<form action="<?php echo url_for('@dossiers', array('action' => 'filter')) ?>" method="get">
<?php foreach ($fields as $field) : ?>
<?php if(!($field['name'] == 'actions')): ?>
<th>
<?php if(isset($filter[$field['name']])): ?>
<?php echo $filter[$field['name']]->render() ?>
<?php if($filter[$field['name']]->hasError()): ?>
<br />
<p>la gaffe !</p>
<?php endif; ?>
<?php endif ; ?>
</th>
<?php endif ; ?>
<?php endforeach ; ?>
<th>
<?php echo $filter->renderHiddenFields() ?>
<input type="submit" value="<?php echo __('X_filter_X', array(), 'stdFilter') ?>" />
<?php echo link_to(__('X_reset_X', '', 'stdFilter'), '@dossiers?filter_reset=yes', array('action' => 'index'), array('method' => 'get', 'class' => 'filter-button', 'id' => 'filter_reset')) ?>
</th>
</form>
</tr> |
Partager