Example #1
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $state = $this->get('State');
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('licenses');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_LICENSES'), 'jdlicenses');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('license.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('license.edit');
         JToolBarHelper::divider();
         JToolBarHelper::checkin('licenses.checkin');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('licenses.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('licenses.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList(JText::_('COM_JDOWNLOADS_DELETE_LIST_ITEM_CONFIRMATION'), 'licenses.delete', 'COM_JDOWNLOADS_TOOLBAR_REMOVE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('help.licenses', true);
 }
Example #2
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('templates');
     // set the correct text in title for every layout type
     switch ($this->jd_tmpl_type) {
         case '1':
             $layout_type = JText::_('COM_JDOWNLOADS_BACKEND_TEMP_TYP1');
             break;
         case '2':
             $layout_type = JText::_('COM_JDOWNLOADS_BACKEND_TEMP_TYP2');
             break;
         case '3':
             $layout_type = JText::_('COM_JDOWNLOADS_BACKEND_TEMP_TYP3');
             break;
         case '4':
             $layout_type = JText::_('COM_JDOWNLOADS_BACKEND_TEMP_TYP4');
             break;
         case '5':
             $layout_type = JText::_('COM_JDOWNLOADS_BACKEND_TEMP_TYP5');
             break;
         case '6':
             $layout_type = JText::_('COM_JDOWNLOADS_BACKEND_TEMP_TYP6');
             break;
         case '7':
             $layout_type = JText::_('COM_JDOWNLOADS_BACKEND_TEMP_TYP7');
             break;
         default:
             $layout_type = '';
     }
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_BACKEND_CPANEL_TEMPLATES_NAME') . ': ' . $layout_type, 'jdlayouts');
     JToolBarHelper::custom('templates.cancel', 'list.png', 'list.png', JText::_('COM_JDOWNLOADS_LAYOUTS'), false, false);
     JToolBarHelper::divider();
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('template.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('template.edit');
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList(JText::_('COM_JDOWNLOADS_DELETE_LIST_ITEM_CONFIRMATION'), 'templates.delete', 'COM_JDOWNLOADS_TOOLBAR_REMOVE');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('templates.activate', 'publish', 'publish', JText::_('COM_JDOWNLOADS_BACKEND_TEMPLIST_MENU_TEXT_ACTIVE'), true, false);
         JToolBarHelper::checkin('templates.checkin');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::custom('layouts.install', 'upload.png', 'upload.png', JText::_('COM_JDOWNLOADS_LAYOUTS_IMPORT_LABEL'), false, false);
         JToolBarHelper::custom('templates.export', 'download.png', 'download.png', JText::_('COM_JDOWNLOADS_LAYOUTS_EXPORT_LABEL'), true, false);
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('help.templates', true);
 }
Example #3
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('info');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_TERMS_OF_USE'), 'jdinfo');
     JToolBarHelper::divider();
     JToolBarHelper::help('help.jdownloads', true);
 }
Example #4
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $state = $this->get('State');
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('layouts');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_BACKEND_CPANEL_TEMPLATES_NAME'), 'jdlogo');
     JToolBarHelper::divider();
     JToolBarHelper::help('help.layouts', true);
 }
Example #5
0
 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('files');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_FILESLIST_TITLE_FILES_UPLOAD'), 'jdupload');
     JToolBarHelper::custom('uploads.files', 'files32.png', 'files32.png', JText::_('COM_JDOWNLOADS_FILES'), false, true);
     JToolBarHelper::custom('uploads.downloads', 'downloads32.png', 'downloads32.png', JText::_('COM_JDOWNLOADS_DOWNLOADS'), false, false);
     JToolBarHelper::divider();
     JToolBarHelper::help('help.uploads', true);
 }
Example #6
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('restore');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_RESTORATION'), 'jdrestore');
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_jdownloads');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('help.restore', true);
 }
