当前位置: 首页>>代码示例>>PHP>>正文


PHP K2HelperHTML::subMenu方法代码示例

本文整理汇总了PHP中K2HelperHTML::subMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP K2HelperHTML::subMenu方法的具体用法?PHP K2HelperHTML::subMenu怎么用?PHP K2HelperHTML::subMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在K2HelperHTML的用法示例。


在下文中一共展示了K2HelperHTML::subMenu方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $user = JFactory::getUser();
     $option = JRequest::getCmd('option');
     $view = JRequest::getCmd('view');
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
     $limitstart = $mainframe->getUserStateFromRequest($option . $view . '.limitstart', 'limitstart', 0, 'int');
     $filter_order = $mainframe->getUserStateFromRequest($option . $view . 'filter_order', 'filter_order', '', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . $view . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $model = $this->getModel();
     $total = $model->getTotalGroups();
     if ($limitstart > $total - $limit) {
         $limitstart = max(0, (int) (ceil($total / $limit) - 1) * $limit);
         JRequest::setVar('limitstart', $limitstart);
     }
     $extraFieldGroups = $model->getGroups();
     $this->assignRef('rows', $extraFieldGroups);
     jimport('joomla.html.pagination');
     $pageNav = new JPagination($total, $limitstart, $limit);
     $this->assignRef('page', $pageNav);
     JToolBarHelper::title(JText::_('K2_EXTRA_FIELD_GROUPS'), 'k2.png');
     JToolBarHelper::deleteList('', 'remove', 'K2_DELETE');
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     if (K2_JVERSION != '15') {
         JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
     } else {
         $toolbar = JToolBar::getInstance('toolbar');
         $toolbar->appendButton('Popup', 'config', 'Parameters', 'index.php?option=com_k2&view=settings');
     }
     $this->loadHelper('html');
     K2HelperHTML::subMenu();
     parent::display($tpl);
 }
开发者ID:grchis,项目名称:Site-Auto,代码行数:35,代码来源:view.html.php

示例2: display

 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('//ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css');
     $document->addStyleSheet(JURI::root(true) . '/media/k2/assets/css/theme.css?v=2.6.8');
     $document->addStyleSheet(JURI::root(true) . '/media/k2/assets/css/elfinder.min.css?v=2.6.8');
     $type = JRequest::getCmd('type');
     $fieldID = JRequest::getCmd('fieldID');
     if ($type == 'video') {
         $mimes = "'video','audio'";
     } elseif ($type == 'image') {
         $mimes = "'image'";
     } else {
         $mimes = '';
     }
     $this->assignRef('mimes', $mimes);
     $this->assignRef('type', $type);
     $this->assignRef('fieldID', $fieldID);
     if ($mainframe->isAdmin()) {
         $toolbar = JToolBar::getInstance('toolbar');
         if (K2_JVERSION != '15') {
             JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
         } else {
             $toolbar->appendButton('Popup', 'config', 'K2_PARAMETERS', 'index.php?option=com_k2&view=settings');
         }
         JToolBarHelper::title(JText::_('K2_MEDIA_MANAGER'), 'k2.png');
         $this->loadHelper('html');
         K2HelperHTML::subMenu();
     }
     parent::display($tpl);
 }
开发者ID:educakanchay,项目名称:educa,代码行数:33,代码来源:view.html.php

