primo commit
This commit is contained in:
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
|
||||
$extlink = 0;
|
||||
if (isset($this->item->extid) && $this->item->extid != '') {
|
||||
$extlink = 1;
|
||||
}
|
||||
$class = $this->t['n'] . 'RenderAdminView';
|
||||
$r = $this->r;
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task) {
|
||||
if (task == '<?php echo $this->t['task'] ?>.cancel' || document.formvalidator.isValid(document.getElementById('adminForm'))) {
|
||||
<?php /*echo $this->form->getField('categories')->save(); ?>
|
||||
<?php echo $this->form->getField('category')->save(); ?>
|
||||
<?php echo $this->form->getField('file')->save(); */ ?>
|
||||
Joomla.submitform(task, document.getElementById('adminForm'));
|
||||
}
|
||||
else {
|
||||
Joomla.renderMessages({"error": ["<?php echo Text::_('JGLOBAL_VALIDATION_FORM_FAILED', true);?>"]});
|
||||
<?php /* alert('<?php echo JText::_('JGLOBAL_VALIDATION_FORM_FAILED', true);?>'); */ ?>
|
||||
}
|
||||
}
|
||||
</script><?php
|
||||
echo $r->startForm($this->t['o'], $this->t['task'], $this->item->id, 'adminForm', 'adminForm');
|
||||
// First Column
|
||||
echo '<div class="span8 form-horizontal">';
|
||||
$tabs = array (
|
||||
'general' => Text::_($this->t['l'].'_GENERAL_OPTIONS')
|
||||
);
|
||||
echo $r->navigation($tabs);
|
||||
|
||||
echo $r->startTabs();
|
||||
|
||||
echo $r->startTab('general', $tabs['general'], 'active');
|
||||
|
||||
$formArray = array('categories', 'category', 'file' );
|
||||
echo $r->group($this->form, $formArray, 1);
|
||||
echo '</div>'. "\n";
|
||||
|
||||
|
||||
echo '</div>';//end tab content
|
||||
echo '</div>';//end span10
|
||||
// Second Column
|
||||
echo '<div class="span4">';
|
||||
|
||||
echo '<div class="alert alert-danger">' . Text::_('COM_PHOCADOWNLOAD_LAYOUT_WARNING').'</div>';
|
||||
|
||||
echo '<div class="alert alert-info"><h4>' . Text::_('COM_PHOCADOWNLOAD_CATEGORIES_VIEW').'</h4>';
|
||||
$lP = PhocaDownloadSettings::getLayoutParams('categories');
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_PARAMETERS').'</h3></div>';
|
||||
if (isset($lP['search'])) {
|
||||
foreach ($lP['search'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_STYLES').'</h3></div>';
|
||||
if (isset($lP['style'])) {
|
||||
foreach ($lP['style'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="alert alert-info"><h4>' . Text::_('COM_PHOCADOWNLOAD_CATEGORY_VIEW').'</h4>';
|
||||
$lP = PhocaDownloadSettings::getLayoutParams('category');
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_PARAMETERS').'</h3></div>';
|
||||
if (isset($lP['search'])) {
|
||||
foreach ($lP['search'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_STYLES').'</h3></div>';
|
||||
if (isset($lP['style'])) {
|
||||
foreach ($lP['style'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="alert alert-info"><h4>' . Text::_('COM_PHOCADOWNLOAD_FILE_VIEW').'</h4>';
|
||||
$lP = PhocaDownloadSettings::getLayoutParams('file');
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_PARAMETERS').'</h3></div>';
|
||||
if (isset($lP['search'])) {
|
||||
foreach ($lP['search'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
echo '<div><h3>' . Text::_('COM_PHOCADOWNLOAD_STYLES').'</h3></div>';
|
||||
if (isset($lP['style'])) {
|
||||
foreach ($lP['style'] as $k => $v) {
|
||||
echo $v . ' ';
|
||||
}
|
||||
}
|
||||
|
||||
echo '</div>';//end span2
|
||||
echo $r->formInputs($this->t['task']);
|
||||
echo $r->endForm();
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/* @package Joomla
|
||||
* @copyright Copyright (C) Open Source Matters. All rights reserved.
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
|
||||
* @extension Phoca Extension
|
||||
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
|
||||
*/
|
||||
defined('_JEXEC') or die();
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
jimport( 'joomla.application.component.view' );
|
||||
|
||||
class PhocaDownloadCpViewPhocaDownloadLayout extends HtmlView
|
||||
{
|
||||
protected $state;
|
||||
protected $item;
|
||||
protected $form;
|
||||
protected $t;
|
||||
protected $r;
|
||||
|
||||
public function display($tpl = null) {
|
||||
|
||||
$this->t = PhocaDownloadUtils::setVars('layout');
|
||||
$this->r = new PhocaDownloadRenderAdminView();
|
||||
$this->state = $this->get('State');
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
|
||||
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function addToolbar() {
|
||||
|
||||
require_once JPATH_COMPONENT.'/helpers/'.$this->t['tasks'].'.php';
|
||||
Factory::getApplication()->input->set('hidemainmenu', true);
|
||||
$bar = Toolbar::getInstance('toolbar');
|
||||
$user = Factory::getUser();
|
||||
//$isNew = ($this->item->id == 0);
|
||||
//$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
|
||||
$class = ucfirst($this->t['tasks']).'Helper';
|
||||
$canDo = $class::getActions($this->t);
|
||||
|
||||
ToolbarHelper::title( Text::_( $this->t['l'].'_LAYOUT' ), 'file-2' );
|
||||
ToolbarHelper::custom($this->t['task'].'.back', 'home-2', '', $this->t['l'].'_CONTROL_PANEL', false);
|
||||
//JToolbarHelper::cancel('phocadownloadlayout.cancel', 'JTOOLBAR_CANCEL');
|
||||
|
||||
if ($canDo->get('core.edit')) {
|
||||
ToolbarHelper::apply($this->t['task'].'.apply', 'JTOOLBAR_APPLY');
|
||||
//JToolbarHelper::save('phocapdfplugin.save', 'JTOOLBAR_SAVE');
|
||||
}
|
||||
ToolbarHelper::divider();
|
||||
ToolbarHelper::help( 'screen.'.$this->t['c'], true );
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user