Пример #1
0
 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  *
  * @see     fetch()
  * @since   11.1
  */
 function display($tpl = null)
 {
     $this->_document = JFactory::getDocument();
     $this->_state = $this->get('State');
     $this->_formId = 0;
     if ($this->_state->get('filter.filter_form_id') != 0) {
         $this->_items = $this->get('Items');
         $this->_pagination = $this->get('Pagination');
         $this->_viewField = $this->getViewField();
         $this->_formId = $this->_state->get('filter.filter_form_id');
         $edition = defined('JSN_UNIFORM_EDITION') ? strtolower(JSN_UNIFORM_EDITION) : "free";
         if ($edition == "free") {
             $this->_countSubmission = $this->get('CountSubmission');
             $countSubmission = 300 - $this->_countSubmission > 0 ? 300 - $this->_countSubmission : 0;
             $msg = JText::sprintf('JSN_UNIFORM_YOU_CAN_ONLY_ACCEPT_UP_TO_300_SUBMISSION', (int) $countSubmission) . ' <a class="jsn-link-action" href="index.php?option=com_uniform&view=upgrade">' . JText::_("JSN_UNIFORM_UPGRADE_EDITION") . '</a>';
             if ($this->_countSubmission <= 300) {
                 JFactory::getApplication()->enqueueMessage($msg);
             } else {
                 JError::raiseNotice(100, $msg);
             }
         }
     }
     $config = JSNConfigHelper::get();
     // Load the submenu.
     $input = JFactory::getApplication()->input;
     JSNUniformHelper::addSubmenu($input->get('view', 'submissions'));
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('SUBMISSIONS');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     // Initialize toolbar
     $this->initToolbar();
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     parent::display($tpl);
     // Load assets
     JSNUniformHelper::addAssets();
     $this->addAssets();
 }
Пример #2
0
 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  */
 function display($tpl = null)
 {
     // Get config parameters
     $config = JSNConfigHelper::get();
     // Initialize toolbar
     JSNUniformHelper::initToolbar('JSN_UNIFORM_ABOUT', 'uniform-about', false);
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('ABOUT');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     // Load assets
     JSNUniformHelper::addAssets();
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     // Load the submenu.
     $input = JFactory::getApplication()->input;
     JSNUniformHelper::addSubmenu($input->get('view', 'about'));
     // Display the template
     parent::display($tpl);
 }
Пример #3
0
 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  *
  * @see     fetch()
  * @since   11.1
  */
 function display($tpl = null)
 {
     // Get config
     $config = JSNConfigHelper::get();
     // Get messages
     $msgs = '';
     if (!$config->get('disable_all_messages')) {
         $msgs = JSNUtilsMessage::getList('FORMS');
         $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : '';
     }
     // Initialize toolbar
     $this->initToolbar();
     // Load the submenu.
     $input = JFactory::getApplication()->input;
     JSNUniformHelper::addSubmenu($input->get('view', 'forms'));
     // Assign variables for rendering
     $this->assignRef('msgs', $msgs);
     // Display the view
     parent::display($tpl);
     // Load assets
     JSNUniformHelper::addAssets();
     $this->addAssets();
 }