Permalink
Browse files

Paginação adicionada às listas administrativas

  • Loading branch information...
1 parent 146d1b9 commit 6e2a6ee10bad21b34025f424c6c887402256e7c9 @p-lambert p-lambert committed Aug 8, 2011
@@ -15,6 +15,7 @@ generator:
actions: ~
fields: ~
list:
+ max_per_page: 2
title: Agendamentos
display: [=id, user_id, equipment_name, appointment_date, schedule_info, event_status, created_at]
fields:
@@ -17,9 +17,6 @@
<tfoot>
<tr>
<th colspan="<?php echo count($this->configuration->getValue('list.display')) + ($this->configuration->getValue('list.object_actions') ? 1 : 0) + ($this->configuration->getValue('list.batch_actions') ? 1 : 0) ?>">
- [?php if ($pager->haveToPaginate()): ?]
- [?php include_partial('<?php echo $this->getModuleName() ?>/pagination', array('pager' => $pager)) ?]
- [?php endif; ?]
[?php echo format_number_choice('[0] no result|[1] 1 result|(1,+Inf] %1% results', array('%1%' => $pager->getNbResults()), $pager->getNbResults(), 'sf_admin') ?]
[?php if ($pager->haveToPaginate()): ?]
@@ -42,6 +39,9 @@
[?php endforeach; ?]
</tbody>
</table>
+ [?php if ($pager->haveToPaginate()): ?]
+ [?php include_partial('<?php echo $this->getModuleName() ?>/pagination', array('pager' => $pager)) ?]
+ [?php endif; ?]
[?php endif; ?]
<script type="text/javascript">
@@ -1,25 +1,23 @@
-<div class="sf_admin_pagination">
- <a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=1">
+<div class="pagination right">
+ <!-- <a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=1">
[?php echo image_tag(sfConfig::get('sf_admin_module_web_dir').'/images/first.png', array('alt' => __('First page', array(), 'sf_admin'), 'title' => __('First page', array(), 'sf_admin'))) ?]
- </a>
+ </a> -->
- <a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=[?php echo $pager->getPreviousPage() ?]">
- [?php echo image_tag(sfConfig::get('sf_admin_module_web_dir').'/images/previous.png', array('alt' => __('Previous page', array(), 'sf_admin'), 'title' => __('Previous page', array(), 'sf_admin'))) ?]
- </a>
+ <a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=[?php echo $pager->getPreviousPage() ?]">«</a>
[?php foreach ($pager->getLinks() as $page): ?]
[?php if ($page == $pager->getPage()): ?]
- [?php echo $page ?]
+ <a href="#" class="active">[?php echo $page ?]</a>
[?php else: ?]
<a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=[?php echo $page ?]">[?php echo $page ?]</a>
[?php endif; ?]
[?php endforeach; ?]
- <a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=[?php echo $pager->getNextPage() ?]">
- [?php echo image_tag(sfConfig::get('sf_admin_module_web_dir').'/images/next.png', array('alt' => __('Next page', array(), 'sf_admin'), 'title' => __('Next page', array(), 'sf_admin'))) ?]
- </a>
+ <a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=[?php echo $pager->getNextPage() ?]">»</a>
+ <!--
<a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=[?php echo $pager->getLastPage() ?]">
[?php echo image_tag(sfConfig::get('sf_admin_module_web_dir').'/images/last.png', array('alt' => __('Last page', array(), 'sf_admin'), 'title' => __('Last page', array(), 'sf_admin'))) ?]
</a>
+ -->
</div>

0 comments on commit 6e2a6ee

Please sign in to comment.