Author: sevein
Date: Mon Oct 12 09:43:27 2009
New Revision: 3727
Log:
Use pager partial for all templates where pager is needed.
Modified:
trunk/apps/qubit/modules/digitalobject/templates/_browse.php
trunk/apps/qubit/modules/digitalobject/templates/_showCompound.php
trunk/apps/qubit/modules/search/templates/recentUpdatesSuccess.php
trunk/apps/qubit/modules/term/templates/browseTermSuccess.php
trunk/apps/qubit/modules/term/templates/listSuccess.php
trunk/apps/qubit/modules/term/templates/listTaxonomySuccess.php
trunk/apps/qubit/modules/user/templates/listSuccess.php
Modified: trunk/apps/qubit/modules/digitalobject/templates/_browse.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/templates/_browse.php Mon Oct
12 00:02:43 2009 (r3726)
+++ trunk/apps/qubit/modules/digitalobject/templates/_browse.php Mon Oct
12 09:43:27 2009 (r3727)
@@ -27,22 +27,5 @@
<?php endforeach; ?>
</tr>
</table>
-<?php if ($digitalObjects->haveToPaginate()): ?>
-<div class="pager">
- <?php $links = $digitalObjects->getLinks(); ?>
- <?php if ($digitalObjects->getPage() != $digitalObjects->getFirstPage()): ?>
- <?php echo link_to('< '.__('previous'),
'digitalobject/browse?mediatype='.$mediaTypeId.'&page='.($digitalObjects->getPage()-1))
?>
- <?php endif; ?>
- <?php foreach ($links as $page): ?>
- <?php echo ($page == $digitalObjects->getPage()) ? $page : link_to($page,
'digitalobject/browse?mediatype='.$mediaTypeId.'&page='.$page) ?>
- <?php if ($page != $digitalObjects->getCurrentMaxLink()): ?> <?php endif ?>
- <?php endforeach ?>
- <?php if ($digitalObjects->getPage() != $digitalObjects->getLastPage()): ?>
- <?php echo link_to(__('next').' >',
'digitalobject/browse?mediatype='.$mediaTypeId.'&page='.($digitalObjects->getPage()+1))
?>
- <?php endif; ?>
-</div>
-<?php endif ?>
-<div class="result-count">
-<?php echo __('displaying %1% to %2% of %3% results', array('%1%' =>
$digitalObjects->getFirstIndice(), '%2%' => $digitalObjects->getLastIndice(),
'%3%' => $digitalObjects->getNbResults())) ?>
-</div>
+<?php echo get_partial('default/pager', array('pager' => $digitalObjects)) ?>
Modified: trunk/apps/qubit/modules/digitalobject/templates/_showCompound.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/templates/_showCompound.php Mon Oct
12 00:02:43 2009 (r3726)
+++ trunk/apps/qubit/modules/digitalobject/templates/_showCompound.php Mon Oct
12 09:43:27 2009 (r3727)
@@ -28,26 +28,4 @@
<?php endif; ?>
</table>
-<?php if ($pager->haveToPaginate()): ?>
-<div class="pager compound_digiobj">
- <?php $links = $pager->getLinks(); ?>
- <?php if ($pager->getPage() != $pager->getFirstPage()): ?>
- <?php echo link_to('< '.__('previous'), $currentObjectRoute + array('page' =>
($pager->getPage()-1))) ?>
- <?php endif; ?>
- <?php foreach ($links as $page): ?>
- <?php echo ($page == $pager->getPage()) ? '<strong>'.$page.'</strong>' :
link_to($page, $currentObjectRoute + array('page' => $page)) ?>
- <?php if ($page != $pager->getCurrentMaxLink()): ?> <?php endif ?>
- <?php endforeach ?>
- <?php if ($pager->getPage() != $pager->getLastPage()): ?>
- <?php echo link_to(__('next').' >', $currentObjectRoute + array('page' =>
($pager->getPage()+1))) ?>
- <?php endif; ?>
-</div>
-<?php endif ?>
-
-<div class="result-count compound_digiobj">
-<?php if ($pager->getFirstIndice() < $pager->getLastIndice()): ?>
-<?php echo __('displaying %1% to %2% of %3%', array('%1%' =>
$pager->getFirstIndice(), '%2%' => $pager->getLastIndice(), '%3%' =>
$pager->getNbResults())) ?>
-<?php else: ?>
-<?php echo __('displaying %1% of %3%', array('%1%' =>
$pager->getFirstIndice(), '%2%' => $pager->getLastIndice(), '%3%' =>
$pager->getNbResults())) ?>
-<?php endif; ?>
-</div>
+<?php echo get_partial('default/pager', array('pager' => $pager)) ?>
Modified: trunk/apps/qubit/modules/search/templates/recentUpdatesSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/search/templates/recentUpdatesSuccess.php Mon Oct
12 00:02:43 2009 (r3726)
+++ trunk/apps/qubit/modules/search/templates/recentUpdatesSuccess.php Mon Oct
12 09:43:27 2009 (r3727)
@@ -41,7 +41,7 @@
<?php echo link_to($name, array('module' => 'term', 'action' => 'show',
'id' => $result->getId())) ?>
<?php endif; ?>
</td>
-
+
<?php if('informationobject' == $objectType && 0 <
sfConfig::get('app_multi_repository')): ?>
<td>
<?php if(null !== $repository = $result->getRepository(array('inherit'
=> true))): ?>
@@ -60,26 +60,4 @@
</tbody>
</table>
-<?php if ($pager->haveToPaginate()): ?>
-<div class="pager">
- <?php $links = $pager->getLinks(); ?>
- <?php if ($pager->getPage() != $pager->getFirstPage()): ?>
- <?php echo link_to('< '.__('previous'), array_merge($defaultParamList,
array('page' => ($pager->getPage()-1)))) ?>
- <?php endif; ?>
- <?php foreach ($links as $page): ?>
- <?php echo ($page == $pager->getPage()) ? '<strong>'.$page.'</strong>' :
link_to($page, array_merge($defaultParamList, array('page' => $page))) ?>
- <?php if ($page != $pager->getCurrentMaxLink()): ?> <?php endif; ?>
- <?php endforeach ?>
- <?php if ($pager->getPage() != $pager->getLastPage()): ?>
- <?php echo link_to(__('next').' >', array_merge($defaultParamList,
array('page' => ($pager->getPage()+1)))) ?>
- <?php endif; ?>
-</div>
-<?php endif; ?>
-
-<div class="result-count">
- <?php if (0 < $pager->getNbResults()): ?>
- <?php echo __('displaying %1% to %2% of %3% results', array('%1%' =>
$pager->getFirstIndice(), '%2%' => $pager->getLastIndice(), '%3%' =>
$pager->getNbResults())) ?>
- <?php else: ?>
- <?php echo __('No results found'); ?>
- <? endif; ?>
-</div>
+<?php echo get_partial('default/pager', array('pager' => $pager)) ?>
Modified: trunk/apps/qubit/modules/term/templates/browseTermSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/term/templates/browseTermSuccess.php Mon Oct
12 00:02:43 2009 (r3726)
+++ trunk/apps/qubit/modules/term/templates/browseTermSuccess.php Mon Oct
12 09:43:27 2009 (r3727)
@@ -41,26 +41,7 @@
</tbody>
</table>
-<?php if ($informationObjects->haveToPaginate()): ?>
-<div class="pager">
- <?php $links = $informationObjects->getLinks(); ?>
- <?php if ($informationObjects->getPage() !=
$informationObjects->getFirstPage()): ?>
- <?php echo link_to('< '.__('previous'),
'term/browse?termId='.$termId.'&sortColumn='.$sortColumn.'&sortDirection='.$sortDirection.'&page='.($informationObjects->getPage()-1))
?>
- <?php endif; ?>
- <?php foreach ($links as $page): ?>
- <?php echo ($page == $informationObjects->getPage()) ?
'<strong>'.$page.'</strong>' : link_to($page,
'term/browse?termId='.$termId.'&sortColumn='.$sortColumn.'&sortDirection='.$sortDirection.'&page='.$page)
?>
- <?php if ($page != $informationObjects->getCurrentMaxLink()): ?> <?php
endif ?>
- <?php endforeach ?>
- <?php if ($informationObjects->getPage() !=
$informationObjects->getLastPage()): ?>
- <?php echo link_to(__('next').' >',
'term/browse?termId='.$termId.'&sortColumn='.$sortColumn.'&sortDirection='.$sortDirection.'&page='.($informationObjects->getPage()+1))
?>
- <?php endif; ?>
-</div>
-<?php endif ?>
-
-<div class="result-count">
-<?php echo __('displaying %1% to %2% of %3% results', array('%1%' =>
$informationObjects->getFirstIndice(), '%2%' =>
$informationObjects->getLastIndice(), '%3%' =>
$informationObjects->getNbResults())) ?>
-</div>
-
+<?php echo get_partial('default/pager', array('pager' => $informationObjects))
?>
<div class="menu-extra">
<?php echo link_to(__('browse all %1%', array('%1%' => $taxonomyName)),
'term/browse?taxonomyId='.$term->getTaxonomyId()); ?>
Modified: trunk/apps/qubit/modules/term/templates/listSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/term/templates/listSuccess.php Mon Oct 12
00:02:43 2009 (r3726)
+++ trunk/apps/qubit/modules/term/templates/listSuccess.php Mon Oct 12
09:43:27 2009 (r3727)
@@ -21,22 +21,4 @@
</tbody>
</table>
-<?php if ($hitlist->haveToPaginate()): ?>
-<div class="pager">
- <?php $links = $hitlist->getLinks() ?>
- <?php if ($hitlist->getPage() != $hitlist->getFirstPage()): ?>
- <?php echo link_to('< '.__('previous'), array('module' => 'term', 'action' =>
'list', 'page' => $hitlist->getPage() - 1)) ?>
- <?php endif; ?>
- <?php foreach ($links as $page): ?>
- <?php echo ($page == $hitlist->getPage()) ? '<strong>'.$page.'</strong>' :
link_to($page, array('module' => 'term', 'action' => 'list', 'page' => $page))
?>
- <?php if ($page != $hitlist->getCurrentMaxLink()): ?> <?php endif; ?>
- <?php endforeach ?>
- <?php if ($hitlist->getPage() != $hitlist->getLastPage()): ?>
- <?php echo link_to(__('next').' >', array('module' => 'term', 'action' =>
'list', 'page' => $hitlist->getPage() + 1)) ?>
- <?php endif; ?>
-</div>
-<?php endif; ?>
-
-<div class="result-count">
-<?php echo __('displaying %1% to %2% of %3% results', array('%1%' =>
$hitlist->getFirstIndice(), '%2%' => $hitlist->getLastIndice(), '%3%' =>
$hitlist->getNbResults())) ?>
-</div>
+<?php echo get_partial('default/pager', array('pager' => $hitlist)) ?>
Modified: trunk/apps/qubit/modules/term/templates/listTaxonomySuccess.php
==============================================================================
--- trunk/apps/qubit/modules/term/templates/listTaxonomySuccess.php Mon Oct
12 00:02:43 2009 (r3726)
+++ trunk/apps/qubit/modules/term/templates/listTaxonomySuccess.php Mon Oct
12 09:43:27 2009 (r3727)
@@ -39,29 +39,7 @@
</tbody>
</table>
-<?php if ($hitlist->haveToPaginate()): ?>
-<div class="pager">
- <?php $links = $hitlist->getLinks() ?>
- <?php if ($hitlist->getPage() != $hitlist->getFirstPage()): ?>
- <?php echo link_to('< '.__('previous'), array('module' => 'term', 'action' =>
'list', 'taxonomyId' => $taxonomy->getId(), 'page' => $hitlist->getPage() - 1))
?>
- <?php endif; ?>
- <?php foreach ($links as $page): ?>
- <?php echo ($page == $hitlist->getPage()) ? '<strong>'.$page.'</strong>' :
link_to($page, array('module' => 'term', 'action' => 'list', 'taxonomyId' =>
$taxonomy->getId(), 'page' => $page)) ?>
- <?php if ($page != $hitlist->getCurrentMaxLink()): ?> <?php endif; ?>
- <?php endforeach ?>
- <?php if ($hitlist->getPage() != $hitlist->getLastPage()): ?>
- <?php echo link_to(__('next').' >', array('module' => 'term', 'action' =>
'list', 'taxonomyId' => $taxonomy->getId(), 'page' => $hitlist->getPage() + 1))
?>
- <?php endif; ?>
-</div>
-<?php endif; ?>
-
-<div class="result-count">
- <?php if (0 < $hitlist->getNbResults()): ?>
- <?php echo __('displaying %1% to %2% of %3% results', array('%1%' =>
$hitlist->getFirstIndice(), '%2%' => $hitlist->getLastIndice(), '%3%' =>
$hitlist->getNbResults())) ?>
- <?php else: ?>
- <?php echo __('No results found'); ?>
- <? endif; ?>
-</div>
+<?php echo get_partial('default/pager', array('pager' => $hitlist)) ?>
<?php if ($editCredentials): ?>
<div style="height: 40px"><!-- Make room to scroll past floating menu --></div>
Modified: trunk/apps/qubit/modules/user/templates/listSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/user/templates/listSuccess.php Mon Oct 12
00:02:43 2009 (r3726)
+++ trunk/apps/qubit/modules/user/templates/listSuccess.php Mon Oct 12
09:43:27 2009 (r3727)
@@ -31,22 +31,4 @@
</tbody>
</table>
-<?php if ($users->haveToPaginate()): ?>
-<div class="pager">
- <?php $links = $users->getLinks(); ?>
- <?php if ($users->getPage() != $users->getFirstPage()): ?>
- <?php echo link_to('< '.__('previous'), array('module' => 'user', 'action' =>
'list', 'page' => $users->getPage()-1)) ?>
- <?php endif; ?>
- <?php foreach ($links as $page): ?>
- <?php echo ($page == $users->getPage()) ? '<strong>'.$page.'</strong>' :
link_to($page, array('module' => 'user', 'action' => 'list', 'page' => $page))
?>
- <?php if ($page != $users->getCurrentMaxLink()): ?> <?php endif ?>
- <?php endforeach ?>
- <?php if ($users->getPage() != $users->getLastPage()): ?>
- <?php echo link_to(__('next').' >', array('module' => 'user', 'action' =>
'list', 'page' => $users->getPage()+1)) ?>
- <?php endif; ?>
-</div>
-<?php endif ?>
-
-<div class="result-count">
-<?php echo __('displaying %1% to %2% of %3% results', array('%1%' =>
$users->getFirstIndice(), '%2%' => $users->getLastIndice(), '%3%' =>
$users->getNbResults())) ?>
-</div>
+<?php echo get_partial('default/pager', array('pager' => $users)) ?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---