Example #1
0
 /**
  * Method to display a view.
  */
 public function display()
 {
     $this->default_view = 'home';
     require_once JPATH_COMPONENT . '/helpers/fabrik.php';
     parent::display();
     // Load the submenu.
     FabrikHelper::addSubmenu(JRequest::getWord('view', 'lists'));
 }
Example #2
0
 /**
  * show the form in the admin
  */
 function view()
 {
     $document =& JFactory::getDocument();
     $model = JModel::getInstance('Form', 'FabrikFEModel');
     JRequest::setVar('view', 'details');
     $viewType = $document->getType();
     $this->setPath('view', COM_FABRIK_FRONTEND . DS . 'views');
     $viewLayout = JRequest::getCmd('layout', 'default');
     $view =& $this->getView('form', $viewType, '');
     $view->setModel($model, true);
     // Set the layout
     $view->setLayout($viewLayout);
     //todo check for cached version
     JToolBarHelper::title(JText::_('COM_FABRIK_MANAGER_FORMS'), 'forms.png');
     $view->display();
     FabrikHelper::addSubmenu(JRequest::getWord('view', 'lists'));
 }
Example #3
0
	/**
	 * show the lists data in the admin
	 */

	public function view()
	{
		$cid = JRequest::getVar('cid', array(0), 'method', 'array');
		if(is_array($cid)){$cid = $cid[0];}
		$cid = JRequest::getInt('listid', $cid);
		// grab the model and set its id
		$model = JModel::getInstance('List', 'FabrikFEModel');
		$model->setState('list.id', $cid);
		$viewType	= JFactory::getDocument()->getType();
		//use the front end renderer to show the table
		$this->setPath('view', COM_FABRIK_FRONTEND.DS.'views');

		$viewLayout	= JRequest::getCmd('layout', 'default');
		$view = & $this->getView($this->view_item, $viewType, '');
		$view->setModel($model, true);
		// Set the layout
		$view->setLayout($viewLayout);
		JToolBarHelper::title(JText::_('COM_FABRIK_MANAGER_LISTS'), 'lists.png');
		$view->display();
		FabrikHelper::addSubmenu(JRequest::getWord('view', 'lists'));
	}