Example #1
0
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $bar = JToolBar::getInstance();
     $canDo = JHelperContent::getActions('com_tz_portfolio_plus');
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     $text = JText::_($this->item->name);
     if ($this->getLayout() == 'upload') {
         $text = JText::_('COM_TZ_PORTFOLIO_PLUS_UPLOAD_AND_INSTALL_ADDON');
     }
     if ($this->getLayout() == 'manager') {
         $text = JText::_($this->item->name) . ': Manager Data';
     }
     JToolBarHelper::title(JText::sprintf('COM_TZ_PORTFOLIO_PLUS_ADDONS_MANAGER_TASK', $text), 'puzzle');
     if ($this->getLayout() == 'edit') {
         // If not checked out, can save the item.
         if (!$checkedOut) {
             if ($canDo->get('core.edit')) {
                 JToolBarHelper::apply('addon.apply');
                 JToolBarHelper::save('addon.save');
             }
         }
     }
     if ($this->getLayout() == 'edit' && $this->item->data_manager) {
         JToolbarHelper::link(JRoute::_(TZ_Portfolio_PlusHelperAddon_Datas::getRootURL($this->item->id)), JText::_('COM_TZ_PORTFOLIO_PLUS_ADDON_DATA_MANAGER'), 'book');
     }
     if ($this->getLayout() != 'manager') {
         JToolBarHelper::cancel('addon.cancel', JText::_('JTOOLBAR_CLOSE'));
         JToolBarHelper::divider();
     } else {
         JToolbarHelper::custom('addon.cancel', 'puzzle', '', JText::_('COM_TZ_PORTFOLIO_PLUS_ADDONS_MANAGER'), false);
     }
     JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER', false, 'http://wiki.templaza.com/TZ_Portfolio_Plus_v3:Administration#How_to_Add_or_Edit_3');
     // 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_PLUS_VIDEO_TUTORIALS');
     $wikiTitle = JText::_('COM_TZ_PORTFOLIO_PLUS_WIKIPEDIA_TUTORIALS');
     $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');
 }
Example #2
0
        }
        ?>
                                    <a href="index.php?option=com_tz_portfolio_plus&task=addon.edit&id=<?php 
        echo $item->id;
        ?>
">
                                    <?php 
        echo $item->name;
        ?>
                                    </a>

                                    <?php 
        if ($item->data_manager) {
            ?>
                                        <a href="<?php 
            echo JRoute::_(TZ_Portfolio_PlusHelperAddon_Datas::getRootURL($item->id));
            ?>
"
                                           class="btn btn-small hasTooltip"
                                           title="<?php 
            echo JText::_('COM_TZ_PORTFOLIO_PLUS_ADDON_DATA_MANAGER');
            ?>
">
                                            <span class="icon-book"></span><span><?php 
            echo JText::_('COM_TZ_PORTFOLIO_PLUS_ADDON_DATA_MANAGER');
            ?>
</span>
                                        </a>
                                    <?php 
        }
        ?>