CC-1749 added pagination to media files display.
This commit is contained in:
parent
ba85842fcd
commit
cf4e784129
4 changed files with 58 additions and 48 deletions
|
@ -32,6 +32,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
$this->_helper->layout->setLayout('library');
|
||||
|
||||
unset($this->search_sess->page);
|
||||
unset($this->search_sess->md);
|
||||
|
||||
$this->_helper->actionStack('contents', 'library');
|
||||
|
|
|
@ -1841,7 +1841,7 @@ class StoredFile {
|
|||
$paginate = " LIMIT ".$limit. " OFFSET " .$offset;
|
||||
$sql = $sql . $paginate;
|
||||
}
|
||||
echo $sql;
|
||||
//echo $sql;
|
||||
|
||||
return $CC_DBC->getAll($sql);
|
||||
}
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
|
||||
<?php
|
||||
|
||||
echo "page: " . $this->page;
|
||||
echo "curr: " . $this->curr;
|
||||
|
||||
echo $this->paginationControl($this->paginator,
|
||||
'Sliding',
|
||||
'library/paginator.phtml');
|
||||
|
|
|
@ -1,44 +1,56 @@
|
|||
<p>
|
||||
<?php if ($this->pageCount): ?>
|
||||
<div class="paginationControl">
|
||||
<?php echo $this->firstItemNumber; ?> - <?php echo $this->lastItemNumber; ?>
|
||||
of <?php echo $this->totalItemCount; ?>
|
||||
</p>
|
||||
|
||||
<?php if ($this->pageCount): ?>
|
||||
<div class="paginationControl">
|
||||
<?php echo $this->firstItemNumber; ?> - <?php echo $this->lastItemNumber; ?>
|
||||
of <?php echo $this->totalItemCount; ?>
|
||||
|
||||
<!-- First page link -->
|
||||
<?php if (isset($this->previous)): ?>
|
||||
<p>
|
||||
<!-- First page link -->
|
||||
<?php if (isset($this->previous)): ?>
|
||||
<a href="<?php echo $this->url(array('page' => $this->first)); ?>">
|
||||
First
|
||||
</a> |
|
||||
<?php else: ?>
|
||||
<?php else: ?>
|
||||
<span class="disabled">First</span> |
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Previous page link -->
|
||||
<?php if (isset($this->previous)): ?>
|
||||
<!-- Previous page link -->
|
||||
<?php if (isset($this->previous)): ?>
|
||||
<a href="<?php echo $this->url(array('page' => $this->previous)); ?>">
|
||||
< Previous
|
||||
</a> |
|
||||
<?php else: ?>
|
||||
<?php else: ?>
|
||||
<span class="disabled">< Previous</span> |
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Next page link -->
|
||||
<?php if (isset($this->next)): ?>
|
||||
<!-- current pages links -->
|
||||
<?php foreach ($this->pagesInRange as $page): ?>
|
||||
<?php if ($this->current != $page): ?>
|
||||
<a href="<?php echo $this->url(array('page' => $page));?>"><?php echo $page; ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $page; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<!-- Next page link -->
|
||||
<?php if (isset($this->next)): ?>
|
||||
<a href="<?php echo $this->url(array('page' => $this->next)); ?>">
|
||||
Next >
|
||||
</a> |
|
||||
<?php else: ?>
|
||||
<?php else: ?>
|
||||
<span class="disabled">Next ></span> |
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Last page link -->
|
||||
<?php if (isset($this->next)): ?>
|
||||
<!-- Last page link -->
|
||||
<?php if (isset($this->next)): ?>
|
||||
<a href="<?php echo $this->url(array('page' => $this->last)); ?>">
|
||||
Last
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<?php else: ?>
|
||||
<span class="disabled">Last</span>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue