Merge branch 'fixes' into main/rendor-staging
[ryzomcore.git] / web / public_php / webtt / app / views / votes / index.ctp
blob4acc4185cb02610395ee328b9f7a8cd0744e32b3
1 <div class="grid_3">
2         <div class="box menubox">
3                 <h2><a href="#" id="toggle-admin-actions">Actions</a></h2>
4                 <div class="inbox">
5                         <div class="block" id="admin-actions">
6                                 <h5><?php echo __('Votes', true); ?></h5>
7                                 <ul class="menu">                               <li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Votes', true)), array('action' => 'index')); ?> </li>
8                                 </ul>                           <h5><?php echo __('Translations', true); ?></h5>
9                                 <ul class="menu">
10                                 <li><?php echo $this->Html->link(sprintf(__('List all %s', true), __('Translations', true)), array('controller' => 'translations', 'action' => 'index')); ?> </li>
11                                 </ul>
12                                 <h5><?php echo __('Users', true); ?></h5>
13                                 <ul class="menu">
14                                 <li><?php echo $this->Html->link(sprintf(__('List all %s', true), __('Users', true)), array('controller' => 'users', 'action' => 'index')); ?> </li>
15                                 </ul>
16                         </div>
17                 </div>
18         </div>
19 </div>
21 <div class="grid_13">
22         <h2 id="page-heading"><?php __('Votes');?></h2>
23         <table cellpadding="0" cellspacing="0">         <?php $tableHeaders = $html->tableHeaders(array($paginator->sort('id'),$paginator->sort('translation_id'),$paginator->sort('user_id'),$paginator->sort('created'),$paginator->sort('modified'),__('Actions', true),));
24                 echo '<thead>'.$tableHeaders.'</thead>'; ?>
26                 <?php
27                 $i = 0;
28                 foreach ($votes as $vote):
29                         $class = null;
30                         if ($i++ % 2 == 0) {
31                                 $class = ' class="altrow"';
32                         }
33                 ?>
34         <tr<?php echo $class;?>>
35                 <td><?php echo $vote['Vote']['id']; ?></td>
36                 <td>
37                         <?php echo $this->Html->link($vote['Translation']['translation_text'], array('controller' => 'translations', 'action' => 'view', $vote['Translation']['id'])); ?>
38                 </td>
39                 <td>
40                         <?php echo $this->Html->link($vote['User']['name'], array('controller' => 'users', 'action' => 'view', $vote['User']['id'])); ?>
41                 </td>
42                 <td><?php echo $vote['Vote']['created']; ?></td>
43                 <td><?php echo $vote['Vote']['modified']; ?></td>
44                 <td class="actions">
45                         <?php echo $this->Html->link(__('View', true), array('action' => 'view', $vote['Vote']['id'])); ?>
46                         <?php echo ' | ' . $this->Html->link(__('Edit', true), array('action' => 'edit', $vote['Vote']['id'])); ?>
47                 </td>
48         </tr>
49         <?php endforeach; ?>
50         <?php echo '<tfoot class=\'dark\'>'.$tableHeaders.'</tfoot>'; ?>
51         </table>
53         
54         <p>
55         <?php
56         echo $this->Paginator->counter(array(
57         'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
58         ));
59         ?>      </p>
61         <div class="paging">
62                 <?php echo $this->Paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
63                 | <?php echo $this->Paginator->numbers();?> |
64                 <?php echo $this->Paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
65         </div>
66 </div>
67 <div class="clear"></div>