本文整理汇总了PHP中JToolBarHelper::addNewX方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolBarHelper::addNewX方法的具体用法?PHP JToolBarHelper::addNewX怎么用?PHP JToolBarHelper::addNewX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolBarHelper
的用法示例。
在下文中一共展示了JToolBarHelper::addNewX方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
global $mainframe, $option;
if ($this->getLayout() == 'form') {
$this->_displayForm($tpl);
return;
}
//JToolBarHelper::title( JText::_( 'Restoration' ), 'generic.png' );
$html = "<div class=\"header icon-48-generic.png\" style='background-image:url(components/com_jdefender/images/dbrestore.png)'>\n";
$html .= JText::_('Restoration');
$html .= "\n</div>\n";
$mainframe->set('JComponentTitle', $html);
JToolBarHelper::deleteList();
JToolBarHelper::addNewX();
$html = "<a href=\"javascript:void(0);\" onclick=\"javascript:" . "document.adminForm; submitbutton('restore');\" class=\"toolbar\">";
$html .= "<span style='background-image:url(components/com_jdefender/images/dbrestore32.gif);' type=\"Standard\">";
$html .= "</span>";
$html .= JText::_('Restore');
$html .= "</a>";
$bar =& JToolBar::getInstance();
$bar->appendButton('Custom', $html, 'close');
$db =& JFactory::getDBO();
$uri =& JFactory::getURI();
$items =& $this->get('Data');
$pagination =& $this->get('Pagination');
$this->assignRef('pagination', $pagination);
$this->assignRef('restorations', $items);
parent::display($tpl);
}
示例2: display
/**
* Easybook view display method
* @return void
**/
function display($tpl = null)
{
global $mainframe;
JToolBarHelper::title(JText::_('Easybook'), 'easybook');
JToolBarHelper::publishList();
JToolBarHelper::unpublishList();
JToolBarHelper::deleteList();
JToolBarHelper::editListX();
JToolBarHelper::addNewX();
JToolBarHelper::preferences('com_easybook', '500');
JHTML::_('stylesheet', 'easybook.css', 'administrator/components/com_easybook/css/');
// Get data from the model
$items =& $this->get('Data');
$pagination = $this->get('Pagination');
$version =& $this->get('Version');
switch ($version->checkVersion(_EASYBOOK_VERSION)) {
case 1:
$this->assign('version', "<span style='border-bottom: dotted 1px #b9b9b9; padding-right: 5px; padding-left: 5px;'><b>EasyBook " . _EASYBOOK_VERSION . "</b></span><br /><div style='margin-top: 5px;'><a href='http://www.easy-joomla.org/index.php?option=com_versions&catid=3&myVersion=" . _EASYBOOK_VERSION . "' target='_blank'><img src='" . JURI::base() . "components/com_easybook/images/shield.gif' border='0' style='vertical-align: text-bottom; padding-right: 5px;'/> <span style='color: #e2ad43;'><b>" . JTEXT::_('no updates available') . "</b></span></a></div>");
break;
case -1:
$this->assign('version', "<span style='border-bottom: dotted 1px #b9b9b9; padding-right: 5px; padding-left: 5px;'><b>EasyBook " . _EASYBOOK_VERSION . "</b></span><br /><div style='margin-top: 5px;'><a href='http://www.easy-joomla.org/index.php?option=com_versions&catid=3&myVersion=" . _EASYBOOK_VERSION . "' target='_blank'><img src='" . JURI::base() . "components/com_easybook/images/box.gif' border='0' style='vertical-align: text-bottom; padding-right: 5px;'/> <span style='color: #ce763a;'><b>" . JTEXT::_('updates available') . "</b> EasyBook " . $version->_current . "</span></a></div>");
break;
case -2:
$this->assign('version', "<span style='border-bottom: dotted 1px #b9b9b9; padding-right: 5px; padding-left: 5px;'><b>EasyBook " . _EASYBOOK_VERSION . "</b></span><br /><div style='margin-top: 5px;'><a href='http://www.easy-joomla.org/index.php?option=com_versions&catid=3&myVersion=" . _EASYBOOK_VERSION . "' target='_blank'><img src='" . JURI::base() . "components/com_easybook/images/fail.gif' border='0' style='vertical-align: middle; padding-right: 5px;'/><span style='color: #e34639;'><b>" . JTEXT::_('connection failed') . "</b></span></a></div>");
break;
}
$this->assignRef('pagination', $pagination);
$this->assignRef('items', $items);
parent::display($tpl);
}
示例3: display
function display($tpl = null)
{
$document =& JFactory::getDocument();
$document->addStyleSheet('components/com_acepolls/assets/css/acepolls.css');
JToolBarHelper::title(JText::_('COM_ACEPOLLS_POLLS'), 'acepolls');
JToolBarHelper::addNewX();
JToolBarHelper::editListX();
JToolBarHelper::deleteList();
JToolBarHelper::divider();
JToolBarHelper::publishList();
JToolBarHelper::unpublishList();
JToolBarHelper::divider();
JToolBarHelper::custom('resetVotes', 'cancel.png', 'cancel.png', JText::_('COM_ACEPOLLS_RESET_VOTES'), true, false);
JToolBarHelper::preferences('com_acepolls');
$this->mainframe = JFactory::getApplication();
$this->option = JRequest::getWord('option');
$filter_order = $this->mainframe->getUserStateFromRequest($this->option . '.polls.filter_order', 'filter_order', 'm.title', 'string');
$filter_order_Dir = $this->mainframe->getUserStateFromRequest($this->option . '.polls.filter_order_Dir', 'filter_order_Dir', '', 'word');
$filter_state = $this->mainframe->getUserStateFromRequest($this->option . '.polls.filter_state', 'filter_state', '', 'word');
$search = $this->mainframe->getUserStateFromRequest($this->option . '.polls.search', 'search', '', 'string');
JHTML::_('behavior.tooltip');
// 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;
$this->assignRef('user', JFactory::getUser());
$this->assignRef('lists', $lists);
$this->assignRef('items', $this->get('Data'));
$this->assignRef('pagination', $this->get('Pagination'));
parent::display($tpl);
}
示例4: EDITFORM_MENU
function EDITFORM_MENU()
{
$cid = JRequest::getVar('cid', array());
if ($cid) {
JToolBarHelper::addNewX('newfield', _FORME_BACKEND_TOOLBAR_NEWFIELD);
}
if ($cid) {
JToolBarHelper::spacer();
}
if ($cid) {
JToolBarHelper::custom('fields.copy.screen', 'copy.png', 'copy_f2.png', _FORME_BACKEND_TOOLBAR_DUPLICATE, false);
}
if ($cid) {
JToolBarHelper::spacer();
}
if ($cid) {
JToolBarHelper::deleteList(' ', 'deletefield', _FORME_BACKEND_TOOLBAR_REMOVE);
}
if ($cid) {
JToolBarHelper::spacer();
}
JToolBarHelper::save('saveform');
JToolBarHelper::apply('applyform');
JToolBarHelper::spacer();
JToolBarHelper::cancel('cancelform', _FORME_BACKEND_TOOLBAR_CLOSE);
JToolBarHelper::spacer();
JToolBarHelper::spacer();
JToolBarHelper::custom('main', 'upload.png', '', _FORME_BACKEND_TOOLBAR_MAIN, false);
}
示例5: display
/**
* Playlists view display method
* @return void
**/
function display($tpl = null)
{
AvrGenericHelper::addCSS('.icon-48-avreloaded {background-image:url(' . JURI::root() . '/administrator/components/com_avreloaded/assets/avreloaded-48x48.png);}');
JToolBarHelper::title(JText::_('AVR_TITLE_MANAGE_PLAYLISTS') . ' - AllVideos Reloaded', 'avreloaded');
$vdir = AvrGenericHelper::getVdir();
$app =& JFactory::getApplication();
$folder = $app->getUserStateFromRequest('com_avreloaded.playlists_folder', 'folder', $vdir);
// Get data from the model
$fselect = $this->_getFolderSelect($vdir, $folder);
$lists =& $this->_getViewLists($app, $folder);
$model =& $this->getModel();
$items =& $model->getData();
if (count($items)) {
JToolBarHelper::deleteList();
JToolBarHelper::editListX();
}
JToolBarHelper::addNewX();
JToolBarHelper::help('playlists', true);
$files = '';
foreach ($items as $i => $item) {
if ($i > 0) {
$files .= ',';
}
$files .= "'" . basename($item->filename) . "'";
}
$this->assignRef('items', $items);
$this->assignRef('lists', $lists);
$this->assignRef('fselect', $fselect);
$this->assignRef('files', $files);
parent::display($tpl);
}
示例6: display
function display($tpl = null)
{
JToolBarHelper::title(JText::_('Счета'), 'Bill');
JToolBarHelper::deleteList();
JToolBarHelper::editListX();
JToolBarHelper::addNewX();
JToolBarHelper::publishList();
JToolBarHelper::unpublishList();
$act = array();
$items =& $this->get('Data');
$users =& $this->get('users');
foreach ($users as $u) {
$act[$u->id] = $u->name;
}
$users = $act;
$profiles =& $this->get('profiles');
foreach ($profiles as $p) {
$act[$p->id] = $p->name;
}
$profiles = $act;
$this->assignRef('items', $items);
$this->assignRef('users', $users);
$this->assignRef('profiles', $profiles);
$pagination =& $this->get('Pagination');
$this->assignRef('pagination', $pagination);
global $option;
$apl = JFactory::getApplication();
$filter_order = $apl->getUserStateFromRequest($option . 'filter_order', 'filter_order', 'published');
$filter_order_Dir = JString::strtoupper($apl->getUserStateFromRequest($option . 'filter_order_Dir', 'filter_order_Dir', 'ASC'));
$lists = array();
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
$this->assignRef('lists', $lists);
parent::display($tpl);
}
示例7: display
/**
* Channels view display method
* @return void
**/
function display($tpl = null)
{
// Require specific controller if requested
$path = JPATH_COMPONENT . DS . 'controllers' . DS . 'orbitscriptsapi.php';
if (file_exists($path)) {
require_once $path;
}
// Create the controller
$orbitscriptsapi = new OrbitscriptsControllerOrbitscriptsApi();
JToolBarHelper::title(JText::_('<%SITE_NAME%> Ads Manager'), 'orbitscriptsads64.png');
if (file_exists(JPATH_ROOT . '/modules/mod_orbitscripts_ads/mod_orbitscripts_ads.php')) {
$msg = $orbitscriptsapi->testconnect();
if ($msg['code'] == 0) {
JToolBarHelper::publishList();
JToolBarHelper::unpublishList();
JToolBarHelper::addNewX('add', 'Create New Channel');
JToolBarHelper::editListX('edit', 'Edit Related Module');
JToolBarHelper::deleteList();
} else {
JError::raiseWarning(100, 'Warning: API return error. Code: <b>' . $msg['code'] . ' - ' . $msg['msg'] . '</b>. You cannot add new channels. Please check "Preferences".');
}
} else {
JError::raiseWarning(100, 'Warning: mod_orbitscripts_ads not found. You cannot add new channels. Please install this module.');
}
JToolBarHelper::Preferences('com_orbitscriptsads', '300', '570');
// Get data from the model
$items =& $this->get('Data');
$this->assignRef('items', $items);
parent::display($tpl);
}
示例8: addToolBar
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_webtv_MANAGER_excercises'), 'webtv');
JToolBarHelper::deleteListX('', 'excercises.delete');
JToolBarHelper::editListX('exercise.edit');
JToolBarHelper::addNewX('exercise.add');
}
示例9: display
public function display($tpl = null)
{
// Set toolbar items for the page
JToolBarHelper::publishList();
JToolBarHelper::unpublishList();
JToolBarHelper::deleteList();
JToolBarHelper::editListX();
JToolBarHelper::addNewX();
JToolBarHelper::preferences('com_simplelists', '480');
JHTML::_('behavior.tooltip');
// Automatically fetch items, total and pagination - and assign them to the template
$this->fetchItems();
// Re-order the items by parent
$listview = $this->getFilter('listview');
if ($listview == 'tree') {
$tree = new SimplelistsCategoryTree();
$tree->setItems($this->items);
$this->items = $tree->getList();
} else {
$listview = 'flat';
}
// Listview box
$options[] = array('id' => 'tree', 'title' => 'Tree');
$options[] = array('id' => 'flat', 'title' => 'Flat list');
$extra = 'onchange="document.adminForm.submit();"';
$this->lists['listview'] = JHTML::_('select.genericlist', $options, 'filter_listview', $extra, 'id', 'title', $listview);
parent::display($tpl);
}
示例10: _setToolBar
function _setToolBar()
{
JToolBarHelper::title(JText::_('MAPPING GROUPS'), 'mapping');
JToolBarHelper::addNewX();
JToolBarHelper::editListX();
JToolBarHelper::deleteListX();
}
示例11: addToolBar
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLDS'));
JToolBarHelper::deleteListX('', 'helloworlds.delete');
JToolBarHelper::editListX('helloworld.edit');
JToolBarHelper::addNewX('helloworld.add');
}
示例12: display
public function display()
{
jimport('joomla.html.pagination');
// get database
$this->db = JFactory::getDBO();
// set toolbar items
$this->joomla->set('JComponentTitle', $this->application->getToolbarTitle(JText::_('Items')));
JToolBarHelper::custom('docopy', 'copy.png', 'copy_f2.png', 'Copy');
JToolBarHelper::deleteList();
JToolBarHelper::editListX();
JToolBarHelper::addNewX();
ZooHelper::toolbarHelp();
JHTML::_('behavior.tooltip');
$state_prefix = $this->option . '_' . $this->application->id . '.submission';
$filter_order = $this->joomla->getUserStateFromRequest($state_prefix . 'filter_order', 'filter_order', 'name', 'cmd');
$filter_order_Dir = $this->joomla->getUserStateFromRequest($state_prefix . 'filter_order_Dir', 'filter_order_Dir', 'desc', 'word');
$table = YTable::getInstance('submission');
$this->groups = ZooHelper::getGroups();
// get data from the table
$where = array();
// application filter
$where[] = 'application_id = ' . (int) $this->application->id;
$options = array('conditions' => array(implode(' AND ', $where)), 'order' => $filter_order . ' ' . $filter_order_Dir);
$this->submissions = $table->all($options);
$this->submissions = array_merge($this->submissions);
// table ordering and search filter
$this->lists['order_Dir'] = $filter_order_Dir;
$this->lists['order'] = $filter_order;
// display view
$this->getView()->display();
}
示例13: display
function display($tpl = null)
{
if (JRequest::getString('task') != 'edit' && JRequest::getString('task') != 'add') {
JToolBarHelper::title('J-Hotel Reservation : ' . JText::_('LNG_MANAGE_ARRIVAL_OPTIONS', true), 'generic.png');
//JRequest::setVar( 'hidemainmenu', 1 );
JToolBarHelper::custom('back', JUtil::getDashBoardIcon(), 'home', 'Back', false, false);
$hotel_id =& $this->get('HotelId');
if ($hotel_id > 0) {
JToolBarHelper::deleteList(JText::_('LNG_ARE_YOU_SURE_YOU_WANT_TO_DELETE', true), 'Delete', 'Delete', 'Detele button', false, false);
JToolBarHelper::editList();
JToolBarHelper::addNewX();
}
$this->hotel_id = $hotel_id;
$items =& $this->get('Datas');
$this->items = $items;
$hotels =& $this->get('Hotels');
$hotels = checkHotels(JFactory::getUser()->id, $hotels);
$this->hotels = $hotels;
} else {
$item =& $this->get('Data');
$this->item = $item;
$hotel_id =& $this->get('HotelId');
$this->hotel_id = $hotel_id;
$hotel =& $this->get('Hotel');
$this->hotel = $hotel;
JToolBarHelper::title('J-Hotel Reservation : ' . ($item->arrival_option_id > 0 ? JText::_('LNG_EDIT', true) : JText::_('LNG_ADD_NEW', true)) . ' ' . JText::_('LNG_MANAGE_ARRIVAL_OPTION', true), 'generic.png');
JRequest::setVar('hidemainmenu', 1);
JToolBarHelper::cancel();
JToolBarHelper::save();
}
parent::display($tpl);
}
示例14: _setToolBar
/**
* Установки тулбара
*/
protected function _setToolBar()
{
require_once JPATH_COMPONENT . '/helpers/smfaq.php';
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
SmFaqHelper::addSubmenu($this->_name);
$canDo = SmFaqHelper::getActions($this->state->get('filter.category_id'));
// Выводим нужные кнопки и заголовок
JToolBarHelper::title(JText::_('COM_SMFAQ_MANAGER_QUESTIONS'), 'smfaq');
if ($canDo->get('core.create')) {
JToolBarHelper::addNewX('smfaq.add', 'JTOOLBAR_NEW');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editListX('smfaq.edit', 'JTOOLBAR_EDIT');
}
JToolBarHelper::divider();
JToolBarHelper::custom('smfaqlist.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::custom('smfaqlist.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::divider();
JToolBarHelper::checkin('smfaqlist.checkin');
// Замена тулбара карзины на удаление
if ($this->state->get('filter.published') == -2) {
JToolBarHelper::deleteList('COM_SMFAQ_YOU_WANT_DELETE_THIS', 'smfaqlist.delete', 'JTOOLBAR_EMPTY_TRASH');
} else {
JToolBarHelper::trash('smfaqlist.trash', 'JTOOLBAR_TRASH');
}
JToolBarHelper::divider();
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_smfaq');
}
}
示例15: addToolBar
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_COCOATEREALESTATE_MANAGER_OBJECTS'));
JToolBarHelper::deleteListX('', 'objects.delete');
JToolBarHelper::editListX('object.edit');
JToolBarHelper::addNewX('object.add');
}