| Current Path : /proc/1908984/root/proc/self/root/proc/self/root/proc/2411249/cwd/ |
| Current File : //proc/1908984/root/proc/self/root/proc/self/root/proc/2411249/cwd/edit.tar |
params.php 0000644 00000006506 15235424750 0006556 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @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();
$form = $displayData->getForm();
$fieldSets = $form->getFieldsets();
if (empty($fieldSets))
{
return;
}
$ignoreFieldsets = $displayData->get('ignore_fieldsets') ?: array();
$ignoreFields = $displayData->get('ignore_fields') ?: array();
$extraFields = $displayData->get('extra_fields') ?: array();
$tabName = $displayData->get('tab_name') ?: 'myTab';
// These are required to preserve data on save when fields are not displayed.
$hiddenFieldsets = $displayData->get('hiddenFieldsets') ?: array();
// These are required to configure showing and hiding fields in the editor.
$configFieldsets = $displayData->get('configFieldsets') ?: array();
// Handle the hidden fieldsets when show_options is set false
if (!$displayData->get('show_options', 1))
{
// The HTML buffer
$html = array();
// Hide the whole buffer
$html[] = '<div style="display:none;">';
// Loop over the fieldsets
foreach ($fieldSets as $name => $fieldSet)
{
// Check if the fieldset should be ignored
if (in_array($name, $ignoreFieldsets, true))
{
continue;
}
// If it is a hidden fieldset, render the inputs
if (in_array($name, $hiddenFieldsets))
{
// Loop over the fields
foreach ($form->getFieldset($name) as $field)
{
// Add only the input on the buffer
$html[] = $field->input;
}
// Make sure the fieldset is not rendered twice
$ignoreFieldsets[] = $name;
}
// Check if it is the correct fieldset to ignore
if (strpos($name, 'basic') === 0)
{
// Ignore only the fieldsets which are defined by the options not the custom fields ones
$ignoreFieldsets[] = $name;
}
}
// Close the container
$html[] = '</div>';
// Echo the hidden fieldsets
echo implode('', $html);
}
// Loop again over the fieldsets
foreach ($fieldSets as $name => $fieldSet)
{
// Ensure any fieldsets we don't want to show are skipped (including repeating formfield fieldsets)
if ((isset($fieldSet->repeat) && $fieldSet->repeat === true)
|| in_array($name, $ignoreFieldsets)
|| (!empty($configFieldsets) && in_array($name, $configFieldsets, true))
|| (!empty($hiddenFieldsets) && in_array($name, $hiddenFieldsets, true))
)
{
continue;
}
// Determine the label
if (!empty($fieldSet->label))
{
$label = JText::_($fieldSet->label);
}
else
{
$label = strtoupper('JGLOBAL_FIELDSET_' . $name);
if (JText::_($label) === $label)
{
$label = strtoupper($app->input->get('option') . '_' . $name . '_FIELDSET_LABEL');
}
$label = JText::_($label);
}
// Start the tab
echo JHtml::_('bootstrap.addTab', $tabName, 'attrib-' . $name, $label);
// Include the description when available
if (isset($fieldSet->description) && trim($fieldSet->description))
{
echo '<p class="alert alert-info">' . $this->escape(JText::_($fieldSet->description)) . '</p>';
}
// The name of the fieldset to render
$displayData->fieldset = $name;
// Force to show the options
$displayData->showOptions = true;
// Render the fieldset
echo JLayoutHelper::render('joomla.edit.fieldset', $displayData);
// End the tab
echo JHtml::_('bootstrap.endTab');
}
metadata.php 0000644 00000002027 15243322663 0007044 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @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;
$form = $displayData->getForm();
// JLayout for standard handling of metadata fields in the administrator content edit screens.
$fieldSets = $form->getFieldsets('metadata');
?>
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(JText::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php
// Include the real fields in this panel.
if ($name === 'jmetadata')
{
echo $form->renderField('metadesc');
echo $form->renderField('metakey');
echo $form->renderField('xreference');
}
foreach ($form->getFieldset($name) as $field)
{
if ($field->name !== 'jform[metadata][tags][]')
{
echo $field->renderField();
}
} ?>
<?php endforeach; ?>
associations.php 0000644 00000001616 15243322663 0007766 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @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;
$form = $displayData->getForm();
$options = array(
'formControl' => $form->getFormControl(),
'hidden' => (int) ($form->getValue('language', null, '*') === '*'),
);
JHtml::_('behavior.core');
JHtml::_('jquery.framework');
JText::script('JGLOBAL_ASSOC_NOT_POSSIBLE');
JText::script('JGLOBAL_ASSOCIATIONS_RESET_WARNING');
JFactory::getDocument()->addScriptOptions('system.associations.edit', $options);
JHtml::_('script', 'system/associations-edit.js', array('version' => 'auto', 'relative' => true));
// JLayout for standard handling of associations fields in the administrator items edit screens.
echo $form->renderFieldset('item_associations');
details.php 0000644 00000003636 15243322665 0006722 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* @deprecated 3.2 removed without replacement in 4.0 see global.php for an alternative
*/
defined('_JEXEC') or die;
$app = JFactory::getApplication();
// JLayout for standard handling of the details sidebar in administrator edit screens.
$title = $displayData->getForm()->getValue('title');
$published = $displayData->getForm()->getField('published');
$saveHistory = $displayData->get('state')->get('params')->get('save_history', 0);
?>
<div class="span2">
<h4><?php echo JText::_('JDETAILS'); ?></h4>
<hr />
<fieldset class="form-vertical">
<?php if (empty($title)) : ?>
<div class="control-group">
<div class="controls">
<?php echo $displayData->getForm()->getValue('name'); ?>
</div>
</div>
<?php else : ?>
<div class="control-group">
<div class="controls">
<?php echo $displayData->getForm()->getValue('title'); ?>
</div>
</div>
<?php endif; ?>
<?php if ($published) : ?>
<?php echo $displayData->getForm()->renderField('published'); ?>
<?php else : ?>
<?php echo $displayData->getForm()->renderField('state'); ?>
<?php endif; ?>
<?php echo $displayData->getForm()->renderField('access'); ?>
<?php echo $displayData->getForm()->renderField('featured'); ?>
<?php if (JLanguageMultilang::isEnabled()) : ?>
<?php echo $displayData->getForm()->renderField('language'); ?>
<?php else : ?>
<input type="hidden" id="jform_language" name="jform[language]" value="<?php echo $displayData->getForm()->getValue('language'); ?>" />
<?php endif; ?>
<?php echo $displayData->getForm()->renderField('tags'); ?>
<?php if ($saveHistory) : ?>
<?php echo $displayData->getForm()->renderField('version_note'); ?>
<?php endif; ?>
</fieldset>
</div>
title_alias.php 0000644 00000001012 15243322666 0007552 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @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;
$form = $displayData->getForm();
$title = $form->getField('title') ? 'title' : ($form->getField('name') ? 'name' : '');
?>
<div class="form-inline form-inline-header">
<?php
echo $title ? $form->renderField($title) : '';
echo $form->renderField('alias');
?>
</div>
global.php 0000644 00000002612 15243322667 0006530 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @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();
$form = $displayData->getForm();
$input = $app->input;
$component = $input->getCmd('option', 'com_content');
if ($component === 'com_categories')
{
$extension = $input->getCmd('extension', 'com_content');
$parts = explode('.', $extension);
$component = $parts[0];
}
$saveHistory = JComponentHelper::getParams($component)->get('save_history', 0);
$fields = $displayData->get('fields') ?: array(
array('parent', 'parent_id'),
array('published', 'state', 'enabled'),
array('category', 'catid'),
'featured',
'sticky',
'access',
'id',
'language',
'tags',
'note',
'version_note',
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
$hiddenFields[] = 'id';
if (!$saveHistory)
{
$hiddenFields[] = 'version_note';
}
$html = array();
$html[] = '<fieldset class="form-vertical">';
foreach ($fields as $field)
{
foreach ((array) $field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
$html[] = $form->renderField($f);
break;
}
}
}
$html[] = '</fieldset>';
echo implode('', $html);
publishingdata.php 0000644 00000001626 15243322667 0010272 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @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();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'publish_up',
'publish_down',
array('created', 'created_time'),
array('created_by', 'created_user_id'),
'created_by_alias',
array('modified', 'modified_time'),
array('modified_by', 'modified_user_id'),
'version',
'hits',
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
foreach ((array) $field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}
item_title.php 0000644 00000001127 15243322671 0007422 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* @deprecated 3.2
*/
defined('_JEXEC') or die;
$title = $displayData->getForm()->getValue('title');
$name = $displayData->getForm()->getValue('name');
?>
<?php if ($title) : ?>
<h2><?php echo htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); ?></h2>
<?php endif; ?>
<?php if ($name) : ?>
<h2><?php echo htmlspecialchars($name, ENT_QUOTES, 'UTF-8'); ?></h2>
<?php endif;
fieldset.php 0000644 00000002217 15243322674 0007066 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @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();
$form = $displayData->getForm();
$name = $displayData->get('fieldset');
$fieldSet = $form->getFieldset($name);
if (empty($fieldSet))
{
return;
}
$ignoreFields = $displayData->get('ignore_fields') ? : array();
$extraFields = $displayData->get('extra_fields') ? : array();
if (!empty($displayData->showOptions) || $displayData->get('show_options', 1))
{
if (isset($extraFields[$name]))
{
foreach ($extraFields[$name] as $f)
{
if (in_array($f, $ignoreFields))
{
continue;
}
if ($form->getField($f))
{
$fieldSet[] = $form->getField($f);
}
}
}
$html = array();
foreach ($fieldSet as $field)
{
$html[] = $field->renderField();
}
echo implode('', $html);
}
else
{
$html = array();
$html[] = '<div style="display:none;">';
foreach ($fieldSet as $field)
{
$html[] = $field->input;
}
$html[] = '</div>';
echo implode('', $html);
}
index.html 0000644 00000000037 15243322675 0006552 0 ustar 00 <!DOCTYPE html><title></title>
frontediting_modules.php 0000644 00000005226 15243322676 0011520 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @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;
// JLayout for standard handling of the edit modules:
$moduleHtml = &$displayData['moduleHtml'];
$mod = $displayData['module'];
$position = $displayData['position'];
$menusEditing = $displayData['menusediting'];
$parameters = JComponentHelper::getParams('com_modules');
$redirectUri = '&return=' . urlencode(base64_encode(JUri::getInstance()->toString()));
$target = '_blank';
$itemid = JFactory::getApplication()->input->get('Itemid', '0', 'int');
if (preg_match('/<(?:div|span|nav|ul|ol|h\d) [^>]*class="[^"]* jmoddiv"/', $moduleHtml))
{
// Module has already module edit button:
return;
}
// Add css class jmoddiv and data attributes for module-editing URL and for the tooltip:
$editUrl = JUri::base() . 'administrator/index.php?option=com_modules&task=module.edit&id=' . (int) $mod->id;
if ($parameters->get('redirect_edit', 'site') === 'site')
{
$editUrl = JUri::base() . 'index.php?option=com_config&controller=config.display.modules&id=' . (int) $mod->id . '&Itemid=' . $itemid . $redirectUri;
$target = '_self';
}
// Add class, editing URL and tooltip, and if module of type menu, also the tooltip for editing the menu item:
$count = 0;
$moduleHtml = preg_replace(
// Replace first tag of module with a class
'/^(\s*<(?:div|span|nav|ul|ol|h\d|section|aside|nav|address|article) [^>]*class="[^"]*)"/',
// By itself, adding class jmoddiv and data attributes for the URL and tooltip:
'\\1 jmoddiv" data-jmodediturl="' . $editUrl . '" data-target="' . $target . '" data-jmodtip="'
. JHtml::_('tooltipText',
JText::_('JLIB_HTML_EDIT_MODULE'),
htmlspecialchars($mod->title, ENT_COMPAT, 'UTF-8') . '<br />' . sprintf(JText::_('JLIB_HTML_EDIT_MODULE_IN_POSITION'), htmlspecialchars($position, ENT_COMPAT, 'UTF-8')),
0
)
. '"'
// And if menu editing is enabled and allowed and it's a menu module, add data attributes for menu editing:
. ($menusEditing && $mod->module === 'mod_menu' ?
' data-jmenuedittip="' . JHtml::_('tooltipText', 'JLIB_HTML_EDIT_MENU_ITEM', 'JLIB_HTML_EDIT_MENU_ITEM_ID') . '"'
:
''
),
$moduleHtml,
1,
$count
);
if ($count)
{
// Load once booststrap tooltip and add stylesheet and javascript to head:
JHtml::_('bootstrap.tooltip');
JHtml::_('bootstrap.popover');
JHtml::_('stylesheet', 'system/frontediting.css', array('version' => 'auto', 'relative' => true));
JHtml::_('script', 'system/frontediting.js', array('version' => 'auto', 'relative' => true));
}