Example #7
0
 /**
  * Add the page title and toolbar.
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('backup');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_BACKUP'), 'jdbackup');
     if ($canDo->get('core.admin')) {
         JToolBarHelper::custom('backup.runbackup', 'new', 'new', JText::_('COM_JDOWNLOADS_BACKUP_CREATE_LINK_LABEL'), false, false);
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_jdownloads');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('help.backup', true);
 }
Example #8
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('files');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_FILES'), 'jdfiles');
     JToolBarHelper::custom('files.uploads', 'upload32.png', 'upload32.png', JText::_('COM_JDOWNLOADS_FILESLIST_TITLE_FILES_UPLOAD'), false, true);
     JToolBarHelper::custom('files.downloads', 'downloads32.png', 'downloads32.png', JText::_('COM_JDOWNLOADS_DOWNLOADS'), false, false);
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList(JText::_('COM_JDOWNLOADS_DELETE_LIST_ITEM_CONFIRMATION'), 'files.delete', 'COM_JDOWNLOADS_TOOLBAR_REMOVE');
         JToolBarHelper::divider();
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('help.files', true);
 }
Example #9
0
 /**
  * Add the page title and toolbar.
  *
  * @since    1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $state = $this->get('State');
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JDownloadsHelper::addSubmenu('categories');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_CATEGORIES'), 'jdcategories');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('category.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('category.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('categories.publish', 'COM_JDOWNLOADS_PUBLISH', true);
         JToolBarHelper::unpublish('categories.unpublish', 'COM_JDOWNLOADS_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::checkin('categories.checkin');
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList(JText::_('COM_JDOWNLOADS_DELETE_LIST_ITEM_CONFIRMATION'), 'categories.delete', 'COM_JDOWNLOADS_TOOLBAR_REMOVE');
         JToolBarHelper::divider();
     }
     // Add a batch button
     if ($canDo->get('core.create') && $canDo->get('core.edit') && $canDo->get('core.edit.state')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         // Instantiate a new JLayoutFile instance and render the batch button
         $layout = new JLayoutFile('joomla.toolbar.batch');
         $dhtml = $layout->render(array('title' => $title));
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::custom('categories.rebuild', 'refresh.png', 'refresh_f2.png', 'COM_JDOWNLOADS_REBUILD', false);
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('help.categories', true);
 }
Example #10
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     JRequest::setVar('hidemainmenu', true);
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('templates');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_BACKEND_EDIT_LANG_TITLE_EDIT'), 'jdlogo');
     if ($canDo->get('core.admin')) {
         JToolBarHelper::save('languageedit.save');
         JToolBarHelper::cancel('languageedit.cancel');
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_jdownloads');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('help.languageedit', true);
 }
Example #11
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $state = $this->get('State');
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('logs');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_LOGS_TITLE_HEAD'), 'jdlogs');
     if ($canDo->get('core.edit')) {
         JToolBarHelper::custom('logs.blockip', 'cancel.png', 'cancel.png', JText::_('COM_JDOWNLOADS_BACKEND_LOG_LIST_BLOCK_IP'), true);
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList(JText::_('COM_JDOWNLOADS_DELETE_LIST_ITEM_CONFIRMATION'), 'logs.delete', 'COM_JDOWNLOADS_TOOLBAR_REMOVE');
         JToolBarHelper::divider();
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('help.logs', true);
 }
Example #12
0
 /**
  * Add the page title and toolbar.
  *
  * 
  */
 protected function addToolbar()
 {
     global $jlistConfig;
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $state = $this->get('State');
     $canDo = JDownloadsHelper::getActions();
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     $document->addScriptDeclaration('function openWindow (url) {
     fenster = window.open(url, "_blank", "width=550, height=480, STATUS=YES, DIRECTORIES=NO, MENUBAR=NO, SCROLLBARS=YES, RESIZABLE=NO");
     fenster.focus();
     }');
     // view menu only when we have not to work with an update
     if (!$jlistConfig['old.jd.release.found']) {
         JDownloadsHelper::addSubmenu('jdownloads');
     }
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_CPANEL'), 'jdlogo');
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_jdownloads');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('help.jdownloads', true);
 }
Example #13
0
 /**
  * Add the page title and toolbar.
  *
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php';
     $document = JFactory::getDocument();
     $document->addStyleSheet('components/com_jdownloads/assets/css/style.css');
     JDownloadsHelper::addSubmenu('groups');
     JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . JText::_('COM_JDOWNLOADS_USER_GROUPS'), 'jdgroups');
     $canDo = jdownloadsHelper::getActions();
     if ($canDo->get('edit.config')) {
         JToolBarHelper::editList('group.edit', 'COM_JDOWNLOADS_USERGROUPS_CHANGE_LIMITS_TITLE');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::custom('groups.resetLimits', 'reset', 'reset', JText::_('COM_JDOWNLOADS_USERGROUPS_RESET_LIMITS_TITLE'), true, false);
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_jdownloads');
         JToolBarHelper::divider();
     }
     if ($canDo->get('edit.config')) {
         JToolBarHelper::help('help.groups', true);
     }
 }