mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
#2794 Added toggleButton param to admin-ui: $grid
This commit is contained in:
@@ -190,7 +190,7 @@ class theme_admin_ui extends e_admin_ui
|
|||||||
// protected \$sortField = 'somefield_order';
|
// protected \$sortField = 'somefield_order';
|
||||||
// protected \$sortParent = 'somefield_parent';
|
// protected \$sortParent = 'somefield_parent';
|
||||||
// protected \$treePrefix = 'somefield_title';
|
// protected \$treePrefix = 'somefield_title';
|
||||||
protected $grid = array('price'=>'price', 'version'=>'version','title'=>'name', 'image'=>'thumbnail', 'body'=>'', 'class'=>'col-md-2', 'perPage'=>12, 'carousel'=>true);
|
protected $grid = array('price'=>'price', 'version'=>'version','title'=>'name', 'image'=>'thumbnail', 'body'=>'', 'class'=>'col-md-2', 'perPage'=>12, 'carousel'=>true, 'toggleButton'=>false);
|
||||||
|
|
||||||
|
|
||||||
protected $fields = array(
|
protected $fields = array(
|
||||||
|
@@ -6173,6 +6173,7 @@ class e_admin_form_ui extends e_form
|
|||||||
* @var e_admin_ui
|
* @var e_admin_ui
|
||||||
*/
|
*/
|
||||||
protected $_controller = null;
|
protected $_controller = null;
|
||||||
|
protected $_list_view = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -6410,6 +6411,7 @@ class e_admin_form_ui extends e_form
|
|||||||
public function getList($ajax = false, $view='default')
|
public function getList($ajax = false, $view='default')
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
$this->_list_view = $view;
|
||||||
$controller = $this->getController();
|
$controller = $this->getController();
|
||||||
|
|
||||||
$request = $controller->getRequest();
|
$request = $controller->getRequest();
|
||||||
@@ -6580,7 +6582,7 @@ class e_admin_form_ui extends e_form
|
|||||||
*/
|
*/
|
||||||
public function renderPagination()
|
public function renderPagination()
|
||||||
{
|
{
|
||||||
if($this->getController()->getAction() === 'grid' && $this->getController()->getGrid('carousel') === true)
|
if($this->_list_view === 'grid' && $this->getController()->getGrid('carousel') === true)
|
||||||
{
|
{
|
||||||
return '<div class="btn-group" >
|
return '<div class="btn-group" >
|
||||||
<a id="admin-ui-carousel-prev" class="btn btn-default" href="#admin-ui-carousel" data-slide="prev"><i class="fa fa-backward"></i></a>
|
<a id="admin-ui-carousel-prev" class="btn btn-default" href="#admin-ui-carousel" data-slide="prev"><i class="fa fa-backward"></i></a>
|
||||||
@@ -6652,9 +6654,11 @@ class e_admin_form_ui extends e_form
|
|||||||
// $tree = $this->getTree();
|
// $tree = $this->getTree();
|
||||||
// $total = $this->getTotal();
|
// $total = $this->getTotal();
|
||||||
$grid = $this->getController()->getGrid();
|
$grid = $this->getController()->getGrid();
|
||||||
|
|
||||||
|
|
||||||
$gridToggle = '';
|
$gridToggle = '';
|
||||||
|
|
||||||
if(!empty($grid))
|
if(!empty($grid) && varset($grid['toggleButton']) !==false)
|
||||||
{
|
{
|
||||||
$gridAction = $this->getController()->getAction() === 'grid' ? 'list' : 'grid';
|
$gridAction = $this->getController()->getAction() === 'grid' ? 'list' : 'grid';
|
||||||
$gridQuery = (array) $_GET;
|
$gridQuery = (array) $_GET;
|
||||||
|
Reference in New Issue
Block a user