예제 #1
0
 /**
  * Display the Message templates view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 function display($tpl = null)
 {
     // Get data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Add publishers helper file
     require_once JPATH_COMPONENT . '/helpers/publishers.php';
     // Add sidebar
     PublishersHelper::addSubmenu('messagetemplates');
     // Load message type model
     $model = JModelLegacy::getInstance('messagetype', 'IsbnregistryModel');
     // Load message types
     $types = $model->getMessageTypesHash();
     // Pass $types to the layout
     $this->assignRef('types', $types);
     // Set the toolbar
     $this->addToolBar();
     // Render the sidebar
     $this->sidebar = JHtmlSidebar::render();
     // Display the template
     parent::display($tpl);
 }
예제 #2
0
 /**
  * Display the Message types view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 function display($tpl = null)
 {
     // Get data from the model
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Add publishers helper file
     require_once JPATH_COMPONENT . '/helpers/publishers.php';
     // Add sidebar
     PublishersHelper::addSubmenu('groupmessages');
     // Set the toolbar
     $this->addToolBar();
     // Render the sidebar
     $this->sidebar = JHtmlSidebar::render();
     // Display the template
     parent::display($tpl);
 }
예제 #3
0
 /**
  * Display the Publications view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 function display($tpl = null)
 {
     // Get data from the model
     $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');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Get filter status
     $filterStatus = $this->state->get('filter.status');
     // Add publishers helper file
     require_once JPATH_COMPONENT . '/helpers/publishers.php';
     // Add sidebar
     if ($filterStatus == 1) {
         PublishersHelper::addSubmenu('publications_received');
     } else {
         if ($filterStatus == 2) {
             PublishersHelper::addSubmenu('publications_on_process');
         } else {
             if ($filterStatus == 4) {
                 PublishersHelper::addSubmenu('publications_no_identifier_granted');
             } else {
                 PublishersHelper::addSubmenu('publications_processed');
             }
         }
     }
     // Set the toolbar
     $this->addToolBar();
     // Render the sidebar
     $this->sidebar = JHtmlSidebar::render();
     // Display the template
     parent::display($tpl);
 }
예제 #4
0
 /**
  * Display the Publishers view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 function display($tpl = null)
 {
     // Get data from the model
     $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');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Get filter no identifier
     $filterNoIdentifier = $this->state->get('filter.no_identifier');
     // Add publishers helper file
     require_once JPATH_COMPONENT . '/helpers/publishers.php';
     // Add sidebar
     if ($filterNoIdentifier == 1) {
         PublishersHelper::addSubmenu('publishers_applications');
         // Set an empty array as variable value
         $this->ismn_publisher_ids = array();
     } else {
         PublishersHelper::addSubmenu('publishers_registry');
         // Load publisher ismn range model
         $model = JModelLegacy::getInstance('publisherismnrange', 'IsbnregistryModel');
         // Load message types
         $ids = $model->getIsmnPublisherIds();
         // Pass results to the layout
         $this->ismn_publisher_ids = $ids;
     }
     // Set the toolbar
     $this->addToolBar();
     // Render the sidebar
     $this->sidebar = JHtmlSidebar::render();
     // Display the template
     parent::display($tpl);
 }