示例3: display

 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $user = JFactory::getUser();
     $option = JRequest::getCmd('option');
     $view = JRequest::getCmd('view');
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
     $limitstart = $mainframe->getUserStateFromRequest($option . $view . '.limitstart', 'limitstart', 0, 'int');
     $filter_order = $mainframe->getUserStateFromRequest($option . $view . 'filter_order', 'filter_order', 'id', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . $view . 'filter_order_Dir', 'filter_order_Dir', 'DESC', 'word');
     $filter_state = $mainframe->getUserStateFromRequest($option . $view . 'filter_state', 'filter_state', -1, 'int');
     $search = $mainframe->getUserStateFromRequest($option . $view . 'search', 'search', '', 'string');
     $search = JString::strtolower($search);
     $model = $this->getModel();
     $total = $model->getTotal();
     $task = JRequest::getCmd('task');
     if ($limitstart > $total - $limit) {
         $limitstart = max(0, (int) (ceil($total / $limit) - 1) * $limit);
         JRequest::setVar('limitstart', $limitstart);
     }
     $tags = $model->getData();
     foreach ($tags as $key => $tag) {
         $tag->numOfItems = $model->countTagItems($tag->id);
         $tag->status = K2_JVERSION == '15' ? JHTML::_('grid.published', $tag, $key) : JHtml::_('jgrid.published', $tag->published, $key, '', $task != 'element');
     }
     $this->assignRef('rows', $tags);
     jimport('joomla.html.pagination');
     $pageNav = new JPagination($total, $limitstart, $limit);
     $this->assignRef('page', $pageNav);
     $lists = array();
     $lists['search'] = $search;
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     $filter_state_options[] = JHTML::_('select.option', -1, JText::_('K2_SELECT_STATE'));
     $filter_state_options[] = JHTML::_('select.option', 1, JText::_('K2_PUBLISHED'));
     $filter_state_options[] = JHTML::_('select.option', 0, JText::_('K2_UNPUBLISHED'));
     $lists['state'] = JHTML::_('select.genericlist', $filter_state_options, 'filter_state', '', 'value', 'text', $filter_state);
     $this->assignRef('lists', $lists);
     JToolBarHelper::title(JText::_('K2_TAGS'), 'k2.png');
     JToolBarHelper::publishList();
     JToolBarHelper::unpublishList();
     JToolBarHelper::deleteList('', 'remove', 'K2_DELETE');
     JToolBarHelper::editList();
     JToolBarHelper::addNew();
     if (K2_JVERSION != '15') {
         JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
     } else {
         $toolbar = JToolBar::getInstance('toolbar');
         $toolbar->appendButton('Popup', 'config', 'Parameters', 'index.php?option=com_k2&view=settings');
     }
     $this->loadHelper('html');
     K2HelperHTML::subMenu();
     parent::display($tpl);
 }
开发者ID:Gskflute,项目名称:joomla25,代码行数:54,代码来源:view.html.php

示例4: display


