| Server IP : 87.98.231.4 / Your IP : 216.73.217.178 [ Web Server : Apache System : Linux webm007.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : grupmartgn ( 667608) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/grupmartgn/elanartcrafts/administrator/components/com_carouselck/views/styles/ |
Upload File : |
<?php
/**
* @name Carousel CK
* @package com_carouselck
* @copyright Copyright (C) 2019. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Cedric Keiflin - https://www.template-creator.com - https://www.joomlack.fr
*/
// No direct access
defined('_JEXEC') or die;
use \Carouselck\CKView;
use \Carouselck\CKFof;
class CarouselckViewStyles extends CKView {
protected $items;
protected $pagination;
protected $state;
/**
* Display the view
*/
public function display($tpl = null) {
$user = JFactory::getUser();
$authorised = ($user->authorise('core.edit', 'com_carouselck') || (count($user->getAuthorisedCategories('com_carouselck', 'core.edit'))));
if ($authorised !== true)
{
throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'), 403);
return false;
}
$this->items = $this->get('Items');
$this->toolbar = $this->getToolbar();
$this->input->set('tmpl', 'component');
$this->input->set('layout', 'modal');
parent::display();
}
private function getToolbar() {
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
if (CKFof::userCan('create')) {
JToolBarHelper::addNew('style.add', 'CK_NEW');
JToolBarHelper::custom('style.copy', 'copy', 'copy', 'CK_COPY');
// Render the popup button
// $html = '<button class="btn btn-small btn-success" onclick="CKBox.open({handler:\'iframe\', fullscreen: true, url:\'' . JUri::root(true) . '/administrator/index.php?option=com_carouselck&view=style&layout=modal&tmpl=component&id=0\'})">
// <span class="icon-new icon-white"></span>
// ' . JText::_('JTOOLBAR_NEW') . '
// </button>';
// $bar->appendButton('Custom', $html);
}
if (CKFof::userCan('edit')) {
JToolBarHelper::custom('style.edit', 'edit', 'edit', 'CK_EDIT');
JToolBarHelper::trash('style.delete', 'CK_TRASH');
}
return $bar;
}
}