function display($tpl = null) { $option = JRequest::getCmd('option'); $mainframe = JFactory::getApplication(); $project_id = $mainframe->getUserState($option . 'project'); $uri = JFactory::getURI()->toString(); $user = JFactory::getUser(); // Get data from the model $items = $this->get('Data'); $total = $this->get('Total'); $pagination = $this->get('Pagination'); $model = $this->getModel(); $projectws = $this->get('Data', 'project'); $division = $mainframe->getUserStateFromRequest($option . 'tt_division', 'division', '', 'string'); //build the html options for divisions $divisions[] = JHtmlSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_DIVISION')); $mdlDivisions = JModelLegacy::getInstance("divisions", "JoomLeagueModel"); if ($res = $mdlDivisions->getDivisions($project_id)) { $divisions = array_merge($divisions, $res); } $lists['divisions'] = $divisions; unset($divisions); $this->user = $user; $this->lists = $lists; $this->items = $items; $this->projectws = $projectws; $this->division = $division; $this->total = $total; $this->pagination = $pagination; $this->request_url = $uri; $this->addToolbar(); parent::display($tpl); }
function _displayModal($tpl) { JToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PERSON_ASSIGN_DESCR')); // Do not allow cache JResponse::allowCache(false); $document = JFactory::getDocument(); $prjid = array(); $prjid = JRequest::getVar('prjid', array(0), 'post', 'array'); $proj_id = (int) $prjid[0]; //build the html select list for projects $projects[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_PROJECT'), 'id', 'name'); if ($res = JoomleagueHelper::getProjects()) { $projects = array_merge($projects, $res); } $lists['projects'] = JHtmlSelect::genericlist($projects, 'prjid[]', 'class="inputbox" onChange="this.form.submit();" style="width:170px"', 'id', 'name', $proj_id); unset($projects); $projectteams[] = JHtmlSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM'), 'value', 'text'); // if a project is active we show the teams select list if ($proj_id > 0) { if ($res = JoomleagueHelper::getProjectteams($proj_id)) { $projectteams = array_merge($projectteams, $res); } $lists['projectteams'] = JHtmlSelect::genericlist($projectteams, 'xtid[]', 'class="inputbox" style="width:170px"', 'value', 'text'); unset($projectteams); } $this->lists = $lists; $this->project_id = $proj_id; parent::display($tpl); }
function _displayDefault($tpl) { $app = JFactory::getApplication(); $jinput = $app->input; $option = $jinput->getCmd('option'); $db = JFactory::getDbo(); $uri = JFactory::getURI(); $node = $this->get('Data'); $total = $this->get('Total'); $pagination = $this->get('Pagination'); $model = $this->getModel(); $projectws = $this->get('Data', 'project'); $treetows = $this->get('Data', 'treeto'); //build the html options for teams $team_id[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM')); if ($projectteams = $model->getProjectTeamsOptions()) { $team_id = array_merge($team_id, $projectteams); } $lists['team'] = $team_id; unset($team_id); $style = 'style="background-color: #dddddd; '; $style .= 'border: 0px solid white;'; $style .= 'font-weight: normal; '; $style .= 'font-size: 8pt; '; $style .= 'width: 150px; '; $style .= 'font-family: verdana; '; $style .= 'text-align: center;"'; $path = 'media/com_joomleague/treebracket/onwhite/'; // build the html radio for adding into new round / exist round $createYesNo = array(0 => JText::_('COM_JOOMLEAGUE_GLOBAL_NO'), 1 => JText::_('COM_JOOMLEAGUE_GLOBAL_YES')); $createLeftRight = array(0 => JText::_('L'), 1 => JText::_('R')); $ynOptions = array(); $lrOptions = array(); foreach ($createYesNo as $key => $value) { $ynOptions[] = JHtmlSelect::option($key, $value); } foreach ($createLeftRight as $key => $value) { $lrOptions[] = JHtmlSelect::option($key, $value); } $lists['addToRound'] = JHtmlSelect::radiolist($ynOptions, 'addToRound', 'class="inputbox"', 'value', 'text', 1); // build the html radio for auto publish new matches $lists['autoPublish'] = JHtmlSelect::radiolist($ynOptions, 'autoPublish', 'class="inputbox"', 'value', 'text', 0); // build the html radio for Left or Right redepth $lists['LRreDepth'] = JHtmlSelect::radiolist($lrOptions, 'LRreDepth', 'class="inputbox"', 'value', 'text', 0); // build the html radio for create new treeto $lists['createNewTreeto'] = JHtmlSelect::radiolist($ynOptions, 'createNewTreeto', 'class="inputbox"', 'value', 'text', 1); $this->lists = $lists; $this->node = $node; // @todo fix! // $this->roundcode',$roundcode); $this->style = $style; $this->path = $path; $this->projectws = $projectws; $this->treetows = $treetows; $this->total = $total; $this->pagination = $pagination; $this->request_url = $uri->toString(); parent::display($tpl); }
protected function getInput() { $options = array(); $options[] = JHTML::_('select.option', '', JText::_('COM_BOOKPRO_SELECT_DURATION')); for ($i = 1; $i < 40; $i++) { $options[] = JHtmlSelect::option($i, $i, 'value', 'text'); } return JHTML::_('select.genericlist', $options, $this->name, ' class="inputbox" ', 'value', 'text', $this->value, $this->id); }
static function getFilterInteger($field, $noSelectText, $start, $end, $selected, $autoSubmit = false, $customParams = '') { $options = array(); $options[] = JHtmlSelect::option(0, $noSelectText); for ($i = $start; $i <= $end; $i++) { $options[] = JHtmlSelect::option($i, $i); } $customParams = array(trim($customParams)); if ($autoSubmit) { $customParams[] = 'onchange="this.form.submit()"'; } $customParams = implode(' ', $customParams); return JHTML::_('select.genericlist', $options, $field, $customParams, 'value', 'text', $selected); }
public static function getProductOptionValues($option_id, $default, $product_optionvalue_id) { //load option values for this option id from the general and pass the default value to it. $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('ov.optionvalue_id,ov.optionvalue_name'); $query->from('#__k2store_optionvalues AS ov'); $query->where('ov.option_id=' . $option_id); $query->order('ov.ordering ASC'); $db->setQuery($query); $rows = $db->loadObjectList(); $list = array(); if (count($rows)) { foreach ($rows as $row) { $options[] = JHtmlSelect::option($row->optionvalue_id, $row->optionvalue_name); } $name = "optionvalue_id[{$product_optionvalue_id}]"; $attribs = array('class' => 'inputbox', 'size' => '1', 'title' => JText::_('K2STORE_SELECT_AN_OPTION')); $list = JHtmlSelect::genericlist($options, $name, $attribs, 'value', 'text', $default, 'optionvalue_id'); } return $list; }
function _displayDefault($tpl) { $option = JRequest::getCmd('option'); $uri = JFactory::getURI(); $url = $uri->toString(); $matchday = $this->get('Data'); $total = $this->get('Total'); $pagination = $this->get('Pagination'); $model = $this->getModel(); $projectws = $this->get('Data', 'project'); $teams = $this->get('projectteams'); $state = $this->get('state'); $filter_order = $state->get('filter_order'); $filter_order_Dir = $state->get('filter_order_Dir'); // table ordering $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; $massadd = $this->input->get('massadd'); //build the html options for divisions $divisions[] = JHtmlSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_DIVISION')); $mdlDivisions = JModelLegacy::getInstance("divisions", "JoomLeagueModel"); if ($res = $mdlDivisions->getDivisions($projectws->id)) { $divisions = array_merge($divisions, $res); } $lists['divisions'] = $divisions; $this->massadd = $massadd; $this->countProjectTeams = count($teams); $this->lists = $lists; $this->matchday = $matchday; $this->projectws = $projectws; $this->pagination = $pagination; $this->request_url = $url; $populate = 0; $this->populate = $populate; $this->addToolbar(); parent::display($tpl); }
protected function getOptions() { $options = array(); $this->value = array(); // The selected values // Deduce table name from conventional names $input = new F0FInput(); $component_prefix = ucfirst(str_replace('com_', '', $input->getString('option'))); $view_prefix = ucfirst($input->getString('view')); // Deduce name of the relation $relation_name = @F0FInflector::pluralize($this->element['name']); // todo remove silence operator // Create a relation's model instance $relation_model = F0FModel::getTmpInstance(ucfirst($relation_name), $component_prefix . 'Model'); // Get the name of key and title field $table = $relation_model->getTable(); $key_field = $table->getKeyName(); $value_field = $table->getColumnAlias('title'); // List all items from the referred table foreach ($relation_model->getItemList(true) as $value) { $options[] = JHtmlSelect::option($value->{$key_field}, $value->{$value_field}); } // Don't load selected values if item is new if ($id = $input->getInt('id')) { // Create an instance of the correct table and load this item $table = F0FTable::getInstance($view_prefix, $component_prefix . 'Table'); // Load the instance of this item, based on ID query parameter $table->load($id); // Get the relation $relation = $table->getRelations()->getMultiple($relation_name); // Add existent relation as default selected values on list foreach ($relation as $item) { $this->value[] = $item->getId(); } } return $options; }
/** * Test the option method. * * @param object $expected Expected Object. * @param string $value The value of the option * @param string $text The text for the option * @param mixed $optKey If a string, the returned object property name for * the value. If an array, options. Valid options are: * attr: String|array. Additional attributes for this option. * Defaults to none. * disable: Boolean. If set, this option is disabled. * label: String. The value for the option label. * option.attr: The property in each option array to use for * additional selection attributes. Defaults to none. * option.disable: The property that will hold the disabled state. * Defaults to "disable". * option.key: The property that will hold the selection value. * Defaults to "value". * option.label: The property in each option array to use as the * selection label attribute. If a "label" option is provided, defaults to * "label", if no label is given, defaults to null (none). * option.text: The property that will hold the the displayed text. * Defaults to "text". If set to null, the option array is assumed to be a * list of displayable scalars. * @param string $optText The property that will hold the the displayed text. This * parameter is ignored if an options array is passed. * @param boolean $disable Not used. * * @return void * * @dataProvider getOptionData * @since 3.2 */ public function testOption($expected, $value, $text = '', $optKey = 'value', $optText = 'text', $disable = false) { $this->assertEquals((object) $expected, JHtmlSelect::option($value, $text, $optKey, $optText, $disable)); }
function display($tpl = null) { $option = JRequest::getCmd('option'); $mainframe = JFactory::getApplication(); $uri = JFactory::getURI(); $params = JComponentHelper::getParams($option); $filter_state = $mainframe->getUserStateFromRequest($option . 'mc_filter_state', 'filter_state', '', 'word'); $filter_order = $mainframe->getUserStateFromRequest($option . 'mc_filter_order', 'filter_order', 'mc.match_number', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'mc_filter_order_Dir', 'filter_order_Dir', '', 'word'); $search = $mainframe->getUserStateFromRequest($option . 'mc_search', 'search', '', 'string'); $search_mode = $mainframe->getUserStateFromRequest($option . 'mc_search_mode', 'search_mode', '', 'string'); $division = $mainframe->getUserStateFromRequest($option . 'mc_division', 'division', '', 'string'); $project_id = $mainframe->getUserState($option . 'project'); $search = JString::strtolower($search); $matches = $this->get('Data'); $total = $this->get('Total'); $pagination = $this->get('Pagination'); $model = $this->getModel(); $projectteams = $model->getProjectTeams(); // state filter $lists['state'] = JHtml::_('grid.state', $filter_state); // table ordering $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; // search filter $lists['search'] = $search; $lists['search_mode'] = $search_mode; $projectws = $this->get('Data', 'project'); $roundws = $this->get('Data', 'round'); //build the html options for teams foreach ($matches as $row) { $teams[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM')); $divhomeid = 0; //apply the filter only if both teams are from the same division //teams are not from the same division in tournament mode with divisions if ($row->divhomeid == $row->divawayid) { $divhomeid = $row->divhomeid; } else { $row->divhomeid = 0; $row->divawayid = 0; } if ($projectteams = $model->getProjectTeamsOptions($divhomeid)) { $teams = array_merge($teams, $projectteams); } $lists['teams_' + $divhomeid] = $teams; unset($teams); } //build the html selectlist for rounds $model = $this->getModel('project'); $ress = JoomleagueHelper::getRoundsOptions($model->_id, 'ASC', true); $project_roundslist = array(); foreach ($ress as $res) { $project_roundslist[] = JHtml::_('select.option', $res->id, $this->getRoundDescription($res)); } $lists['project_rounds'] = JHtml::_('select.genericList', $project_roundslist, 'rid[]', 'class="inputbox" ' . 'onChange="document.getElementById(\'short_act\').value=\'rounds\';' . 'document.roundForm.submit();" ', 'value', 'text', $roundws->id); $lists['project_rounds2'] = JHtml::_('select.genericList', $project_roundslist, 'rid', 'class="inputbox" ', 'value', 'text', $roundws->id); //build the html selectlist for matches $overall_config = $model->getTemplateConfig('overall'); if (isset($overall_config['use_jl_substitution']) && $overall_config['use_jl_substitution'] || isset($overall_config['use_jl_events']) && $overall_config['use_jl_events']) { $match_list = array(); $mdd[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_MATCH')); foreach ($matches as $row) { $mdd[] = JHtml::_('select.option', 'index3.php?option=com_joomleague&task=match.editEvents&cid[0]=' . $row->id, $row->team1 . '-' . $row->team2); } $RosterEventMessage = isset($overall_config['use_jl_substitution']) && $overall_config['use_jl_substitution'] ? JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_LINEUP') : ''; if (isset($overall_config['use_jl_events']) && $overall_config['use_jl_events']) { if (isset($overall_config['use_jl_events']) && $overall_config['use_jl_substitution']) { $RosterEventMessage .= ' / '; } $RosterEventMessage .= JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_EVENTS'); } $RosterEventMessage .= $RosterEventMessage != '' ? ':' : ''; $lists['RosterEventMessage'] = $RosterEventMessage; $lists['round_matches'] = JHtml::_('select.genericList', $mdd, 'mdd', 'id="mdd" class="inputbox" onchange="jl_load_new_match_events(this,\'eventscontainer\')"', 'value', 'text', '0'); } //build the html options for extratime $match_result_type[] = JHtmlSelect::option('0', JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_RT')); $match_result_type[] = JHtmlSelect::option('1', JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_OT')); $match_result_type[] = JHtmlSelect::option('2', JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_SO')); $lists['match_result_type'] = $match_result_type; unset($match_result_type); //build the html options for massadd create type $createTypes = array(0 => JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD'), 1 => JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_1'), 2 => JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_2')); $ctOptions = array(); foreach ($createTypes as $key => $value) { $ctOptions[] = JHtmlSelect::option($key, $value); } $lists['createTypes'] = JHtmlSelect::genericlist($ctOptions, 'ct[]', 'class="inputbox" onchange="javascript:displayTypeView();"', 'value', 'text', 1, 'ct'); unset($createTypes); // build the html radio for adding into one round / all rounds $createYesNo = array(0 => JText::_('COM_JOOMLEAGUE_GLOBAL_NO'), 1 => JText::_('COM_JOOMLEAGUE_GLOBAL_YES')); $ynOptions = array(); foreach ($createYesNo as $key => $value) { $ynOptions[] = JHtmlSelect::option($key, $value); } $lists['addToRound'] = JHtmlSelect::radiolist($ynOptions, 'addToRound', 'class="inputbox"', 'value', 'text', 0); // build the html radio for auto publish new matches $lists['autoPublish'] = JHtmlSelect::radiolist($ynOptions, 'autoPublish', 'class="inputbox"', 'value', 'text', 0); //build the html options for divisions $divisions[] = JHtmlSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_DIVISION')); $mdlDivisions = JModelLegacy::getInstance("divisions", "JoomLeagueModel"); if ($res = $mdlDivisions->getDivisions($project_id)) { $divisions = array_merge($divisions, $res); } $lists['divisions'] = $divisions; unset($divisions); $this->division = $division; $this->user = JFactory::getUser(); $this->lists = $lists; $this->matches = $matches; $this->ress = $ress; $this->projectws = $projectws; $this->roundws = $roundws; $this->pagination = $pagination; $this->teams = $projectteams; $this->request_url = $uri->toString(); $this->prefill = $params->get('use_prefilled_match_roster', 0); $this->addToolbar(); parent::display($tpl); }
public static function releaseStates(array $attribs = array()) { //-- aka autoload :P JHtml::_('select.option', 'foo'); $attribs = array_merge(array('name' => 'releaseState', 'id' => 'releaseState', 'selected' => 'release'), $attribs); //$name = isset($attribs['name']) ? $attribs['name'] $options = array(); $states = array('release', 'development'); foreach ($states as $state) { $options[] = JHtmlSelect::option($state, ucfirst($state)); } return JHtmlSelect::genericlist($options, $attribs['name'], $attribs, 'value', 'text', $attribs['selected'], $attribs['id']); }
static function getStateList($name, $selected) { $data[] = JHtmlSelect::option('1', JText::_('JPUBLISHED')); $data[] = JHtmlSelect::option('0', JText::_('JUNPUBLISHED')); return JHtmlSelect::genericlist($data, $name, 'class="inputbox"', 'value', 'text', $selected, 'id_state'); }
static function getDurationBox($selected, $name = 'days') { $options = array(); $options[] = JHtmlSelect::option('', JText::_('COM_BOOKPRO_SELECT_DURATION')); $options[] = JHtmlSelect::option(1, JText::_('COM_BOOKPRO_TOUR_DAYTRIP')); for ($i = 2; $i < 40; $i++) { $options[] = JHtmlSelect::option($i, JText::sprintf('COM_BOOKPRO_DAYS_TXT', $i)); } return JHtmlSelect::genericlist($options, $name, 'class="input"', 'value', 'text', $selected); }
public static function getLuggageBox($selected, $n = 59, $start = 0, $name = 'transport_luggage') { $options = array(); for ($i = $start; $i <= $n; $i++) { $otext = $i; $options[] = JHtmlSelect::option($i, $otext); } return JHtmlSelect::genericlist($options, $name, 'class="input-mini"', 'value', 'text', $selected); }
public static function getTourCategorySelect($select) { $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select('c.*'); $query->from('#__bookpro_category AS c'); $query->innerJoin('#__bookpro_tour AS t ON c.id=t.cat_id'); $query->group('c.id'); $query->order('ordering ASC'); $sql = (string) $query; $db->setQuery($sql); $items = $db->loadObjectList(); $options = array(); $options[] = JHtmlSelect::option(0, JText::_('MOD_BOOKPRO_TRAVEL_SEARCH_SELECT_CATEGORY')); for ($i = 0; $i < count($items); $i++) { $options[] = JHtmlSelect::option($items[$i]->id, $items[$i]->title); } // array_unshift ( $flight, $temp ); return JHtml::_('select.genericlist', $options, 'cat_id', 'class="input-medium"', 'value', 'text', $select); }
function _displayEditlist($tpl) { $option = JRequest::getCmd('option'); $mainframe = JFactory::getApplication(); $project_id = $mainframe->getUserState($option . 'project'); $node_id = $mainframe->getUserState($option . 'node_id'); $uri = JFactory::getURI(); $treetomatchs = $this->get('Data'); $total = $this->get('Total'); $model = $this->getModel(); $projectws = $this->get('Data', 'project'); $nodews = $this->get('Data', 'node'); //build the html select list for node assigned matches $ress = array(); $res1 = array(); $notusedmatches = array(); if ($ress = $model->getNodeMatches($node_id)) { $matcheslist = array(); foreach ($ress as $res) { if (empty($res1->info)) { $node_matcheslist[] = JHtmlSelect::option($res->value, $res->text); } else { $node_matcheslist[] = JHtmlSelect::option($res->value, $res->text . ' (' . $res->info . ')'); } } $lists['node_matches'] = JHtmlSelect::genericlist($node_matcheslist, 'node_matcheslist[]', ' style="width:250px; height:300px;" class="inputbox" multiple="true" size="' . min(30, count($ress)) . '"', 'value', 'text'); } else { $lists['node_matches'] = '<select name="node_matcheslist[]" id="node_matcheslist" style="width:250px; height:300px;" class="inputbox" multiple="true" size="10"></select>'; } if ($ress1 = $model->getMatches()) { if ($ress = $model->getNodeMatches($node_id)) { foreach ($ress1 as $res1) { $used = 0; foreach ($ress as $res) { if ($res1->value == $res->value) { $used = 1; } } if ($used == 0 && !empty($res1->info)) { $notusedmatches[] = JHtmlSelect::option($res1->value, $res1->text . ' (' . $res1->info . ')'); } elseif ($used == 0 && empty($res1->info)) { $notusedmatches[] = JHtmlSelect::option($res1->value, $res1->text); } } } else { foreach ($ress1 as $res1) { if (empty($res1->info)) { $notusedmatches[] = JHtmlSelect::option($res1->value, $res1->text); } else { $notusedmatches[] = JHtmlSelect::option($res1->value, $res1->text . ' (' . $res1->info . ')'); } } } } else { JError::raiseWarning('ERROR_CODE', '<br />' . JText::_('COM_JOOMLEAGUE_ADMIN_TREETOMATCH_ADD_MATCH') . '<br /><br />'); } //build the html select list for matches if (count($notusedmatches) > 0) { $lists['matches'] = JHtmlSelect::genericlist($notusedmatches, 'matcheslist[]', ' style="width:250px; height:300px;" class="inputbox" multiple="true" size="' . min(30, count($notusedmatches)) . '"', 'value', 'text'); } else { $lists['matches'] = '<select name="matcheslist[]" id="matcheslist" style="width:250px; height:300px;" class="inputbox" multiple="true" size="10"></select>'; } unset($res); unset($res1); unset($notusedmatches); $this->user = JFactory::getUser(); $this->lists = $lists; $this->treetomatchs = $treetomatchs; $this->projectws = $projectws; $this->nodews = $nodews; $this->pagination = $pagination; $this->request_url = $uri->toString(); parent::display($tpl); }
$query = $db->getQuery(true); $query->select('id, title, module, position'); $query->from('#__modules'); $query->where('published = 1'); $query->where('client_id = 0'); $query->order('title'); $db->setQuery($query); $modules = $db->loadObjectList(); $tplXml = PLAZART_TEMPLATE_PATH . '/templateDetails.xml'; $xml = JFactory::getXML($tplXml); $xml_position = $xml->positions->position; $arr_pos = array(); $arr_pos[] = JHtmlSelect::option('', 'Select a position'); $arr_pos[] = JHtmlSelect::option('component', 'component'); for ($i = 0; $i < count($xml_position); $i++) { $arr_pos[] = JHtmlSelect::option((string) $xml_position[$i], (string) $xml_position[$i]); } ?> <div id="plazart-admin-megamenu" class="hidden plazart-admin-megamenu"> <div class="admin-inline-toolbox clearfix"> <div class="plazart-admin-mm-row clearfix"> <div id="plazart-admin-mm-intro" class="pull-left"> <h3><?php echo JTexT::_('PLAZART_NAVIGATION_MM_TOOLBOX'); ?> </h3> <p><?php echo JTexT::_('PLAZART_NAVIGATION_MM_TOOLBOX_DESC'); ?>
function _displayDefault($tpl) { $document = JFactory::getDocument(); $option = JRequest::getCmd('option'); $mainframe = JFactory::getApplication(); $project_id = $mainframe->getUserState($option . 'project'); $db = JFactory::getDbo(); $uri = JFactory::getURI(); $baseurl = JUri::root(); $document->addScript($baseurl . 'administrator/components/com_joomleague/assets/js/autocompleter/1_4/Autocompleter.js'); $document->addScript($baseurl . 'administrator/components/com_joomleague/assets/js/autocompleter/1_4/Autocompleter.Request.js'); $document->addScript($baseurl . 'administrator/components/com_joomleague/assets/js/autocompleter/1_4/Observer.js'); $document->addScript($baseurl . 'administrator/components/com_joomleague/assets/js/autocompleter/1_4/quickaddteam.js'); $document->addStyleSheet($baseurl . 'administrator/components/com_joomleague/assets/css/Autocompleter.css'); $filter_state = $mainframe->getUserStateFromRequest($option . 'tl_filter_state', 'filter_state', '', 'word'); $filter_order = $mainframe->getUserStateFromRequest($option . 'tl_filter_order', 'filter_order', 't.name', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'tl_filter_order_Dir', 'filter_order_Dir', '', 'word'); $search = $mainframe->getUserStateFromRequest($option . 'tl_search', 'search', '', 'string'); $division = $mainframe->getUserStateFromRequest($option . 'tl_division', 'division', '', 'string'); $search_mode = $mainframe->getUserStateFromRequest($option . 'tl_search_mode', 'search_mode', '', 'string'); $search = JString::strtolower($search); $projectteam = $this->get('Data'); $total = $this->get('Total'); $pagination = $this->get('Pagination'); $model = $this->getModel(); // state filter $lists['state'] = JHtml::_('grid.state', $filter_state); // search filter $lists['search'] = $search; $lists['search_mode'] = $search_mode; // table ordering $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; //build the html options for divisions $divisions[] = JHtmlSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_DIVISION')); $mdlDivisions = JModelLegacy::getInstance("divisions", "JoomLeagueModel"); if ($res = $mdlDivisions->getDivisions($project_id)) { $divisions = array_merge($divisions, $res); } $lists['divisions'] = $divisions; unset($divisions); $projectws = $this->get('Data', 'project'); $this->user = JFactory::getUser(); $this->lists = $lists; $this->projectteam = $projectteam; $this->division = $division; $this->projectws = $projectws; $this->pagination = $pagination; $this->request_url = $uri->toString(); $this->addToolbar(); parent::display($tpl); }