first commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Page Builder CK
|
||||
* @package com_pagebuilderck
|
||||
* @copyright Copyright (C) 2015. 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 Pagebuilderck\CKFof;
|
||||
|
||||
require_once(PAGEBUILDERCK_PATH . '/helpers/defines.js.php');
|
||||
|
||||
// check the joomla! version
|
||||
if (version_compare(JVERSION, '3.0.0') > 0) {
|
||||
$jversion = '3';
|
||||
} else {
|
||||
$jversion = '2';
|
||||
}
|
||||
|
||||
$user = CKFof::getUser();
|
||||
$userId = $user->get('id');
|
||||
// for ordering
|
||||
$listOrder = $this->state->get('filter_order', 'a.id');
|
||||
$listDirn = $this->state->get('filter_order_Dir', 'ASC');
|
||||
$filter_search = $this->state->get('filter_search', '');
|
||||
$limitstart = $this->state->get('limitstart', 0);
|
||||
$limit = $this->state->get('limit', 20);
|
||||
CKFof::addStyleSheet(PAGEBUILDERCK_MEDIA_URI . '/assets/adminlist.css');
|
||||
?>
|
||||
<div class="ckadminsidebar"><?php echo JHtmlSidebar::render() ?></div>
|
||||
<div class="ckadminarea">
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_pagebuilderck&view=pages'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<div id="filter-bar" class="btn-toolbar input-group">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<label for="filter_search" class="element-invisible"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></label>
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo addslashes($this->state->get('filter_search')); ?>" class="cktip form-control" title="" />
|
||||
</div>
|
||||
<div class="input-group-append btn-group pull-left hidden-phone">
|
||||
<button type="submit" class="btn btn-primary cktip" title="<?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i><?php echo ($jversion === '2' ? JText::_('JSEARCH_FILTER_SUBMIT') : ''); ?></button>
|
||||
<button type="button" class="btn btn-secondary cktip" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.getElementById('filter_search').value = '';
|
||||
this.form.submit();"><i class="icon-remove"></i><?php echo ($jversion === '2' ? JText::_('JSEARCH_FILTER_CLEAR') : ''); ?></button>
|
||||
</div>
|
||||
|
||||
<?php if ($jversion === '3') { ?>
|
||||
<div class="btn-group pull-right hidden-phone ordering-select">
|
||||
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
<div style="margin: 5px 0;">
|
||||
<label for="categories" ><?php echo JText::_('COM_PAGEBUILDERCK_CATEGORIES'); ?></label>
|
||||
<select id="categories" name="categories" class="form-select" onchange="this.form.submit();">
|
||||
<option value="0"><?php echo JText::_('COM_PAGEBUILDERCK_SELECT_CATEGORY'); ?></option>
|
||||
<?php
|
||||
$categories = PagebuilderckHelper::getCategories();
|
||||
foreach ($categories as $category) {
|
||||
?>
|
||||
<option value="<?php echo $category->id ?>" <?php echo ($category->id == addslashes($this->state->get('categories')) ?'selected="true"':'') ?>><?php echo $category->name ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<table class="table table-striped" id="templateckList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%">
|
||||
<input type="checkbox" name="checkall-toggle" class="form-check-input" title="<?php echo JText::_('JGLOBAL_CHECK_ALL'); ?>" value="" onclick="Joomla.checkAll(this)" />
|
||||
</th>
|
||||
|
||||
<th class='left'>
|
||||
<?php //echo JText::_('COM_PAGEBUILDERCK_TEMPLATES_NAME'); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_PAGEBUILDERCK_PAGES_NAME', 'a.title', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php if (isset($this->items[0]->state)) { ?>
|
||||
<?php } ?>
|
||||
<th class="nowrap">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_PAGEBUILDERCK_CATEGORIES', 'a.categories', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php if (isset($this->items[0]->id)) {
|
||||
?>
|
||||
<th width="1%" class="nowrap">
|
||||
<?php //echo JText::_('JGRID_HEADING_ID'); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php } ?>
|
||||
<th width="1%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="10">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($this->items as $i => $item) :
|
||||
$canCreate = $user->authorise('core.create', 'com_pagebuilderck');
|
||||
$canEdit = $user->authorise('core.edit', 'com_pagebuilderck');
|
||||
$canCheckin = $user->authorise('core.manage', 'com_pagebuilderck');
|
||||
$canChange = $user->authorise('core.edit.state', 'com_pagebuilderck');
|
||||
$link = 'index.php?option=com_pagebuilderck&view=page&task=page.edit&id=' . $item->id;
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td class="center">
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php if ($item->checked_out) { ?>
|
||||
<a class="tbody-icon" href="<?php echo JRoute::_('index.php?option=com_pagebuilderck&task=pages.checkin&id=' . $item->id); ?>"><span class="icon-checkedout" aria-hidden="true"></span></a>
|
||||
<?php /*<div role="tooltip" id="cbcheckin0-desc"><strong>Check-in</strong><br>test<br>Saturday, 05 February 2022<br>08:57</div> */ ?>
|
||||
<?php } ?>
|
||||
<a href="<?php echo $link; ?>"><?php echo $item->title; ?></a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php
|
||||
if (! empty($item->categoriesByName)) {
|
||||
// echo '<span class="badge bg-secondary">' . implode('</span><span class="badge bg-secondary">', $item->categoriesByName) . '</span>';
|
||||
echo implode("<br/>", $item->categoriesByName);
|
||||
} ?>
|
||||
</td>
|
||||
<?php if (isset($this->items[0]->id)) {
|
||||
?>
|
||||
<td class="center">
|
||||
<?php echo (int) $item->id; ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<td class="center">
|
||||
<?php
|
||||
$buttonstate = $item->state == '1' ? '' : 'un';
|
||||
?>
|
||||
<span class="icon-<?php echo $buttonstate ?>publish"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
|
||||
<input type="hidden" name="state_request" value="1" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<small style="display:block;text-align:center;"><?php echo JText::_('COM_PAGEBUILDERCK_VOTE_JED'); ?> <a href="https://extensions.joomla.org/extensions/extension/authoring-a-content/content-construction/page-builder-ck" target="_blank" ><small><?php echo JText::_('COM_PAGEBUILDERCK_VOTE_JED_BUTTON'); ?></small></a></small>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body></body></html>
|
||||
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Page Builder CK
|
||||
* @package com_pagebuilderck
|
||||
* @copyright Copyright (C) 2015. 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 Pagebuilderck\CKFof;
|
||||
|
||||
// check the joomla! version
|
||||
if (version_compare(JVERSION, '3.0.0') > 0) {
|
||||
$jversion = '3';
|
||||
} else {
|
||||
$jversion = '2';
|
||||
}
|
||||
|
||||
$user = CKFof::getUser();
|
||||
$userId = $user->get('id');
|
||||
// for ordering
|
||||
$listOrder = $this->state->get('filter_order', 'a.id');
|
||||
$listDirn = $this->state->get('filter_order_Dir', 'ASC');
|
||||
$filter_search = $this->state->get('filter_search', '');
|
||||
$limitstart = $this->state->get('limitstart', 0);
|
||||
$limit = $this->state->get('limit', 20);
|
||||
$function = $this->input->get('function', '', 'cmd');
|
||||
$target = $this->input->get('target', '', 'cmd');
|
||||
CKFof::addStyleSheet(PAGEBUILDERCK_MEDIA_URI . '/assets/adminlist.css');
|
||||
if ($target == 'leftpanel') {
|
||||
?>
|
||||
<style>
|
||||
body.contentpane {
|
||||
background: #f5f5f5;
|
||||
padding: 0px;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="<?php echo PAGEBUILDERCK_MEDIA_URI ?>/assets/pagebuilderck.css?ver=<?php echo PAGEBUILDERCK_VERSION ?>" type="text/css" />
|
||||
<link rel="stylesheet" href="<?php echo JUri::root(true) ?>/components/com_pagebuilderck/assets/font-awesome.min.css" type="text/css" />
|
||||
<div class="pagebuilderckchecking"></div>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_pagebuilderck&view=pages&layout=modal&tmpl=component&function=' . $function . '&target=' . $target); ?>" method="post" name="adminForm" id="adminForm" class="ckinterface <?php if ($target == 'leftpanel') { echo 'ckleftpanelframe'; } ?>">
|
||||
<?php if ($target == 'leftpanel') { ?>
|
||||
<div class="ckleftpanelsearch">
|
||||
<input type="text" name="filter_search" id="filter_search" class="cksearchleftpanel" placeholder="<?php echo JText::_('CK_SEARCH') ?>" value="<?php echo addslashes($this->state->get('filter_search')); ?>" />
|
||||
<i class="fa fa-search cktip" title="<?php echo JText::_('CK_SEARCH') ?>" onclick="document.getElementById('adminForm').submit();"></i>
|
||||
<i onclick="document.getElementById('filter_search').value = '';document.getElementById('adminForm').submit();" class="fa fa-times cktip" title="<?php echo JText::_('CK_CLEAN') ?>" ></i>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div id="filter-bar" class="btn-toolbar input-group">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<label for="filter_search" class="element-invisible"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></label>
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo addslashes($this->state->get('filter_search')); ?>" class="cktip form-control" title="" />
|
||||
</div>
|
||||
<div class="input-group-append btn-group pull-left hidden-phone">
|
||||
<button type="submit" class="btn btn-primary cktip" title="<?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i><?php echo ($jversion === '2' ? JText::_('JSEARCH_FILTER_SUBMIT') : ''); ?></button>
|
||||
<button type="button" class="btn btn-secondary cktip" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.getElementById('filter_search').value = '';
|
||||
this.form.submit();"><i class="icon-remove"></i><?php echo ($jversion === '2' ? JText::_('JSEARCH_FILTER_CLEAR') : ''); ?></button>
|
||||
</div>
|
||||
<?php if ($jversion === '3') { ?>
|
||||
<div class="btn-group pull-right hidden-phone ordering-select">
|
||||
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC'); ?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="clearfix"> </div>
|
||||
<div style="margin: 5px 0;">
|
||||
<select id="categories" name="categories" class="form-select" onchange="this.form.submit();">
|
||||
<option value="0"><?php echo JText::_('COM_PAGEBUILDERCK_SELECT_CATEGORY'); ?></option>
|
||||
<?php
|
||||
$categories = PagebuilderckHelper::getCategories();
|
||||
foreach ($categories as $category) {
|
||||
?>
|
||||
<option value="<?php echo $category->id ?>" <?php echo ($category->id == addslashes($this->state->get('categories')) ?'selected="true"':'') ?>><?php echo $category->name ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<table class="table table-striped" id="pagebuilderckList">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class='left'>
|
||||
<?php //echo JText::_('COM_PAGEBUILDERCK_TEMPLATES_NAME'); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_PAGEBUILDERCK_PAGES_NAME', 'a.title', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php if (isset($this->items[0]->state)) { ?>
|
||||
<?php } ?>
|
||||
<?php if (isset($this->items[0]->id)) {
|
||||
?>
|
||||
<th width="1%" class="nowrap">
|
||||
<?php //echo JText::_('JGRID_HEADING_ID'); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="10">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($this->items as $i => $item) :
|
||||
$canCreate = $user->authorise('core.create', 'com_pagebuilderck');
|
||||
$canEdit = $user->authorise('core.edit', 'com_pagebuilderck');
|
||||
$canCheckin = $user->authorise('core.manage', 'com_pagebuilderck');
|
||||
$canChange = $user->authorise('core.edit.state', 'com_pagebuilderck');
|
||||
// $link = 'index.php?option=com_pagebuilderck&view=page&task=page.edit&id=' . $item->id;
|
||||
$link = 'javascript:void(0)';
|
||||
$onclick = 'window.parent.' . $function . '(' . $item->id . ', \'page\', \'' . addslashes($item->title) . '\');';
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?> ckrowpage">
|
||||
<td>
|
||||
<a href="<?php echo $link; ?>" onclick="<?php echo $onclick ?>"><?php echo $item->title; ?></a>
|
||||
</td>
|
||||
<?php if (isset($this->items[0]->id)) {
|
||||
?>
|
||||
<td class="center">
|
||||
<?php echo (int) $item->id; ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
|
||||
<input type="hidden" name="state_request" value="1" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
/**
|
||||
* @name Page Builder CK
|
||||
* @package com_pagebuilderck
|
||||
* @copyright Copyright (C) 2015. 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 Pagebuilderck\CKView;
|
||||
use Pagebuilderck\CKFof;
|
||||
|
||||
/**
|
||||
* View class for a list of items.
|
||||
*/
|
||||
class PagebuilderckViewPages extends CKView {
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null) {
|
||||
// for the items published to be shown in the modal list
|
||||
$this->state = $this->model->getState();
|
||||
if ($this->input->get('layout') === 'modal') {
|
||||
$this->model->setState('filter_state', '1');
|
||||
} else {
|
||||
$this->model->setState('filter_state', '');
|
||||
}
|
||||
|
||||
$this->items = $this->get('Items');
|
||||
|
||||
if (CKFof::isAdmin()) $this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar() {
|
||||
PagebuilderckHelper::loadCkbox();
|
||||
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
|
||||
// Load the left sidebar only for Joomla 3 and under.
|
||||
if (! PAGEBUILDERCK_ISJ4) {
|
||||
PagebuilderckHelper::addSubmenu('pages');
|
||||
}
|
||||
|
||||
JToolBarHelper::title(JText::_('COM_PAGEBUILDERCK'));
|
||||
|
||||
if (CKFof::userCan('create')) {
|
||||
JToolBarHelper::addNew('page.add', 'JTOOLBAR_NEW');
|
||||
}
|
||||
|
||||
if (CKFof::userCan('edit')) {
|
||||
JToolBarHelper::editList('page.edit', 'JTOOLBAR_EDIT');
|
||||
JToolBarHelper::custom('page.copy', 'copy', 'copy', 'CK_COPY');
|
||||
JToolBarHelper::custom('page.publish', 'publish', 'publish', 'JTOOLBAR_PUBLISH');
|
||||
JToolBarHelper::custom('page.unpublish', 'unpublish', 'unpublish', 'JTOOLBAR_UNPUBLISH');
|
||||
// if Params is installed
|
||||
if (PagebuilderckHelper::getParams()) {
|
||||
$importButton = '<joomla-toolbar-button><button class="btn btn-small" onclick="CKBox.open({handler: \'inline\', content: \'ckImportModal\', fullscreen: false, size: {x: \'600px\', y: \'200px\'}});">
|
||||
<span class="icon-forward-2"></span>
|
||||
' . JText::_('CK_IMPORT') . '
|
||||
</button></joomla-toolbar-button>';
|
||||
$bar->appendButton('Custom', $importButton, 'import');
|
||||
|
||||
// $exportButton = '<joomla-toolbar-button><button class="btn btn-small" onclick="ckExportPage(document.adminForm);">
|
||||
// <span class="icon-share"></span>
|
||||
// ' . JText::_('CK_EXPORT') . '
|
||||
// </button></joomla-toolbar-button>';
|
||||
// $bar->appendButton('Custom', $exportButton, 'export');
|
||||
|
||||
if (version_compare(JVERSION, '4.0.0') > 0) {
|
||||
$exportButton = '<div id="toolbar-dropdown-save-group" class="btn-group dropdown-save-group" role="group">
|
||||
<joomla-toolbar-button>
|
||||
<button class="btn btn-small" onclick="ckExportPage(document.adminForm);">
|
||||
<span class="icon-share"></span>
|
||||
' . JText::_('CK_EXPORT') . '
|
||||
</button>
|
||||
</joomla-toolbar-button>
|
||||
<button type="button" class="btn dropdown-toggle-split" data-bs-toggle="dropdown" data-bs-target=".dropdown-menu" data-bs-display="static" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="visually-hidden">Toggle Dropdown</span>
|
||||
<span class="icon-chevron-down" aria-hidden="true"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu ">
|
||||
<joomla-toolbar-button>
|
||||
<button class=" dropdown-item first" type="button" onclick="ckExportPage(document.adminForm, \'1\');">
|
||||
<span class="icon-share"></span>
|
||||
' . JText::_('CK_EXPORT_WITH_IMAGES') . '
|
||||
</button>
|
||||
</joomla-toolbar-button>
|
||||
<joomla-toolbar-button>
|
||||
<button class=" dropdown-item first" type="button" onclick="ckExportPageAsLibrary(document.adminForm);">
|
||||
<span class="icon-share"></span>
|
||||
' . JText::_('CK_EXPORT_AS_LIBRARY') . '
|
||||
</button>
|
||||
</joomla-toolbar-button>
|
||||
</div>
|
||||
</div>';
|
||||
$bar->appendButton('Custom', $exportButton, 'export');
|
||||
} else {
|
||||
$exportButton = '<joomla-toolbar-button><button class="btn btn-small" onclick="ckExportPage(document.adminForm);">
|
||||
<span class="icon-share"></span>
|
||||
' . JText::_('CK_EXPORT') . '
|
||||
</button></joomla-toolbar-button>';
|
||||
$bar->appendButton('Custom', $exportButton, 'export');
|
||||
|
||||
$exportButton = '<joomla-toolbar-button><button class="btn btn-small" onclick="ckExportPage(document.adminForm, \'1\');">
|
||||
<span class="icon-share"></span>
|
||||
' . JText::_('CK_EXPORT_WITH_IMAGES') . '
|
||||
</button></joomla-toolbar-button>';
|
||||
$bar->appendButton('Custom', $exportButton, 'export');
|
||||
|
||||
$exportButton = '<joomla-toolbar-button><button class="btn btn-small" onclick="ckExportPageAsLibrary(document.adminForm);">
|
||||
<span class="icon-share"></span>
|
||||
' . JText::_('CK_EXPORT_AS_LIBRARY') . '
|
||||
</button></joomla-toolbar-button>';
|
||||
$bar->appendButton('Custom', $exportButton, 'export');
|
||||
}
|
||||
|
||||
/*
|
||||
* <div id="toolbar-dropdown-save-group" class="btn-group dropdown-save-group" role="group">
|
||||
<button type="button" class="btn btn-success dropdown-toggle-split" data-bs-toggle="dropdown" data-bs-target=".dropdown-menu" data-bs-display="static" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="visually-hidden">Toggle Dropdown</span>
|
||||
<span class="icon-chevron-down" aria-hidden="true"></span>
|
||||
</button>
|
||||
|
||||
|
||||
<joomla-toolbar-button id="save-group-children-save" task="article.save" form-validation="">
|
||||
<button class="button-save btn btn-success" type="button">
|
||||
<span class="icon-save" aria-hidden="true"></span>
|
||||
Save & Close</button>
|
||||
</joomla-toolbar-button>
|
||||
|
||||
<div class="dropdown-menu ">
|
||||
|
||||
<joomla-toolbar-button id="save-group-children-save-new" task="article.save2new" form-validation="">
|
||||
<button class="button-save-new dropdown-item first" type="button">
|
||||
<span class="icon-save-new" aria-hidden="true"></span>
|
||||
Save & New</button>
|
||||
</joomla-toolbar-button>
|
||||
|
||||
<joomla-toolbar-button id="save-group-children-save1" task="article.save2menu" form-validation="">
|
||||
<button class="button-save dropdown-item" type="button">
|
||||
<span class="icon-save" aria-hidden="true"></span>
|
||||
Save to Menu</button>
|
||||
</joomla-toolbar-button>
|
||||
|
||||
<joomla-toolbar-button id="save-group-children-save-copy" task="article.save2copy" form-validation="">
|
||||
<button class="button-save-copy dropdown-item last" type="button">
|
||||
<span class="icon-save-copy" aria-hidden="true"></span>
|
||||
Save as Copy</button>
|
||||
</joomla-toolbar-button>
|
||||
</div>
|
||||
</div>
|
||||
*/
|
||||
// if (document.adminForm.boxchecked.value==0){alert('Veuillez d\'abord effectuer une s<>lection dans la liste.');}else{ Joomla.submitbutton('pages.export')}
|
||||
// JToolBarHelper::custom('pages.export', 'share', 'share', 'CK_EXPORT', true);
|
||||
if ($importClass = PagebuilderckHelper::getParams('import')) {
|
||||
$importClass->loadImportForm();
|
||||
}
|
||||
if ($exportClass = PagebuilderckHelper::getParams('export')) {
|
||||
$exportClass->loadExportForm();
|
||||
}
|
||||
} else {
|
||||
$importButton = '<joomla-toolbar-button><button class="btn btn-small" onclick="CKBox.open({handler:\'inline\',content: \'pagebuilderckparamsmessage\', fullscreen: false, size: {x: \'600px\', y: \'150px\'}});">
|
||||
<span class="icon-forward-2"></span>
|
||||
' . JText::_('CK_IMPORT') . '
|
||||
</button></joomla-toolbar-button>';
|
||||
$bar->appendButton('Custom', $importButton, 'import');
|
||||
$exportButton = '<joomla-toolbar-button><button class="btn btn-small" onclick="CKBox.open({handler:\'inline\',content: \'pagebuilderckparamsmessage\', fullscreen: false, size: {x: \'600px\', y: \'150px\'}});">
|
||||
<span class="icon-share"></span>
|
||||
' . JText::_('CK_EXPORT') . '
|
||||
</button></joomla-toolbar-button>';
|
||||
$bar->appendButton('Custom', $exportButton, 'export');
|
||||
echo PagebuilderckHelper::showParamsMessage(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (CKFof::userCan('core.delete')) {
|
||||
//If this component does not use state then show a direct delete button as we can not trash
|
||||
// JToolBarHelper::custom('page.trash', 'trash', 'trash', 'JTOOLBAR_DELETE', 'test');
|
||||
$deleteButton = '<joomla-toolbar-button id="toolbar-cktrash" list-selection=""><button class="btn btn-small ' . (PAGEBUILDERCK_ISJ4 ? 'btn-danger' : '') . '" onclick="if (document.adminForm.boxchecked.value == 0) { alert(Joomla.JText._(\'JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST\')); } else { if (confirm(\'' . JText::_('CK_CONFIRM_DELETE') . '\')) Joomla.submitbutton(\'page.trash\'); }">
|
||||
<span class="icon-trash"></span>
|
||||
' . JText::_('CK_DELETE') . '
|
||||
</button></joomla-toolbar-button>';
|
||||
$bar->appendButton('Custom', $deleteButton, 'export');
|
||||
}
|
||||
|
||||
if (CKFof::userCan('core.admin')) {
|
||||
JToolBarHelper::preferences('com_pagebuilderck');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user