Example #1
0
 function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     TZ_PortfolioHelper::addSubmenu('groups');
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
Example #2
0
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     TZ_PortfolioHelper::addSubmenu('tags');
     // We don't need toolbar in the modal window.
     if ($this->getLayout() !== 'modal') {
         $this->addToolbar();
     }
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
Example #3
0
 public function display($tpl = null)
 {
     if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         tzportfolioimport('helper/content');
     }
     $this->items = $this->get('Items');
     $this->state = $this->get('State');
     $this->pagination = $this->get('pagination');
     JFactory::getLanguage()->load('com_templates');
     TZ_PortfolioHelper::addSubmenu('templates');
     // We don't need toolbar in the modal window.
     if ($this->getLayout() !== 'modal') {
         $this->addToolbar();
     }
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
Example #4
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     require_once JPATH_COMPONENT . '/helpers/users.php';
     JFactory::getLanguage()->load('com_users');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     TZ_PortfolioHelper::addSubmenu('users');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Include the component HTML helpers.
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
Example #5
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     // Initialise variables.
     TZ_PortfolioHelper::addSubmenu('categories');
     $categoryId = $this->state->get('filter.category_id');
     $component = $this->state->get('filter.component');
     $section = $this->state->get('filter.section');
     $canDo = null;
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     // Avoid nonsense situation.
     if ($component == 'com_tz_portfolio') {
         return;
     }
     // Need to load the menu language file as mod_menu hasn't been loaded yet.
     $lang = JFactory::getLanguage();
     $lang->load($component, JPATH_BASE, null, false, false) || $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component, null, false, false) || $lang->load($component, JPATH_BASE, $lang->getDefault(), false, false) || $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component, $lang->getDefault(), false, false);
     // Load the category helper.
     require_once JPATH_COMPONENT . '/helpers/categories.php';
     // Get the results for each action.
     $canDo = TZ_PortfolioHelper::getActions($component, $categoryId);
     // If a component categories title string is present, let's use it.
     if ($lang->hasKey($component_title_key = strtoupper($component . ($section ? "_{$section}" : '')) . '_CATEGORIES_TITLE')) {
         $title = JText::_($component_title_key);
     } elseif ($lang->hasKey($component_section_key = strtoupper($component . ($section ? "_{$section}" : '')))) {
         $title = JText::sprintf('COM_CATEGORIES_CATEGORIES_TITLE', $this->escape(JText::_($component_section_key)));
     } else {
         $title = JText::_('COM_CATEGORIES_CATEGORIES_BASE_TITLE');
     }
     // Load specific css component
     JHtml::_('stylesheet', $component . '/administrator/categories.css', array(), true);
     // Prepare the toolbar.
     JToolBarHelper::title($title, 'categories ' . substr($component, 4) . ($section ? "-{$section}" : '') . '-categories');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories($component, 'core.create')) > 0) {
         JToolBarHelper::addNew('category.add');
     }
     if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
         JToolBarHelper::editList('category.edit');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::publish('categories.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('categories.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('categories.archive');
     }
     if (JFactory::getUser()->authorise('core.admin')) {
         JToolBarHelper::checkin('categories.checkin');
     }
     if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete', $component)) {
         JToolBarHelper::deleteList('', 'categories.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('categories.trash');
         JToolBarHelper::divider();
     }
     // Add a batch button
     if ($canDo->get('core.edit')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         $batchIcon = '<i class="icon-checkbox-partial" title="' . $title . '"></i>';
         $batchClass = ' class="btn btn-small"';
         //// If the joomla's version is more than or equal to 3.0
         if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
             $title = JText::_('COM_TZ_PORTFOLIO_BATCH');
             $batchIcon = '<span class="tz-icon-batch" title="' . $title . '"></span>';
             $batchClass = '';
         }
         $dhtml = '<a' . $batchClass . ' href="#" data-toggle="modal" data-target="#collapseModal">';
         $dhtml .= $batchIcon . $title . '</a>';
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::custom('categories.rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false);
         //			JToolBarHelper::preferences($component);
         JToolBarHelper::preferences('com_tz_portfolio');
         JToolBarHelper::divider();
     }
     // Compute the ref_key if it does exist in the component
     if (!$lang->hasKey($ref_key = strtoupper($component . ($section ? "_{$section}" : '')) . '_CATEGORIES_HELP_KEY')) {
         $ref_key = 'JHELP_COMPONENTS_' . strtoupper(substr($component, 4) . ($section ? "_{$section}" : '')) . '_CATEGORIES';
     }
     // Get help for the categories 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 = JText::_($lang_help_url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     $doc = JFactory::getDocument();
     // If the joomla is version 3.0
     if (COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio/fonts/font-awesome-v3.0.2/css/font-awesome.min.css');
     }
     $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio/css/style.min.css');
     //        // Complie button
     //        $compileTitle   = JText::_('COM_TZ_PORTFOLIO_COMPILE_LESS_TO_CSS');
     //        $compileIcon    = '<i class="icon-check"></i>&nbsp;';
     //        $compileClass   = ' class="btn btn-small"';
     //
     //        //// If the joomla's version is more than or equal to 3.0
     //        if(!COM_TZ_PORTFOLIO_JVERSION_COMPARE){
     //            $compileIcon    = '<span class="tz-icon-compile"></span>';
     //            $compileClass   = null;
     //        }
     //
     //        $compileButton   = '<a'.$compileClass.' onclick="Joomla.submitbutton(\'action.lesscall\')" href="#">'
     //            .$compileIcon.$compileTitle.'</a> ';
     //
     //        //  JS Compress button
     //        $compressTitle  = JText::_('COM_TZ_PORTFOLIO_COMPRESSION_JS');
     //        $compressIcon   = '<i class="icon-check"></i>&nbsp;';
     //        $compressClass  = ' class="btn btn-small"';
     //
     //        //// If the joomla's version is more than or equal to 3.0
     //        if(!COM_TZ_PORTFOLIO_JVERSION_COMPARE){
     //            $compressIcon    = '<span class="tz-icon-compress"></span>';
     //            $compressClass   = null;
     //        }
     //
     //        $compressButton   = '<a'.$compressClass.' onclick="Joomla.submitbutton(\'action.jscompress\')" href="#">'
     //            .$compressIcon.$compressTitle.'</a> ';
     //
     //        $bar -> appendButton('Custom',$compileButton,'compile');
     //        $bar -> appendButton('Custom',$compressButton,'compress');
     //        JToolBarHelper::divider();
     JToolBarHelper::help($ref_key, JComponentHelper::getParams($component)->exists('helpURL'), $url);
     JHtmlSidebar::setAction('index.php?option=com_tz_portfolio&view=categories');
     // Special HTML workaround to get send popup working
     $docClass = ' class="btn btn-small"';
     $youtubeIcon = '<i class="tz-icon-youtube tz-icon-14"></i>&nbsp;';
     $wikiIcon = '<i class="tz-icon-wikipedia tz-icon-14"></i>&nbsp;';
     $youtubeTitle = JText::_('COM_TZ_PORTFOLIO_VIDEO_TUTORIALS');
     $wikiTitle = JText::_('COM_TZ_PORTFOLIO_WIKIPEDIA_TUTORIALS');
     //// If the joomla's version is more than or equal to 3.0
     if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         $youtubeIcon = '<span class="tz-icon-youtube" title="' . $youtubeTitle . '"></span>';
         $wikiIcon = '<span class="tz-icon-wikipedia" title="' . $wikiTitle . '"></span>';
         $docClass = null;
     }
     $videoTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://www.youtube.com/channel/UCykS6SX6L2GOI-n3IOPfTVQ/videos\', \'' . $youtubeTitle . '\', 800, 500, 1)"' . ' href="#">' . $youtubeIcon . $youtubeTitle . '</a>';
     $wikiTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://wiki.templaza.com/Main_Page\', \'' . $wikiTitle . '\', 800, 500, 1)"' . ' href="#">' . $wikiIcon . $wikiTitle . '</a>';
     $bar->appendButton('Custom', $videoTutorial, 'youtube');
     $bar->appendButton('Custom', $wikiTutorial, 'wikipedia');
     JHtmlSidebar::addFilter(JText::_('COM_TZ_PORTFOLIO_OPTION_SELECT_FIELDS_GROUP'), 'filter_group', JHtml::_('select.options', $this->listsGroup, 'value', 'text', $this->state->get('filter.group')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_MAX_LEVELS'), 'filter_level', JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
 }
Example #6
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = TZ_PortfolioHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'), 'article.png');
     if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_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.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('articles.trash');
         JToolBarHelper::divider();
     }
     //// If the joomla's version is more than or equal to 3.0
     if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         $resizeTitle = JText::_('COM_TZ_PORTFOLIO_RESIZE_ALL_IMAGES');
         $resizeIcon = '<span class="tz-icon-expand" title="' . $resizeTitle . '"></span>';
         $rdhtml = '<a class="toolbar" href="#"' . ' onclick="if (document.adminForm.boxchecked.value==0){' . 'alert(\'Please first make a selection from the list\');}' . 'else{ Joomla.submitbutton(\'articles.resizeimage\')}">';
         $rdhtml .= $resizeIcon . $resizeTitle . '</a>';
         $bar->appendButton('Custom', $rdhtml, JText::_('COM_TZ_PORTFOLIO_RESIZE_ALL_IMAGES'), 'articles.resizeimage', true);
     } else {
         JToolbarHelper::custom('articles.resizeimage', 'expand-2', '', JText::_('COM_TZ_PORTFOLIO_RESIZE_ALL_IMAGES'), true);
     }
     //Add a batch button
     if ($user->authorise('core.edit')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         $batchIcon = '<i class="icon-checkbox-partial" title="' . $title . '"></i>';
         $batchClass = ' class="btn btn-small"';
         //// If the joomla's version is more than or equal to 3.0
         if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
             $title = JText::_('COM_TZ_PORTFOLIO_BATCH');
             $batchIcon = '<span class="tz-icon-batch" title="' . $title . '"></span>';
             $batchClass = '';
         }
         $dhtml = '<a' . $batchClass . ' href="#" data-toggle="modal" data-target="#collapseModal">';
         $dhtml .= $batchIcon . $title . '</a>';
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_tz_portfolio');
         JToolBarHelper::divider();
     }
     $doc = JFactory::getDocument();
     // If the joomla is version 3.0
     if (COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio/fonts/font-awesome-v3.0.2/css/font-awesome.min.css');
     }
     $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio/css/style.min.css');
     //        // Complie button
     //        $compileTitle   = JText::_('COM_TZ_PORTFOLIO_COMPILE_LESS_TO_CSS');
     //        $compileIcon    = '<i class="icon-check"></i>&nbsp;';
     //        $compileClass   = ' class="btn btn-small"';
     //
     //        //// If the joomla's version is more than or equal to 3.0
     //        if(!COM_TZ_PORTFOLIO_JVERSION_COMPARE){
     //            $compileIcon    = '<span class="tz-icon-compile"></span>';
     //            $compileClass   = null;
     //        }
     //
     //        $compileButton   = '<a'.$compileClass.' onclick="Joomla.submitbutton(\'action.lesscall\')" href="#">'
     //                           .$compileIcon.$compileTitle.'</a> ';
     //
     //        //  JS Compress button
     //        $compressTitle  = JText::_('COM_TZ_PORTFOLIO_COMPRESSION_JS');
     //        $compressIcon   = '<i class="icon-check"></i>&nbsp;';
     //        $compressClass  = ' class="btn btn-small"';
     //
     //        //// If the joomla's version is more than or equal to 3.0
     //        if(!COM_TZ_PORTFOLIO_JVERSION_COMPARE){
     //            $compressIcon    = '<span class="tz-icon-compress"></span>';
     //            $compressClass   = null;
     //        }
     //
     //        $compressButton   = '<a'.$compressClass.' onclick="Joomla.submitbutton(\'action.jscompress\')" href="#">'
     //                            .$compressIcon.$compressTitle.'</a> ';
     //
     //        $bar -> appendButton('Custom',$compileButton,'compile');
     //        $bar -> appendButton('Custom',$compressButton,'compress');
     //        JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER');
     // Special HTML workaround to get send popup working
     $docClass = ' class="btn btn-small"';
     $youtubeIcon = '<i class="tz-icon-youtube tz-icon-14"></i>&nbsp;';
     $wikiIcon = '<i class="tz-icon-wikipedia tz-icon-14"></i>&nbsp;';
     $youtubeTitle = JText::_('COM_TZ_PORTFOLIO_VIDEO_TUTORIALS');
     $wikiTitle = JText::_('COM_TZ_PORTFOLIO_WIKIPEDIA_TUTORIALS');
     //// If the joomla's version is more than or equal to 3.0
     if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         $youtubeIcon = '<span class="tz-icon-youtube" title="' . $youtubeTitle . '"></span>';
         $wikiIcon = '<span class="tz-icon-wikipedia" title="' . $wikiTitle . '"></span>';
         $docClass = null;
     }
     $videoTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://www.youtube.com/channel/UCykS6SX6L2GOI-n3IOPfTVQ/videos\', \'' . $youtubeTitle . '\', 800, 500, 1)"' . ' href="#">' . $youtubeIcon . $youtubeTitle . '</a>';
     $wikiTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://wiki.templaza.com/Main_Page\', \'' . $wikiTitle . '\', 800, 500, 1)"' . ' href="#">' . $wikiIcon . $wikiTitle . '</a>';
     $bar->appendButton('Custom', $videoTutorial, 'youtube');
     $bar->appendButton('Custom', $wikiTutorial, 'wikipedia');
     JHtmlSidebar::setAction('index.php?option=com_tz_portfolio&view=articles');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_content'), 'value', 'text', $this->state->get('filter.category_id')));
     //        require_once(JPATH_COMPONENT_ADMINISTRATOR.'/models/categories.php');
     JHtml::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/models');
     $model = JModelLegacy::getInstance('Categories', 'TZ_PortfolioModel', array('ignore_request' => true));
     $model->setState('filter.group', $this->state->get('filter.group'));
     $listGroup = $model->getGroups();
     JHtmlSidebar::addFilter(JText::_('COM_TZ_PORTFOLIO_OPTION_SELECT_FIELDS_GROUP'), 'filter_group', JHtml::_('select.options', $listGroup, 'value', 'text', $this->state->get('filter.group')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_MAX_LEVELS'), 'filter_level', JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_AUTHOR'), 'filter_author_id', JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
 }
