Author: jablko
Date: Sun Aug 23 13:15:32 2009
New Revision: 3055
Log:
Take stab at simplifying links and hiding unspecified parameters
Modified:
trunk/apps/qubit/modules/informationobject/templates/listSuccess.php
Modified: trunk/apps/qubit/modules/informationobject/templates/listSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/listSuccess.php
Sun Aug 23 00:03:31 2009 (r3054)
+++ trunk/apps/qubit/modules/informationobject/templates/listSuccess.php
Sun Aug 23 13:15:32 2009 (r3055)
@@ -4,10 +4,10 @@
<thead>
<tr>
<th><?php if ($sort == 'titleUp'): ?>
- <?php echo link_to(__('title'), array('module' => 'informationobject',
'action' => 'list', 'repository' => $repositoryId, 'sort' => 'titleDown',
'page' => $page)) ?>
+ <?php echo link_to(__('title'), array('sort' => 'titleDown') +
$sf_request->getParameterHolder()->getAll()) ?>
<?php echo image_tag('up.gif', 'style="padding-bottom: 3px;"', 'sort up')
?>
<?php else: ?>
- <?php echo link_to(__('title'), array('module' => 'informationobject',
'action' => 'list', 'repository' => $repositoryId, 'sort' => 'titleUp', 'page'
=> $page)) ?>
+ <?php echo link_to(__('title'), array('sort' => 'titleUp') +
$sf_request->getParameterHolder()->getAll()) ?>
<?php endif; ?>
<?php if ($sort == 'titleDown'): ?>
@@ -22,10 +22,10 @@
<?php if($multiRepository): ?>
<th>
<?php if ($sort == 'repositoryUp'): ?>
- <?php echo link_to(__(sfConfig::get('app_ui_label_repository')),
array('module' => 'informationobject', 'action' => 'list', 'repository' =>
$repositoryId, 'sort' => 'repositoryDown', 'page' => $page)) ?>
+ <?php echo link_to(__(sfConfig::get('app_ui_label_repository')),
array('sort' => 'repositoryDown') +
$sf_request->getParameterHolder()->getAll()) ?>
<?php echo image_tag('up.gif', 'style="padding-bottom: 3px;"', 'sort
up') ?>
<?php else: ?>
- <?php echo link_to(__(sfConfig::get('app_ui_label_repository')),
array('module' => 'informationobject', 'action' => 'list', 'repository' =>
$repositoryId, 'sort' => 'repositoryUp', 'page' => $page)) ?>
+ <?php echo link_to(__(sfConfig::get('app_ui_label_repository')),
array('sort' => 'repositoryUp')) ?>
<?php endif; ?>
<?php if ($sort == 'repositoryDown'): // multi-repository: show repository
(w/ sorting) ?>
@@ -68,14 +68,14 @@
<div class="pager">
<?php $links = $informationObjects->getLinks() ?>
<?php if ($informationObjects->getPage() !=
$informationObjects->getFirstPage()): ?>
- <?php echo link_to('< '.__('previous'), array('module' =>
'informationobject', 'action' => 'list', 'sort' => $sort, 'page' =>
$informationObjects->getPage() - 1)) ?>
+ <?php echo link_to('< '.__('previous'), array('page' =>
$informationObjects->getPage() - 1) +
$sf_request->getParameterHolder()->getAll()) ?>
<?php endif; ?>
<?php foreach ($links as $page): ?>
- <?php echo ($page == $informationObjects->getPage()) ?
'<strong>'.$page.'</strong>' : link_to($page, array('module' =>
'informationobject', 'action' => 'list', 'sort' => $sort, 'page' => $page)) ?>
+ <?php echo ($page == $informationObjects->getPage()) ?
'<strong>'.$page.'</strong>' : link_to($page, array('page' => $page) +
$sf_request->getParameterHolder()->getAll()) ?>
<?php if ($page != $informationObjects->getCurrentMaxLink()): ?> <?php
endif; ?>
<?php endforeach ?>
<?php if ($informationObjects->getPage() !=
$informationObjects->getLastPage()): ?>
- <?php echo link_to(__('next').' >', array('module' => 'informationobject',
'action' => 'list', 'sort' => $sort, 'page' => $informationObjects->getPage() +
1)) ?>
+ <?php echo link_to(__('next').' >', array('page' =>
$informationObjects->getPage() + 1) +
$sf_request->getParameterHolder()->getAll()) ?>
<?php endif; ?>
</div>
<?php endif; ?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---