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


PHP JToolbarHelper::modal方法代码示例

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


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

示例1: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_sibdiet');
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_PROFILES'), 'users profiles');
     if (in_array('profiles', $this->permissions)) {
         if ($canDo->get('core.create')) {
             JToolBarHelper::addNew('profile.add');
         }
         if (isset($this->items[0])) {
             if ($canDo->get('core.edit')) {
                 JToolBarHelper::editList('profile.edit');
             }
             if ($canDo->get('core.edit.state')) {
                 JToolbarHelper::checkin('profiles.checkin');
             }
             if ($canDo->get('core.delete')) {
                 JToolbarHelper::deleteList('', 'profiles.delete');
             }
             // Add a batch button for Merge Files
             if (JFactory::getUser()->get('isRoot')) {
                 JToolbarHelper::modal('collapseModal', 'icon-users', JText::_('COM_SIBDIET_TOOLBAR_MERGE_FILES'));
             }
         }
     }
     JToolBarHelper::help('screen.profiles', true);
 }
开发者ID:smhnaji,项目名称:sdnet,代码行数:35,代码来源:view.html.php

示例2: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  *
  * @return  void
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $canDo = JHelperContent::getActions('com_templates');
     if ($canDo->get('core.edit') && $canDo->get('core.create') && $canDo->get('core.admin')) {
         $showButton = true;
     } else {
         $showButton = false;
     }
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     $explodeArray = explode('.', $this->fileName);
     $ext = end($explodeArray);
     JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_VIEW_TEMPLATE'), 'eye thememanager');
     // Add a Apply and save button
     if ($this->type == 'file') {
         if ($showButton) {
             JToolbarHelper::apply('template.apply');
             JToolbarHelper::save('template.save');
         }
     } elseif ($this->type == 'image') {
         if ($showButton) {
             JToolbarHelper::custom('template.cropImage', 'move', 'move', 'COM_TEMPLATES_BUTTON_CROP', false, false);
             JToolbarHelper::modal('resizeModal', 'icon-refresh', 'COM_TEMPLATES_BUTTON_RESIZE');
         }
     } elseif ($this->type == 'archive') {
         if ($showButton) {
             JToolbarHelper::custom('template.extractArchive', 'arrow-down', 'arrow-down', 'COM_TEMPLATES_BUTTON_EXTRACT_ARCHIVE', false, false);
         }
     }
     // Add a copy template button
     if ($this->hathor->home == 0) {
         if ($showButton) {
             JToolbarHelper::modal('collapseModal', 'icon-copy', 'COM_TEMPLATES_BUTTON_COPY_TEMPLATE');
         }
     }
     // Add a Template preview button
     if ($this->preview->client_id == 0) {
         $bar->appendButton('Link', 'picture', 'COM_TEMPLATES_BUTTON_PREVIEW', JUri::root() . 'index.php?tp=1&templateStyle=' . $this->preview->id);
     }
     // Add Manage folders button
     if ($showButton) {
         JToolbarHelper::modal('folderModal', 'icon-folder icon white', 'COM_TEMPLATES_BUTTON_FOLDERS');
     }
     // Add a new file button
     if ($showButton) {
         JToolbarHelper::modal('fileModal', 'icon-file', 'COM_TEMPLATES_BUTTON_FILE');
     }
     // Add a Rename file Button
     if ($this->hathor->home == 0) {
         if ($showButton && $this->type != 'home') {
             JToolbarHelper::modal('renameModal', 'icon-refresh', 'COM_TEMPLATES_BUTTON_RENAME_FILE');
         }
     }
     // Add a Delete file Button
     if ($showButton && $this->type != 'home') {
         JToolbarHelper::modal('deleteModal', 'icon-remove', 'COM_TEMPLATES_BUTTON_DELETE_FILE');
     }
     // Add a Compile Button
     if ($showButton) {
         if ($ext == 'less') {
             JToolbarHelper::custom('template.less', 'play', 'play', 'COM_TEMPLATES_BUTTON_LESS', false, false);
         }
     }
     if ($this->type == 'home') {
         JToolbarHelper::cancel('template.cancel', 'JTOOLBAR_CLOSE');
     } else {
         JToolbarHelper::cancel('template.close', 'COM_TEMPLATES_BUTTON_CLOSE_FILE');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_TEMPLATES_EDIT');
 }
