예제 #1
0
파일: view.html.php 프로젝트: ngxuanmui/hp3
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     $canDo = Jnt_HanhphucHelper::getActions($this->state->get('filter.category_id'));
     JToolBarHelper::title($isNew ? JText::_('User Content: Edit') : JText::_('User Content: New'), 'article.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_je_content', 'core.create')) > 0)) {
         JToolBarHelper::apply('article.apply');
         JToolBarHelper::save('article.save');
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2new('article.save2new');
         }
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('article.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('article.cancel');
     } else {
         JToolBarHelper::cancel('article.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #2
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = Jnt_HanhphucHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('User content manager'), 'article.png');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_je_content', 'core.create')) > 0) {
         JToolBarHelper::addNew('article.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('article.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::custom('articles.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('articles.archive');
         JToolBarHelper::checkin('articles.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('articles.trash');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_je_content');
     }
 }
예제 #3
0
파일: view.html.php 프로젝트: ngxuanmui/hp3
 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jnt_hanhphuc.php';
     $canDo = Jnt_HanhphucHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     JToolBarHelper::title(JText::_('Albums Manager'), 'article.png');
     //		if (count($user->getAuthorisedCategories('com_jnt_hanhphuc', 'core.create')) > 0)
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('album.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('album.edit');
     }
     if ($canDo->get('core.edit.state')) {
         if ($this->state->get('filter.state') != 2) {
             JToolBarHelper::divider();
             JToolBarHelper::publish('albums.publish', 'JTOOLBAR_PUBLISH', true);
             JToolBarHelper::unpublish('albums.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($this->state->get('filter.state') != -1) {
             JToolBarHelper::divider();
             if ($this->state->get('filter.state') != 2) {
                 JToolBarHelper::archiveList('albums.archive');
             } elseif ($this->state->get('filter.state') == 2) {
                 JToolBarHelper::unarchiveList('albums.publish');
             }
         }
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::checkin('albums.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'albums.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('albums.trash');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_jnt_hanhphuc');
     }
 }
예제 #4
0
파일: view.html.php 프로젝트: ngxuanmui/hp3
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     // Since we don't track these assets at the item level, use the category id.
     $canDo = Jnt_HanhphucHelper::getActions($this->item->catid, 0);
     JToolBarHelper::title($isNew ? JText::_('Albums Manager: New Album') : JText::_('Albums Manager: Edit Album'), 'banners.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_jnt_hanhphuc', 'core.create')) > 0)) {
         JToolBarHelper::apply('album.apply');
         JToolBarHelper::save('album.save');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('album.cancel');
     } else {
         JToolBarHelper::cancel('album.cancel', 'JTOOLBAR_CLOSE');
     }
 }
예제 #5
0
<?php

/**
 * @package		Joomla.Administrator
 * @subpackage	com_users
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access.
defined('_JEXEC') or die;
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('behavior.modal');
$canDo = Jnt_HanhphucHelper::getActions();
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$loggeduser = JFactory::getUser();
?>

<form action="<?php 
echo JRoute::_('index.php?option=com_jnt_hanhphuc&view=users');
?>
" method="post" name="adminForm" id="adminForm">
	<fieldset id="filter-bar">
		<div class="filter-search fltlft">
			<label class="filter-search-lbl" for="filter_search"><?php 
echo JText::_('Search: ');
?>
</label>
			<input type="text" name="filter_search" id="filter_search" value="<?php 
예제 #6
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = Jnt_HanhphucHelper::getActions();
     JToolBarHelper::title(JText::_('COM_USERS_VIEW_USERS_TITLE'), 'user');
 }
예제 #7
0
파일: view.html.php 프로젝트: ngxuanmui/hp3
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = Jnt_HanhphucHelper::getActions();
     JToolBarHelper::title(JText::_('Users Manager'), 'user');
 }