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


PHP Toolbar::appendButton方法代码示例

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


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

示例1: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = ModulesHelper::getActions();
     Toolbar::title(Lang::txt('COM_MODULES_MANAGER_MODULES'), 'module.png');
     if ($canDo->get('core.create')) {
         //Toolbar::addNew('module.add');
         Toolbar::appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_modules&view=select&tmpl=component', 850, 400);
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('module.edit');
     }
     if ($canDo->get('core.create')) {
         Toolbar::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
     }
     if ($canDo->get('core.edit.state')) {
         Toolbar::divider();
         Toolbar::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
         Toolbar::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         Toolbar::divider();
         Toolbar::checkin('modules.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         Toolbar::deleteList('', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
         Toolbar::divider();
     } elseif ($canDo->get('core.edit.state')) {
         Toolbar::trash('modules.trash');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_modules');
         Toolbar::divider();
     }
     Toolbar::help('modules');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:40,代码来源:view.html.php

示例2: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     $canDo = LanguagesHelper::getActions();
     Toolbar::title(Lang::txt('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'langmanager.png');
     if ($canDo->get('core.create')) {
         Toolbar::addNew('language.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('language.edit');
         Toolbar::divider();
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.published') != 2) {
             Toolbar::publishList('languages.publish');
             Toolbar::unpublishList('languages.unpublish');
         }
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         Toolbar::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
         Toolbar::divider();
     } elseif ($canDo->get('core.edit.state')) {
         Toolbar::trash('languages.trash');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         // Add install languages link to the lang installer component
         Toolbar::appendButton('Link', 'extension', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages');
         Toolbar::divider();
         Toolbar::preferences('com_languages');
         Toolbar::divider();
     }
     Toolbar::help('languages');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:39,代码来源:view.html.php

示例3: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     // Set the titlebar text
     Toolbar::title(Lang::txt('COM_MEDIA'), 'mediamanager.png');
     // Add a delete button
     if (User::authorise('core.delete', 'com_media')) {
         $title = Lang::txt('JTOOLBAR_DELETE');
         $dhtml = "<a href=\"#\" onclick=\"MediaManager.submit('folder.delete')\" data-title=\"{$title}\">\n\t\t\t\t\t\t<span class=\"icon-32-delete\">{$title}</span>\n\t\t\t\t\t</a>";
         Toolbar::appendButton('Custom', $dhtml, 'delete');
         Toolbar::divider();
     }
     // Add a delete button
     if (User::authorise('core.admin', 'com_media')) {
         Toolbar::preferences('com_media', 450, 800, 'JToolbar_Options', '', 'window.location.reload()');
         Toolbar::divider();
     }
     Toolbar::help('media');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:23,代码来源:view.html.php

示例4: defined

 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
$canDo = \Components\Groups\Helpers\Permissions::getActions('group');
Toolbar::title(Lang::txt('COM_GROUPS'), 'groups.png');
Toolbar::appendButton('Popup', 'new', 'COM_GROUPS_NEW', 'index.php?option=' . $this->option . '&controller=' . $this->controller . '&tmpl=component&task=new&gid=' . $this->filters['gid'], 570, 170);
Toolbar::spacer();
switch ($this->filters['status']) {
    case 'invitee':
        //if ($canDo->get('core.edit'))
        //{
        //Toolbar::custom('accept', 'publish', Lang::txt('Accept'), Lang::txt('Accept'), false, false);
        //}
        if ($canDo->get('core.delete')) {
            Toolbar::custom('uninvite', 'unpublish', 'COM_GROUPS_MEMBER_UNINVITE', 'COM_GROUPS_MEMBER_UNINVITE', false, false);
        }
        break;
    case 'applicant':
        if ($canDo->get('core.edit')) {
            Toolbar::custom('approve', 'publish', 'COM_GROUPS_MEMBER_APPROVE', 'COM_GROUPS_MEMBER_APPROVE', false, false);
        }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:display.php

示例5: defined

 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
$canDo = \Components\Courses\Helpers\Permissions::getActions();
Toolbar::title(Lang::txt('COM_COURSES') . ': ' . Lang::txt('COM_COURSES_COUPON_CODES'), 'courses.png');
if ($canDo->get('core.create')) {
    Toolbar::appendButton('Popup', 'refresh', 'COM_COURSES_GENERATE', 'index.php?option=' . $this->option . '&controller=' . $this->controller . '&section=' . $this->section->get('id') . '&task=options&tmpl=component', 500, 200);
    Toolbar::spacer();
    Toolbar::custom('export', 'export', 'export', 'COM_COURSES_EXPORT_CODES', false);
    Toolbar::spacer();
    Toolbar::addNew();
}
if ($canDo->get('core.edit')) {
    Toolbar::editList();
}
if ($canDo->get('core.delete')) {
    Toolbar::deleteList('COM_COURSES_DELETE_CONFIRM', 'delete');
}
Html::behavior('tooltip');
?>
<script type="text/javascript">
function submitbutton(pressbutton)
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:display.php

示例6: defined

 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
$canDo = \Components\Groups\Helpers\Permissions::getActions('group');
Toolbar::title(Lang::txt('COM_GROUPS'), 'groups.png');
Toolbar::appendButton('Popup', 'new', 'COM_GROUPS_NEW', 'index.php?option=' . $this->option . '&controller=' . $this->controller . '&tmpl=component&task=new&gid=' . $this->filters['gid'], 570, 170);
Toolbar::appendButton('Link', 'unblock', 'COM_GROUPS_ROLE_ASSIGN', 'index.php?option=' . $this->option . '&controller=roles&tmpl=component&task=assign&gid=' . $this->filters['gid'], 400, 400);
Toolbar::spacer();
switch ($this->filters['status']) {
    case 'invitee':
        //if ($canDo->get('core.edit'))
        //{
        //Toolbar::custom('accept', 'publish', Lang::txt('Accept'), Lang::txt('Accept'), false, false);
        //}
        if ($canDo->get('core.delete')) {
            Toolbar::custom('uninvite', 'unpublish', 'COM_GROUPS_MEMBER_UNINVITE', 'COM_GROUPS_MEMBER_UNINVITE', false, false);
        }
        break;
    case 'applicant':
        if ($canDo->get('core.edit')) {
            Toolbar::custom('approve', 'publish', 'COM_GROUPS_MEMBER_APPROVE', 'COM_GROUPS_MEMBER_APPROVE', false, false);
        }
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:31,代码来源:display.php

示例7: defined

 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2011 Purdue University. All rights reserved.
 * @license   http://www.gnu.org/licenses/lgpl-3.0.html LGPLv3
 */
defined('_HZEXEC_') or die;
//print_r($this->sku->getId()); die;
$canDo = \Components\Storefront\Admin\Helpers\Permissions::getActions('product');
Toolbar::title(Lang::txt('COM_STOREFRONT') . ': SKU\'s serial numbers', 'storefront.png');
Toolbar::appendButton('Popup', 'new', 'New', 'index.php?option=' . $this->option . '&controller=' . $this->controller . '&tmpl=component&task=new&sId=' . $this->sku->getId(), 570, 170);
if ($canDo->get('core.delete')) {
    Toolbar::deleteList();
}
Toolbar::spacer();
//Toolbar::custom('upload', 'upload.png', '', 'Upload CSV', false);
Toolbar::appendButton('Popup', 'upload', 'Upload CSV', 'index.php?option=' . $this->option . '&controller=' . $this->controller . '&tmpl=component&task=upload&sId=' . $this->sku->getId(), 570, 170);
Toolbar::spacer();
Toolbar::cancel();
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
	var form = document.adminForm;
	if (pressbutton == 'cancel') {
		submitform(pressbutton);
		return;
	}
	// do field validation
	submitform(pressbutton);
}
</script>
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:31,代码来源:display.php


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