Example #7
0
 /**
  * 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 = TZ_PortfolioHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     JToolBarHelper::title(JText::_('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) {
         JToolBarHelper::apply('article.apply');
         JToolBarHelper::save('article.save');
         JToolBarHelper::save2new('article.save2new');
         JToolBarHelper::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) {
                 JToolBarHelper::apply('article.apply');
                 JToolBarHelper::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')) {
                     JToolBarHelper::save2new('article.save2new');
                 }
             }
         }
         // If checked out, we can still save
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2copy('article.save2copy');
         }
         JToolBarHelper::cancel('article.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER_EDIT');
 }
Example #8
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JFactory::getLanguage()->load('com_content');
     $state = $this->get('State');
     $canDo = TZ_PortfolioHelper::getActions($this->state->get('filter.category_id'));
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolBarHelper::title(JText::_('COM_CONTENT_FEATURED_TITLE'), 'featured.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('article.add');
     }
     if ($canDo->get('core.edit')) {
         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::divider();
         JToolBarHelper::archiveList('articles.archive');
         JToolBarHelper::checkin('articles.checkin');
         JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
         JToolBarHelper::divider();
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::trash('articles.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_tz_portfolio');
         //			JToolBarHelper::preferences('com_content');
         JToolBarHelper::divider();
     }
     $doc = JFactory::getDocument();
     // If the joomla is version 3.0
     if (COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio/fonts/font-awesome-v3.0.2/css/font-awesome.min.css');
     }
     $doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio/css/style.min.css');
     // Complie button
     $compileTitle = JText::_('COM_TZ_PORTFOLIO_COMPILE_LESS_TO_CSS');
     $compileIcon = '<i class="icon-check"></i>&nbsp;';
     $compileClass = ' class="btn btn-small"';
     //// If the joomla's version is more than or equal to 3.0
     if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         $compileIcon = '<span class="tz-icon-compile"></span>';
         $compileClass = null;
     }
     $compileButton = '<a' . $compileClass . ' onclick="Joomla.submitbutton(\'action.lesscall\')" href="#">' . $compileIcon . $compileTitle . '</a> ';
     //  JS Compress button
     $compressTitle = JText::_('COM_TZ_PORTFOLIO_COMPRESSION_JS');
     $compressIcon = '<i class="icon-check"></i>&nbsp;';
     $compressClass = ' class="btn btn-small"';
     //// If the joomla's version is more than or equal to 3.0
     if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         $compressIcon = '<span class="tz-icon-compress"></span>';
         $compressClass = null;
     }
     $compressButton = '<a' . $compressClass . ' onclick="Joomla.submitbutton(\'action.jscompress\')" href="#">' . $compressIcon . $compressTitle . '</a> ';
     $bar->appendButton('Custom', $compileButton, 'compile');
     $bar->appendButton('Custom', $compressButton, 'compress');
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
     JHtmlSidebar::setAction('index.php?option=com_tz_portfolio&view=featured');
     // Special HTML workaround to get send popup working
     $docClass = ' class="btn btn-small"';
     $youtubeIcon = '<i class="tz-icon-youtube tz-icon-14"></i>&nbsp;';
     $wikiIcon = '<i class="tz-icon-wikipedia tz-icon-14"></i>&nbsp;';
     $youtubeTitle = JText::_('COM_TZ_PORTFOLIO_VIDEO_TUTORIALS');
     $wikiTitle = JText::_('COM_TZ_PORTFOLIO_WIKIPEDIA_TUTORIALS');
     //// If the joomla's version is more than or equal to 3.0
     if (!COM_TZ_PORTFOLIO_JVERSION_COMPARE) {
         $youtubeIcon = '<span class="tz-icon-youtube" title="' . $youtubeTitle . '"></span>';
         $wikiIcon = '<span class="tz-icon-wikipedia" title="' . $wikiTitle . '"></span>';
         $docClass = null;
     }
     $videoTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://www.youtube.com/channel/UCykS6SX6L2GOI-n3IOPfTVQ/videos\', \'' . $youtubeTitle . '\', 800, 500, 1)"' . ' href="#">' . $youtubeIcon . $youtubeTitle . '</a>';
     $wikiTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://wiki.templaza.com/Main_Page\', \'' . $wikiTitle . '\', 800, 500, 1)"' . ' href="#">' . $wikiIcon . $wikiTitle . '</a>';
     $bar->appendButton('Custom', $videoTutorial, 'youtube');
     $bar->appendButton('Custom', $wikiTutorial, 'wikipedia');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_content'), 'value', 'text', $this->state->get('filter.category_id')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_MAX_LEVELS'), 'filter_level', JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_AUTHOR'), 'filter_author_id', JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
 }