示例#1
0
 function display($tpl = null)
 {
     //get the guild
     $guild = $this->get('Data');
     $isNew = $guild->guild_id < 1;
     $text = $isNew ? JText::_('JTOOLBAR_NEW') : JText::_('JTOOLBAR_EDIT');
     JToolBarHelper::title(JText::_('COM_RAIDPLANNER_GUILD') . ': ' . $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();
     $plugins = RaidPlannerHelper::getSyncPlugins();
     $plugin_params = array();
     if ($guild->sync_plugin != '' && ($plugin = RaidPlannerHelper::getGuildPlugin($guild->guild_id))) {
         $plugin_params = RaidPlannerHelper::getSyncPluginParams($guild->sync_plugin);
         $this->assign('do_sync', $plugin->trigger('onRPBeforeSync'));
         /* FIXME, don't know if this plugin provide sync abilities */
     } else {
         $this->assign('do_sync', false);
     }
     $this->assignRef('sync_plugins', $plugins);
     $this->assignRef('sync_params', $plugin_params);
     $this->assignRef('guild', $guild);
     parent::display($tpl);
 }
示例#2
0
 function display($tpl = null)
 {
     /* Load required javascripts */
     RaidPlannerHelper::loadJSFramework(true);
     JHTML::script('com_raidplanner/HtmlTable.Extended.js', false, true);
     $model = $this->getModel();
     $paramsObj = JComponentHelper::getParams('com_raidplanner');
     $menuitemid = JRequest::getInt('Itemid');
     if ($menuitemid) {
         $menu = JFactory::getApplication()->getMenu();
         $menuparams = $menu->getParams($menuitemid);
         $paramsObj->merge($menuparams);
     }
     $guild_id = $paramsObj->get('guild_id', '0');
     $show_account = $paramsObj->get('show_account', '0');
     $initial_sort = $paramsObj->get('initial_sort', '0');
     $guild_plugin = RaidPlannerHelper::getGuildPlugin($guild_id);
     if ($guild_plugin != null) {
         $sync_interval = $paramsObj->get('sync_interval', 4);
         $sync_enabled = $paramsObj->get('armory_sync', '0') == 1;
         if ($sync_enabled) {
             $guild_plugin->trigger('onRPSyncGuild', array($guild_id, $sync_interval, false));
         }
         $guild_plugin->trigger('onRPLoadCSS');
     }
     $this->assignRef('guild_plugin', $guild_plugin);
     $this->assign('characters', $model->getGuildCharacters($guild_id));
     $this->assign('guildinfo', $model->getGuildInfo($guild_id));
     $this->assign('ranks', RaidPlannerHelper::getRanks());
     $this->assignRef('show_account', $show_account);
     $this->assignRef('initial_sort', $initial_sort);
     parent::display($tpl);
 }
示例#3
0
				</thead>
				<tbody>
		<?php 
foreach ($this->attendants as $attendant) {
    ?>
					<tr>
						<td class="<?php 
    echo $attendant->class_css;
    ?>
">
							<input type="hidden" name="characters[]" value="<?php 
    echo $attendant->character_id;
    ?>
" />
							<a href="<?php 
    if ($guild_plugin = RaidPlannerHelper::getGuildPlugin($attendant->guild_id)) {
        echo implode(" ", $guild_plugin->trigger('onRPGetCharacterLink', array($attendant->char_name)));
    } else {
        echo '#" onclick="javascript:rpShowTooltip(\'att_char_name_' . $attendant->character_id . '\');return false;" ';
    }
    ?>
" onmouseenter="javascript:rpShowTooltip('att_char_name_<?php 
    echo $attendant->character_id;
    ?>
');" id="att_char_name_<?php 
    echo $attendant->character_id;
    ?>
" style="color:<?php 
    echo $attendant->class_color;
    ?>
" class="rp_tooltips" title="<?php