//.........这里部分代码省略.........
     $lists['featured'] = JHTML::_('select.genericlist', $filter_featured_options, 'filter_featured', '', 'value', 'text', $filter_featured);
     if ($params->get('showTagFilter')) {
         $tagsModel = K2Model::getInstance('Tags', 'K2Model');
         $options = $tagsModel->getFilter();
         $option = new JObject();
         $option->id = 0;
         $option->name = JText::_('K2_SELECT_TAG');
         array_unshift($options, $option);
         $lists['tag'] = JHTML::_('select.genericlist', $options, 'tag', '', 'id', 'name', $tag);
     }
     if (version_compare(JVERSION, '1.6.0', 'ge')) {
         $languages = JHTML::_('contentlanguage.existing', true, true);
         array_unshift($languages, JHTML::_('select.option', '', JText::_('K2_SELECT_LANGUAGE')));
         $lists['language'] = JHTML::_('select.genericlist', $languages, 'language', '', 'value', 'text', $language);
     }
     $this->assignRef('lists', $lists);
     jimport('joomla.html.pagination');
     $pageNav = new JPagination($total, $limitstart, $limit);
     $this->assignRef('page', $pageNav);
     $filters = array();
     $columns = array();
     $dispatcher = JDispatcher::getInstance();
     JPluginHelper::importPlugin('k2');
     $dispatcher->trigger('onK2BeforeAssignFilters', array(&$filters));
     $this->assignRef('filters', $filters);
     $dispatcher->trigger('onK2BeforeAssignColumns', array(&$columns));
     $this->assignRef('columns', $columns);
     JToolBarHelper::title(JText::_('K2_ITEMS'), 'k2.png');
     if ($filter_trash == 1) {
         JToolBarHelper::custom('restore', 'publish.png', 'publish_f2.png', 'K2_RESTORE', true);
         JToolBarHelper::deleteList('K2_ARE_YOU_SURE_YOU_WANT_TO_DELETE_SELECTED_ITEMS', 'remove', 'K2_DELETE');
     } else {
         $params = JComponentHelper::getParams('com_k2');
         $toolbar = JToolBar::getInstance('toolbar');
         K2_JVERSION == '30' ? JToolBarHelper::custom('featured', 'featured.png', 'featured_f2.png', 'K2_TOGGLE_FEATURED_STATE', true) : JToolBarHelper::custom('featured', 'default.png', 'default_f2.png', 'K2_TOGGLE_FEATURED_STATE', true);
         JToolBarHelper::publishList();
         JToolBarHelper::unpublishList();
         JToolBarHelper::custom('move', 'move.png', 'move_f2.png', 'K2_MOVE', true);
         JToolBarHelper::custom('copy', 'copy.png', 'copy_f2.png', 'K2_COPY', true);
         JToolBarHelper::editList();
         JToolBarHelper::addNew();
         JToolBarHelper::trash('trash');
     }
     $toolbar = JToolBar::getInstance('toolbar');
     if (K2_JVERSION != '15') {
         JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
     } else {
         $toolbar->appendButton('Popup', 'config', 'K2_PARAMETERS', 'index.php?option=com_k2&view=settings');
     }
     // Import Joomla! content button
     if ($user->gid > 23 && !$params->get('hideImportButton')) {
         $buttonUrl = JURI::base() . 'index.php?option=com_k2&view=items&task=import';
         $buttonText = JText::_('K2_IMPORT_JOOMLA_CONTENT');
         if (K2_JVERSION == '30') {
             $button = '<a id="K2ImportContentButton" class="btn btn-small" href="' . $buttonUrl . '"><i class="icon-archive "></i>' . $buttonText . '</a>';
         } else {
             $button = '<a id="K2ImportContentButton" href="' . $buttonUrl . '"><span class="icon-32-archive" title="' . $buttonText . '"></span>' . $buttonText . '</a>';
         }
         $toolbar->appendButton('Custom', $button);
     }
     $this->loadHelper('html');
     K2HelperHTML::subMenu();
     $template = $mainframe->getTemplate();
     $this->assignRef('template', $template);
     $this->assignRef('filter_featured', $filter_featured);
     $this->assignRef('filter_trash', $filter_trash);
     $this->assignRef('user', $user);
     if (K2_JVERSION != '15') {
         $dateFormat = JText::_('K2_J16_DATE_FORMAT');
     } else {
         $dateFormat = JText::_('K2_DATE_FORMAT');
     }
     $this->assignRef('dateFormat', $dateFormat);
     $ordering = ($this->lists['order'] == 'i.ordering' || $this->lists['order'] == 'category' || $this->filter_featured > 0 && $this->lists['order'] == 'i.featured_ordering') && !$this->filter_trash;
     $this->assignRef('ordering', $ordering);
     JTable::addIncludePath(JPATH_COMPONENT . DS . 'tables');
     $table = JTable::getInstance('K2Item', 'Table');
     $this->assignRef('table', $table);
     // Joomla! 3.0 drag-n-drop sorting variables
     if (K2_JVERSION == '30') {
         if ($ordering) {
             $action = $this->filter_featured == 1 ? 'savefeaturedorder' : 'saveorder';
             JHtml::_('sortablelist.sortable', 'k2ItemsList', 'adminForm', strtolower($this->lists['order_Dir']), 'index.php?option=com_k2&view=items&task=' . $action . '&format=raw');
         }
         $document = JFactory::getDocument();
         $document->addScriptDeclaration('
         Joomla.orderTable = function() {
             table = document.getElementById("sortTable");
             direction = document.getElementById("directionTable");
             order = table.options[table.selectedIndex].value;
             if (order != \'' . $this->lists['order'] . '\') {
                 dirn = \'asc\';
         } else {
             dirn = direction.options[direction.selectedIndex].value;
         }
         Joomla.tableOrdering(order, dirn, "");
         }');
     }
     parent::display($tpl);
 }
