| Current Path : /home/wuectly/www/03cbe/ |
| Current File : /home/wuectly/www/03cbe/component.tar |
tmpl/default_navigation.php 0000604 00000001777 15245650405 0012112 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<ul class="nav nav-list">
<?php if ($this->userIsSuperAdmin) : ?>
<li class="nav-header"><?php echo JText::_('COM_CONFIG_SYSTEM'); ?></li>
<li><a href="index.php?option=com_config"><?php echo JText::_('COM_CONFIG_GLOBAL_CONFIGURATION'); ?></a></li>
<li class="divider"></li>
<?php endif; ?>
<li class="nav-header"><?php echo JText::_('COM_CONFIG_COMPONENT_FIELDSET_LABEL'); ?></li>
<?php foreach ($this->components as $component) : ?>
<?php
$active = '';
if ($this->currentComponent === $component)
{
$active = ' class="active"';
}
?>
<li<?php echo $active; ?>>
<a href="index.php?option=com_config&view=component&component=<?php echo $component; ?>"><?php echo JText::_($component); ?></a>
</li>
<?php endforeach; ?>
</ul>
tmpl/default.php 0000604 00000011103 15245650405 0007653 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$template = $app->getTemplate();
// Load the tooltip behavior.
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', '.chzn-custom-value', null, array('disable_search_threshold' => 0));
JHtml::_('formbehavior.chosen', 'select');
// Load JS message titles
JText::script('ERROR');
JText::script('WARNING');
JText::script('NOTICE');
JText::script('MESSAGE');
JFactory::getDocument()->addScriptDeclaration(
'
Joomla.submitbutton = function(task)
{
if (task === "config.cancel.component" || document.formvalidator.isValid(document.getElementById("component-form")))
{
jQuery("#permissions-sliders select").attr("disabled", "disabled");
Joomla.submitform(task, document.getElementById("component-form"));
}
};
// Select first tab
jQuery(document).ready(function() {
jQuery("#configTabs a:first").tab("show");
});'
);
?>
<form action="<?php echo JRoute::_('index.php?option=com_config'); ?>" id="component-form" method="post" name="adminForm" autocomplete="off" class="form-validate form-horizontal">
<div class="row-fluid">
<!-- Begin Sidebar -->
<div class="span2" id="sidebar">
<div class="sidebar-nav">
<?php echo $this->loadTemplate('navigation'); ?>
</div>
</div><!-- End Sidebar -->
<div class="span10" id="config">
<?php if ($this->fieldsets): ?>
<ul class="nav nav-tabs" id="configTabs">
<?php foreach ($this->fieldsets as $name => $fieldSet) : ?>
<?php $dataShowOn = ''; ?>
<?php if (!empty($fieldSet->showon)) : ?>
<?php JHtml::_('jquery.framework'); ?>
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($fieldSet->showon, $this->formControl)) . '\''; ?>
<?php endif; ?>
<?php $label = empty($fieldSet->label) ? 'COM_CONFIG_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
<li<?php echo $dataShowOn; ?>><a data-toggle="tab" href="#<?php echo $name; ?>"><?php echo JText::_($label); ?></a></li>
<?php endforeach; ?>
</ul><!-- /configTabs -->
<div class="tab-content" id="configContent">
<?php foreach ($this->fieldsets as $name => $fieldSet) : ?>
<div class="tab-pane" id="<?php echo $name; ?>">
<?php if (isset($fieldSet->description) && !empty($fieldSet->description)) : ?>
<div class="tab-description alert alert-info">
<span class="icon-info" aria-hidden="true"></span> <?php echo JText::_($fieldSet->description); ?>
</div>
<?php endif; ?>
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
<?php
$dataShowOn = '';
$groupClass = $field->type === 'Spacer' ? ' field-spacer' : '';
?>
<?php if ($field->showon) : ?>
<?php JHtml::_('jquery.framework'); ?>
<?php JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); ?>
<?php $dataShowOn = ' data-showon=\'' . json_encode(JFormHelper::parseShowOnConditions($field->showon, $field->formControl, $field->group)) . '\''; ?>
<?php endif; ?>
<?php if ($field->hidden) : ?>
<?php echo $field->input; ?>
<?php else : ?>
<div class="control-group<?php echo $groupClass; ?>"<?php echo $dataShowOn; ?>>
<?php if ($name != 'permissions') : ?>
<div class="control-label">
<?php echo $field->label; ?>
</div>
<?php endif; ?>
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
<?php echo $field->input; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div><!-- /configContent -->
<?php else: ?>
<div class="alert alert-info"><span class="icon-info" aria-hidden="true"></span> <?php echo JText::_('COM_CONFIG_COMPONENT_NO_CONFIG_FIELDS_MESSAGE'); ?></div>
<?php endif; ?>
</div><!-- /config -->
<input type="hidden" name="id" value="<?php echo $this->component->id; ?>" />
<input type="hidden" name="component" value="<?php echo $this->component->option; ?>" />
<input type="hidden" name="return" value="<?php echo $this->return; ?>" />
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
tmpl/default.xml 0000604 00000001017 15245650405 0007667 0 ustar 00 <?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_CONFIG_COMPONENT_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_CONFIG_COMPONENT_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="request">
<fieldset name="request" addfieldpath="administrator/components/com_config/model/field">
<field
name="component"
type="configComponents"
label="JGLOBAL_CHOOSE_COMPONENT_LABEL"
description="JGLOBAL_CHOOSE_COMPONENT_DESC"
required="true"
/>
</fieldset>
</fields>
</metadata>
html.php 0000604 00000004740 15245650405 0006230 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* View for the component configuration
*
* @since 3.2
*/
class ConfigViewComponentHtml extends ConfigViewCmsHtml
{
public $state;
public $form;
public $component;
/**
* Display the view
*
* @return string The rendered view.
*
* @since 3.2
*
*/
public function render()
{
$form = null;
$component = null;
try
{
$component = $this->model->getComponent();
if (!$component->enabled)
{
return false;
}
$form = $this->model->getForm();
$user = JFactory::getUser();
}
catch (Exception $e)
{
JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
return false;
}
// Bind the form to the data.
if ($form && $component->params)
{
$form->bind($component->params);
}
$this->fieldsets = $form ? $form->getFieldsets() : null;
$this->formControl = $form ? $form->getFormControl() : null;
// Don't show permissions fieldset if not authorised.
if (!$user->authorise('core.admin', $component->option) && isset($this->fieldsets['permissions']))
{
unset($this->fieldsets['permissions']);
}
$this->form = &$form;
$this->component = &$component;
$this->components = ConfigHelperConfig::getComponentsWithConfig();
$this->userIsSuperAdmin = $user->authorise('core.admin');
$this->currentComponent = JFactory::getApplication()->input->get('component');
$this->return = JFactory::getApplication()->input->get('return', '', 'base64');
$this->addToolbar();
return parent::render();
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 3.2
*/
protected function addToolbar()
{
JToolbarHelper::title(JText::_($this->component->option . '_configuration'), 'equalizer config');
JToolbarHelper::apply('config.save.component.apply');
JToolbarHelper::save('config.save.component.save');
JToolbarHelper::divider();
JToolbarHelper::cancel('config.cancel.component');
JToolbarHelper::divider();
$helpUrl = $this->form->getData()->get('helpURL');
$helpKey = (string) $this->form->getXml()->config->help['key'];
$helpKey = $helpKey ?: 'JHELP_COMPONENTS_' . strtoupper($this->currentComponent) . '_OPTIONS';
JToolbarHelper::help($helpKey, (boolean) $helpUrl, null, $this->currentComponent);
}
}