%PDF- %PDF-
| Direktori : /home1/lightco1/www/administrator/components/com_baforms/views/forms/ |
| Current File : //home1/lightco1/www/administrator/components/com_baforms/views/forms/view.html.php |
<?php
/**
* @package BaForms
* @author Balbooa http://www.balbooa.com/
* @copyright Copyright @ Balbooa
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
*/
defined('_JEXEC') or die;
// import Joomla view library
jimport('joomla.application.component.view');
class baformsViewForms extends JViewLegacy
{
protected $items;
protected $pagination;
protected $state;
protected $about;
/**
* View display method
* @return void
*/
public function display($tpl = null)
{
$this->about = baformsHelper::aboutUs();
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
// Set the toolbar
$this->addToolBar();
baformsHelper::addSubmenu('forms');
$this->sidebar = JHtmlSidebar::render();
foreach ($this->items as &$item)
{
$item->order_up = true;
$item->order_dn = true;
}
// Display the template
parent::display($tpl);
}
protected function addToolBar ()
{
JToolBarHelper::title(JText::_('FORMS_TITLE'), 'star');
JToolBarHelper::addNew('form.add');
JToolBarHelper::editList('form.edit');
JToolBarHelper::custom('forms.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
JToolbarHelper::publish('forms.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('forms.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::deleteList('', 'forms.delete');
}
protected function getSortFields()
{
return array(
'ordering' => JText::_('JGRID_HEADING_ORDERING'),
'published' => JText::_('JSTATUS'),
'title' => JText::_('JGLOBAL_TITLE'),
'id' => JText::_('JGRID_HEADING_ID')
);
}
}