开发者ID:Roma48,项目名称:abazherka_old,代码行数:101,代码来源:view.html.php

示例5: display


//.........这里部分代码省略.........
             } else {
                 $users[$i]->blockStatus .= '<a title="' . JText::_('K2_DISABLE') . '" onclick="return listItemTask(\'cb' . $i . ',\'disable\')" href="#"><img alt="' . JText::_('K2_DISABLED') . '" src="images/tick.png"></a>';
             }
             if ($task == 'element') {
                 $users[$i]->blockStatus = strip_tags($users[$i]->blockStatus, '<img>');
             }
         } else {
             $states = array(1 => array('', 'K2_LOGGED_IN', 'K2_LOGGED_IN', 'K2_LOGGED_IN', false, 'publish', 'publish'), 0 => array('', 'K2_NOT_LOGGED_IN', 'K2_NOT_LOGGED_IN', 'K2_NOT_LOGGED_IN', false, 'unpublish', 'unpublish'));
             $users[$i]->loggedInStatus = JHtml::_('jgrid.state', $states, $users[$i]->loggedin, $i, '', false);
             $states = array(0 => array('disable', 'K2_ENABLED', 'K2_DISABLE', 'K2_ENABLED', false, 'publish', 'publish'), 1 => array('enable', 'K2_DISABLED', 'K2_ENABLE', 'K2_DISABLED', false, 'unpublish', 'unpublish'));
             $users[$i]->blockStatus = JHtml::_('jgrid.state', $states, $users[$i]->block, $i, '', $task != 'element');
         }
     }
     $this->assignRef('rows', $users);
     jimport('joomla.html.pagination');
     $pageNav = new JPagination($total, $limitstart, $limit);
     $this->assignRef('page', $pageNav);
     $lists = array();
     $lists['search'] = $search;
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     $filter_status_options[] = JHTML::_('select.option', -1, JText::_('K2_SELECT_STATE'));
     $filter_status_options[] = JHTML::_('select.option', 0, JText::_('K2_ENABLED'));
     $filter_status_options[] = JHTML::_('select.option', 1, JText::_('K2_BLOCKED'));
     $lists['status'] = JHTML::_('select.genericlist', $filter_status_options, 'filter_status', '', 'value', 'text', $filter_status);
     $userGroups = $model->getUserGroups();
     $groups[] = JHTML::_('select.option', '0', JText::_('K2_SELECT_JOOMLA_GROUP'));
     foreach ($userGroups as $userGroup) {
         $groups[] = JHTML::_('select.option', $userGroup->value, $userGroup->text);
     }
     $lists['filter_group'] = JHTML::_('select.genericlist', $groups, 'filter_group', '', 'value', 'text', $filter_group);
     $K2userGroups = $model->getUserGroups('k2');
     $K2groups[] = JHTML::_('select.option', '0', JText::_('K2_SELECT_K2_GROUP'));
     foreach ($K2userGroups as $K2userGroup) {
         $K2groups[] = JHTML::_('select.option', $K2userGroup->id, $K2userGroup->name);
     }
     $lists['filter_group_k2'] = JHTML::_('select.genericlist', $K2groups, 'filter_group_k2', '', 'value', 'text', $filter_group_k2);
     $this->assignRef('lists', $lists);
     if (K2_JVERSION != '15') {
         $dateFormat = JText::_('K2_J16_DATE_FORMAT');
     } else {
         $dateFormat = JText::_('K2_DATE_FORMAT');
     }
     $this->assignRef('dateFormat', $dateFormat);
     $template = $mainframe->getTemplate();
     $this->assignRef('template', $template);
     if ($mainframe->isAdmin()) {
         JToolBarHelper::title(JText::_('K2_USERS'), 'k2.png');
         JToolBarHelper::custom('move', 'move.png', 'move_f2.png', 'K2_MOVE', true);
         JToolBarHelper::deleteList('K2_WARNING_YOU_ARE_ABOUT_TO_DELETE_THE_SELECTED_USERS_PERMANENTLY_FROM_THE_SYSTEM', 'delete', 'K2_DELETE');
         JToolBarHelper::publishList('enable', 'K2_ENABLE');
         JToolBarHelper::unpublishList('disable', 'K2_DISABLE');
         JToolBarHelper::editList();
         JToolBarHelper::deleteList('K2_ARE_YOU_SURE_YOU_WANT_TO_RESET_SELECTED_USERS', 'remove', 'K2_RESET_USER_DETAILS');
         $toolbar = JToolBar::getInstance('toolbar');
         if (K2_JVERSION != '15') {
             JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
         } else {
             $toolbar->appendButton('Popup', 'config', 'K2_PARAMETERS', 'index.php?option=com_k2&view=settings');
         }
         $this->loadHelper('html');
         K2HelperHTML::subMenu();
         $user = JFactory::getUser();
         $canImport = false;
         if (K2_JVERSION == '15') {
             $canImport = $user->gid > 23;
         } else {
             $canImport = $user->authorise('core.admin', 'com_k2');
         }
         if ($canImport) {
             if (!$params->get('hideImportButton')) {
                 $buttonUrl = JURI::base() . 'index.php?option=com_k2&amp;view=users&amp;task=import';
                 $buttonText = JText::_('K2_IMPORT_JOOMLA_USERS');
                 if (K2_JVERSION == '30') {
                     $button = '<a id="K2ImportUsersButton" class="btn btn-small" href="' . $buttonUrl . '"><i class="icon-archive "></i>' . $buttonText . '</a>';
                 } else {
                     $button = '<a id="K2ImportUsersButton" href="' . $buttonUrl . '"><span class="icon-32-archive" title="' . $buttonText . '"></span>' . $buttonText . '</a>';
                 }
                 $toolbar->appendButton('Custom', $button);
             }
         }
         $document = JFactory::getDocument();
         $document->addScriptDeclaration('var K2Language = ["' . JText::_('K2_REPORT_USER_WARNING', true) . '"];');
     }
     $isAdmin = $mainframe->isAdmin();
     $this->assignRef('isAdmin', $isAdmin);
     if ($mainframe->isSite()) {
         // CSS
         $document->addStyleSheet(JURI::root(true) . '/media/k2/assets/css/k2.frontend.css?v=2.7.0');
         $document->addStyleSheet(JURI::root(true) . '/templates/system/css/general.css');
         $document->addStyleSheet(JURI::root(true) . '/templates/system/css/system.css');
         if (K2_JVERSION != '15') {
             $document->addStyleSheet(JURI::root(true) . '/administrator/templates/bluestork/css/template.css');
             $document->addStyleSheet(JURI::root(true) . '/media/system/css/system.css');
         } else {
             $document->addStyleSheet(JURI::root(true) . '/administrator/templates/khepri/css/general.css');
         }
     }
     parent::display($tpl);
 }
