Exemplo n.º 1
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = NewsfeedsHelper::getActions($state->get('filter.category_id'));
     Toolbar::title(Lang::txt('COM_NEWSFEEDS_MANAGER_NEWSFEEDS'), 'newsfeeds.png');
     if (count(User::getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
         Toolbar::addNew('newsfeed.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('newsfeed.edit');
     }
     if ($canDo->get('core.edit.state')) {
         Toolbar::divider();
         Toolbar::publish('newsfeeds.publish', 'JTOOLBAR_PUBLISH', true);
         Toolbar::unpublish('newsfeeds.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         Toolbar::divider();
         Toolbar::archiveList('newsfeeds.archive');
     }
     if ($canDo->get('core.admin')) {
         Toolbar::checkin('newsfeeds.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         Toolbar::deleteList('', 'newsfeeds.delete', 'JTOOLBAR_EMPTY_TRASH');
         Toolbar::divider();
     } elseif ($canDo->get('core.edit.state')) {
         Toolbar::trash('newsfeeds.trash');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_newsfeeds');
         Toolbar::divider();
     }
     Toolbar::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS');
 }
Exemplo n.º 2
0
 /**
  * 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');
 }
Exemplo n.º 3
0
 /**
  * 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');
 }
Exemplo n.º 4
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     Toolbar::title(Lang::txt('COM_CONTENT_ARTICLES_TITLE'), 'article.png');
     if ($canDo->get('core.create') || count(User::getAuthorisedCategories('com_content', 'core.create')) > 0) {
         Toolbar::addNew('article.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         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::custom('articles.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
         Toolbar::divider();
         Toolbar::archiveList('articles.archive');
         Toolbar::checkin('articles.checkin');
     }
     if ($this->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::trash('articles.trash');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_content');
         Toolbar::divider();
     }
     Toolbar::help('articles');
 }
Exemplo n.º 5
0
 /**
  * Adds the page title and toolbar
  *
  * @return	void
  *
  * @since		2.5
  */
 protected function addToolbar()
 {
     // Get the results for each action
     $canDo = LanguagesHelper::getActions();
     Toolbar::title(Lang::txt('COM_LANGUAGES_VIEW_OVERRIDES_TITLE'), 'langmanager');
     if ($canDo->get('core.create')) {
         Toolbar::addNew('override.add');
     }
     if ($canDo->get('core.edit') && $this->pagination->total) {
         Toolbar::editList('override.edit');
     }
     if ($canDo->get('core.delete') && $this->pagination->total) {
         Toolbar::deleteList('', 'overrides.delete');
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_languages');
     }
     Toolbar::divider();
     Toolbar::help('overrides');
 }
Exemplo n.º 6
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = UsersHelper::getActions();
     Toolbar::title(Lang::txt('COM_USERS_VIEW_GROUPS_TITLE'), 'groups');
     if ($canDo->get('core.create')) {
         Toolbar::addNew('group.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('group.edit');
         Toolbar::divider();
     }
     if ($canDo->get('core.delete')) {
         Toolbar::deleteList('', 'groups.delete');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_users');
         Toolbar::divider();
     }
     Toolbar::help('groups');
 }
Exemplo n.º 7
0
 /**
  * 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');
 }
Exemplo n.º 8
0
 * 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\Citations\Helpers\Permissions::getActions('type');
Toolbar::title(Lang::txt('CITATIONS') . ': ' . Lang::txt('CITATION_TYPES'), 'citation.png');
if ($canDo->get('core.create')) {
    Toolbar::addNew();
}
if ($canDo->get('core.edit')) {
    Toolbar::editList();
}
if ($canDo->get('core.delete')) {
    Toolbar::spacer();
    Toolbar::deleteList();
}
Toolbar::spacer();
Toolbar::help('types');
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
	if (pressbutton == 'cancel') {
Exemplo n.º 9
0
 * 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') . ': ' . Lang::txt('COM_RESOURCES_CHILDREN'), 'resources.png');
if ($this->filters['parent_id'] > 0) {
    if ($canDo->get('core.create')) {
        Toolbar::addNew('addchild', 'COM_RESOURCES_ADD_CHILD');
    }
    if ($canDo->get('core.delete')) {
        Toolbar::deleteList('COM_RESOURCES_REMOVE_CHILD_CONFIRM', 'removechild', 'COM_RESOURCES_REMOVE_CHILD');
    }
    Toolbar::spacer();
}
if ($canDo->get('core.edit.state')) {
    Toolbar::publishList();
    Toolbar::unpublishList();
    Toolbar::spacer();
}
if ($canDo->get('core.edit')) {
    Toolbar::editList();
}
if ($canDo->get('core.delete')) {
Exemplo n.º 10
0
 * 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_NOTES'), 'user');
if ($canDo->get('core.create')) {
    Toolbar::addNew('note.add');
}
if ($canDo->get('core.edit')) {
    Toolbar::editList('note.edit');
}
if ($canDo->get('core.edit.state')) {
    Toolbar::divider();
    Toolbar::publish('notes.publish', 'JTOOLBAR_PUBLISH', true);
    Toolbar::unpublish('notes.unpublish', 'JTOOLBAR_UNPUBLISH', true);
    Toolbar::divider();
    Toolbar::archiveList('notes.archive');
    Toolbar::checkin('notes.checkin');
}
if ($this->filters['state'] == -2 && $canDo->get('core.delete')) {
    Toolbar::deleteList('', 'notes.delete', 'JTOOLBAR_EMPTY_TRASH');
    Toolbar::divider();
Exemplo n.º 11
0
 /**
  * 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_ITEMS_TITLE'), 'menumgr.png');
     if ($canDo->get('core.create')) {
         Toolbar::addNew('item.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('item.edit');
     }
     if ($canDo->get('core.edit.state')) {
         Toolbar::divider();
         Toolbar::publish('items.publish', 'JTOOLBAR_PUBLISH', true);
         Toolbar::unpublish('items.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     }
     if (User::authorise('core.admin')) {
         Toolbar::divider();
         Toolbar::checkin('items.checkin', 'JTOOLBAR_CHECKIN', true);
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         Toolbar::deleteList('', 'items.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         Toolbar::trash('items.trash');
     }
     if ($canDo->get('core.edit.state')) {
         Toolbar::makeDefault('items.setDefault', 'COM_MENUS_TOOLBAR_SET_HOME');
         Toolbar::divider();
     }
     if (User::authorise('core.admin')) {
         Toolbar::custom('items.rebuild', 'refresh.png', 'refresh_f2.png', 'JToolbar_Rebuild', false);
         Toolbar::divider();
     }
     Toolbar::help('items');
 }
Exemplo n.º 12
0
 * 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_QUOTA_CLASSES'), 'user');
if ($canDo->get('core.edit')) {
    Toolbar::addNew('addClass');
    Toolbar::editList('editClass');
    Toolbar::deleteList('COM_MEMBERS_QUOTA_CONFIRM_DELETE', 'deleteClass');
    Toolbar::spacer();
}
Toolbar::help('quotaclasses');
?>

<?php 
$this->view('_submenu')->display();
?>

<form action="<?php 
echo Route::url('index.php?option=' . $this->option . '&controller=' . $this->controller);
?>
" method="post" name="adminForm" id="adminForm">
Exemplo n.º 13
0
 * 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    Christopher Smoak <*****@*****.**>
 * @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_NEWSLETTER_NEWSLETTER_MAILINGLISTS') . ': ' . $this->list->name, 'list.png');
Toolbar::addNew('addemail', 'COM_NEWSLETTER_TOOLBAR_ADDEMAILS');
Toolbar::deleteList('COM_NEWSLETTER_MAILINGLIST_DELETE_EMAILS_CHECK', 'deleteemail', 'COM_NEWSLETTER_TOOLBAR_REMOVE');
Toolbar::spacer();
Toolbar::custom('export', 'export', '', 'COM_NEWSLETTER_TOOLBAR_EXPORT', false);
Toolbar::spacer();
Toolbar::cancel();
?>

<?php 
if ($this->getError()) {
    echo '<p class="error">' . $this->getError() . '</p>';
}
?>

<form action="<?php 
echo Route::url('index.php?option=' . $this->option);
Exemplo n.º 14
0
 /**
  * Display the toolbar.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     $canDo = UsersHelper::getActions();
     Toolbar::title(Lang::txt('COM_USERS_VIEW_NOTES_TITLE'), 'user');
     if ($canDo->get('core.create')) {
         Toolbar::addNew('note.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('note.edit');
     }
     if ($canDo->get('core.edit.state')) {
         Toolbar::divider();
         Toolbar::publish('notes.publish', 'JTOOLBAR_PUBLISH', true);
         Toolbar::unpublish('notes.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         Toolbar::divider();
         Toolbar::archiveList('notes.archive');
         Toolbar::checkin('notes.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         Toolbar::deleteList('', 'notes.delete', 'JTOOLBAR_EMPTY_TRASH');
         Toolbar::divider();
     } elseif ($canDo->get('core.edit.state')) {
         Toolbar::trash('notes.trash');
         Toolbar::divider();
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_users');
         Toolbar::divider();
     }
     Toolbar::help('notes');
 }