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


PHP flexicontent_html::addToolBarButton方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     //initialise variables
     $app = JFactory::getApplication();
     $option = JRequest::getVar('option');
     $user = JFactory::getUser();
     $db = JFactory::getDBO();
     $document = JFactory::getDocument();
     $cparams = JComponentHelper::getParams('com_flexicontent');
     $print_logging_info = $cparams->get('print_logging_info');
     if ($print_logging_info) {
         global $fc_run_times;
     }
     JHTML::_('behavior.tooltip');
     //get vars
     $filter_order = $app->getUserStateFromRequest($option . '.tags.filter_order', 'filter_order', 't.name', 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest($option . '.tags.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_state = $app->getUserStateFromRequest($option . '.tags.filter_state', 'filter_state', '*', 'word');
     $filter_assigned = $app->getUserStateFromRequest($option . '.tags.filter_assigned', 'filter_assigned', '*', 'word');
     $search = $app->getUserStateFromRequest($option . '.tags.search', 'search', '', 'string');
     $search = FLEXI_J16GE ? $db->escape(trim(JString::strtolower($search))) : $db->getEscaped(trim(JString::strtolower($search)));
     //add css and submenu to document
     $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/flexicontentbackend.css');
     if (FLEXI_J30GE) {
         $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j3x.css');
     } else {
         if (FLEXI_J16GE) {
             $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j25.css');
         } else {
             $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j15.css');
         }
     }
     // Get User's Global Permissions
     $perms = FlexicontentHelperPerm::getPerm();
     // Create Submenu (and also check access to current view)
     FLEXISubmenu('CanTags');
     // Create document/toolbar titles
     $doc_title = JText::_('FLEXI_TAGS');
     $site_title = $document->getTitle();
     JToolBarHelper::title($doc_title, 'tags');
     $document->setTitle($doc_title . ' - ' . $site_title);
     // Create the toolbar
     $js = "window.addEvent('domready', function(){";
     $contrl = FLEXI_J16GE ? "tags." : "";
     $toolbar = JToolBar::getInstance('toolbar');
     if ($perms->CanConfig) {
         $btn_task = '';
         $popup_load_url = JURI::base() . 'index.php?option=com_flexicontent&view=tags&layout=import&tmpl=component';
         if (FLEXI_J30GE || !FLEXI_J16GE) {
             // Layout of Popup button broken in J3.1, add in J1.5 it generates duplicate HTML tag id (... just for validation), so add manually
             $js .= "\n\t\t\t\t\tjQuery('#toolbar-import a.toolbar, #toolbar-import button')\n\t\t\t\t\t\t.attr('onclick', 'javascript:;')\n\t\t\t\t\t\t.attr('href', '" . $popup_load_url . "')\n\t\t\t\t\t\t.attr('rel', '{handler: \\'iframe\\', size: {x: 430, y: 500}, onClose: function() {}}');\n\t\t\t\t";
             JToolBarHelper::custom($btn_task, 'import.png', 'import_f2.png', 'FLEXI_IMPORT', false);
             JHtml::_('behavior.modal', '#toolbar-import a.toolbar, #toolbar-import button');
         } else {
             $toolbar->appendButton('Popup', 'import', JText::_('FLEXI_IMPORT'), str_replace('&', '&', $popup_load_url), 430, 500);
         }
         JToolBarHelper::divider();
         JToolBarHelper::spacer();
     }
     JToolBarHelper::publishList($contrl . 'publish');
     JToolBarHelper::unpublishList($contrl . 'unpublish');
     JToolBarHelper::addNew($contrl . 'add');
     JToolBarHelper::editList($contrl . 'edit');
     //JToolBarHelper::deleteList(JText::_('FLEXI_ARE_YOU_SURE'), $contrl.'remove');
     // This will work in J2.5+ too and is offers more options (above a little bogus in J1.5, e.g. bad HTML id tag)
     $msg_alert = JText::sprintf('FLEXI_SELECT_LIST_ITEMS_TO', JText::_('FLEXI_DELETE'));
     $msg_confirm = JText::_('FLEXI_ITEMS_DELETE_CONFIRM');
     $btn_task = $contrl . 'remove';
     $extra_js = "";
     flexicontent_html::addToolBarButton('FLEXI_DELETE', 'delete', '', $msg_alert, $msg_confirm, $btn_task, $extra_js, $btn_list = true, $btn_menu = true, $btn_confirm = true);
     if ($perms->CanConfig) {
         JToolBarHelper::divider();
         JToolBarHelper::spacer();
         $session = JFactory::getSession();
         $fc_screen_width = (int) $session->get('fc_screen_width', 0, 'flexicontent');
         $_width = $fc_screen_width && $fc_screen_width - 84 > 940 ? $fc_screen_width - 84 > 1400 ? 1400 : $fc_screen_width - 84 : 940;
         $fc_screen_height = (int) $session->get('fc_screen_height', 0, 'flexicontent');
         $_height = $fc_screen_height && $fc_screen_height - 128 > 550 ? $fc_screen_height - 128 > 1000 ? 1000 : $fc_screen_height - 128 : 550;
         JToolBarHelper::preferences('com_flexicontent', $_height, $_width, 'Configuration');
     }
     $js .= "});";
     $document->addScriptDeclaration($js);
     //Get data from the model
     if ($print_logging_info) {
         $start_microtime = microtime(true);
     }
     $rows = $this->get('Data');
     if ($print_logging_info) {
         @($fc_run_times['execute_main_query'] += round(1000000 * 10 * (microtime(true) - $start_microtime)) / 10);
     }
     // Get assigned items
     $model = $this->getModel();
     $rowids = array();
     foreach ($rows as $row) {
         $rowids[] = $row->id;
     }
     if ($print_logging_info) {
         $start_microtime = microtime(true);
     }
     $rowtotals = $model->getAssignedItems($rowids);
//.........这里部分代码省略.........
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:view.html.php

示例2: display

 function display($tpl = null)
 {
     // ********************
     // Initialise variables
     // ********************
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $option = $jinput->get('option', '', 'cmd');
     $view = $jinput->get('view', '', 'cmd');
     $cparams = JComponentHelper::getParams('com_flexicontent');
     $user = JFactory::getUser();
     $db = JFactory::getDBO();
     $document = JFactory::getDocument();
     // Get model
     $model = $this->getModel();
     $print_logging_info = $cparams->get('print_logging_info');
     if ($print_logging_info) {
         global $fc_run_times;
     }
     // ***********
     // Get filters
     // ***********
     $count_filters = 0;
     // various filters
     $filter_fieldtype = $model->getState('filter_fieldtype');
     $filter_assigned = $model->getState('filter_assigned');
     $filter_type = $model->getState('filter_type');
     $filter_state = $model->getState('filter_state');
     $filter_access = $model->getState('filter_access');
     if ($filter_assigned) {
         $count_filters++;
     }
     if ($filter_fieldtype) {
         $count_filters++;
     }
     if ($filter_state) {
         $count_filters++;
     }
     if ($filter_access) {
         $count_filters++;
     }
     if ($filter_type) {
         $count_filters++;
     }
     // ordering filters
     $filter_order = $model->getState('filter_order');
     $filter_order_Dir = $model->getState('filter_order_Dir');
     // text search
     $search = $model->getState('search');
     $search = $db->escape(trim(JString::strtolower($search)));
     // ****************************
     // Important usability messages
     // ****************************
     if ($cparams->get('show_usability_messages', 1)) {
         $notice_content_type_order = $app->getUserStateFromRequest($option . '.' . $view . '.notice_content_type_order', 'notice_content_type_order', 0, 'int');
         if (!$notice_content_type_order) {
             $app->setUserState($option . '.' . $view . '.notice_content_type_order', 1);
             $app->enqueueMessage(JText::_('FLEXI_DEFINE_FIELD_ORDER_FILTER_BY_TYPE'), 'message');
             $app->enqueueMessage(JText::_('FLEXI_DEFINE_FIELD_ORDER_FILTER_WITHOUT_TYPE'), 'message');
             $app->enqueueMessage(JText::_('FLEXI_USABILITY_MESSAGES_TURN_OFF'), 'message');
         }
     }
     // **************************
     // Add css and js to document
     // **************************
     flexicontent_html::loadFramework('select2');
     //JHTML::_('behavior.tooltip');
     $document->addStyleSheetVersion(JURI::base(true) . '/components/com_flexicontent/assets/css/flexicontentbackend.css', FLEXI_VHASH);
     $document->addStyleSheetVersion(JURI::base(true) . '/components/com_flexicontent/assets/css/j3x.css', FLEXI_VHASH);
     $js = "jQuery(document).ready(function(){";
     // *****************************
     // Get user's global permissions
     // *****************************
     $perms = FlexicontentHelperPerm::getPerm();
     // ************************
     // Create Submenu & Toolbar
     // ************************
     // Create Submenu (and also check access to current view)
     FLEXISubmenu('CanFields');
     // Create document/toolbar titles
     $doc_title = JText::_('FLEXI_FIELDS');
     $site_title = $document->getTitle();
     JToolBarHelper::title($doc_title, 'fields');
     $document->setTitle($doc_title . ' - ' . $site_title);
     if ($perms->CanEditField) {
         $ctrl_task = '&task=fields.selectsearchflag';
         $popup_load_url = JURI::base() . 'index.php?option=com_flexicontent' . $ctrl_task . '&tmpl=component';
         $btn_name = 'basicindex';
         $btn_task = '';
         $full_js = ';';
         $extra_js = '';
         flexicontent_html::addToolBarButton(JText::_('FLEXI_TOGGLE_SEARCH_FLAG'), $btn_name, $full_js, $msg_alert = JText::_('FLEXI_SELECT_FIELDS_TO_TOGGLE_PROPERTY'), $msg_confirm = '', $btn_task, $extra_js, $btn_list = true, $btn_menu = true, $btn_confirm = false, $btn_class = "");
         $js .= "\n\t\t\t\tjQuery('#toolbar-basicindex a.toolbar, #toolbar-basicindex button')\n\t\t\t\t\t.attr('onclick', 'javascript:;')\n\t\t\t\t\t.attr('href', '" . $popup_load_url . "')\n\t\t\t\t\t.attr('rel', '{handler: \\'iframe\\', size: {x: 800, y: 340}, onClose: function() {}}');\n\t\t\t";
     }
     $contrl = "fields.";
     if ($perms->CanCopyFields) {
         JToolBarHelper::custom($contrl . 'copy', 'copy.png', 'copy_f2.png', 'FLEXI_COPY');
         JToolBarHelper::custom($contrl . 'copy_wvalues', 'copy_wvalues.png', 'copy_f2.png', 'FLEXI_COPY_WITH_VALUES');
         JToolBarHelper::divider();
     }
//.........这里部分代码省略.........
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:101,代码来源:view.html.php

示例3: display


//.........这里部分代码省略.........
                $admin_folder = str_replace(JURI::root(true), '', JURI::base(true));
                $item_url = str_replace($admin_folder . '/', '/', $item_url);
                // Restore application
                JFactory::$application = JApplication::getInstance('administrator');
            }
            $previewlink = $item_url . (strstr($item_url, '?') ? '&' : '?') . 'preview=1' . $autologin;
            //$previewlink     = str_replace('&', '&', $previewlink);
            //$previewlink = JRoute::_(JURI::root() . FlexicontentHelperRoute::getItemRoute($item->id.':'.$item->alias, $categories[$item->catid]->slug)) .$autologin;
            // PREVIEW for latest version
            if (!$params->get('use_versioning', 1) || $item->version == $item->current_version && $item->version == $item->last_version) {
                $toolbar->appendButton('Custom', '<button class="preview btn btn-small btn-info spaced-btn" onClick="window.open(\'' . $previewlink . '\');"><span title="' . JText::_('Preview') . '" class="icon-screen"></span>' . JText::_('Preview') . '</button>', 'preview');
            } else {
                // Add a preview button for (currently) LOADED version of the item
                $previewlink_loaded_ver = $previewlink . '&version=' . $item->version;
                $toolbar->appendButton('Custom', '<button class="preview btn btn-small" onClick="window.open(\'' . $previewlink_loaded_ver . '\');" target="_blank"><span title="' . JText::_('Preview') . '" class="icon-screen"></span>' . JText::_('FLEXI_PREVIEW_FORM_LOADED_VERSION') . ' [' . $item->version . ']</button>', 'preview');
                // Add a preview button for currently ACTIVE version of the item
                $previewlink_active_ver = $previewlink . '&version=' . $item->current_version;
                $toolbar->appendButton('Custom', '<button class="preview btn btn-small" onClick="window.open(\'' . $previewlink_active_ver . '\');" target="_blank"><span title="' . JText::_('Preview') . '" class="icon-screen"></span>' . JText::_('FLEXI_PREVIEW_FRONTEND_ACTIVE_VERSION') . ' [' . $item->current_version . ']</button>', 'preview');
                // Add a preview button for currently LATEST version of the item
                $previewlink_last_ver = $previewlink;
                //'&version='.$item->last_version;
                $toolbar->appendButton('Custom', '<button class="preview btn btn-small" onClick="window.open(\'' . $previewlink_last_ver . '\');" target="_blank"><span title="' . JText::_('Preview') . '" class="icon-screen"></span>' . JText::_('FLEXI_PREVIEW_LATEST_SAVED_VERSION') . ' [' . $item->last_version . ']</button>', 'preview');
            }
            JToolBarHelper::spacer();
            JToolBarHelper::divider();
            JToolBarHelper::spacer();
        }
        // ************************
        // Add modal layout editing
        // ************************
        if ($perms['cantemplates']) {
            JToolBarHelper::divider();
            if (!$isnew || $item->version) {
                flexicontent_html::addToolBarButton('FLEXI_EDIT_LAYOUT', $btn_name = 'apply_ajax', $full_js = "var url = jQuery(this).attr('data-href'); fc_showDialog(url, 'fc_modal_popup_container'); return false;", $msg_alert = '', $msg_confirm = '', $btn_task = 'items.apply_ajax', $extra_js = '', $btn_list = false, $btn_menu = true, $btn_confirm = false, $btn_class = "btn-info" . $tip_class, $btn_icon = "icon-pencil", 'data-placement="bottom" data-href="index.php?option=com_flexicontent&amp;view=template&amp;type=items&amp;tmpl=component&amp;ismodal=1&amp;folder=' . $item->itemparams->get('ilayout', $tparams->get('ilayout', 'default')) . '" title="Edit the display layout of this item. <br/><br/>Note: this layout maybe assigned to content types or other items, thus changing it will effect them too"');
            }
        }
        // Check if saving an item that translates an original content in site's default language
        $site_default = substr(flexicontent_html::getSiteDefaultLang(), 0, 2);
        $is_content_default_lang = $site_default == substr($item->language, 0, 2);
        // *****************************************************************************
        // Get (CORE & CUSTOM) fields and their VERSIONED values and then
        // (a) Apply Content Type Customization to CORE fields (label, description, etc)
        // (b) Create the edit html of the CUSTOM fields by triggering 'onDisplayField'
        // *****************************************************************************
        if ($print_logging_info) {
            $start_microtime = microtime(true);
        }
        $fields = $this->get('Extrafields');
        $item->fields =& $fields;
        if ($print_logging_info) {
            $fc_run_times['get_field_vals'] = round(1000000 * 10 * (microtime(true) - $start_microtime)) / 10;
        }
        if ($print_logging_info) {
            $start_microtime = microtime(true);
        }
        $jcustom = $app->getUserState('com_flexicontent.edit.item.custom');
        //print_r($jcustom);
        foreach ($fields as $field) {
            // a. Apply CONTENT TYPE customizations to CORE FIELDS, e.g a type specific label & description
            // NOTE: the field parameters are already created so there is not need to call this for CUSTOM fields, which do not have CONTENT TYPE customizations
            if ($field->iscore) {
                FlexicontentFields::loadFieldConfig($field, $item);
            }
            // b. Create field 's editing HTML (the form field)
            // NOTE: this is DONE only for CUSTOM fields, since form field html is created by the form for all CORE fields, EXCEPTION is the 'text' field (see bellow)
            if (!$field->iscore) {
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:67,代码来源:view.html.php

示例4: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = UsersHelper::getActions();
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('group.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('group.edit');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'groups.delete');
         JToolBarHelper::divider();
     }
     $appsman_path = JPATH_COMPONENT_ADMINISTRATOR . DS . 'views' . DS . 'appsman';
     if (file_exists($appsman_path)) {
         $btn_icon = 'icon-download';
         $btn_name = 'download';
         $btn_task = 'appsman.exportxml';
         $extra_js = " var f=document.getElementById('adminForm'); f.elements['view'].value='appsman'; jQuery('<input>').attr({type: 'hidden', name: 'table', value: 'usergroups'}).appendTo(jQuery(f));";
         flexicontent_html::addToolBarButton('Export now', $btn_name, $full_js = '', $msg_alert = '', $msg_confirm = 'Export now as XML', $btn_task, $extra_js, $btn_list = false, $btn_menu = true, $btn_confirm = true, $btn_class = "btn-warning", $btn_icon);
         $btn_icon = 'icon-box-add';
         $btn_name = 'box-add';
         $btn_task = 'appsman.addtoexport';
         $extra_js = " var f=document.getElementById('adminForm'); f.elements['view'].value='appsman'; jQuery('<input>').attr({type: 'hidden', name: 'table', value: 'usergroups'}).appendTo(jQuery(f));";
         flexicontent_html::addToolBarButton('Add to export', $btn_name, $full_js = '', $msg_alert = '', $msg_confirm = 'Add to export list', $btn_task, $extra_js, $btn_list = false, $btn_menu = true, $btn_confirm = true, $btn_class = "btn-warning", $btn_icon);
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_users');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_USERS_GROUPS');
 }
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:38,代码来源:view.html.php

示例5: setToolbar

 /**
  * Method to configure the toolbar for this view.
  *
  * @access	public
  * @return	void
  */
 function setToolbar()
 {
     $perms = FlexicontentHelperPerm::getPerm();
     $contrl = "users.";
     JToolBarHelper::custom('logout', 'cancel.png', 'cancel_f2.png', 'Logout');
     JToolBarHelper::addNew($contrl . 'add');
     JToolBarHelper::editList($contrl . 'edit');
     //JToolBarHelper::deleteList(JText::_('FLEXI_ARE_YOU_SURE'), $contrl.'remove');
     // This will work in J2.5+ too and is offers more options (above a little bogus in J1.5, e.g. bad HTML id tag)
     $msg_alert = JText::sprintf('FLEXI_SELECT_LIST_ITEMS_TO', JText::_('FLEXI_DELETE'));
     $msg_confirm = JText::_('FLEXI_ITEMS_DELETE_CONFIRM');
     $btn_task = $contrl . 'remove';
     $extra_js = "";
     flexicontent_html::addToolBarButton('FLEXI_DELETE', 'delete', '', $msg_alert, $msg_confirm, $btn_task, $extra_js, $btn_list = true, $btn_menu = true, $btn_confirm = true);
     JToolBarHelper::divider();
     JToolBarHelper::spacer();
     JToolBarHelper::help('JHELP_USERS_USER_MANAGER');
     if ($perms->CanConfig) {
         JToolBarHelper::divider();
         JToolBarHelper::spacer();
         $session = JFactory::getSession();
         $fc_screen_width = (int) $session->get('fc_screen_width', 0, 'flexicontent');
         $_width = $fc_screen_width && $fc_screen_width - 84 > 940 ? $fc_screen_width - 84 > 1400 ? 1400 : $fc_screen_width - 84 : 940;
         $fc_screen_height = (int) $session->get('fc_screen_height', 0, 'flexicontent');
         $_height = $fc_screen_height && $fc_screen_height - 128 > 550 ? $fc_screen_height - 128 > 1000 ? 1000 : $fc_screen_height - 128 : 550;
         JToolBarHelper::preferences('com_flexicontent', $_height, $_width, 'Configuration');
     }
 }
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:34,代码来源:view.html.php

示例6: display

 function display($tpl = null)
 {
     // ********************
     // Initialise variables
     // ********************
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $option = $jinput->get('option', '', 'cmd');
     $view = $jinput->get('view', '', 'cmd');
     $cparams = JComponentHelper::getParams('com_flexicontent');
     $user = JFactory::getUser();
     $db = JFactory::getDBO();
     $document = JFactory::getDocument();
     // Get model
     $model = $this->getModel();
     $print_logging_info = $cparams->get('print_logging_info');
     if ($print_logging_info) {
         global $fc_run_times;
     }
     // ***********
     // Get filters
     // ***********
     $count_filters = 0;
     // various filters
     $filter_state = $app->getUserStateFromRequest($option . '.' . $view . '.filter_state', 'filter_state', '', 'word');
     $filter_access = $app->getUserStateFromRequest($option . '.' . $view . '.filter_access', 'filter_access', '', 'string');
     if ($filter_state) {
         $count_filters++;
     }
     if ($filter_access) {
         $count_filters++;
     }
     // ordering filters
     $filter_order = $app->getUserStateFromRequest($option . '.' . $view . '.filter_order', 'filter_order', 't.name', 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest($option . '.' . $view . '.filter_order_Dir', 'filter_order_Dir', '', 'word');
     // text search
     $search = $app->getUserStateFromRequest($option . '.' . $view . '.search', 'search', '', 'string');
     $search = $db->escape(trim(JString::strtolower($search)));
     // ****************************
     // Important usability messages
     // ****************************
     if ($cparams->get('show_usability_messages', 1)) {
     }
     // **************************
     // Add css and js to document
     // **************************
     flexicontent_html::loadFramework('select2');
     JHTML::_('behavior.tooltip');
     $document->addStyleSheet(JURI::base(true) . '/components/com_flexicontent/assets/css/flexicontentbackend.css');
     if (FLEXI_J30GE) {
         $document->addStyleSheet(JURI::base(true) . '/components/com_flexicontent/assets/css/j3x.css');
     } else {
         if (FLEXI_J16GE) {
             $document->addStyleSheet(JURI::base(true) . '/components/com_flexicontent/assets/css/j25.css');
         }
     }
     // *****************************
     // Get user's global permissions
     // *****************************
     $perms = FlexicontentHelperPerm::getPerm();
     // ************************
     // Create Submenu & Toolbar
     // ************************
     // Create Submenu (and also check access to current view)
     FLEXISubmenu('CanTypes');
     // Create document/toolbar titles
     $doc_title = JText::_('FLEXI_TYPES');
     $site_title = $document->getTitle();
     JToolBarHelper::title($doc_title, 'types');
     $document->setTitle($doc_title . ' - ' . $site_title);
     $contrl = "types.";
     JToolBarHelper::custom($contrl . 'copy', 'copy.png', 'copy_f2.png', 'FLEXI_COPY');
     JToolBarHelper::divider();
     JToolBarHelper::spacer();
     JToolBarHelper::publishList($contrl . 'publish');
     JToolBarHelper::unpublishList($contrl . 'unpublish');
     JToolBarHelper::addNew($contrl . 'add');
     JToolBarHelper::editList($contrl . 'edit');
     //JToolBarHelper::deleteList(JText::_('FLEXI_ARE_YOU_SURE'), $contrl.'remove');
     // This will work in J2.5+ too and is offers more options (above a little bogus in J1.5, e.g. bad HTML id tag)
     $msg_alert = JText::sprintf('FLEXI_SELECT_LIST_ITEMS_TO', JText::_('FLEXI_DELETE'));
     $msg_confirm = JText::_('FLEXI_ITEMS_DELETE_CONFIRM');
     $btn_task = $contrl . 'remove';
     $extra_js = "";
     flexicontent_html::addToolBarButton('FLEXI_DELETE', 'delete', '', $msg_alert, $msg_confirm, $btn_task, $extra_js, $btn_list = true, $btn_menu = true, $btn_confirm = true);
     $appsman_path = JPATH_COMPONENT_ADMINISTRATOR . DS . 'views' . DS . 'appsman';
     if (file_exists($appsman_path)) {
         $btn_icon = 'icon-download';
         $btn_name = 'download';
         $btn_task = 'appsman.exportxml';
         $extra_js = " var f=document.getElementById('adminForm'); f.elements['view'].value='appsman'; jQuery('<input>').attr({type: 'hidden', name: 'table', value: 'flexicontent_types'}).appendTo(jQuery(f));";
         flexicontent_html::addToolBarButton('Export now', $btn_name, $full_js = '', $msg_alert = '', $msg_confirm = 'Export now as XML', $btn_task, $extra_js, $btn_list = false, $btn_menu = true, $btn_confirm = true, $btn_class = "btn-warning", $btn_icon);
         $btn_icon = 'icon-box-add';
         $btn_name = 'box-add';
         $btn_task = 'appsman.addtoexport';
         $extra_js = " var f=document.getElementById('adminForm'); f.elements['view'].value='appsman'; jQuery('<input>').attr({type: 'hidden', name: 'table', value: 'flexicontent_types'}).appendTo(jQuery(f));";
         flexicontent_html::addToolBarButton('Add to export', $btn_name, $full_js = '', $msg_alert = '', $msg_confirm = 'Add to export list', $btn_task, $extra_js, $btn_list = false, $btn_menu = true, $btn_confirm = true, $btn_class = "btn-warning", $btn_icon);
     }
     if ($perms->CanConfig) {
         JToolBarHelper::divider();
//.........这里部分代码省略.........
开发者ID:noxidsoft,项目名称:flexicontent-cck,代码行数:101,代码来源:view.html.php

示例7: display


//.........这里部分代码省略.........
             }
         }
     }
     if ($filter_itemscount) {
         $js .= "\$\$('.col_itemscount').each(function(el){ el.addClass('yellow'); });";
     } else {
         $js .= "\$\$('.col_itemscount').each(function(el){ el.removeClass('yellow'); });";
     }
     if ($search) {
         $js .= "\$\$('.col_title').each(function(el){ el.addClass('yellow'); });";
     } else {
         $js .= "\$\$('.col_title').each(function(el){ el.removeClass('yellow'); });";
     }
     $js .= "});";
     $document->addScriptDeclaration($js);
     // Get User's Global Permissions
     $perms = FlexicontentHelperPerm::getPerm();
     // Create Submenu (and also check access to current view)
     FLEXISubmenu('CanAuthors');
     // Create document/toolbar titles
     $doc_title = JText::_('FLEXI_AUTHORS');
     $site_title = $document->getTitle();
     JToolBarHelper::title($doc_title, 'authors');
     $document->setTitle($doc_title . ' - ' . $site_title);
     // Create the toolbar
     $contrl = FLEXI_J16GE ? "users." : "";
     JToolBarHelper::custom('logout', 'cancel.png', 'cancel_f2.png', 'Logout');
     //JToolBarHelper::deleteList(JText::_('FLEXI_ARE_YOU_SURE'), $contrl.'remove');
     // This will work in J2.5+ too and is offers more options (above a little bogus in J1.5, e.g. bad HTML id tag)
     $msg_alert = JText::sprintf('FLEXI_SELECT_LIST_ITEMS_TO', JText::_('FLEXI_DELETE'));
     $msg_confirm = JText::_('FLEXI_ITEMS_DELETE_CONFIRM');
     $btn_task = $contrl . 'remove';
     $extra_js = "";
     flexicontent_html::addToolBarButton('FLEXI_DELETE', 'delete', '', $msg_alert, $msg_confirm, $btn_task, $extra_js, $btn_list = true, $btn_menu = true, $btn_confirm = true);
     JToolBarHelper::addNew($contrl . 'add');
     JToolBarHelper::editList($contrl . 'edit');
     JToolBarHelper::divider();
     JToolBarHelper::spacer();
     if (!FLEXI_J16GE) {
         JToolBarHelper::help('screen.users');
     } else {
         JToolBarHelper::help('JHELP_USERS_USER_MANAGER');
     }
     if ($perms->CanConfig) {
         JToolBarHelper::divider();
         JToolBarHelper::spacer();
         $session = JFactory::getSession();
         $fc_screen_width = (int) $session->get('fc_screen_width', 0, 'flexicontent');
         $_width = $fc_screen_width && $fc_screen_width - 84 > 940 ? $fc_screen_width - 84 > 1400 ? 1400 : $fc_screen_width - 84 : 940;
         $fc_screen_height = (int) $session->get('fc_screen_height', 0, 'flexicontent');
         $_height = $fc_screen_height && $fc_screen_height - 128 > 550 ? $fc_screen_height - 128 > 1000 ? 1000 : $fc_screen_height - 128 : 550;
         JToolBarHelper::preferences('com_flexicontent', $_height, $_width, 'Configuration');
     }
     $limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit'), 'int');
     $limitstart = $app->getUserStateFromRequest($option . '.limitstart', 'limitstart', 0, 'int');
     $where = array();
     $having = array();
     $extra_joins = array();
     if (isset($search) && $search != '') {
         $searchEscaped = FLEXI_J16GE ? $db->escape($search, true) : $db->getEscaped($search, true);
         $searchEscaped = $db->Quote('%' . $searchEscaped . '%', false);
         $where[] = 'a.username LIKE ' . $searchEscaped . ' OR a.email LIKE ' . $searchEscaped . ' OR a.name LIKE ' . $searchEscaped;
     }
     // visited date filtering
     if ($date == 1) {
         if ($startdate && !$enddate) {
开发者ID:jakesyl,项目名称:flexicontent,代码行数:67,代码来源:view.html.php


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