开发者ID:Tommar,项目名称:vino2,代码行数:79,代码来源:view.html.php

示例3: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  *
  * @return  void
  */
 protected function addToolbar()
 {
     $app = JFactory::getApplication();
     $user = JFactory::getUser();
     $app->input->set('hidemainmenu', true);
     // User is global SuperUser
     $isSuperUser = $user->authorise('core.admin');
     // Get the toolbar object instance
     $bar = JToolbar::getInstance('toolbar');
     $explodeArray = explode('.', $this->fileName);
     $ext = end($explodeArray);
     JToolbarHelper::title(JText::sprintf('COM_TEMPLATES_MANAGER_VIEW_TEMPLATE', ucfirst($this->template->name)), 'eye thememanager');
     // Only show file edit buttons for global SuperUser
     if ($isSuperUser) {
         // Add an Apply and save button
         if ($this->type == 'file') {
             JToolbarHelper::apply('template.apply');
             JToolbarHelper::save('template.save');
         } elseif ($this->type == 'image') {
             JToolbarHelper::custom('template.cropImage', 'move', 'move', 'COM_TEMPLATES_BUTTON_CROP', false);
             JToolbarHelper::modal('resizeModal', 'icon-refresh', 'COM_TEMPLATES_BUTTON_RESIZE');
         } elseif ($this->type == 'archive') {
             JToolbarHelper::custom('template.extractArchive', 'arrow-down', 'arrow-down', 'COM_TEMPLATES_BUTTON_EXTRACT_ARCHIVE', false);
         }
         // Add a copy template button (Hathor override doesn't need the button)
         if ($app->getTemplate() != 'hathor') {
             JToolbarHelper::modal('copyModal', 'icon-copy', 'COM_TEMPLATES_BUTTON_COPY_TEMPLATE');
         }
     }
     // Add a Template preview button
     if ($this->preview->client_id == 0) {
         $bar->appendButton('Popup', 'picture', 'COM_TEMPLATES_BUTTON_PREVIEW', JUri::root() . 'index.php?tp=1&templateStyle=' . $this->preview->id, 800, 520);
     }
     // Only show file manage buttons for global SuperUser
     if ($isSuperUser) {
         // Add Manage folders button
         JToolbarHelper::modal('folderModal', 'icon-folder icon white', 'COM_TEMPLATES_BUTTON_FOLDERS');
         // Add a new file button
         JToolbarHelper::modal('fileModal', 'icon-file', 'COM_TEMPLATES_BUTTON_FILE');
         // Add a Rename file Button (Hathor override doesn't need the button)
         if ($app->getTemplate() != 'hathor' && $this->type != 'home') {
             JToolbarHelper::modal('renameModal', 'icon-refresh', 'COM_TEMPLATES_BUTTON_RENAME_FILE');
         }
         // Add a Delete file Button
         if ($this->type != 'home') {
             JToolbarHelper::modal('deleteModal', 'icon-remove', 'COM_TEMPLATES_BUTTON_DELETE_FILE');
         }
         // Add a Compile Button
         if ($ext == 'less') {
             JToolbarHelper::custom('template.less', 'play', 'play', 'COM_TEMPLATES_BUTTON_LESS', false);
         }
     }
     if ($this->type == 'home') {
         JToolbarHelper::cancel('template.cancel', 'JTOOLBAR_CLOSE');
     } else {
         JToolbarHelper::cancel('template.close', 'COM_TEMPLATES_BUTTON_CLOSE_FILE');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_EXTENSIONS_TEMPLATE_MANAGER_TEMPLATES_EDIT');
 }
开发者ID:joomla-projects,项目名称:media-manager-improvement,代码行数:67,代码来源:view.html.php


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