Commit ca4ba249 by Dirk Benkert

no message

parent 59a54c1d
......@@ -67,6 +67,11 @@ class PaginationFilterSort extends AbstractPlugin {
const PARAMS = 'params';
/**
* option key for the request parameters to pass on
*/
const REQUEST_PARAMS = 'requestParams';
/**
* Data array
*
* @var array
......@@ -103,8 +108,8 @@ class PaginationFilterSort extends AbstractPlugin {
$this->options = $options;
$this->session = new Container($options[self::SESSION_NAMESPACE]);
if (!isset($session->page)) {
$session->page = 1;
if (!isset($this->session->page)) {
$this->session->page = 1;
}
$this->parseParams();
......@@ -123,6 +128,7 @@ class PaginationFilterSort extends AbstractPlugin {
self::FILTER => $this->getFilter(),
self::IDENTITY => $this->getController()->getIdentity(),
self::PARAMS => $params,
self::REQUEST_PARAMS => array('query' => $params)
));
}
......
......@@ -20,45 +20,54 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
if ($this->pageCount > 1): ?>
if ($this->pageCount > 1) {
$query = $this->query;
?>
<div class="text-center">
<ul class="pagination">
<!-- Previous page link -->
<?php if (isset($this->previous)): ?>
<?php if (isset($this->previous)) {
$query['query']['page'] = $this->previous;
?>
<li>
<a href="<?php echo $this->url($this->route, $this->params); ?>?page=<?php echo $this->previous; ?>">«</a>
<a href="<?php echo $this->url($this->route, $this->params, $query); ?>">«</a>
</li>
<?php else: ?>
<?php } else { ?>
<li class="disabled">
<a href="#">«</a>
</li>
<?php endif; ?>
<?php } ?>
<!-- Numbered page links -->
<?php foreach ($this->pagesInRange as $page): ?>
<?php if ($page != $this->current): ?>
<?php
foreach ($this->pagesInRange as $page) {
if ($page != $this->current) {
$query['query']['page'] = $page;
?>
<li>
<a href="<?php echo $this->url($this->route, $this->params);?>?page=<?php echo $page; ?>">
<a href="<?php echo $this->url($this->route, $this->params, $query);?>">
<?php echo $page; ?>
</a>
</li>
<?php else: ?>
<?php } else { ?>
<li class="active">
<a href="#"><?php echo $page; ?></a>
</li>
<?php endif; ?>
<?php endforeach; ?>
<?php }
} ?>
<!-- Next page link -->
<?php if (isset($this->next)): ?>
<?php if (isset($this->next)) {
$query['query']['page'] = $this->next;
?>
<li>
<a href="<?php echo $this->url($this->route, $this->params); ?>?page=<?php echo $this->next; ?>">»</a>
<a href="<?php echo $this->url($this->route, $this->params, $query); ?>">»</a>
</li>
<?php else: ?>
<?php } else { ?>
<li class="disabled">
<a href="#">»</a>
</li>
<?php endif; ?>
<?php } ?>
</ul>
</div>
<?php endif; ?>
\ No newline at end of file
<?php } ?>
\ No newline at end of file
......@@ -134,14 +134,14 @@
$helper->setActions($actions);
echo $helper->render();
echo $this->paginationControl(
$paginator, 'all', array('partial/pagination.phtml', 'Administration'), array(
'route' => 'application/default',
'params' => array(
'controller' => 'file',
'controller' => 'files',
'action' => 'index',
)
),
'query' => $this->requestParams
)
);
?>
......
......@@ -5661,7 +5661,7 @@ define('modules/File',['require','jquery','Module','dropzone'],function(require)
myDropzone.processQueue();
} else {
jQuery('#dialog').modal('hide');
//window.location.reload();
window.location.reload();
}
});
this.on("errormultiple", function(files, response) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -119,7 +119,7 @@ define(function(require) {
myDropzone.processQueue();
} else {
jQuery('#dialog').modal('hide');
//window.location.reload();
window.location.reload();
}
});
this.on("errormultiple", function(files, response) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment