%PDF- %PDF-
| Direktori : /home1/lightco1/upgrade.lightco.com.au/administrator/components/com_csvi/views/maps/ |
| Current File : //home1/lightco1/upgrade.lightco.com.au/administrator/components/com_csvi/views/maps/view.html.php |
<?php
/**
* @package CSVI
* @subpackage Fieldmapper
*
* @author Roland Dalmulder <contact@csvimproved.com>
* @copyright Copyright (C) 2006 - 2016 RolandD Cyber Produksi. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
* @link http://www.csvimproved.com
*/
defined('_JEXEC') or die;
/**
* Maps view.
*
* @package CSVI
* @subpackage Fieldmapper
* @since 6.0
*/
class CsviViewMaps extends JViewLegacy
{
/**
* The items to display.
*
* @var array
* @since 6.6.0
*/
protected $items;
/**
* The pagination object
*
* @var JPagination
* @since 6.6.0
*/
protected $pagination;
/**
* The user state.
*
* @var JObject
* @since 6.6.0
*/
protected $state;
/**
* Form with filters
*
* @var array
* @since 6.6.0
*/
public $filterForm = array();
/**
* List of active filters
*
* @var array
* @since 6.6.0
*/
public $activeFilters = array();
/**
* Access rights of a user
*
* @var JObject
* @since 6.6.0
*/
protected $canDo;
/**
* The sidebar to show
*
* @var string
* @since 2.0
*/
protected $sidebar = '';
/**
* Executes before rendering a generic page, default to actions necessary
* for the Browse task.
*
* @param string $tpl Subtemplate to use
*
* @return boolean Return true to allow rendering of the page
*
* @since 6.0
*
* @throws Exception
*/
public function display($tpl = null)
{
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
$this->canDo = JHelperContent::getActions('com_csvi');
$this->toolbar();
// Render the sidebar
$helper = new CsviHelperCsvi;
$helper->addSubmenu('maps');
$this->sidebar = JHtmlSidebar::render();
return parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
private function toolbar()
{
JToolbarHelper::title(JText::_('COM_CSVI') . ' - ' . JText::_('COM_CSVI_TITLE_MAPS'), 'info');
if ($this->canDo->get('core.create'))
{
JToolbarHelper::addNew('map.add');
}
if ($this->canDo->get('core.edit') || $this->canDo->get('core.edit.own'))
{
JToolbarHelper::editList('map.edit');
}
if ($this->canDo->get('core.delete'))
{
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'maps.delete');
}
}
}