- md5
- fb8b237cdbe3e4fb26373e5ebed4470e
- sha1
- ef294a88782e70812c1778842b4312f9e679e9d6
- sha256
- 422e574cd8d1602b993b1ad9d6354470e56e5555d8beb1c4510f11fcad6114ab
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
<?php
/**
* @package Joomla.Administrator
* @subpackage com_finder
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('_JEXEC') or die;
JLoader::register('FinderHelperLanguage', JPATH_ADMINISTRATOR . '/components/com_finder/helpers/language.php');
/**
* Groups view class for Finder.
*
* @package Joomla.Administrator
* @subpackage com_finder
* @since 2.5
*/
class FinderViewMaps extends JViewLegacy
{
/**
* Method to display the view.
*
* @param string $tpl A template file to load. [optional]
*
* @return mixed A string if successful, otherwise a JError object.
*
* @since 2.5
*/
public function display($tpl = null)
{
// Load plug-in language files.
FinderHelperLanguage::loadPluginLanguage();
// Load the view data.
$this->items = $this->get('Items');
$this->total = $this->get('Total');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
// Prepare the view.
$this->addToolbar();
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
parent::display($tpl);
}
/**
* Method to configure the toolbar for this view.
*
* @return void
*
* @since 2.5
*/
protected function addToolbar()
{
// For whatever reason, the helper isn't being found
include_once JPATH_COMPONENT . '/helpers/finder.php';
$canDo = FinderHelper::getActions();
JToolBarHelper::title(JText::_('COM_FINDER_MAPS_TOOLBAR_TITLE'), 'finder');
$toolbar = JToolBar::getInstance('toolbar');
if ($canDo->get('core.edit.state'))
{
JToolBarHelper::publishList('maps.publish');
JToolBarHelper::unpublishList('maps.unpublish');
JToolBarHelper::divider();
}
if ($canDo->get('core.delete'))
{
JToolBarHelper::deleteList('', 'maps.delete');
JToolBarHelper::divider();
}
if ($canDo->get('core.admin'))
{
JToolBarHelper::preferences('com_finder');
}
JToolBarHelper::divider();
$toolbar->appendButton('Popup', 'stats', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 500);
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_CONTENT_MAPS');
}
}
The same content is in 2 releases, Joomla 2.5.7 to 2.5.8. See them all, or every version of this file.