本文整理汇总了PHP中Toolbar::custom方法的典型用法代码示例。如果您正苦于以下问题:PHP Toolbar::custom方法的具体用法?PHP Toolbar::custom怎么用?PHP Toolbar::custom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Toolbar
的用法示例。
在下文中一共展示了Toolbar::custom方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = TemplatesHelper::getActions();
$isSite = $state->get('filter.client_id') == 0;
Toolbar::title(Lang::txt('COM_TEMPLATES_MANAGER_STYLES'), 'thememanager');
if ($canDo->get('core.edit.state')) {
Toolbar::makeDefault('styles.setDefault', 'COM_TEMPLATES_TOOLBAR_SET_HOME');
Toolbar::divider();
}
if ($canDo->get('core.edit')) {
Toolbar::editList('style.edit');
}
if ($canDo->get('core.create')) {
Toolbar::custom('styles.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
Toolbar::divider();
}
if ($canDo->get('core.delete')) {
Toolbar::deleteList('', 'styles.delete');
Toolbar::divider();
}
if ($canDo->get('core.admin')) {
Toolbar::preferences('com_templates');
Toolbar::divider();
}
Toolbar::help('styles');
}
示例2: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = UsersHelper::getActions();
Toolbar::title(Lang::txt('COM_USERS_VIEW_USERS_TITLE'), 'user');
if ($canDo->get('core.create')) {
//Toolbar::addNew('user.add');
}
if ($canDo->get('core.edit')) {
Toolbar::editList('user.edit');
}
if ($canDo->get('core.edit.state')) {
Toolbar::divider();
Toolbar::publish('users.approve', 'COM_USERS_TOOLBAR_APPROVE', true);
Toolbar::unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
Toolbar::custom('users.unblock', 'unblock.png', 'unblock_f2.png', 'COM_USERS_TOOLBAR_UNBLOCK', true);
Toolbar::divider();
}
if ($canDo->get('core.delete')) {
Toolbar::deleteList('', 'users.delete');
Toolbar::divider();
}
if ($canDo->get('core.admin')) {
Toolbar::preferences('com_users');
Toolbar::divider();
}
Toolbar::help('users');
}
示例3: 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');
}
示例4: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
Toolbar::title(Lang::txt('COM_CONTENT_FEATURED_TITLE'), 'featured.png');
if ($canDo->get('core.create')) {
Toolbar::addNew('article.add');
}
if ($canDo->get('core.edit')) {
Toolbar::editList('article.edit');
}
if ($canDo->get('core.edit.state')) {
Toolbar::divider();
Toolbar::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
Toolbar::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
Toolbar::divider();
Toolbar::archiveList('articles.archive');
Toolbar::checkin('articles.checkin');
Toolbar::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
}
if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
Toolbar::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
Toolbar::divider();
} elseif ($canDo->get('core.edit.state')) {
Toolbar::divider();
Toolbar::trash('articles.trash');
}
if ($canDo->get('core.admin')) {
Toolbar::preferences('com_content');
Toolbar::divider();
}
Toolbar::help('featured');
}
示例5: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
if ($this->getLayout() == 'edit') {
Toolbar::title(Lang::txt('COM_MESSAGES_WRITE_PRIVATE_MESSAGE'), 'new-privatemessage.png');
Toolbar::save('message.save', 'COM_MESSAGES_TOOLBAR_SEND');
Toolbar::cancel('message.cancel');
Toolbar::help('JHELP_COMPONENTS_MESSAGING_WRITE');
} else {
Toolbar::title(Lang::txt('COM_MESSAGES_VIEW_PRIVATE_MESSAGE'), 'inbox.png');
$sender = JUser::getInstance($this->item->user_id_from);
if ($sender->authorise('core.admin') || $sender->authorise('core.manage', 'com_messages') && $sender->authorise('core.login.admin')) {
Toolbar::custom('message.reply', 'restore.png', 'restore_f2.png', 'COM_MESSAGES_TOOLBAR_REPLY', false);
}
Toolbar::cancel('message.cancel');
Toolbar::help('JHELP_COMPONENTS_MESSAGING_READ');
}
}
示例6: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/menus.php';
$canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
Toolbar::title(Lang::txt('COM_MENUS_VIEW_MENUS_TITLE'), 'menumgr.png');
if ($canDo->get('core.create')) {
Toolbar::addNew('menu.add');
}
if ($canDo->get('core.edit')) {
Toolbar::editList('menu.edit');
}
if ($canDo->get('core.delete')) {
Toolbar::divider();
Toolbar::deleteList('', 'menus.delete');
}
Toolbar::custom('menus.rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false);
if ($canDo->get('core.admin')) {
Toolbar::divider();
Toolbar::preferences('com_menus');
}
Toolbar::divider();
Toolbar::help('menus');
}
示例7: defined
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* 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;
Toolbar::title(Lang::txt('Search: Setup Listing'));
Toolbar::custom('saveHubType', 'save', '', 'Add new HubType', false);
Toolbar::cancel();
$this->css('solr');
$option = $this->option;
\Submenu::addEntry(Lang::txt('Overview'), 'index.php?option=' . $option . '&task=configure');
\Submenu::addEntry(Lang::txt('Search Index'), 'index.php?option=' . $option . '&task=searchindex');
\Submenu::addEntry(Lang::txt('Index Blacklist'), 'index.php?option=' . $option . '&task=manageBlacklist');
?>
<style>
/* Desktop View */
.search-container {
background: #FFFFFF;
height: 100%;
width: 100%;
}
示例8: defined
* 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;
Toolbar::title(Lang::txt('Solr Search: Add Document Type - ' . $this->type));
Toolbar::back();
Toolbar::spacer();
//Toolbar::save();
Toolbar::custom('saveschema', 'save', '', 'Index data-type', false);
\Submenu::addEntry(Lang::txt('Overview'), 'index.php?option=' . $this->option . '&task=configure');
\Submenu::addEntry(Lang::txt('Search Index'), 'index.php?option=' . $this->option . '&task=searchindex');
\Submenu::addEntry(Lang::txt('Index Blacklist'), 'index.php?option=' . $this->option . '&task=manageBlacklist');
$this->css('solr');
?>
<style>
.odd-row {
background-color: #FFFFFF;
width: 8px;
}
.even-row {
width: 8px;
}
示例9: defined
* 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
* @author Christopher Smoak <csmoak@purdue.edu>
* @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
// No direct access
defined('_HZEXEC_') or die;
//set title
Toolbar::title(Lang::txt('COM_NEWSLETTER_NEWSLETTER_MAILINGLISTS') . ': ' . $this->list->name, 'list.png');
//add toolbar buttons
Toolbar::custom('doaddemail', 'save', '', 'COM_NEWSLETTER_TOOLBAR_SUBMIT', false);
Toolbar::cancel('cancelemail');
?>
<?php
if ($this->getError()) {
echo '<p class="error">' . $this->getError() . '</p>';
}
?>
<form action="<?php
echo Route::url('index.php?option=' . $this->option);
?>
" method="post" name="adminForm" enctype="multipart/form-data">
<fieldset class="adminform">
<legend><?php
示例10: defined
* 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\Members\Helpers\Admin::getActions('component');
// Menu
Toolbar::title(Lang::txt('COM_MEMBERS') . ': ' . Lang::txt('COM_MEMBERS_PASSWORD_RULES'), 'user');
if ($canDo->get('core.manage')) {
Toolbar::custom('restore_default_content', 'refresh', 'refresh', 'COM_MEMBERS_PASSWORD_RESTORE_DEFAULTS', false, false);
Toolbar::spacer();
}
if ($canDo->get('core.create')) {
Toolbar::addNew();
}
if ($canDo->get('core.edit')) {
Toolbar::editList();
}
if ($canDo->get('core.delete')) {
Toolbar::spacer();
Toolbar::deleteList();
}
?>
<nav role="navigation" class="sub sub-navigation">
示例11: defined
* @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
// No direct access
defined('_HZEXEC_') or die;
// Get the permissions helper
$canDo = Components\Developer\Helpers\Permissions::getActions('application');
// title & toolbar
Toolbar::title(Lang::txt('COM_DEVELOPER') . ': ' . Lang::txt('COM_DEVELOPER_APPLICATIONS'));
if ($canDo->get('core.admin')) {
Toolbar::preferences($this->option, '550');
Toolbar::spacer();
}
if ($canDo->get('core.edit')) {
Toolbar::custom('resetclientsecret', 'refresh', 'refresh', Lang::txt('COM_DEVELOPER_RESET_CLIENT_SECRET'));
Toolbar::custom('removetokens', 'cancel', 'cancel', Lang::txt('COM_DEVELOPER_REVOKE_TOKENS'));
Toolbar::spacer();
}
if ($canDo->get('core.edit.state')) {
Toolbar::publishList();
Toolbar::unpublishList();
Toolbar::spacer();
}
if ($canDo->get('core.delete')) {
Toolbar::deleteList('', 'delete');
}
if ($canDo->get('core.edit')) {
Toolbar::editList();
}
if ($canDo->get('core.create')) {
Toolbar::addNew();
示例12: defined
*/
// No direct access
defined('_HZEXEC_') or die;
$canDo = \Components\Groups\Helpers\Permissions::getActions('group');
Toolbar::title($this->group->get('description') . ': ' . Lang::txt('COM_GROUPS_PAGES_CATEGORIES'), 'groups');
if ($canDo->get('core.create')) {
Toolbar::addNew();
}
if ($canDo->get('core.edit')) {
Toolbar::editList();
}
if ($canDo->get('core.delete')) {
Toolbar::deleteList('COM_GROUPS_PAGES_CATEGORIES_CONFIRM_DELETE', 'delete');
}
Toolbar::spacer();
Toolbar::custom('manage', 'config', 'config', 'COM_GROUPS_MANAGE', false);
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
submitform(pressbutton);
}
</script>
<?php
require_once dirname(dirname(__DIR__)) . DS . 'pages' . DS . 'tmpl' . DS . 'menu.php';
?>
<form action="<?php
echo Route::url('index.php?option=' . $this->option . '&controller=' . $this->controller . '&gid=' . $this->group->cn);
示例13: 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\Resources\Helpers\Permissions::getActions('resource');
Toolbar::title(Lang::txt('COM_RESOURCES'), 'resources.png');
if ($canDo->get('core.admin')) {
Toolbar::custom('check', 'scan', '', 'COM_RESOURCES_AUDIT', false);
Toolbar::spacer();
Toolbar::preferences($this->option, '550');
Toolbar::spacer();
}
if ($canDo->get('core.create')) {
Toolbar::addNew('addchild', 'COM_RESOURCES_ADD_CHILD');
Toolbar::spacer();
}
if ($canDo->get('core.edit.state')) {
Toolbar::publishList();
Toolbar::unpublishList();
Toolbar::spacer();
}
if ($canDo->get('core.create')) {
Toolbar::addNew();
示例14: 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
* @author Shawn Rice <zooley@purdue.edu>
* @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
// No direct access.
defined('_HZEXEC_') or die;
Toolbar::title(Lang::txt('COM_SUPPORT_TICKET') . ': ' . Lang::txt('COM_SUPPORT_QUERIES'), 'support');
if (User::authorise('core.admin', $this->option)) {
Toolbar::custom('reset', 'refresh.png', 'refresh_f2.png', 'COM_SUPPORT_RESET', false);
Toolbar::spacer();
Toolbar::addNew();
Toolbar::editList();
Toolbar::deleteList();
Toolbar::spacer();
}
Toolbar::help('queries');
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform(pressbutton);
return;
示例15: defined
* 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');
if ($canDo->get('core.admin')) {
Toolbar::preferences('com_groups', '550');
Toolbar::spacer();
}
if ($canDo->get('core.manage') && $this->config->get('super_gitlab', 0)) {
Toolbar::custom('update', 'refresh', '', 'COM_GROUPS_UPDATE_CODE');
Toolbar::spacer();
}
if ($canDo->get('core.create')) {
Toolbar::addNew();
}
if ($canDo->get('core.edit')) {
Toolbar::editList();
}
if ($canDo->get('core.delete')) {
Toolbar::deleteList('COM_GROUPS_DELETE_CONFIRM', 'delete');
}
Toolbar::spacer();
Toolbar::help('groups');
Html::behavior('tooltip');
?>