开发者ID:emavro,项目名称:k2,代码行数:101,代码来源:view.html.php

示例6: display

 function display($tpl = null)
 {
     $mainframe =& JFactory::getApplication();
     $user =& JFactory::getUser();
     $option = JRequest::getCmd('option');
     $view = JRequest::getCmd('view');
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
     $limitstart = $mainframe->getUserStateFromRequest($option . $view . '.limitstart', 'limitstart', 0, 'int');
     $filter_order = $mainframe->getUserStateFromRequest($option . $view . 'filter_order', 'filter_order', 'c.ordering', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . $view . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_trash = $mainframe->getUserStateFromRequest($option . $view . 'filter_trash', 'filter_trash', 0, 'int');
     $filter_category = $mainframe->getUserStateFromRequest($option . $view . 'filter_category', 'filter_category', 0, 'int');
     $filter_state = $mainframe->getUserStateFromRequest($option . $view . 'filter_state', 'filter_state', -1, 'int');
     $language = $mainframe->getUserStateFromRequest($option . $view . 'language', 'language', '', 'string');
     $search = $mainframe->getUserStateFromRequest($option . $view . 'search', 'search', '', 'string');
     $search = JString::strtolower($search);
     $model =& $this->getModel();
     $total = $model->getTotal();
     if ($limitstart > $total - $limit) {
         $limitstart = max(0, (int) (ceil($total / $limit) - 1) * $limit);
         JRequest::setVar('limitstart', $limitstart);
     }
     $categories = $model->getData();
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'category.php';
     $categoryModel = new K2ModelCategory();
     $params =& JComponentHelper::getParams('com_k2');
     $this->assignRef('params', $params);
     if ($params->get('showItemsCounterAdmin')) {
         for ($i = 0; $i < sizeof($categories); $i++) {
             $categories[$i]->numOfItems = $categoryModel->countCategoryItems($categories[$i]->id);
             $categories[$i]->numOfTrashedItems = $categoryModel->countCategoryItems($categories[$i]->id, 1);
         }
     }
     $this->assignRef('rows', $categories);
     jimport('joomla.html.pagination');
     $pageNav = new JPagination($total, $limitstart, $limit);
     $this->assignRef('page', $pageNav);
     $lists = array();
     $lists['search'] = $search;
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     $filter_trash_options[] = JHTML::_('select.option', 0, JText::_('K2_CURRENT'));
     $filter_trash_options[] = JHTML::_('select.option', 1, JText::_('K2_TRASHED'));
     $lists['trash'] = JHTML::_('select.genericlist', $filter_trash_options, 'filter_trash', '', 'value', 'text', $filter_trash);
     $filter_state_options[] = JHTML::_('select.option', -1, JText::_('K2_SELECT_STATE'));
     $filter_state_options[] = JHTML::_('select.option', 1, JText::_('K2_PUBLISHED'));
     $filter_state_options[] = JHTML::_('select.option', 0, JText::_('K2_UNPUBLISHED'));
     $lists['state'] = JHTML::_('select.genericlist', $filter_state_options, 'filter_state', '', 'value', 'text', $filter_state);
     $categoriesModel = JModel::getInstance('Categories', 'K2Model');
     $categories_option[] = JHTML::_('select.option', 0, JText::_('K2_SELECT_CATEGORY'));
     $categoriesFilter = $categoriesModel->categoriesTree(NULL, true, false);
     $categories_options = @array_merge($categories_option, $categoriesFilter);
     $lists['categories'] = JHTML::_('select.genericlist', $categories_options, 'filter_category', '', 'value', 'text', $filter_category);
     if (version_compare(JVERSION, '1.6.0', 'ge')) {
         $languages = JHTML::_('contentlanguage.existing', true, true);
         array_unshift($languages, JHTML::_('select.option', '', JText::_('K2_SELECT_LANGUAGE')));
         $lists['language'] = JHTML::_('select.genericlist', $languages, 'language', '', 'value', 'text', $language);
     }
     $this->assignRef('lists', $lists);
     JToolBarHelper::title(JText::_('K2_CATEGORIES'), 'k2.png');
     if ($filter_trash == 1) {
         JToolBarHelper::custom('restore', 'restore.png', 'restore_f2.png', 'K2_RESTORE', true);
         JToolBarHelper::deleteList('K2_ARE_YOU_SURE_YOU_WANT_TO_DELETE_SELECTED_CATEGORIES', 'remove', 'K2_DELETE');
     } else {
         JToolBarHelper::publishList();
         JToolBarHelper::unpublishList();
         JToolBarHelper::customX('move', 'move.png', 'move_f2.png', 'K2_MOVE');
         JToolBarHelper::customX('copy', 'copy.png', 'copy_f2.png', 'K2_COPY');
         JToolBarHelper::editList();
         JToolBarHelper::addNew();
         JToolBarHelper::trash('trash');
     }
     if (K2_JVERSION == '16') {
         JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
     } else {
         $toolbar =& JToolBar::getInstance('toolbar');
         $toolbar->appendButton('Popup', 'config', 'Parameters', 'index.php?option=com_k2&view=settings');
     }
     $this->loadHelper('html');
     K2HelperHTML::subMenu();
     $this->assignRef('filter_trash', $filter_trash);
     $template = $mainframe->getTemplate();
     $this->assignRef('template', $template);
     $ordering = ($this->lists['order'] == 'c.ordering' || $this->lists['order'] == 'c.parent, c.ordering') && !$this->filter_trash;
     $this->assignRef('ordering', $ordering);
     parent::display($tpl);
 }
开发者ID:vuchannguyen,项目名称:dayhoc,代码行数:87,代码来源:view.html.php

示例7: display

 function display($tpl = null)
 {
     $mainframe =& JFactory::getApplication();
     $document =& JFactory::getDocument();
     $params =& JComponentHelper::getParams('com_k2');
     $option = JRequest::getCmd('option');
     $view = JRequest::getCmd('view');
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
     $limitstart = $mainframe->getUserStateFromRequest($option . $view . '.limitstart', 'limitstart', 0, 'int');
     $filter_order = $mainframe->getUserStateFromRequest($option . $view . 'filter_order', 'filter_order', '', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . $view . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_status = $mainframe->getUserStateFromRequest($option . $view . 'filter_status', 'filter_status', -1, 'int');
     $filter_group = $mainframe->getUserStateFromRequest($option . $view . 'filter_group', 'filter_group', 1, 'filter_group');
     $filter_group_k2 = $mainframe->getUserStateFromRequest($option . $view . 'filter_group_k2', 'filter_group_k2', '', 'filter_group_k2');
     $search = $mainframe->getUserStateFromRequest($option . $view . 'search', 'search', '', 'string');
     $search = JString::strtolower($search);
     JModel::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'models');
     $model =& JModel::getInstance('Users', 'K2Model');
     $users = $model->getData();
     for ($i = 0; $i < sizeof($users); $i++) {
         $users[$i]->loggedin = $model->checkLogin($users[$i]->id);
         $users[$i]->profileID = $model->hasProfile($users[$i]->id);
         if ($users[$i]->lastvisitDate == "0000-00-00 00:00:00") {
             $users[$i]->lvisit = false;
         } else {
             $users[$i]->lvisit = $users[$i]->lastvisitDate;
         }
         $users[$i]->link = JRoute::_('index.php?option=com_k2&view=user&cid=' . $users[$i]->id);
     }
     $this->assignRef('rows', $users);
     $total = $model->getTotal();
     jimport('joomla.html.pagination');
     $pageNav = new JPagination($total, $limitstart, $limit);
     $this->assignRef('page', $pageNav);
     $lists = array();
     $lists['search'] = $search;
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     $filter_status_options[] = JHTML::_('select.option', -1, JText::_('K2_SELECT_STATE'));
     $filter_status_options[] = JHTML::_('select.option', 0, JText::_('K2_ENABLED'));
     $filter_status_options[] = JHTML::_('select.option', 1, JText::_('K2_BLOCKED'));
     $lists['status'] = JHTML::_('select.genericlist', $filter_status_options, 'filter_status', '', 'value', 'text', $filter_status);
     $userGroups = $model->getUserGroups();
     $groups[] = JHTML::_('select.option', '0', JText::_('K2_SELECT_JOOMLA_GROUP'));
     foreach ($userGroups as $userGroup) {
         $groups[] = JHTML::_('select.option', $userGroup->value, $userGroup->text);
     }
     $lists['filter_group'] = JHTML::_('select.genericlist', $groups, 'filter_group', '', 'value', 'text', $filter_group);
     $K2userGroups = $model->getUserGroups('k2');
     $K2groups[] = JHTML::_('select.option', '0', JText::_('K2_SELECT_K2_GROUP'));
     foreach ($K2userGroups as $K2userGroup) {
         $K2groups[] = JHTML::_('select.option', $K2userGroup->id, $K2userGroup->name);
     }
     $lists['filter_group_k2'] = JHTML::_('select.genericlist', $K2groups, 'filter_group_k2', '', 'value', 'text', $filter_group_k2);
     $this->assignRef('lists', $lists);
     if (K2_JVERSION == '16') {
         $dateFormat = JText::_('K2_J16_DATE_FORMAT');
     } else {
         $dateFormat = JText::_('K2_DATE_FORMAT');
     }
     $this->assignRef('dateFormat', $dateFormat);
     $template = $mainframe->getTemplate();
     $this->assignRef('template', $template);
     if ($mainframe->isAdmin()) {
         JToolBarHelper::title(JText::_('K2_USERS'), 'k2.png');
         JToolBarHelper::customX('move', 'move.png', 'move_f2.png', 'K2_MOVE');
         JToolBarHelper::deleteList('K2_WARNING_YOU_ARE_ABOUT_TO_DELETE_THE_SELECTED_USERS_PERMANENTLY_FROM_THE_SYSTEM', 'delete', 'K2_DELETE');
         JToolBarHelper::publishList('enable', 'K2_ENABLE');
         JToolBarHelper::unpublishList('disable', 'K2_DISABLE');
         JToolBarHelper::editList();
         JToolBarHelper::deleteList('K2_ARE_YOU_SURE_YOU_WANT_TO_RESET_SELECTED_USERS', 'remove', 'K2_RESET_USER_DETAILS');
         $toolbar =& JToolBar::getInstance('toolbar');
         if (K2_JVERSION == '16') {
             JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
         } else {
             $toolbar->appendButton('Popup', 'config', 'K2_PARAMETERS', 'index.php?option=com_k2&view=settings');
         }
         $this->loadHelper('html');
         K2HelperHTML::subMenu();
         $user =& JFactory::getUser();
         if ($user->gid > 23) {
             if (!$params->get('hideImportButton')) {
                 $buttonUrl = JURI::base() . 'index.php?option=com_k2&amp;view=users&amp;task=import';
                 $buttonText = JText::_('K2_IMPORT_JOOMLA_USERS');
                 $button = '<a id="K2ImportUsersButton" href="' . $buttonUrl . '"><span class="icon-32-archive" title="' . $buttonText . '"></span>' . $buttonText . '</a>';
                 $toolbar->appendButton('Custom', $button);
             }
         }
     }
     $isAdmin = $mainframe->isAdmin();
     $this->assignRef('isAdmin', $isAdmin);
     if ($mainframe->isSite()) {
         // CSS
         $document->addStyleSheet(JURI::root(true) . '/media/k2/assets/css/k2.frontend.css');
         $document->addStyleSheet(JURI::root(true) . '/templates/system/css/general.css');
         $document->addStyleSheet(JURI::root(true) . '/templates/system/css/system.css');
         if (K2_JVERSION == '16') {
             $document->addStyleSheet(JURI::root(true) . '/administrator/templates/bluestork/css/template.css');
             $document->addStyleSheet(JURI::root(true) . '/media/system/css/system.css');
         } else {
//.........这里部分代码省略.........
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:101,代码来源:view.html.php


注:本文中的K2HelperHTML::subMenu方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。