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


PHP Toolbar::apply方法代码示例

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


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

示例1: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $isNew = $this->item->id == 0;
     $canDo = TemplatesHelper::getActions();
     Toolbar::title($isNew ? Lang::txt('COM_TEMPLATES_MANAGER_ADD_STYLE') : Lang::txt('COM_TEMPLATES_MANAGER_EDIT_STYLE'), 'thememanager');
     // If not checked out, can save the item.
     if ($canDo->get('core.edit')) {
         Toolbar::apply('style.apply');
         Toolbar::save('style.save');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('style.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('style.cancel');
     } else {
         Toolbar::cancel('style.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     // Get the help information for the template item.
     $lang = Lang::getRoot();
     $help = $this->get('Help');
     if ($lang->hasKey($help->url)) {
         $debug = $lang->setDebug(false);
         $url = Lang::txt($help->url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     Toolbar::help('style');
     //$help->key, false, $url);
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:39,代码来源:view.html.php

示例2: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $userId = User::get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == User::get('id'));
     // Since we don't track these assets at the item level, use the category id.
     $canDo = NewsfeedsHelper::getActions($this->item->catid, 0);
     Toolbar::title(Lang::txt('COM_NEWSFEEDS_MANAGER_NEWSFEED'), 'newsfeeds.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count(User::getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0)) {
         Toolbar::apply('newsfeed.apply');
         Toolbar::save('newsfeed.save');
     }
     if (!$checkedOut && count(User::getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
         Toolbar::save2new('newsfeed.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('newsfeed.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('newsfeed.cancel');
     } else {
         Toolbar::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:34,代码来源:view.html.php

示例3: addToolbar

 /**
  * Display the toolbar.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', 1);
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == User::get('id'));
     $canDo = UsersHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     Toolbar::title(Lang::txt('COM_USERS_NOTES'), 'user');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count(User::getAuthorisedCategories('com_users', 'core.create')))) {
         Toolbar::apply('note.apply');
         Toolbar::save('note.save');
     }
     if (!$checkedOut && count(User::getAuthorisedCategories('com_users', 'core.create'))) {
         Toolbar::save2new('note.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && count(User::getAuthorisedCategories('com_users', 'core.create')) > 0) {
         Toolbar::save2copy('note.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('note.cancel');
     } else {
         Toolbar::cancel('note.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('note');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:34,代码来源:view.html.php

示例4: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     Request::setVar('hidemainmenu', 1);
     $isNew = empty($this->item->lang_id);
     $canDo = LanguagesHelper::getActions();
     Toolbar::title(Lang::txt($isNew ? 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE' : 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_EDIT_TITLE'), 'langmanager.png');
     // If a new item, can save.
     if ($isNew && $canDo->get('core.create')) {
         Toolbar::save('language.save');
     }
     //If an existing item, allow to Apply and Save.
     if (!$isNew && $canDo->get('core.edit')) {
         Toolbar::apply('language.apply');
         Toolbar::save('language.save');
     }
     // If an existing item, can save to a copy only if we have create rights.
     if ($canDo->get('core.create')) {
         Toolbar::save2new('language.save2new');
     }
     if ($isNew) {
         Toolbar::cancel('language.cancel');
     } else {
         Toolbar::cancel('language.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('language');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:33,代码来源:view.html.php

示例5: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $isNew = $this->item->id == 0;
     $canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
     Toolbar::title(Lang::txt($isNew ? 'COM_MENUS_VIEW_NEW_MENU_TITLE' : 'COM_MENUS_VIEW_EDIT_MENU_TITLE'), 'menu.png');
     // If a new item, can save the item.  Allow users with edit permissions to apply changes to prevent returning to grid.
     if ($isNew && $canDo->get('core.create')) {
         if ($canDo->get('core.edit')) {
             Toolbar::apply('menu.apply');
         }
         Toolbar::save('menu.save');
     }
     // If user can edit, can save the item.
     if (!$isNew && $canDo->get('core.edit')) {
         Toolbar::apply('menu.apply');
         Toolbar::save('menu.save');
     }
     // If the user can create new items, allow them to see Save & New
     if ($canDo->get('core.create')) {
         Toolbar::save2new('menu.save2new');
     }
     if ($isNew) {
         Toolbar::cancel('menu.cancel');
     } else {
         Toolbar::cancel('menu.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('menu');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:35,代码来源:view.html.php

示例6: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', 1);
     Toolbar::title(Lang::txt('COM_ADMIN_VIEW_PROFILE_TITLE'), 'user-profile');
     Toolbar::apply('profile.apply');
     Toolbar::save('profile.save');
     Toolbar::cancel('profile.cancel', 'JTOOLBAR_CLOSE');
     Toolbar::divider();
     Toolbar::help('JHELP_ADMIN_USER_PROFILE_EDIT');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:15,代码来源:view.html.php

示例7: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == User::get('id'));
     $canDo = ModulesHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     $item = $this->get('Item');
     Toolbar::title(Lang::txt('COM_MODULES_MANAGER_MODULE', Lang::txt($this->item->module)), 'module.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         Toolbar::apply('module.apply');
         Toolbar::save('module.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         Toolbar::save2new('module.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('module.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('module.cancel');
     } else {
         Toolbar::cancel('module.cancel', 'JTOOLBAR_CLOSE');
     }
     // Get the help information for the menu item.
     $lang = Lang::getRoot();
     $help = $this->get('Help');
     if ($lang->hasKey($help->url)) {
         $debug = $lang->setDebug(false);
         $url = Lang::txt($help->url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     Toolbar::help('module');
     //$help->key, false, $url);
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:43,代码来源:view.html.php

示例8: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $userId = User::get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     $canDo = ContentHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     Toolbar::title(Lang::txt('COM_CONTENT_PAGE_' . ($checkedOut ? 'VIEW_ARTICLE' : ($isNew ? 'ADD_ARTICLE' : 'EDIT_ARTICLE'))), 'article-add.png');
     // Built the actions for new and existing records.
     // For new records, check the create permission.
     if ($isNew && count(User::getAuthorisedCategories('com_content', 'core.create')) > 0) {
         Toolbar::apply('article.apply');
         Toolbar::save('article.save');
         Toolbar::save2new('article.save2new');
         Toolbar::cancel('article.cancel');
     } else {
         // Can't save the record if it's checked out.
         if (!$checkedOut) {
             // Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
             if ($canDo->get('core.edit') || $canDo->get('core.edit.own') && $this->item->created_by == $userId) {
                 Toolbar::apply('article.apply');
                 Toolbar::save('article.save');
                 // We can save this record, but check the create permission to see if we can return to make a new one.
                 if ($canDo->get('core.create')) {
                     Toolbar::save2new('article.save2new');
                 }
             }
         }
         // If checked out, we can still save
         if ($canDo->get('core.create')) {
             Toolbar::save2copy('article.save2copy');
         }
         Toolbar::cancel('article.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('article');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:42,代码来源:view.html.php

示例9: 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
 * @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_CONFIG_GLOBAL_CONFIGURATION'), 'config.png');
Toolbar::apply('application.apply');
Toolbar::save('application.save');
Toolbar::divider();
Toolbar::cancel('application.cancel');
Toolbar::divider();
Toolbar::help('global_config');
// Load tooltips behavior
Html::behavior('formvalidation');
Html::behavior('switcher', 'submenu');
Html::behavior('tooltip');
// Load submenu template, using element id 'submenu' as needed by behavior.switcher
$this->document->setBuffer($this->loadTemplate('navigation'), 'modules', 'submenu');
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:default.php

示例10: defined

 *
 * 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;
Request::setVar('hidemainmenu', true);
$canDo = \Components\Plugins\Admin\Helpers\Plugins::getActions();
Toolbar::title(Lang::txt('COM_PLUGINS_MANAGER_PLUGIN', Lang::txt($this->item->name)), 'plugin');
// If not checked out, can save the item.
if ($canDo->get('core.edit')) {
    Toolbar::apply('apply');
    Toolbar::save('save');
}
Toolbar::cancel('cancel', 'JTOOLBAR_CLOSE');
Toolbar::divider();
Toolbar::help('plugin');
Html::addIncludePath(JPATH_COMPONENT . '/helpers/html');
Html::behavior('tooltip');
Html::behavior('formvalidation');
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'plugin.cancel' || document.formvalidator.isValid($('#item-form'))) {
			Joomla.submitform(task, document.getElementById('item-form'));
		}
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:edit.php

示例11: 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\Members\Helpers\Admin::getActions('component');
Toolbar::title(Lang::txt('COM_MEMBERS') . ': ' . Lang::txt('COM_MEMBERS_PROFILE'), 'user');
if ($canDo->get('core.edit') || $canDo->get('core.create')) {
    Toolbar::apply('applyprofile');
    Toolbar::save('saveprofile');
    Toolbar::spacer();
}
Toolbar::cancel();
Toolbar::divider();
Toolbar::help('profile');
$elements = array();
foreach ($this->fields as $field) {
    $element = new stdClass();
    $element->label = (string) $field->get('label');
    $element->name = (string) $field->get('name');
    $element->field_type = (string) $field->get('type');
    if ($element->field_type == 'select') {
        $element->field_type = 'dropdown';
    }
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:31,代码来源:profile.php

示例12: 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');
$text = $this->task == 'editClass' ? Lang::txt('JACTION_EDIT') : Lang::txt('JACTION_CREATE');
Toolbar::title(Lang::txt('COM_MEMBERS_QUOTA_CLASSES') . ': ' . $text, 'user');
if ($canDo->get('core.edit')) {
    Toolbar::apply('applyClass');
    Toolbar::save('saveClass');
    Toolbar::spacer();
}
Toolbar::cancel('cancelClass');
?>

<script type="text/javascript">
function submitbutton(pressbutton)
{
	var form = document.adminForm;

	if (pressbutton == 'cancel') {
		submitform( pressbutton );
		return;
	}
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:31,代码来源:editclass.php

示例13: 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;
$checkedOut = !($this->row->get('checked_out') == 0 || $this->row->get('checked_out') == User::get('id'));
$canDo = Components\Members\Helpers\Admin::getActions($this->row->get('category_id'), $this->row->get('id'));
$text = $this->task == 'edit' ? Lang::txt('JACTION_EDIT') : Lang::txt('JACTION_CREATE');
Toolbar::title(Lang::txt('COM_MEMBERS') . ': ' . Lang::txt('COM_MEMBERS_NOTES') . ': ' . $text, 'user');
// If not checked out, can save the item.
if (!$checkedOut && ($canDo->get('core.edit') || count(User::getAuthorisedCategories('com_users', 'core.create')))) {
    Toolbar::apply('note.apply');
    Toolbar::save('note.save');
}
if (!$checkedOut && count(User::getAuthorisedCategories('com_users', 'core.create'))) {
    Toolbar::save2new('note.save2new');
}
// If an existing item, can save to a copy.
if (!$this->row->isNew() && count(User::getAuthorisedCategories('com_users', 'core.create')) > 0) {
    Toolbar::save2copy('note.save2copy');
}
Toolbar::cancel('note.cancel');
Toolbar::divider();
Toolbar::help('note');
Html::behavior('tooltip');
Html::behavior('formvalidation');
?>
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:31,代码来源:edit.php

示例14: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     // Initialise variables.
     $extension = Request::getCmd('extension');
     $userId = User::get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     // Avoid nonsense situation.
     if ($extension == 'com_categories') {
         return;
     }
     // The extension can be in the form com_foo.section
     $parts = explode('.', $extension);
     $component = $parts[0];
     $section = count($parts) > 1 ? $parts[1] : null;
     // Need to load the menu language file as mod_menu hasn't been loaded yet.
     $lang = Lang::getRoot();
     $lang->load($component, JPATH_BASE, null, false, false) || $lang->load($component, PATH_CORE . '/components/' . $component . '/admin', null, false, false) || $lang->load($component, JPATH_BASE, $lang->getDefault(), false, false) || $lang->load($component, PATH_CORE . '/components/' . $component . '/admin', $lang->getDefault(), false, false);
     // Load the category helper.
     require_once JPATH_COMPONENT . '/helpers/categories.php';
     // Get the results for each action.
     $canDo = CategoriesHelper::getActions($component, $this->item->id);
     // If a component categories title string is present, let's use it.
     if ($lang->hasKey($component_title_key = $component . ($section ? "_{$section}" : '') . '_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT') . '_TITLE')) {
         $title = Lang::txt($component_title_key);
     } elseif ($lang->hasKey($component_section_key = $component . ($section ? "_{$section}" : ''))) {
         $title = Lang::txt('COM_CATEGORIES_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT') . '_TITLE', $this->escape(Lang::txt($component_section_key)));
     } else {
         $title = Lang::txt('COM_CATEGORIES_CATEGORY_BASE_' . ($isNew ? 'ADD' : 'EDIT') . '_TITLE');
     }
     // Load specific css component
     Html::asset('stylesheet', $component . '/administrator/categories.css', array(), true);
     // Prepare the toolbar.
     Toolbar::title($title, 'category-' . ($isNew ? 'add' : 'edit') . ' ' . substr($component, 4) . ($section ? "-{$section}" : '') . '-category-' . ($isNew ? 'add' : 'edit'));
     // For new records, check the create permission.
     if ($isNew && count(User::getAuthorisedCategories($component, 'core.create')) > 0) {
         Toolbar::apply('category.apply');
         Toolbar::save('category.save');
         Toolbar::save2new('category.save2new');
     } elseif (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.edit.own') && $this->item->created_user_id == $userId)) {
         Toolbar::apply('category.apply');
         Toolbar::save('category.save');
         if ($canDo->get('core.create')) {
             Toolbar::save2new('category.save2new');
         }
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('category.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('category.cancel');
     } else {
         Toolbar::cancel('category.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     // Compute the ref_key if it does exist in the component
     if (!$lang->hasKey($ref_key = strtoupper($component . ($section ? "_{$section}" : '')) . '_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT') . '_HELP_KEY')) {
         $ref_key = 'JHELP_COMPONENTS_' . strtoupper(substr($component, 4) . ($section ? "_{$section}" : '')) . '_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT');
     }
     // Get help for the category/section view for the component by
     // -remotely searching in a language defined dedicated URL: *component*_HELP_URL
     // -locally  searching in a component help file if helpURL param exists in the component and is set to ''
     // -remotely searching in a component URL if helpURL param exists in the component and is NOT set to ''
     if ($lang->hasKey($lang_help_url = strtoupper($component) . '_HELP_URL')) {
         $debug = $lang->setDebug(false);
         $url = Lang::txt($lang_help_url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     Toolbar::help('category');
     //$ref_key, Component::params( $component )->exists('helpURL'), $url, $component);
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:79,代码来源:view.html.php

示例15: 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\Collections\Helpers\Permissions::getActions('post');
$text = $this->task == 'edit' ? Lang::txt('JACTION_EDIT') : Lang::txt('JACTION_CREATE');
Toolbar::title(Lang::txt('COM_COLLECTIONS') . ': ' . Lang::txt('COM_COLLECTIONS_POSTS') . ': ' . $text, 'collection.png');
if ($canDo->get('core.edit')) {
    Toolbar::apply();
    Toolbar::save();
    Toolbar::spacer();
}
Toolbar::cancel();
Toolbar::spacer();
Toolbar::help('collection');
if (!$this->row->get('id')) {
    $this->row->set('created_by', User::get('id'));
    $this->row->set('created', Date::toSql());
}
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
	var form = document.adminForm;
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:edit.php


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