示例#1
0
 /**
  * display method of Hello view
  * @return void
  **/
 function display($tpl = null)
 {
     //get the raid
     $raid = $this->get('Data');
     $isNew = $raid->raid_id < 1;
     $text = $isNew ? JText::_('JTOOLBAR_NEW') : JText::_('JTOOLBAR_EDIT');
     JToolBarHelper::title(JText::_('COM_RAIDPLANNER_RAID') . ': ' . $text . '');
     JToolBarHelper::apply();
     JToolBarHelper::save();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'JTOOLBAR_CLOSE');
     }
     $this->assignRef('users', RaidPlannerHelper::getUsers());
     $this->assignRef('guilds', RaidPlannerHelper::getGuilds());
     $this->assignRef('groups', RaidPlannerHelper::getGroups());
     $this->assignRef('icons', $this->getIcons());
     $this->assignRef('raid', $raid);
     parent::display($tpl);
 }
示例#2
0
 function display($tpl = null)
 {
     //get the character
     $char = $this->get('Data');
     $isNew = $char->character_id < 1;
     $text = $isNew ? JText::_('JTOOLBAR_NEW') : JText::_('JTOOLBAR_EDIT');
     JToolBarHelper::title(JText::_('COM_RAIDPLANNER_CHARACTER') . ': ' . $text . '');
     JToolBarHelper::apply();
     JToolBarHelper::save();
     if ($isNew) {
         JToolBarHelper::cancel();
     } else {
         // for existing items the button is renamed `close`
         JToolBarHelper::cancel('cancel', 'JTOOLBAR_CLOSE');
     }
     $model = $this->getModel();
     $this->assign('users', RaidPlannerHelper::getUsers());
     $this->assignRef('character', $char);
     $this->assign('classes', RaidPlannerHelper::getClasses());
     $this->assign('genders', RaidPlannerHelper::getGenders());
     $this->assign('races', RaidPlannerHelper::getRaces());
     $this->assign('guilds', RaidPlannerHelper::getGuilds());
     parent::display($tpl);
 }