Rajout de l'aide de vue URL
[zf2.biz/galerie.git] / module / Galerie / view / galerie / index / index.phtml
index b32b282..f9d18c7 100644 (file)
@@ -1,27 +1,46 @@
-<p>vue <em>back-office</em> d&rsquo;une <strong>galerie</strong>&nbsp;: <?php echo $this->translate('index', 'galerie'); ?></p>
-
-
-<h1>Galerie</h1>
-<h2>test de fetchAll()</h2>
-
-<pre><?php echo $Galerie_all->count(); ?></pre>
-<pre><?php print_r($Galerie_all->toArray()); ?></pre>
-
-<h2>test de getGalerie</h2>
-
-<pre><?php print_r($Galerie_one); ?></pre>
-<p>Identifiant&nbsp;: <?php echo $Galerie_one->id; ?></p>
-
-
-<h1>GalerieInfo</h1>
-<h2>test de select()</h2>
-
-<pre><?php echo $GalerieInfo_all->count(); ?></pre>
-<pre><?php print_r($GalerieInfo_all->toArray()); ?></pre>
-
-<pre><?php print_r($GalerieInfo_one); ?></pre>
-
-<pre><?php echo $GalerieInfo_usr->count(); ?></pre>
-<pre><?php print_r($GalerieInfo_usr->toArray()); ?></pre>
-
-
+<h1><?php echo $this->translate('Galerie_index_title', 'galerie'); ?></h1>
+
+<table id="galeries">
+       <tr>
+               <th>
+                       <strong><?php echo $this->translate('Galerie_index_table_name', 'galerie'); ?></strong>
+                       <em><?php echo $this->translate('Galerie_index_table_description', 'galerie'); ?></em>
+               </th>
+               <th>
+                       <?php echo $this->translate('Galerie_index_table_username', 'galerie'); ?>
+               </th>
+               <th>
+                       <?php echo $this->translate('Galerie_index_table_nb', 'galerie'); ?>
+               </th>
+               <th>
+                       <?php echo $this->translate('Galerie_index_table_actions', 'galerie'); ?>
+               </th>
+       </tr>
+       <?php if ($galeries->count() == 0): ?>
+       <tr>
+               <td colspan="5">
+                       <strong><?php echo $this->translate('Galerie_index_table_void', 'galerie'); ?></strong>
+               </td>
+       </tr>
+       <?php else: ?>
+       <?php foreach($galeries as $galerie): ?>
+       <tr>
+               <td>
+                       <strong><?php echo $this->escapeHtml($galerie->name); ?></strong>
+                       <em><?php echo $this->escapeHtml($galerie->description); ?></em>
+               </td>
+               <td>
+                       <?php echo $this->escapeHtml($galerie->username); ?>
+               </td>
+               <td>
+                       <?php echo $this->escapeHtml($galerie->nb); ?>
+               </td>
+               <td>
+                        <a href="<?php echo $this->url('galerie/view', array('id'=>$galerie->id)); ?>"><?php echo $this->translate('Galerie_index_table_lien_view', 'galerie'); ?></a>
+                        <a href="<?php echo $this->url('galerie/edit', array('id'=>$galerie->id)); ?>"><?php echo $this->translate('Galerie_index_table_lien_edit', 'galerie'); ?></a>
+                        <a href="<?php echo $this->url('galerie/del', array('id'=>$galerie->id)); ?>"><?php echo $this->translate('Galerie_index_table_lien_del', 'galerie'); ?></a>
+               </td>
+       </tr>
+       <?php endforeach; ?>
+       <?php endif; ?>
+</table>