Skip to content

Instantly share code, notes, and snippets.

@violetyk
Created October 18, 2011 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save violetyk/1294546 to your computer and use it in GitHub Desktop.
Save violetyk/1294546 to your computer and use it in GitHub Desktop.
[cakephp]TwitterBootstrap対応、ページングエレメント
<p><?php echo $paginator->counter(array('format' => '全 %count% 件中 %start% 件 から %end% 件を表示')); ?></p>
<!-- pagination -->
<?php if (isset($paginator) && $paginator->hasPage(null, 2)): ?>
<div class="pagination">
<ul>
<?php if ($paginator->hasPrev()): ?>
<li class="prev"><?php e($paginator->first('« 最初', array())); ?></li>
<?php e($paginator->prev('< 前へ', array('tag' => 'li'))); ?>
<?php else: ?>
<li class="prev disabled"><a href="#">« 最初</a></li>
<li class="disabled"><a href="#">&lt; 前へ</a></li>
<?php endif ?>
<?php echo $paginator->numbers( array('tag' => 'li', 'separator' => null, 'modulus' => 11) );?>
<?php if ($paginator->hasNext()): ?>
<?php e($paginator->next('次へ >', array('tag' => 'li'))); ?>
<li class="next"><?php e($paginator->last('最後 »', array())); ?></li>
<?php else: ?>
<li class="disabled"><a href="#">&gt; 次へ</a></li>
<li class="next disabled"><a href="#">最後 »</a></li>
<?php endif ?>
</ul>
</div>
<?php endif ?>
<!-- /pagination -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment