Permalink
Browse files

adding clickable category filter in offers and requests

  • Loading branch information...
1 parent aa4c04d commit 64fa4bfa4f1e829a891ec1436c725e3d84779fbe @essemme committed Jun 26, 2012
Showing with 13 additions and 8 deletions.
  1. +8 −4 View/Offerte/index.ctp
  2. +5 −4 View/Richieste/index.ctp
View
@@ -106,15 +106,19 @@
<td>
<?php echo $this->Html->link($offerta['Tipo']['nome'], array('controller' => 'offerte', 'action' => 'index', 'tipo' => $offerta['Tipo']['id'])); ?>
</td>
- <td><?php
+ <td>
+ <?php
if($offerta['Offerta']['completa']) echo '<strike>';
echo nl2br($this->Text->truncate(h($offerta['Offerta']['offerta'])));
if($offerta['Offerta']['completa']) echo '</strike>';
- ?>&nbsp;
- <br />
- [<?php echo $offerta['Categoria']['categoria']; ?>]
+ ?>
+ <br />
+
+ [<?php echo $this->Html->link( $offerta['Categoria']['categoria'], array('controller' => 'offerte', 'action' => 'index', 'categoria' => $offerta['Categoria']['id'])); ?>]
+
+
</td>
<td>
<?php if($dove != '') echo $dove; ?>
View
@@ -24,14 +24,14 @@
<?php //echo $this->Batch->create('Richiesta')?>
<table class="table table-bordered table-striped" >
<tr>
- <th>Id<?php //echo $this->Paginator->sort('id');?></th>
+ <th><?php echo $this->Paginator->sort('id');?></th>
<th>Tipo<?php //echo $this->Paginator->sort('tipo_id');?>
- <br/>scadenza indicativa<?php //echo $this->Paginator->sort('scadenza', 'scadenza indicativa');?></th>
+ <br/><?php echo $this->Paginator->sort('scadenza', 'scadenza indicativa');?></th>
<th>Cosa serve<?php //echo $this->Paginator->sort('cosa_serve');?></th>
<th>Dove, a chi<?php //echo $this->Paginator->sort('dove_a_chi', 'dove, a chi');?></th>
<?php if($this->Session->read('Auth.User.role_id') < 3 ) : ?>
<th>Inserimento, <?php //echo $this->Paginator->sort('created', 'inserimento');?><br/>
- Ultima modifica<?php //echo $this->Paginator->sort('modified', 'ultima modifica');?>, inserito da<?php //echo $this->Paginator->sort('user_id');?>
+ <?php echo $this->Paginator->sort('modified', 'ultima modifica');?>, inserito da<?php //echo $this->Paginator->sort('user_id');?>
</th>
<th></th>
<?php endif; ?>
@@ -116,7 +116,8 @@
?>
</strong>
<br />
- [<?php echo $richiesta['Categoria']['categoria']; ?>]
+
+ [<?php echo $this->Html->link( $richiesta['Categoria']['categoria'], array('controller' => 'richieste', 'action' => 'index', 'categoria' => $richiesta['Categoria']['id'])); ?>]
</td>
<td>

0 comments on commit 64fa4bf

Please sign in to comment.