protected function addToolBar() { JToolBarHelper::title(JText::_('COM_webtv_MANAGER_excercises'), 'webtv'); JToolBarHelper::deleteListX('', 'excercises.delete'); JToolBarHelper::editListX('exercise.edit'); JToolBarHelper::addNewX('exercise.add'); }
protected function addToolBar() { JToolBarHelper::title(JText::_('COM_HELLOWORLD_MANAGER_HELLOWORLDS')); JToolBarHelper::deleteListX('', 'helloworlds.delete'); JToolBarHelper::editListX('helloworld.edit'); JToolBarHelper::addNewX('helloworld.add'); }
function _setToolBar() { JToolBarHelper::title(JText::_('MAPPING GROUPS'), 'mapping'); JToolBarHelper::addNewX(); JToolBarHelper::editListX(); JToolBarHelper::deleteListX(); }
protected function addToolBar() { JToolBarHelper::title(JText::_('COM_COCOATEREALESTATE_MANAGER_OBJECTS')); JToolBarHelper::deleteListX('', 'objects.delete'); JToolBarHelper::editListX('object.edit'); JToolBarHelper::addNewX('object.add'); }
function display($tpl = null) { $mainframe = JFactory::getApplication(); $option = JRequest::getVar('option'); $user =& JFactory::getUser(); $document =& JFactory::getDocument(); $params = JComponentHelper::getParams('com_redform'); $rows = $this->get('Data'); $pagination = $this->get('Pagination'); $lists = array(); /* Set variabels */ $this->assignRef('rows', $rows); $this->assignRef('pagination', $pagination); $this->assignRef('lists', $lists); $this->assignRef('params', $params); $this->assignRef('key', JRequest::getVar('submit_key')); JToolBarHelper::title(JText::_('COM_REDFORM_PAYMENTS_HISTORY'), 'redform_submitters'); JToolBarHelper::addNew(); JToolBarHelper::editListX(); JToolBarHelper::deleteListX(); JToolBarHelper::custom('back', 'back', 'back', 'back', false); // set the menu RedformHelper::setMenu(); /* Display the page */ parent::display($tpl); }
/** * Draws the menu to edit a user */ function _CONFIGC() { JToolBarHelper::title(JText::_('Configuration - Client'), 'config.png'); JToolBarHelper::deleteListX(_BC_DELETEWEBSITE); JToolBarHelper::spacer(); JToolBarHelper::save(); JToolBarHelper::spacer(); JToolBarHelper::help('blastchatc.config', true); }
private function generateToolbar() { JToolBarHelper::title(JText::_('COM_API') . ': ' . JText::_('COM_API_KEYS')); JToolBarHelper::publishList(); JToolBarHelper::unpublishList(); JToolBarHelper::divider(); JToolBarHelper::addNewX(); JToolBarHelper::editListX(); JToolBarHelper::deleteListX(); }
function _setToolBar() { JToolBarHelper::title(JText::_('RESOURCES_MANAGER'), 'resources'); JToolBarHelper::cancel(); JToolBarHelper::addNew(); JToolBarHelper::editListX(); JToolBarHelper::customX('import', 'import', '', 'Import', false); JToolBarHelper::customX('export', 'export', '', 'Export'); JToolBarHelper::unpublishList(); JToolBarHelper::publishList(); JToolBarHelper::deleteListX(JText::_('RESOURCES_TREE_REMOVE_CONFIRM_MESSAGE')); }
function _lixeira($toolbar = true) { // desabilita o menu principal JRequest::setVar('hidemainmenu', 1); JToolBarHelper::title(JText::_($this->comTitulo) . ': [' . JText::_('Trash') . ']', $this->comIcone); if ($toolbar) { JToolBarHelper::deleteListX('Os registros selecionados serão removidos definitivamente, deseja continuar?'); JToolBarHelper::custom('unTrash', 'save', 'save', 'Restaurar', true, false); JToolBarHelper::custom('list', 'forward', 'forward', 'Voltar', false, false); } // Pega dados do modelo $itens =& $this->get('Lixeira'); // Carrega os resultado da busca $this->assignRef('itens', $itens); parent::display($this->tpl); }
function display($tpl = null) { $fields =& $this->get('Data'); $this->assignRef('fields', $fields); $CBfields =& $this->get('CBfields'); $this->assignRef('CBfields', $CBfields); $JSfields =& $this->get('JSfields'); $this->assignRef('JSfields', $JSfields); $VMfields =& $this->get('VMfields'); $this->assignRef('VMfields', $VMfields); $listId = JRequest::getVar('listid', ''); $this->assignRef('listId', $listId); $name = JRequest::getVar('name', ''); if (!$name) { $name = JRequest::getVar('listName', ''); } $this->assignRef('name', $name); if ($name) { $title = ' ( ' . $name . ' )'; } else { $title = ''; } $layout = JRequest::getVar('layout', 0, 'post', 'string'); if ($layout == 'form') { JToolBarHelper::title(JText::_('JM_NEWSLETTER_NEW_CUSTOM_FIELD') . $title); JToolBarHelper::save(); JToolBarHelper::spacer(); JToolBarHelper::cancel(); JToolBarHelper::spacer(); } else { JToolBarHelper::title(JText::_('JM_NEWSLETTER_CUSTOM_FIELDS') . $title); JToolBarHelper::custom('goToLists', 'lists', 'lists', 'JM_LISTS', false, false); JToolBarHelper::spacer(); JToolBarHelper::addNewX(); JToolBarHelper::spacer(); // JToolBarHelper::editListX(); // JToolBarHelper::spacer(); JToolBarHelper::deleteListX(); JToolBarHelper::spacer(); } parent::display($tpl); require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'footer.php'; }
function display($tpl = null) { // Toolbar JToolBarHelper::customX('install', 'export', 'export', 'DEFAULT', false); JToolBarHelper::title(JText::_('BOOKMARKS'), 'bookmarks'); JToolBarHelper::deleteListX(JText::_('VALIDDELETEITEMS', true)); JToolBarHelper::editListX(); JToolBarHelper::addNewX(); // Sub menu JSubMenuHelper::addEntry(JText::_('DOCUMENTATION'), index . '&view=docs'); JSubMenuHelper::addEntry(JText::_('BOOKMARKS'), index . '&view=bookmarks', true); JSubMenuHelper::addEntry('CSS', index . '&view=css'); JSubMenuHelper::addEntry(JText::_('IN_EX'), index . '&view=export'); JSubMenuHelper::addEntry(JText::_('CONFIGURATION'), index . '&controller=config&task=edit'); // Document $this->setTitle(JText::_('BOOKMARKS')); $this->addStyle('.icon-48-bookmarks{' . 'background-image:url(components/com_linkr/assets/icon.bms.png);' . '}' . '.icon-32-export{' . 'background-image:url(templates/khepri/images/toolbar/icon-32-export.png);' . '}'); $this->assignRef('bookmarks', $this->get('Bookmarks')); $this->assignRef('page', $this->get('Pagination')); $this->assignRef('order', $this->get('Order')); parent::display($tpl); }
/** * Setting the toolbar */ protected function addToolBar() { $canDo = MaintHelper::getActions(); $bar = JToolBar::getInstance('toolbar'); JToolBarHelper::title(JText::_('COM_MAINT')); $toolbar = JToolBar::getInstance('toolbar'); JToolBarHelper::custom('maints.reports', 'icon-32-xml.png', '', 'COM_MAINT_MENU_REPORTS', false, false); JToolBarHelper::customX('maints.show', 'preview', '', 'COM_MAINT_MENU_PREVIEW'); if ($canDo->get('core.delete')) { JToolBarHelper::deleteListX('', 'maints.delete'); } if ($canDo->get('core.edit')) { JToolBarHelper::editListX('maint.edit'); } if ($canDo->get('core.create')) { JToolBarHelper::addNewX('maint.add'); } if ($canDo->get('core.admin')) { JToolBarHelper::divider(); JToolBarHelper::custom('maints.money', 'money.png', '', 'COM_MAINT_MONEY', false, false); JToolBarHelper::preferences('com_maint'); } }
function display($tpl = null) { $layout = JRequest::getVar('layout', 0, 'post', 'string'); $CBfields =& $this->get('CBfields'); $this->assignRef('CBfields', $CBfields); $JSfields =& $this->get('JSfields'); $this->assignRef('JSfields', $JSfields); $VMfields =& $this->get('VMfields'); $this->assignRef('VMfields', $VMfields); if ($layout == 'form') { $cid = JRequest::getVar('cid', ''); if ($cid) { JToolBarHelper::title(JText::_('JM_NEWSLETTER_EDIT_MERGE_FIELD')); } else { JToolBarHelper::title(JText::_('JM_NEWSLETTER_NEW_MERGE_FIELD')); } JToolBarHelper::save(); JToolBarHelper::spacer(); JToolBarHelper::cancel(); JToolBarHelper::spacer(); $types[] = array('type' => '0', 'name' => '--- ' . JText::_('JM_SELECT_A_DATA_TYPE') . ' ---'); $types[] = array('type' => 'text', 'name' => 'text'); $types[] = array('type' => 'email', 'name' => 'email'); $types[] = array('type' => 'number', 'name' => 'number'); $types[] = array('type' => 'radio', 'name' => 'radio'); $types[] = array('type' => 'dropdown', 'name' => 'dropdown'); $types[] = array('type' => 'date', 'name' => 'date'); $types[] = array('type' => 'address', 'name' => 'address'); $types[] = array('type' => 'phone', 'name' => 'phone'); $types[] = array('type' => 'url', 'name' => 'url'); $types[] = array('type' => 'imageurl', 'name' => 'imageurl'); $item['listid'] = JRequest::getVar('listid'); $item['name'] = ''; $item['tag'] = ''; $item['field_type'] = ''; $item['req'] = 0; $item['choices'] = array(); $fieldData[0]->dbfield = ''; if (isset($cid[0])) { $attribs = explode(';', $cid[0]); $item['name'] = $attribs[0]; $item['tag'] = $attribs[1]; $item['field_type'] = $attribs[2]; $item['req'] = $attribs[3]; $item['choices'] = explode('||', $attribs[4]); $db =& JFactory::getDBO(); $query = "SELECT * FROM #__joomailermailchimpintegration_custom_fields " . "WHERE `grouping_id` = '" . $item['tag'] . "'"; $db->setQuery($query); $fieldData = $db->loadObjectList(); if (isset($fieldData[0])) { $fieldId = $fieldData[0]->id; $groupingId = $fieldData[0]->grouping_id; if ($fieldData[0]->framework == 'CB') { $CBeditID = $fieldData[0]->dbfield; $JSeditID = ''; $VMeditID = ''; } else { if ($fieldData[0]->framework == 'JS') { $CBeditID = ''; $JSeditID = $fieldData[0]->dbfield; $VMeditID = ''; } else { if ($fieldData[0]->framework == 'VM') { $CBeditID = ''; $JSeditID = ''; $query = "SELECT fieldid FROM #__vm_userfield " . "WHERE `name` = '" . $fieldData[0]->dbfield . "'"; $db->setQuery($query); $VMeditID = $db->loadResult(); } } } } else { $fieldId = ''; $groupingId = ''; $CBeditID = ''; $JSeditID = ''; $VMeditID = ''; $fieldData[0]->dbfield = ''; } } else { $name = ''; $CBeditID = ''; $JSeditID = ''; $VMeditID = ''; $fieldId = ''; $groupingId = ''; } $typeDropDown = JHTML::_('select.genericlist', $types, 'field_type', '', 'type', 'name', array($item['field_type'])); $this->assignRef('typeDropDown', $typeDropDown); $this->assignRef('item', $item); $firstoption = new stdClass(); $firstoption->id = 0; $firstoption->name = '--- ' . JText::_('JM_SELECT_FIELD') . ' ---'; $JSDropDown = ''; if ($JSfields) { $JSfields = array_merge(array($firstoption), $JSfields); $JSDropDown = JHTML::_('select.genericlist', $JSfields, 'JSfield', 'id="JSField" style="min-width:303px;"', 'id', 'name', array($fieldData[0]->dbfield)); } $this->assignRef('JSDropDown', $JSDropDown); $this->assignRef('CBeditID', $CBeditID); $VMDropDown = ''; if ($VMfields) { $VMfields = array_merge(array($firstoption), $VMfields); $VMDropDown = JHTML::_('select.genericlist', $VMfields, 'VMfield', 'id="VMfield" style="min-width:303px;"', 'id', 'name', array($VMeditID)); } $this->assignRef('VMDropDown', $VMDropDown); } else { $fields =& $this->get('Data'); $this->assignRef('fields', $fields); $listId = JRequest::getVar('listid', ''); $this->assignRef('listId', $listId); $name = JRequest::getVar('name', ''); if (!$name) { $name = JRequest::getVar('listName', ''); } $this->assignRef('name', $name); if ($name) { $title = ' ( ' . $name . ' )'; } else { $title = ''; } JToolBarHelper::title(JText::_('JM_NEWSLETTER_CUSTOM_MERGE_FIELDS') . $title); JToolBarHelper::custom('goToLists', 'lists', 'lists', 'JM_LISTS', false, false); JToolBarHelper::spacer(); JToolBarHelper::addNewX(); JToolBarHelper::spacer(); JToolBarHelper::editListX(); // JToolBarHelper::spacer(); JToolBarHelper::deleteListX(JText::_('JM_ARE_YOU_SURE_TO_DELETE_THIS_MERGE_FIELD')); JToolBarHelper::spacer(); } parent::display($tpl); require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'footer.php'; }
function display($tpl = null) { //Load helpers $this->loadHelper('currencydisplay'); $this->loadHelper('html'); // require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'vendor.php'); Obsolete now?? //if(!class_exists('vmOrderPlugin')) require(JPATH_VM_PLUGINS.DS.'vmorderplugin.php'); if (!class_exists('vmPSPlugin')) { require JPATH_VM_PLUGINS . DS . 'vmpsplugin.php'; } $orderStatusModel = VmModel::getModel('orderstatus'); $orderStates = $orderStatusModel->getOrderStatusList(); $this->SetViewTitle('ORDER'); $orderModel = VmModel::getModel(); // JToolBarHelper::custom( 'orderPrint', 'print','','COM_VIRTUEMART_PRINT',false); // JToolBarHelper::custom( 'invoice', 'invoice','','COM_VIRTUEMART_INVOICE',false); // JToolBarHelper::deleteListX(); $curTask = JRequest::getWord('task'); if ($curTask == 'edit') { // Load addl models $userFieldsModel = VmModel::getModel('userfields'); $productModel = VmModel::getModel('product'); // Get the data $virtuemart_order_id = JRequest::getInt('virtuemart_order_id'); $order = $orderModel->getOrder($virtuemart_order_id); $_orderID = $order['details']['BT']->virtuemart_order_id; $orderbt = $order['details']['BT']; $orderst = array_key_exists('ST', $order['details']) ? $order['details']['ST'] : $orderbt; $orderbt->invoiceNumber = $orderModel->getInvoiceNumber($orderbt->virtuemart_order_id); $currency = CurrencyDisplay::getInstance('', $order['details']['BT']->virtuemart_vendor_id); $this->assignRef('currency', $currency); $_userFields = $userFieldsModel->getUserFields('account', array('captcha' => true, 'delimiters' => true), array('delimiter_userinfo', 'user_is_vendor', 'username', 'password', 'password2', 'agreed', 'address_type')); $userfields = $userFieldsModel->getUserFieldsFilled($_userFields, $orderbt); $_userFields = $userFieldsModel->getUserFields('shipment', array(), array('delimiter_userinfo', 'username', 'email', 'password', 'password2', 'agreed', 'address_type')); $shipmentfields = $userFieldsModel->getUserFieldsFilled($_userFields, $orderst); // Create an array to allow orderlinestatuses to be translated // We'll probably want to put this somewhere in ShopFunctions... $_orderStatusList = array(); foreach ($orderStates as $orderState) { //$_orderStatusList[$orderState->virtuemart_orderstate_id] = $orderState->order_status_name; //When I use update, I have to use this? $_orderStatusList[$orderState->order_status_code] = JText::_($orderState->order_status_name); } $_itemStatusUpdateFields = array(); $_itemAttributesUpdateFields = array(); foreach ($order['items'] as $_item) { $_itemStatusUpdateFields[$_item->virtuemart_order_item_id] = JHTML::_('select.genericlist', $orderStates, "item_id[" . $_item->virtuemart_order_item_id . "][order_status]", 'class="selectItemStatusCode"', 'order_status_code', 'order_status_name', $_item->order_status, 'order_item_status' . $_item->virtuemart_order_item_id, true); } // $_shipmentInfo = ShopFunctions::getShipmentRateDetails($orderbt->virtuemart_shipmentmethod_id); /* Assign the data */ $this->assignRef('orderdetails', $order); $this->assignRef('orderID', $_orderID); $this->assignRef('userfields', $userfields); $this->assignRef('shipmentfields', $shipmentfields); $this->assignRef('orderstatuslist', $_orderStatusList); $this->assignRef('itemstatusupdatefields', $_itemStatusUpdateFields); $this->assignRef('itemattributesupdatefields', $_itemAttributesUpdateFields); $this->assignRef('orderbt', $orderbt); $this->assignRef('orderst', $orderst); $this->assignRef('virtuemart_shipmentmethod_id', $orderbt->virtuemart_shipmentmethod_id); /* Data for the Edit Status form popup */ $_currentOrderStat = $order['details']['BT']->order_status; // used to update all item status in one time $_orderStatusSelect = JHTML::_('select.genericlist', $orderStates, 'order_status', '', 'order_status_code', 'order_status_name', $_currentOrderStat, 'order_items_status', true); $this->assignRef('orderStatSelect', $_orderStatusSelect); $this->assignRef('currentOrderStat', $_currentOrderStat); /* Toolbar */ JToolBarHelper::custom('prev', 'back', '', 'COM_VIRTUEMART_ITEM_PREVIOUS', false); JToolBarHelper::custom('next', 'forward', '', 'COM_VIRTUEMART_ITEM_NEXT', false); JToolBarHelper::divider(); JToolBarHelper::custom('cancel', 'back', 'back', 'back', false, false); } else { if ($curTask == 'editOrderItem') { $this->loadHelper('calculationHelper'); $this->assignRef('orderstatuses', $orderStates); $model = VmModel::getModel(); $orderId = JRequest::getString('orderId', ''); $orderLineItem = JRequest::getVar('orderLineId', ''); $this->assignRef('virtuemart_order_id', $orderId); $this->assignRef('virtuemart_order_item_id', $orderLineItem); $orderItem = $model->getOrderLineDetails($orderId, $orderLineItem); $this->assignRef('orderitem', $orderItem); } else { $this->setLayout('orders'); $model = VmModel::getModel(); $this->addStandardDefaultViewLists($model, 'created_on'); $this->lists['state_list'] = $this->renderOrderstatesList(); $orderslist = $model->getOrdersList(); $this->assignRef('orderstatuses', $orderStates); if (!class_exists('CurrencyDisplay')) { require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php'; } /* Apply currency This must be done per order since it's vendor specific */ $_currencies = array(); // Save the currency data during this loop for performance reasons if ($orderslist) { foreach ($orderslist as $virtuemart_order_id => $order) { //This is really interesting for multi-X, but I avoid to support it now already, lets stay it in the code if (!array_key_exists('v' . $order->virtuemart_vendor_id, $_currencies)) { $_currencies['v' . $order->virtuemart_vendor_id] = CurrencyDisplay::getInstance('', $order->virtuemart_vendor_id); } $order->order_total = $_currencies['v' . $order->virtuemart_vendor_id]->priceDisplay($order->order_total); $order->invoiceNumber = $model->getInvoiceNumber($order->virtuemart_order_id); } } /* * UpdateStatus removed from the toolbar; don't understand how this was intented to work but * the order ID's aren't properly passed. Might be readded later; the controller needs to handle * the arguments. */ /* Toolbar */ JToolBarHelper::save('updatestatus', JText::_('COM_VIRTUEMART_UPDATE_STATUS')); //JToolBarHelper::custom( 'exportOrdersAsCSV', 'exportCSV','','COM_VIRTUEMART_ITEM_EXPORT',false); JToolBarHelper::deleteListX(); /* Assign the data */ $this->assignRef('orderslist', $orderslist); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } } parent::display($tpl); }
function display($tpl = null) { global $mainframe; JToolBarHelper::title(JText::_('Fade Gallery - Galleries'), 'generic.png'); JToolBarHelper::addNewX('newItem'); JToolBarHelper::customX( 'copyItem', 'copy.png', 'copy_f2.png', 'Copy', true); JToolBarHelper::deleteListX(); $db = & JFactory::getDBO(); $context = 'com_fadegallery.galleries.'; $filter_order = $mainframe->getUserStateFromRequest( $context.'filter_order', 'filter_order', 's.id', 'cmd' ); $filter_order_Dir = $mainframe->getUserStateFromRequest( $context.'filter_order_Dir', 'filter_order_Dir', '', 'word' ); $search = $mainframe->getUserStateFromRequest( $context.'search', 'search', '', 'string' ); $limit = $mainframe->getUserStateFromRequest( $context.'limit', 'limit', $mainframe->getCfg('list_limit'), 'int' ); $limitstart = $mainframe->getUserStateFromRequest( $context.'limitstart', 'limitstart', 0, 'int' ); $where = array(); if ($search) { $where[] = 'LOWER(s.galleryname) LIKE '.$db->Quote( '%'.$db->getEscaped($search,true).'%', false ); } $where = count( $where ) ? ' WHERE ' . implode( ' AND ', $where ) : ''; $orderby = 'ORDER BY '. $filter_order .' '. $filter_order_Dir ; $query = 'SELECT COUNT(*)' . ' FROM #__fadegallery AS s ' . $where ; $db->setQuery( $query ); if (!$db->query()) echo ( $db->stderr()); $total = $db->loadResult(); //echo $total; //echo 'total='.$total;exit; jimport('joomla.html.pagination'); $pageNav = new JPagination( $total, $limitstart, $limit ); $query = 'SELECT s.* FROM #__fadegallery AS s ' . $where . $orderby ; $db->setQuery($query, $pageNav->limitstart, $pageNav->limit ); if (!$db->query()) echo ( $db->stderr()); $rows = $db->loadObjectList(); $javascript = 'onchange="document.adminForm.submit();"'; $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; // search filter $lists['search']= $search; $this->assignRef('items', $rows); $this->assignRef('pagination', $pageNav); $this->assignRef('lists', $lists); parent::display($tpl); }