You've already forked joomla_test
first commit
This commit is contained in:
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$template = $app->getTemplate();
|
||||
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (document.formvalidator.isValid(document.id('component-form'))) {
|
||||
Joomla.submitform(task, document.getElementById('component-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<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 id="sidebar" class="span2">
|
||||
<div class="sidebar-nav">
|
||||
<?php echo $this->loadTemplate('navigation'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Sidebar -->
|
||||
<div class="span10">
|
||||
<ul class="nav nav-tabs" id="configTabs">
|
||||
<?php $fieldSets = $this->form->getFieldsets(); ?>
|
||||
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
|
||||
<?php $label = empty($fieldSet->label) ? 'COM_CONFIG_' . $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
|
||||
<li><a href="#<?php echo $name; ?>" data-toggle="tab"><?php echo JText::_($label); ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<?php $fieldSets = $this->form->getFieldsets(); ?>
|
||||
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
|
||||
<div class="tab-pane" id="<?php echo $name; ?>">
|
||||
<?php if (isset($fieldSet->description) && !empty($fieldSet->description)) : ?>
|
||||
<p class="tab-description"><?php echo JText::_($fieldSet->description); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($this->form->getFieldset($name) as $field): ?>
|
||||
<div class="control-group">
|
||||
<?php if (!$field->hidden && $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 endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<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>
|
||||
<script type="text/javascript">
|
||||
jQuery('#configTabs a:first').tab('show'); // Select first tab
|
||||
</script>
|
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @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>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
require_once dirname(dirname(__DIR__)) . '/helper/component.php';
|
||||
|
||||
/**
|
||||
* View for the component configuration
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_config
|
||||
* @since 1.5
|
||||
*/
|
||||
class ConfigViewComponent extends JViewLegacy
|
||||
{
|
||||
/**
|
||||
* Associates the options screen help key with the component name.
|
||||
*
|
||||
* @var array
|
||||
* @since 3.1
|
||||
*/
|
||||
protected $helpScreenArray = array(
|
||||
'com_banners' => 'JHELP_COMPONENTS_BANNER_MANAGER_OPTIONS',
|
||||
'com_cache' => 'JHELP_COMPONENTS_CACHE_MANAGER_SETTINGS',
|
||||
'com_checkin' => 'JHELP_COMPONENTS_CHECK-IN_CONFIGURATION',
|
||||
'com_contact' => 'JHELP_COMPONENTS_CONTACT_MANAGER_OPTIONS',
|
||||
'com_content' => 'JHELP_COMPONENTS_ARTICLE_MANAGER_OPTIONS',
|
||||
'com_finder' => 'JHELP_COMPONENTS_SMART_SEARCH_CONFIGURATION',
|
||||
'com_installer' => 'JHELP_COMPONENTS_INSTALLER_CONFIGURATION',
|
||||
'com_joomlaupdate' => 'JHELP_COMPONENTS_JOOMLA_UPDATE_CONFIGURATION',
|
||||
'com_languages' => 'JHELP_COMPONENTS_LANGUAGE_MANAGER_OPTIONS',
|
||||
'com_media' => 'JHELP_COMPONENTS_MEDIA_MANAGER_OPTIONS',
|
||||
'com_menus' => 'JHELP_COMPONENTS_MENUS_CONFIGURATION',
|
||||
'com_messages' => 'JHELP_COMPONENTS_MESSAGES_CONFIGURATION',
|
||||
'com_modules' => 'JHELP_COMPONENTS_MODULE_MANAGER_OPTIONS',
|
||||
'com_newsfeeds' => 'JHELP_COMPONENTS_NEWS_FEED_MANAGER_OPTIONS',
|
||||
'com_plugins' => 'JHELP_COMPONENTS_PLUG-IN_MANAGER_OPTIONS',
|
||||
'com_redirect' => 'JHELP_COMPONENTS_REDIRECT_MANAGER_OPTIONS',
|
||||
'com_search' => 'JHELP_COMPONENTS_SEARCH_MANAGER_OPTIONS',
|
||||
'com_tags' => 'JHELP_COMPONENTS_TAGS_MANAGER_OPTIONS',
|
||||
'com_templates' => 'JHELP_COMPONENTS_TEMPLATE_MANAGER_OPTIONS',
|
||||
'com_users' => 'JHELP_COMPONENTS_USERS_CONFIGURATION',
|
||||
'com_weblinks' => 'JHELP_COMPONENTS_WEB_LINKS_MANAGER_OPTIONS',
|
||||
);
|
||||
|
||||
/**
|
||||
* Execute and display a template script.
|
||||
*
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return mixed A string if successful, otherwise a Error object.
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$form = $this->get('Form');
|
||||
$component = $this->get('Component');
|
||||
$user = JFactory::getUser();
|
||||
$app = JFactory::getApplication();
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bind the form to the data.
|
||||
if ($form && $component->params)
|
||||
{
|
||||
$form->bind($component->params);
|
||||
}
|
||||
|
||||
$this->form = &$form;
|
||||
$this->component = &$component;
|
||||
|
||||
$this->components = ConfigHelperComponent::getComponentsWithConfig();
|
||||
ConfigHelperComponent::loadLanguageForComponents($this->components);
|
||||
|
||||
$this->userIsSuperAdmin = $user->authorise('core.admin');
|
||||
$this->currentComponent = JFactory::getApplication()->input->get('component');
|
||||
$this->return = $app->input->get('return', '', 'base64');
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
$app->input->set('hidemainmenu', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JToolbarHelper::title(JText::_($this->component->option . '_configuration'), 'config.png');
|
||||
JToolbarHelper::apply('component.apply');
|
||||
JToolbarHelper::save('component.save');
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::cancel('component.cancel');
|
||||
JToolbarHelper::divider();
|
||||
|
||||
// Get the correct help key for this screen
|
||||
if (isset($this->helpScreenArray[$this->component->option]))
|
||||
{
|
||||
JToolbarHelper::help($this->helpScreenArray[$this->component->option]);
|
||||
}
|
||||
else
|
||||
{
|
||||
JToolbarHelper::help('JHELP_SITE_GLOBAL_CONFIGURATION');
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user