Refactored the compiler list view body builder, in preparation of the relation fields. Added more options to the relation admin fields. gh-287

This commit is contained in:
Llewellyn committed 2018-05-24 15:58:48 +02:00
1 parent 84b683182a
commit fef3460772
56 files changed
+1004 -908

No files matched your search

+3 -3
View File
@@ -125,12 +125,12 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 22nd May, 2018
+ *Last Build*: 24th May, 2018
+ *Version*: 2.7.11
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **185406**
+ *Field count*: **1052**
+ *Line count*: **185617**
+ *Field count*: **1053**
+ *File count*: **1236**
+ *Folder count*: **197**
+3 -3
View File
@@ -125,12 +125,12 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 22nd May, 2018
+ *Last Build*: 24th May, 2018
+ *Version*: 2.7.11
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **185406**
+ *Field count*: **1052**
+ *Line count*: **185617**
+ *Field count*: **1053**
+ *File count*: **1236**
+ *Folder count*: **197**
+4 -1
View File
@@ -10,4 +10,7 @@
/* CSS Document */
.codefield {
width: 500px;
}
+42
View File
@@ -53,6 +53,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
$this->registerTask('checkRuleName', 'ajax');
$this->registerTask('fieldOptions', 'ajax');
$this->registerTask('getFieldPropertyDesc', 'ajax');
$this->registerTask('getCodeGlueOptions', 'ajax');
$this->registerTask('snippetDetails', 'ajax');
$this->registerTask('setSnippetGithub', 'ajax');
$this->registerTask('getSnippets', 'ajax');
@@ -1032,6 +1033,47 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
}
}
break;
case 'getCodeGlueOptions':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$listfieldValue = $jinput->get('listfield', NULL, 'INT');
$joinfieldsValue = $jinput->get('joinfields', NULL, 'STRING');
$typeValue = $jinput->get('type', NULL, 'INT');
$areaValue = $jinput->get('area', NULL, 'INT');
if($listfieldValue && $joinfieldsValue && $typeValue && $areaValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getCodeGlueOptions($listfieldValue, $joinfieldsValue, $typeValue, $areaValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'snippetDetails':
try
{
-1
View File
@@ -677,5 +677,4 @@ class Compiler extends Infusion
// any help to improve this is welcome...
}
}
+49 -3
View File
@@ -487,6 +487,20 @@ class Get
*/
public $catOtherName = array();
/**
* The field relations values
*
* @var array
*/
public $fieldRelations = array();
/**
* The list join fields
*
* @var array
*/
public $listJoinBuilder = array();
/**
* The linked admin view tabs
*
@@ -1340,18 +1354,21 @@ class Get
'b.addfields',
'b.id',
'c.addconditions',
'c.id'
'c.id',
'r.addrelations'
), array(
'addfields',
'addfields_id',
'addconditions',
'addconditions_id'
'addconditions_id',
'addrelations'
)
)
);
$query->from('#__componentbuilder_admin_view AS a');
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_admin_fields', 'b') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('b.admin_view') . ')');
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_admin_fields_conditions', 'c') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('c.admin_view') . ')');
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_admin_fields_relations', 'r') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('r.admin_view') . ')');
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
// Reset the query using our newly populated query object.
@@ -1624,7 +1641,7 @@ class Get
$conditionValue['match_type'] = $type;
$conditionValue['match_xml'] = $fieldValue['settings']->xml;
// if custom field load field being extended
if (!ComponentbuilderHelper::typeField($type))
if (!ComponentbuilderHelper::fieldCheck($type))
{
$conditionValue['match_extends'] = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml, 'extends="', '"');
}
@@ -1642,6 +1659,35 @@ class Get
}
}
unset($view->addconditions);
// prep the buckets
$this->fieldRelations[$name_list] = array();
$this->listJoinBuilder[$name_list] = array();
// set the relations
$view->addrelations = (isset($view->addrelations) && ComponentbuilderHelper::checkJson($view->addrelations)) ? json_decode($view->addrelations, true) : null;
if (ComponentbuilderHelper::checkArray($view->addrelations))
{
foreach ($view->addrelations as $nr => $relationsValue)
{
// only add if list view field is selected and joind fields are set
if (isset($relationsValue['listfield']) &&
is_numeric($relationsValue['listfield']) &&
$relationsValue['listfield'] > 0 &&
isset($relationsValue['joinfields']) &&
ComponentbuilderHelper::checkArray($relationsValue['joinfields']))
{
// load the field relations
$this->fieldRelations[$name_list][(int) $relationsValue['listfield']] = $relationsValue;
// load the list joints
foreach ($relationsValue['joinfields'] as $join)
{
$this->listJoinBuilder[$name_list][(int) $join] = (int) $join;
}
}
}
}
unset($view->addrelations);
// set linked views
$this->linkedAdminViews[$name_single] = null;
$view->addlinked_views = (isset($view->addlinked_views) && ComponentbuilderHelper::checkJson($view->addlinked_views)) ? json_decode($view->addlinked_views, true) : null;
+57 -83
View File
@@ -1075,7 +1075,7 @@ class Fields extends Structure
// set the array of field names
$this->setFieldsNames($view_name_single, $fieldAttributes['name']);
if ($this->defaultField($typeName, 'option'))
if (ComponentbuilderHelper::fieldCheck($typeName, 'option'))
{
//reset options array
$optionArray = array();
@@ -1087,7 +1087,7 @@ class Fields extends Structure
$this->setBuilders($langLabel, $langView, $view_name_single, $view_name_list, $name, $view, $field, $typeName, $multiple, false, $optionArray);
}
}
elseif ($this->defaultField($typeName, 'plain'))
elseif (ComponentbuilderHelper::fieldCheck($typeName, 'plain'))
{
if ($build)
{
@@ -1097,7 +1097,7 @@ class Fields extends Structure
// now add to the field set
$dynamicField = $this->setField('plain', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray);
}
elseif ($this->defaultField($typeName, 'spacer'))
elseif (ComponentbuilderHelper::fieldCheck($typeName, 'spacer'))
{
if ($build)
{
@@ -1117,7 +1117,7 @@ class Fields extends Structure
// now add to the field set
$dynamicField = $this->setField('spacer', $fieldAttributes, $name, $typeName, $langView, $view_name_single, $view_name_list, $placeholders, $optionArray);
}
elseif ($this->defaultField($typeName, 'special'))
elseif (ComponentbuilderHelper::fieldCheck($typeName, 'special'))
{
// set the repeatable field or subform field
if ($typeName === 'repeatable' || $typeName === 'subform')
@@ -1378,12 +1378,12 @@ class Fields extends Structure
{
//reset options array
$r_optionArray = array();
if ($this->defaultField($r_typeName, 'option'))
if (ComponentbuilderHelper::fieldCheck($r_typeName, 'option'))
{
// now add to the field set
$field .= $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
}
elseif ($this->defaultField($r_typeName, 'plain'))
elseif (ComponentbuilderHelper::fieldCheck($r_typeName, 'plain'))
{
// now add to the field set
$field .= $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
@@ -1465,12 +1465,12 @@ class Fields extends Structure
{
//reset options array
$r_optionArray = array();
if ($this->defaultField($r_typeName, 'option'))
if (ComponentbuilderHelper::fieldCheck($r_typeName, 'option'))
{
// now add to the field set
$field .= $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
}
elseif ($this->defaultField($r_typeName, 'plain'))
elseif (ComponentbuilderHelper::fieldCheck($r_typeName, 'plain'))
{
// now add to the field set
$field .= $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
@@ -1715,12 +1715,12 @@ class Fields extends Structure
{
//reset options array
$r_optionArray = array();
if ($this->defaultField($r_typeName, 'option'))
if (ComponentbuilderHelper::fieldCheck($r_typeName, 'option'))
{
// now add to the field set
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
elseif ($this->defaultField($r_typeName, 'plain'))
elseif (ComponentbuilderHelper::fieldCheck($r_typeName, 'plain'))
{
// now add to the field set
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
@@ -1812,12 +1812,12 @@ class Fields extends Structure
{
//reset options array
$r_optionArray = array();
if ($this->defaultField($r_typeName, 'option'))
if (ComponentbuilderHelper::fieldCheck($r_typeName, 'option'))
{
// now add to the field set
ComponentbuilderHelper::xmlAppend($form, $this->setField('option', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
}
elseif ($this->defaultField($r_typeName, 'plain'))
elseif (ComponentbuilderHelper::fieldCheck($r_typeName, 'plain'))
{
// now add to the field set
ComponentbuilderHelper::xmlAppend($form, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
@@ -2049,7 +2049,7 @@ class Fields extends Structure
$fieldAttributes = array();
$setCustom = false;
// setup joomla default fields
if (!$this->defaultField($typeName))
if (!ComponentbuilderHelper::fieldCheck($typeName))
{
$fieldAttributes['custom'] = array();
$setCustom = true;
@@ -2399,6 +2399,10 @@ class Fields extends Structure
$this->dbKeys[$view_name_single][] = $name;
}
}
// set list switch
$listSwitch = (isset($field['list']) && $field['list'] == 1);
// set list join
$listJoin = (isset($this->listJoinBuilder[$view_name_list][(int) $field['field']]));
// add history to this view
if (isset($view['history']) && $view['history'])
{
@@ -2443,22 +2447,44 @@ class Fields extends Structure
}
}
// build the list values
if ((isset($field['list']) && $field['list'] == 1) && $typeName != 'repeatable' && $typeName != 'subform')
if (($listSwitch || $listJoin) && $typeName != 'repeatable' && $typeName != 'subform')
{
// load to list builder
$this->listBuilder[$view_name_list][] = array(
'type' => $typeName,
'code' => $name,
'lang' => $listLangName,
'title' => (isset($field['title']) && $field['title']) ? true : false,
'alias' => (isset($field['alias']) && $field['alias']) ? true : false,
'link' => (isset($field['link']) && $field['link']) ? true : false,
'sort' => (isset($field['sort']) && $field['sort']) ? true : false,
'custom' => $custom,
'multiple' => $multiple,
'options' => $options);
$this->customBuilderList[$view_name_list][] = $name;
if ($listSwitch)
{
$this->listBuilder[$view_name_list][] = array(
'id' => (int) $field['field'],
'type' => $typeName,
'code' => $name,
'lang' => $listLangName,
'title' => (isset($field['title']) && $field['title']) ? true : false,
'alias' => (isset($field['alias']) && $field['alias']) ? true : false,
'link' => (isset($field['link']) && $field['link']) ? true : false,
'sort' => (isset($field['sort']) && $field['sort']) ? true : false,
'custom' => $custom,
'multiple' => $multiple,
'options' => $options);
}
// load the list join builder
elseif ($listJoin)
{
$this->listJoinBuilder[$view_name_list][(int) $field['field']] = array(
'type' => $typeName,
'code' => $name,
'lang' => $listLangName,
'title' => (isset($field['title']) && $field['title']) ? true : false,
'alias' => (isset($field['alias']) && $field['alias']) ? true : false,
'link' => (isset($field['link']) && $field['link']) ? true : false,
'sort' => (isset($field['sort']) && $field['sort']) ? true : false,
'custom' => $custom,
'multiple' => $multiple,
'options' => $options);
}
// build custom builder list
if ($listSwitch || $listJoin)
{
$this->customBuilderList[$view_name_list][] = $name;
}
}
// set the hidden field of this view
if ($typeName === 'hidden')
@@ -2601,7 +2627,7 @@ class Fields extends Structure
}
// load the json list display fix
if ((isset($field['list']) && $field['list'] == 1) && $typeName != 'repeatable' && $typeName != 'subform')
if (($listSwitch || $listJoin) && $typeName != 'repeatable' && $typeName != 'subform')
{
if (ComponentbuilderHelper::checkArray($options))
{
@@ -2636,12 +2662,12 @@ class Fields extends Structure
// check if field should be added to uikit
$this->buildSiteFieldData($view_name_single, $name, 'uikit', $typeName);
// load the selection translation fix
if (ComponentbuilderHelper::checkArray($options) && (isset($field['list']) && $field['list'] == 1) && $typeName != 'repeatable' && $typeName != 'subform')
if (ComponentbuilderHelper::checkArray($options) && ($listSwitch || $listJoin) && $typeName != 'repeatable' && $typeName != 'subform')
{
$this->selectionTranslationFixBuilder[$view_name_list][$name] = $options;
}
// build the sort values
if ($dbSwitch && (isset($field['sort']) && $field['sort'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform'))
if ($dbSwitch && (isset($field['sort']) && $field['sort'] == 1) && ($listSwitch || $listJoin) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform'))
{
$this->sortBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'custom' => $custom, 'options' => $options);
}
@@ -2652,7 +2678,7 @@ class Fields extends Structure
$this->searchBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'custom' => $custom, 'list' => $_list);
}
// build the filter values
if ($dbSwitch && (isset($field['filter']) && $field['filter'] == 1) && (isset($field['list']) && $field['list'] == 1) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform'))
if ($dbSwitch && (isset($field['filter']) && $field['filter'] == 1) && ($listSwitch || $listJoin) && (!$multiple && $typeName != 'checkbox' && $typeName != 'checkboxes' && $typeName != 'repeatable' && $typeName != 'subform'))
{
$this->filterBuilder[$view_name_list][] = array('type' => $typeName, 'code' => $name, 'lang' => $listLangName, 'database' => $view_name_single, 'function' => ComponentbuilderHelper::safeString($name, 'F'), 'custom' => $custom, 'options' => $options);
}
@@ -2993,58 +3019,6 @@ class Fields extends Structure
return '';
}
/**
* default Fields
*
* @param string $type The field type
* @param boolean $option The field grouping
*
* @return boolean if the field was found
*
*/
public function defaultField($type, $option = 'default')
{
// list of default fields
// https://docs.joomla.org/Form_field
$defaults = array(
'default' => array(
'accesslevel', 'cachehandler', 'calendar', 'captcha', 'category', 'checkbox',
'checkboxes', 'color', 'combo', 'componentlayout', 'contentlanguage', 'editor',
'chromestyle', 'contenttype', 'databaseconnection', 'editors', 'email', 'file',
'filelist', 'folderlist', 'groupedlist', 'hidden', 'file', 'headertag', 'helpsite',
'imagelist', 'integer', 'language', 'list', 'media', 'menu', 'note', 'number', 'password',
'plugins', 'radio', 'repeatable', 'range', 'rules', 'subform', 'sessionhandler', 'spacer', 'sql', 'tag',
'tel', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition', 'moduletag',
'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
),
'plain' => array(
'accesslevel', 'checkbox', 'cachehandler', 'calendar', 'category', 'chromestyle', 'color',
'contenttype', 'combo', 'componentlayout', 'databaseconnection', 'editor', 'editors',
'email', 'file', 'filelist', 'folderlist', 'headertag', 'helpsite',
'hidden', 'imagelist', 'integer', 'language', 'media', 'menu',
'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules',
'sessionhandler', 'tag', 'tel', 'text', 'textarea',
'timezone', 'url', 'user', 'usergroup'
),
'spacer' => array(
'note', 'spacer'
),
'option' => array(
'plugins', 'checkboxes', 'contentlanguage', 'list', 'radio', 'sql'
),
'special' => array(
'contentlanguage', 'groupedlist', 'moduleposition', 'plugin',
'repeatable', 'templatestyle', 'subform'
)
);
if (in_array($type, $defaults[$option]))
{
return true;
}
return false;
}
/**
* xmlPrettyPrint
*
+273 -408
View File
@@ -6327,6 +6327,7 @@ class Interpretation extends Fields
$Helper = $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh] . 'Helper';
// setup correct core target
$coreLoad = false;
$core = null;
if (isset($this->permissionCore[$viewName_single]))
{
$core = $this->permissionCore[$viewName_single];
@@ -6409,199 +6410,44 @@ class Interpretation extends Fields
// start adding the dynamic
foreach ($this->listBuilder[$viewName_list] as $item)
{
$checkoutTriger = false;
if (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && isset($item['custom']['table']) && ComponentbuilderHelper::checkString($item['custom']['table']))
// set some defaults
$customAdminViewButtons = '';
// set the item default class
$itemClass = 'hidden-phone';
// get list item code
$itemCode = $this->getListItemCode($item, $viewName_list, $doNotEscape);
// is this a linked item
if ($item['link'] || (ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] === 'user'))
{
$item['id'] = $item['code'];
if (!$item['multiple'])
{
$item['code'] = $item['code'] . '_' . $item['custom']['text'];
}
}
// check if translated value is used
if (isset($this->selectionTranslationFixBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->selectionTranslationFixBuilder[$viewName_list]) && array_key_exists($item['code'], $this->selectionTranslationFixBuilder[$viewName_list]))
{
$itemCode = '<?php echo JText:' . ':_($item->' . $item['code'] . '); ?>';
}
elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['text'] === 'user')
{
$itemCode = '<?php echo JFactory::getUser((int)$item->' . $item['code'] . ')->name; ?>';
}
elseif ($doNotEscape)
{
if (in_array($item['code'], $this->doNotEscape[$viewName_list]))
{
$itemCode = '<?php echo $item->' . $item['code'] . '; ?>';
}
else
{
$itemCode = '<?php echo $this->escape($item->' . $item['code'] . '); ?>';
}
// set some defaults
$checkoutTriger = false;
// set the item default class
$itemClass = 'nowrap';
// get list item link
$itemLink = $this->getListItemLink($item, $checkoutTriger, $viewName_single, $viewName_list);
// get list item link autority
$itemLinkAutority = $this->getListItemLinkAutority($item, $viewName_single, $viewName_list, $coreLoad, $core);
// set item row
$itemRow = $this->getListItemLinkRow($itemCode, $itemLink, $itemLinkAutority, $viewName_list, $checkoutTriger);
}
else
{
$itemCode = '<?php echo $this->escape($item->' . $item['code'] . '); ?>';
// set item row
$itemRow = PHP_EOL . "\t\t\t<?php echo " . $itemCode . "; ?>";
}
if ($item['link'])
// check if buttons was aready added
if ($firstTimeBeingAdded) // TODO we must improve this to allow more items to be targeted instead of just the first item :)
{
// allways rest custom links
$customAdminView = '';
// if to be linked
if ($item['type'] === 'category' && !$item['title'])
{
$otherViews = $this->catCodeBuilder[$viewName_single]['views'];
// category and linked
$body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $otherViews . ".category.' . (int)\$item->" . $item['code'] . ")): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->' . $item['code'] . '; ?>&extension=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '.' . $otherViews . '"><?php echo $this->escape($item->category_title); ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>";
$body .= PHP_EOL . "\t\t\t\t<?php echo \$this->escape(\$item->category_title); ?>";
$body .= PHP_EOL . "\t\t\t<?php endif; ?>";
$body .= PHP_EOL . "\t\t</td>";
}
elseif ($item['type'] === 'user' && !$item['title'])
{
// user and linked
$body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['code'] . ' ?>"><?php echo $' . $item['code'] . 'User->name; ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>";
$body .= PHP_EOL . "\t\t\t\t<?php echo \$" . $item['code'] . "User->name; ?>";
$body .= PHP_EOL . "\t\t\t<?php endif; ?>";
$body .= PHP_EOL . "\t\t</td>";
}
else
{
$add = true;
if (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] != 'user' && !$item['title'])
{
// link to that item instead
$link = 'index.php?option=' . $item['custom']['component'] . '&view=' . $item['custom']['views'] . '&task=' . $item['custom']['view'] . '.edit&id=<?php echo $item->' . $item['id'] . '; ?>&ref=' . $viewName_list;
$coreLoadLink = false;
if (isset($this->permissionCore[$item['custom']['view']]))
{
$coreLink = $this->permissionCore[$item['custom']['view']];
$coreLoadLink = true;
}
// check if the item has permissions.
if ($coreLoadLink && (isset($coreLink['core.edit']) && isset($this->permissionBuilder[$coreLink['core.edit']])) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$coreLink['core.edit']]) && in_array($item['custom']['view'], $this->permissionBuilder[$coreLink['core.edit']]))
{
$accessCheck = "\$this->user->authorise('" . $coreLink['core.edit'] . "', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $item['custom']['view'] . ".' . (int)\$item->" . $item['id'] . ")";
}
else
{
$accessCheck = "\$this->user->authorise('core.edit', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $item['custom']['view'] . ".' . (int)\$item->" . $item['id'] . ")";
}
}
elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] === 'user' && !$item['title'])
{
// user and linked
$body .= PHP_EOL . "\t\t<?php \$" . $item['id'] . " = JFactory::getUser(\$item->" . $item['id'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['id'] . ' ?>"><?php echo $' . $item['id'] . '->name; ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>";
$body .= PHP_EOL . "\t\t\t\t<?php echo \$" . $item['id'] . "->name; ?>";
$body .= PHP_EOL . "\t\t\t<?php endif; ?>";
$body .= PHP_EOL . "\t\t</td>";
$add = false;
}
else
{
// start building the links
$link = '<?php echo $edit; ?>&id=<?php echo $item->id; ?>';
// check if custom links should be added to this list views
if (isset($this->customAdminViewListLink[$viewName_list]) && ComponentbuilderHelper::checkArray($this->customAdminViewListLink[$viewName_list]) && $firstTimeBeingAdded)
{
// make sure the custom links are only added once
$firstTimeBeingAdded = false;
// start building the links
$customAdminView = PHP_EOL . "\t\t\t" . '<div class="btn-group">';
foreach ($this->customAdminViewListLink[$viewName_list] as $customLinkView)
{
$customAdminView .= PHP_EOL . "\t\t\t<?php if (\$canDo->get('" . $customLinkView['link'] . ".access')): ?>";
$customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini" href="index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $customLinkView['link'] . '&id=<?php echo $item->id; ?>" title="<?php echo JText:' . ':_(' . "'COM_" . $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] . '_' . $customLinkView['NAME'] . "'" . '); ?>" ><span class="icon-' . $customLinkView['icon'] . '"></span></a>';
$customAdminView .= PHP_EOL . "\t\t\t<?php else: ?>";
$customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini disabled" href="#" title="<?php echo JText:' . ':_(' . "'COM_" . $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] . '_' . $customLinkView['NAME'] . "'" . '); ?>"><span class="icon-' . $customLinkView['icon'] . '"></span></a>';
$customAdminView .= PHP_EOL . "\t\t\t<?php endif; ?>";
}
$customAdminView .= PHP_EOL . "\t\t\t" . '</div>';
}
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.edit']]))
{
// set permissions.
$accessCheck = "\$canDo->get('" . $core['core.edit'] . "')";
}
else
{
// set permissions.
$accessCheck = "\$canDo->get('core.edit')";
}
// triger the checked out script to be added
$checkoutTriger = true;
}
if ($add)
{
// set as linked
$body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (" . $accessCheck . "): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<div class="name">' . PHP_EOL . "\t\t\t\t\t" . '<a href="' . $link . '">' . $itemCode . '</a>';
if ($checkoutTriger)
{
$body .= PHP_EOL . "\t\t\t\t\t<?php if (\$item->checked_out): ?>";
$body .= PHP_EOL . "\t\t\t\t\t\t<?php echo JHtml::_('jgrid.checkedout', \$i, \$userChkOut->name, \$item->checked_out_time, '" . $viewName_list . ".', \$canCheckin); ?>";
$body .= PHP_EOL . "\t\t\t\t\t<?php endif; ?>";
}
$body .= PHP_EOL . "\t\t\t\t" . '</div>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<div class="name">' . $itemCode . '</div>';
$body .= PHP_EOL . "\t\t\t<?php endif; ?>";
$body .= $customAdminView;
$body .= PHP_EOL . "\t\t</td>";
}
}
}
else
{
if ($item['type'] === 'category')
{
$body .= PHP_EOL . "\t\t<td class=\"" . $this->setListFieldClass($item['code'], $viewName_list, 'hidden-phone') . "\">";
$body .= PHP_EOL . "\t\t\t<?php echo \$this->escape(\$item->category_title); ?>";
$body .= PHP_EOL . "\t\t</td>";
}
elseif (ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] === 'user')
{
// custom user and linked
$body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . " = JFactory::getUser(\$item->" . $item['id'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap hidden-phone') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$this->user->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['id'] . ' ?>"><?php echo $' . $item['code'] . '->name; ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>";
$body .= PHP_EOL . "\t\t\t\t<?php echo \$" . $item['code'] . "->name; ?>";
$body .= PHP_EOL . "\t\t\t<?php endif; ?>";
$body .= PHP_EOL . "\t\t</td>";
}
elseif ($item['type'] === 'user')
{
// user name only
$body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php echo \$" . $item['code'] . "User->name; ?>";
$body .= PHP_EOL . "\t\t</td>";
}
else
{
// normal not linked
$body .= PHP_EOL . "\t\t<td class=\"" . $this->setListFieldClass($item['code'], $viewName_list, 'hidden-phone') . "\">";
$body .= PHP_EOL . "\t\t\t" . $itemCode;
$body .= PHP_EOL . "\t\t</td>";
}
// get custom admin view buttons
$customAdminViewButtons = $this->getCustomAdminViewButtons($item, $viewName_single, $viewName_list, $coreLoad);
// make sure the custom admin view buttons are only added once
$firstTimeBeingAdded = false;
}
// add row to body
$body .= PHP_EOL . "\t\t<td class=\"" . $this->setListFieldClass($item['code'], $viewName_list, $itemClass) . "\">";
$body .= $itemRow;
$body .= $customAdminViewButtons;
$body .= PHP_EOL . "\t\t</td>";
}
// add the defaults
if (!isset($this->fieldsNames[$viewName_single]['published']))
@@ -6644,6 +6490,192 @@ class Interpretation extends Fields
return '';
}
protected function getListItemLinkRow($itemCode, $itemLink, $itemLinkAutority, $viewName_list, $checkoutTriger, $class = true)
{
// add class
$tab = '';
if ($class)
{
$link .= PHP_EOL . "\t\t\t" . '<div class="name">';
$tab = "\t";
}
// the link logic
$link .= PHP_EOL . $tab . "\t\t\t<?php if (" . $itemLinkAutority . "): ?>";
$link .= PHP_EOL . $tab . "\t\t\t\t" . '<a href="' . $itemLink . '"><?php echo ' . $itemCode . '; ?></a>';
if ($checkoutTriger)
{
$link .= PHP_EOL . $tab . "\t\t\t\t<?php if (\$item->checked_out): ?>";
$link .= PHP_EOL . $tab . "\t\t\t\t\t<?php echo JHtml::_('jgrid.checkedout', \$i, \$userChkOut->name, \$item->checked_out_time, '" . $viewName_list . ".', \$canCheckin); ?>";
$link .= PHP_EOL . $tab . "\t\t\t\t<?php endif; ?>";
}
$link .= PHP_EOL . $tab . "\t\t\t<?php else: ?>";
$link .= PHP_EOL . $tab . "\t\t\t\t<?php echo " . $itemCode . "; ?>";
$link .= PHP_EOL . $tab . "\t\t\t<?php endif; ?>";
// add class
if ($class)
{
$link .= PHP_EOL . "\t\t\t</div>";
}
// return the link logic
return $link;
}
protected function getCustomAdminViewButtons($viewName_list, $ref = '')
{
$customAdminViewButton = '';
// check if custom links should be added to this list views
if (isset($this->customAdminViewListLink[$viewName_list]) && ComponentbuilderHelper::checkArray($this->customAdminViewListLink[$viewName_list]))
{
// start building the links
$customAdminViewButton .= PHP_EOL . "\t\t\t" . '<div class="btn-group">';
foreach ($this->customAdminViewListLink[$viewName_list] as $customLinkView)
{
$customAdminViewButton .= PHP_EOL . "\t\t\t<?php if (\$canDo->get('" . $customLinkView['link'] . ".access')): ?>";
$customAdminViewButton .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini" href="index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $customLinkView['link'] . '&id=<?php echo $item->id; ?>' . $ref . '" title="<?php echo JText:' . ':_(' . "'COM_" . $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] . '_' . $customLinkView['NAME'] . "'" . '); ?>" ><span class="icon-' . $customLinkView['icon'] . '"></span></a>';
$customAdminViewButton .= PHP_EOL . "\t\t\t<?php else: ?>";
$customAdminViewButton .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini disabled" href="#" title="<?php echo JText:' . ':_(' . "'COM_" . $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] . '_' . $customLinkView['NAME'] . "'" . '); ?>"><span class="icon-' . $customLinkView['icon'] . '"></span></a>';
$customAdminViewButton .= PHP_EOL . "\t\t\t<?php endif; ?>";
}
$customAdminViewButton .= PHP_EOL . "\t\t\t" . '</div>';
}
return $customAdminViewButton;
}
protected function getListItemCode(&$item, $viewName_list, $doNotEscape, $escape = '$this->escape')
{
// first update the code id needed
if (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && isset($item['custom']['table']) && ComponentbuilderHelper::checkString($item['custom']['table']))
{
$item['id_code'] = $item['code'];
if (!$item['multiple'])
{
$item['code'] = $item['code'] . '_' . $item['custom']['text'];
}
}
// check if category
if ($item['type'] === 'category' && !$item['title'])
{
return $escape . '($item->category_title)';
}
// check if user
elseif ($item['type'] === 'user')
{
return 'JFactory::getUser((int)$item->' . $item['code'] . ')->name';
}
// check if custom user
elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] === 'user' && isset($item['id_code']))
{
return 'JFactory::getUser((int)$item->' . $item['id_code'] . ')->name';
}
// check if translated value is used
elseif (isset($this->selectionTranslationFixBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->selectionTranslationFixBuilder[$viewName_list]) && array_key_exists($item['code'], $this->selectionTranslationFixBuilder[$viewName_list]))
{
return 'JText:' . ':_($item->' . $item['code'] . ')';
}
elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['text'] === 'user')
{
return 'JFactory::getUser((int)$item->' . $item['code'] . ')->name';
}
elseif ($doNotEscape)
{
if (in_array($item['code'], $this->doNotEscape[$viewName_list]))
{
return '$item->' . $item['code'];
}
}
// default
return $escape . '($item->' . $item['code'] . ')';
}
protected function getListItemLink($item, &$checkoutTriger, $viewName_single, $viewName_list, $ref = null)
{
// set referal if not set
$referal = '';
if (!$ref)
{
$ref = '&ref=' . $viewName_list;
}
// in linked tab/view so must add ref to default
else
{
$referal = $ref;
}
// if to be linked
if ($item['type'] === 'category' && !$item['title'])
{
// get the other view
$otherViews = $this->catCodeBuilder[$viewName_single]['views'];
// return the link to category
return 'index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->' . $item['code'] . '; ?>&extension=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '.' . $otherViews;
}
elseif ($item['type'] === 'user' && !$item['title'])
{
// return user link
return 'index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['code'] . ' ?>';
}
elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] != 'user' && !$item['title'] && isset($item['id_code']))
{
// link to that linked item
return 'index.php?option=' . $item['custom']['component'] . '&view=' . $item['custom']['views'] . '&task=' . $item['custom']['view'] . '.edit&id=<?php echo $item->' . $item['id_code'] . '; ?>' . $ref;
}
elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] === 'user' && !$item['title'] && isset($item['id_code']))
{
// return user link
return 'index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['id_code'] . ' ?>';
}
// make sure to triger the checkout
$checkoutTriger = true;
// basic default item link
return '<?php echo $edit; ?>&id=<?php echo $item->id; ?>'.$referal;
}
protected function getListItemLinkAutority($item, $viewName_single, $viewName_list, $coreLoad, $core, $user = '$this->user')
{
// if to be linked
if ($item['type'] === 'category' && !$item['title'])
{
// get the other view
$otherViews = $this->catCodeBuilder[$viewName_single]['views'];
// return the autority to category
return $user . "->authorise('core.edit', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $otherViews . ".category.' . (int)\$item->" . $item['code'] . ")";
}
elseif ($item['type'] === 'user' && !$item['title'])
{
// return user autority
return $user . "->authorise('core.edit', 'com_users')";
}
elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] != 'user' && !$item['title'] && isset($item['id_code']))
{
// link to that linked item
$coreLoadLink = false;
if (isset($this->permissionCore[$item['custom']['view']]))
{
$coreLink = $this->permissionCore[$item['custom']['view']];
$coreLoadLink = true;
}
// check if the item has permissions.
if ($coreLoadLink && (isset($coreLink['core.edit']) && isset($this->permissionBuilder[$coreLink['core.edit']])) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$coreLink['core.edit']]) && in_array($item['custom']['view'], $this->permissionBuilder[$coreLink['core.edit']]))
{
return $user . "->authorise('" . $coreLink['core.edit'] . "', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $item['custom']['view'] . ".' . (int)\$item->" . $item['id_code'] . ")";
}
// return default for this external item
return $user . "->authorise('core.edit', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $item['custom']['view'] . ".' . (int)\$item->" . $item['id_code'] . ")";
}
elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] === 'user' && !$item['title'] && isset($item['id_code']))
{
// return user link
return $user . "->authorise('core.edit', 'com_users')";
}
// check if the item has custom permissions.
elseif ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.edit']]))
{
// set permissions.
return "\$canDo->get('" . $core['core.edit'] . "')";
}
// set core permissions.
return "\$canDo->get('core.edit')";
}
protected function setListFieldClass($name, $listViewName, $default = '')
{
return (isset($this->listFieldClass[$listViewName]) && isset($this->listFieldClass[$listViewName][$name])) ? $this->listFieldClass[$listViewName][$name] : $default;
@@ -7548,6 +7580,7 @@ class Interpretation extends Fields
$firstTimeBeingAdded = true;
// setup correct core target
$coreLoad = false;
$core = null;
if (isset($this->permissionCore[$viewName_single]))
{
$core = $this->permissionCore[$viewName_single];
@@ -7572,212 +7605,44 @@ class Interpretation extends Fields
// start adding the dynamic
foreach ($this->listBuilder[$viewName_list] as $item)
{
// set the ref
$ref = '&ref=' . $refview . '&refid=<?php echo $id; ?>';
// set some defaults
$customAdminViewButtons = '';
// get list item code
$itemCode = $this->getListItemCode($item, $viewName_list, $doNotEscape, '$displayData->escape');
// is this a linked item
if (($item['link'] || (ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] === 'user')) && (!isset($item['custom']) || !isset($item['custom']['view']) || $refview !== $item['custom']['view']))
{
// set some defaults
$checkoutTriger = false;
// get list item link
$itemLink = $this->getListItemLink($item, $checkoutTriger, $viewName_single, $viewName_list, $ref);
// get list item link autority
$itemLinkAutority = $this->getListItemLinkAutority($item, $viewName_single, $viewName_list, $coreLoad, $core, '$user');
// set item row
$itemRow = $this->getListItemLinkRow($itemCode, $itemLink, $itemLinkAutority, $viewName_list, $checkoutTriger, false);
}
else
{
// set item row
$itemRow = PHP_EOL . "\t\t\t<?php echo " . $itemCode . "; ?>";
}
// check if buttons was aready added
if ($firstTimeBeingAdded) // TODO we must improve this to allow morw items to be targeted instead of just the first item :)
{
// get custom admin view buttons
$customAdminViewButtons = $this->getCustomAdminViewButtons($item, $viewName_single, $viewName_list, $coreLoad, $ref);
// make sure the custom admin view buttons are only added once
$firstTimeBeingAdded = false;
}
// add row to body
$body .= PHP_EOL . "\t\t<td>";
$body .= $itemRow;
$body .= $customAdminViewButtons;
$body .= PHP_EOL . "\t\t</td>";
// increment counter
$counter++;
$checkoutTriger = false;
if (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && isset($item['custom']['table']) && ComponentbuilderHelper::checkString($item['custom']['table']))
{
$item['id'] = $item['code'];
if (!$item['multiple'])
{
$item['code'] = $item['code'] . '_' . $item['custom']['text'];
}
}
// check if translated vlaue is used
if (isset($this->selectionTranslationFixBuilder[$viewName_list]) && ComponentbuilderHelper::checkArray($this->selectionTranslationFixBuilder[$viewName_list]) && array_key_exists($item['code'], $this->selectionTranslationFixBuilder[$viewName_list]))
{
$itemCode = '<?php echo JText:' . ':_($item->' . $item['code'] . '); ?>';
}
elseif ($item['custom']['text'] === 'user')
{
$itemCode = '<?php echo JFactory::getUser((int)$item->' . $item['code'] . ')->name; ?>';
}
elseif ($doNotEscape)
{
if (in_array($item['code'], $this->doNotEscape[$viewName_list]))
{
$itemCode = '<?php echo $item->' . $item['code'] . '; ?>';
}
else
{
$itemCode = '<?php echo $displayData->escape($item->' . $item['code'] . '); ?>';
}
}
else
{
$itemCode = '<?php echo $displayData->escape($item->' . $item['code'] . '); ?>';
}
if ($item['link'])
{
// allways rest custom links
$customAdminView = '';
// if to be linked
if ($item['type'] === 'category' && !$item['title'])
{
$otherViews = $this->catCodeBuilder[$viewName_single]['views'];
// category and linked
$body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$user->authorise('core.edit', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $otherViews . ".category.' . (int)\$item->" . $item['code'] . ")): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->' . $item['code'] . '; ?>&extension=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '.' . $otherViews . '"><?php echo $displayData->escape($item->category_title); ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>";
$body .= PHP_EOL . "\t\t\t\t<?php echo \$displayData->escape(\$item->category_title); ?>";
$body .= PHP_EOL . "\t\t\t<?php endif; ?>";
$body .= PHP_EOL . "\t\t</td>";
}
elseif ($item['type'] === 'user' && !$item['title'])
{
// user and linked
$body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$user->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['code'] . ' ?>"><?php echo $' . $item['code'] . 'User->name; ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>";
$body .= PHP_EOL . "\t\t\t\t<?php echo \$" . $item['code'] . "User->name; ?>";
$body .= PHP_EOL . "\t\t\t<?php endif; ?>";
$body .= PHP_EOL . "\t\t</td>";
}
else
{
$add = true;
if (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] != 'user' && !$item['title'])
{
if ($refview === $item['custom']['view'])
{
// normal not linked
$body .= PHP_EOL . "\t\t<td>";
$body .= PHP_EOL . "\t\t\t" . $itemCode;
$body .= PHP_EOL . "\t\t</td>";
$add = false;
}
else
{
// link to that item instead
$link = 'index.php?option=' . $item['custom']['component'] . '&view=' . $item['custom']['views'] . '&task=' . $item['custom']['view'] . '.edit&id=<?php echo $item->' . $item['id'] . '; ?>&ref=' . $refview . '&refid=<?php echo $id; ?>';
$coreLoadLink = false;
if (isset($this->permissionCore[$item['custom']['view']]))
{
$coreLink = $this->permissionCore[$item['custom']['view']];
$coreLoadLink = true;
}
// check if the item has permissions.
if ($coreLoadLink && isset($this->permissionBuilder[$coreLink['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder[$coreLink['core.edit']]) && in_array($item['custom']['view'], $this->permissionBuilder[$coreLink['core.edit']]))
{
$accessCheck = "\$user->authorise('" . $coreLink['core.edit'] . "', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $item['custom']['view'] . ".' . (int)\$item->" . $item['id'] . ")";
}
else
{
$accessCheck = "\$user->authorise('core.edit', 'com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "." . $item['custom']['view'] . ".' . (int)\$item->" . $item['id'] . ")";
}
}
}
elseif (isset($item['custom']) && ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] === 'user' && !$item['title'])
{
// user and linked
$body .= PHP_EOL . "\t\t<?php \$_" . $item['id'] . " = JFactory::getUser(\$item->" . $item['id'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (\$user->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['id'] . ' ?>"><?php echo $_' . $item['id'] . '->name; ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>";
$body .= PHP_EOL . "\t\t\t\t<?php echo \$_" . $item['id'] . "->name; ?>";
$body .= PHP_EOL . "\t\t\t<?php endif; ?>";
$body .= PHP_EOL . "\t\t</td>";
$add = false;
}
else
{
$link = '<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=' . $refview . '&refid=<?php echo $id; ?>';
// check if custom links should be added to this list views
if (isset($this->customAdminViewListLink[$viewName_list]) && ComponentbuilderHelper::checkArray($this->customAdminViewListLink[$viewName_list]) && $firstTimeBeingAdded)
{
// make sure the custom links are only added once
$firstTimeBeingAdded = false;
// start building the links
$customAdminView = PHP_EOL . "\t\t\t" . '<div class="btn-group">';
foreach ($this->customAdminViewListLink[$viewName_list] as $customLinkView)
{
$customAdminView .= PHP_EOL . "\t\t\t<?php if (\$canDo->get('" . $customLinkView['link'] . ".access')): ?>";
$customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini" href="index.php?option=com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '&view=' . $customLinkView['link'] . '&id=<?php echo $item->id; ?>&ref=' . $refview . '&refid=<?php echo $id; ?>" title="<?php echo JText:' . ':_(' . "'COM_" . $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] . '_' . $customLinkView['NAME'] . "'" . '); ?>" ><span class="icon-' . $customLinkView['icon'] . '"></span></a>';
$customAdminView .= PHP_EOL . "\t\t\t<?php else: ?>";
$customAdminView .= PHP_EOL . "\t\t\t\t" . '<a class="hasTooltip btn btn-mini disabled" href="#" title="<?php echo JText:' . ':_(' . "'COM_" . $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] . '_' . $customLinkView['NAME'] . "'" . '); ?>"><span class="icon-' . $customLinkView['icon'] . '"></span></a>';
$customAdminView .= PHP_EOL . "\t\t\t<?php endif; ?>";
}
$customAdminView .= PHP_EOL . "\t\t\t" . '</div>';
}
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($viewName_single, $this->permissionBuilder['global'][$core['core.edit']]))
{
// set permissions.
$accessCheck = "\$canDo->get('" . $core['core.edit'] . "')";
}
else
{
// set permissions.
$accessCheck = "\$canDo->get('core.edit')";
}
// triger the checked out script to be added
$checkoutTriger = true;
}
if ($add)
{
// set as linked
$body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php if (" . $accessCheck . "): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="' . $link . '">' . $itemCode . '</a>';
if ($checkoutTriger)
{
$body .= PHP_EOL . "\t\t\t\t\t<?php if (\$item->checked_out): ?>";
$body .= PHP_EOL . "\t\t\t\t\t\t<?php echo JHtml::_('jgrid.checkedout', \$i, \$userChkOut->name, \$item->checked_out_time, '" . $viewName_list . ".', \$canCheckin); ?>";
$body .= PHP_EOL . "\t\t\t\t\t<?php endif; ?>";
}
$body .= PHP_EOL . "\t\t\t<?php else: ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<div class="name">' . $itemCode . '</div>';
$body .= PHP_EOL . "\t\t\t<?php endif; ?>";
$body .= $customAdminView;
$body .= PHP_EOL . "\t\t</td>";
}
}
}
else
{
if ($item['type'] === 'category')
{
$body .= PHP_EOL . "\t\t<td>";
$body .= PHP_EOL . "\t\t\t<?php echo \$displayData->escape(\$item->category_title); ?>";
$body .= PHP_EOL . "\t\t</td>";
}
elseif (ComponentbuilderHelper::checkArray($item['custom']) && $item['custom']['extends'] === 'user')
{
// custom user and linked
$body .= PHP_EOL . "\t\t<?php \$_" . $item['code'] . " = JFactory::getUser(\$item->" . $item['id'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td>';
$body .= PHP_EOL . "\t\t\t<?php if (\$user->authorise('core.edit', 'com_users')): ?>";
$body .= PHP_EOL . "\t\t\t\t" . '<a href="index.php?option=com_users&task=user.edit&id=<?php echo (int) $item->' . $item['id'] . ' ?>"><?php echo $_' . $item['code'] . '->name; ?></a>';
$body .= PHP_EOL . "\t\t\t<?php else: ?>";
$body .= PHP_EOL . "\t\t\t\t<?php echo \$_" . $item['code'] . "->name; ?>";
$body .= PHP_EOL . "\t\t\t<?php endif; ?>";
$body .= PHP_EOL . "\t\t</td>";
}
elseif ($item['type'] === 'user')
{
// user name only
$body .= PHP_EOL . "\t\t<?php \$" . $item['code'] . "User = JFactory::getUser(\$item->" . $item['code'] . "); ?>";
$body .= PHP_EOL . "\t\t" . '<td class="' . $this->setListFieldClass($item['code'], $viewName_list, 'nowrap') . '">';
$body .= PHP_EOL . "\t\t\t<?php echo \$" . $item['code'] . "User->name; ?>";
$body .= PHP_EOL . "\t\t</td>";
}
else
{
// normal not linked
$body .= PHP_EOL . "\t\t<td>";
$body .= PHP_EOL . "\t\t\t" . $itemCode;
$body .= PHP_EOL . "\t\t</td>";
}
}
}
$counter = $counter + 2;
$data_value = (3 == $this->footableVersion) ? 'data-sort-value' : 'data-value';
@@ -9303,7 +9168,7 @@ class Interpretation extends Fields
}
// set target type
$targetTypeSufix = "";
if ($this->defaultField($target['type'], 'spacer'))
if (ComponentbuilderHelper::fieldCheck($target['type'], 'spacer'))
{
// target a class if this is a note or spacer
$targetType = ".";
@@ -9369,7 +9234,7 @@ class Interpretation extends Fields
{
case 1: // Is
// only 4 list/radio/checkboxes
if (ComponentbuilderHelper::typeField($type, 'list') || ComponentbuilderHelper::typeField($type, 'dynamic') || !ComponentbuilderHelper::typeField($type))
if (ComponentbuilderHelper::fieldCheck($type, 'list') || ComponentbuilderHelper::fieldCheck($type, 'dynamic') || !ComponentbuilderHelper::fieldCheck($type))
{
if (ComponentbuilderHelper::checkArray($options))
{
@@ -9400,7 +9265,7 @@ class Interpretation extends Fields
break;
case 2: // Is Not
// only 4 list/radio/checkboxes
if (ComponentbuilderHelper::typeField($type, 'list') || ComponentbuilderHelper::typeField($type, 'dynamic') || !ComponentbuilderHelper::typeField($type))
if (ComponentbuilderHelper::fieldCheck($type, 'list') || ComponentbuilderHelper::fieldCheck($type, 'dynamic') || !ComponentbuilderHelper::fieldCheck($type))
{
if (ComponentbuilderHelper::checkArray($options))
{
@@ -9431,7 +9296,7 @@ class Interpretation extends Fields
break;
case 3: // Any Selection
// only 4 list/radio/checkboxes/dynamic_list
if (ComponentbuilderHelper::typeField($type, 'list') || ComponentbuilderHelper::typeField($type, 'dynamic') || !ComponentbuilderHelper::typeField($type))
if (ComponentbuilderHelper::fieldCheck($type, 'list') || ComponentbuilderHelper::fieldCheck($type, 'dynamic') || !ComponentbuilderHelper::fieldCheck($type))
{
if (ComponentbuilderHelper::checkArray($options))
{
@@ -9469,21 +9334,21 @@ class Interpretation extends Fields
break;
case 4: // Active (not empty)
// only 4 text_field
if (ComponentbuilderHelper::typeField($type, 'text'))
if (ComponentbuilderHelper::fieldCheck($type, 'text'))
{
$string .= 'isSet(' . $value . ')';
}
break;
case 5: // Unactive (empty)
// only 4 text_field
if (ComponentbuilderHelper::typeField($type, 'text'))
if (ComponentbuilderHelper::fieldCheck($type, 'text'))
{
$string .= '!isSet(' . $value . ')';
}
break;
case 6: // Key Word All (case-sensitive)
// only 4 text_field
if (ComponentbuilderHelper::typeField($type, 'text'))
if (ComponentbuilderHelper::fieldCheck($type, 'text'))
{
if (ComponentbuilderHelper::checkArray($options['keywords']))
{
@@ -9507,7 +9372,7 @@ class Interpretation extends Fields
break;
case 7: // Key Word Any (case-sensitive)
// only 4 text_field
if (ComponentbuilderHelper::typeField($type, 'text'))
if (ComponentbuilderHelper::fieldCheck($type, 'text'))
{
if (ComponentbuilderHelper::checkArray($options['keywords']))
{
@@ -9531,7 +9396,7 @@ class Interpretation extends Fields
break;
case 8: // Key Word All (case-insensitive)
// only 4 text_field
if (ComponentbuilderHelper::typeField($type, 'text'))
if (ComponentbuilderHelper::fieldCheck($type, 'text'))
{
if (ComponentbuilderHelper::checkArray($options['keywords']))
{
@@ -9556,7 +9421,7 @@ class Interpretation extends Fields
break;
case 9: // Key Word Any (case-insensitive)
// only 4 text_field
if (ComponentbuilderHelper::typeField($type, 'text'))
if (ComponentbuilderHelper::fieldCheck($type, 'text'))
{
if (ComponentbuilderHelper::checkArray($options['keywords']))
{
@@ -9581,7 +9446,7 @@ class Interpretation extends Fields
break;
case 10: // Min Length
// only 4 text_field
if (ComponentbuilderHelper::typeField($type, 'text'))
if (ComponentbuilderHelper::fieldCheck($type, 'text'))
{
if (ComponentbuilderHelper::checkArray($options))
{
@@ -9598,7 +9463,7 @@ class Interpretation extends Fields
break;
case 11: // Max Length
// only 4 text_field
if (ComponentbuilderHelper::typeField($type, 'text'))
if (ComponentbuilderHelper::fieldCheck($type, 'text'))
{
if (ComponentbuilderHelper::checkArray($options))
{
@@ -9615,7 +9480,7 @@ class Interpretation extends Fields
break;
case 12: // Exact Length
// only 4 text_field
if (ComponentbuilderHelper::typeField($type, 'text'))
if (ComponentbuilderHelper::fieldCheck($type, 'text'))
{
if (ComponentbuilderHelper::checkArray($options))
{
@@ -9643,7 +9508,7 @@ class Interpretation extends Fields
$buket = array();
if (ComponentbuilderHelper::checkString($options))
{
if (ComponentbuilderHelper::typeField($type, 'list') || ComponentbuilderHelper::typeField($type, 'dynamic') || !ComponentbuilderHelper::typeField($type))
if (ComponentbuilderHelper::fieldCheck($type, 'list') || ComponentbuilderHelper::fieldCheck($type, 'dynamic') || !ComponentbuilderHelper::fieldCheck($type))
{
$optionsArray = array_map('trim', (array) explode(PHP_EOL, $options));
if (!ComponentbuilderHelper::checkArray($optionsArray))
@@ -9663,7 +9528,7 @@ class Interpretation extends Fields
}
}
}
elseif (ComponentbuilderHelper::typeField($type, 'text'))
elseif (ComponentbuilderHelper::fieldCheck($type, 'text'))
{
// check to get the key words if set
$keywords = ComponentbuilderHelper::getBetween($options, 'keywords="', '"');
@@ -9721,12 +9586,12 @@ class Interpretation extends Fields
// this is only since 3.3.4
$select = 'var ' . $keyName . ' = jQuery("#jform_' . $name . '_id").val();';
}
elseif ($type === 'list' || ComponentbuilderHelper::typeField($type, 'dynamic') || !ComponentbuilderHelper::typeField($type))
elseif ($type === 'list' || ComponentbuilderHelper::fieldCheck($type, 'dynamic') || !ComponentbuilderHelper::fieldCheck($type))
{
$select = 'var ' . $keyName . ' = jQuery("#jform_' . $name . '").val();';
$isArray = true;
}
elseif (ComponentbuilderHelper::typeField($type, 'text'))
elseif (ComponentbuilderHelper::fieldCheck($type, 'text'))
{
$select = 'var ' . $keyName . ' = jQuery("#jform_' . $name . '").val();';
}
+70 -28
View File
@@ -1801,7 +1801,7 @@ abstract class ComponentbuilderHelper
return $sufix === "" || ($sufix == substr(strrchr($file, "."), -strlen($sufix)));
}
public static function imageInfo($path,$request = 'type')
public static function imageInfo($path, $request = 'type')
{
// set image
$image = JPATH_SITE.'/'.$path;
@@ -1914,37 +1914,79 @@ abstract class ComponentbuilderHelper
return array_unique($bucket);
}
public static function typeField($type,$option = 'default')
/**
* Field Grouping https://docs.joomla.org/Form_field
**/
protected static $fieldGroups = array(
'default' => array(
'accesslevel', 'cachehandler', 'calendar', 'captcha', 'category', 'checkbox',
'checkboxes', 'color', 'combo', 'componentlayout', 'contentlanguage', 'editor',
'chromestyle', 'contenttype', 'databaseconnection', 'editors', 'email', 'file',
'filelist', 'folderlist', 'groupedlist', 'hidden', 'file', 'headertag', 'helpsite',
'imagelist', 'integer', 'language', 'list', 'media', 'menu', 'note', 'number', 'password',
'plugins', 'radio', 'repeatable', 'range', 'rules', 'subform', 'sessionhandler', 'spacer', 'sql', 'tag',
'tel', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition', 'moduletag',
'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
),
'plain' => array(
'accesslevel', 'checkbox', 'cachehandler', 'calendar', 'category', 'chromestyle', 'color',
'contenttype', 'combo', 'componentlayout', 'databaseconnection', 'editor', 'editors',
'email', 'file', 'filelist', 'folderlist', 'headertag', 'helpsite',
'hidden', 'imagelist', 'integer', 'language', 'media', 'menu',
'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules',
'sessionhandler', 'tag', 'tel', 'text', 'textarea',
'timezone', 'url', 'user', 'usergroup'
),
'text' => array(
'calendar','color','editor','email','password','tel','text','textarea','url','number','range'
),
'list' => array(
'checkboxes','checkbox','list','radio'
),
'dynamic' => array(
'category','headertag','tag','rules','user','file','filelist','folderlist','imagelist','integer','timezone','media','meter'
),
'spacer' => array(
'note', 'spacer'
),
'option' => array(
'plugins', 'checkboxes', 'contentlanguage', 'list', 'radio', 'sql'
),
'special' => array(
'contentlanguage', 'groupedlist', 'moduleposition', 'plugin',
'repeatable', 'templatestyle', 'subform'
)
);
/**
* Field Checker
*
* @param string $type The field type
* @param boolean $option The field grouping
*
* @return boolean if the field was found
*/
public static function fieldCheck($type, $option = 'default')
{
// list of default fields
// https://docs.joomla.org/Form_field
$fields = array(
'default' => array(
'accesslevel','cachehandler','calendar','captcha','category','checkbox',
'checkboxes','color','combo','componentlayout','contentlanguage','editor',
'chromestyle','contenttype','databaseconnection','editors','email','file',
'filelist','folderlist','groupedlist','hidden','file','headertag','helpsite',
'imagelist','integer','language','list','media','menu','note','password',
'plugins','range','radio','repeatable','rules','subform','sessionhandler','spacer','sql','tag',
'tel','menuitem','modulelayout','meter','moduleorder','moduleposition','moduletag',
'templatestyle','text','textarea','timezone','url','user','usergroup'
),
'text' => array(
'calendar','color','editor','email','password','tel','text','textarea','url','number','range'
),
'list' => array(
'checkboxes','checkbox','list','radio'
),
'dynamic' => array(
'category','headertag','tag','rules','user','file','filelist','folderlist','imagelist','integer','timezone','media','meter'
)
);
if (in_array($type,$fields[$option]))
// now check
if (isset(self::$fieldGroups[$option]) && in_array($type, self::$fieldGroups[$option]))
{
return true;
}
return false;
return false;
}
/**
* get the spacer IDs
*
* @return array ids of the spacer field types
*/
public static function getSpacerIds()
{
// get the database object to use quote
$db = JFactory::getDbo();
return self::getVars('fieldtype', (array) array_map(function($name) use($db) { return $db->quote(ucfirst($name)); }, self::$fieldGroups['spacer']), 'name', 'id');
}
/**
@@ -11,6 +11,7 @@ COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_T
COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders"
COM_COMPONENTBUILDER_ADD_KEY_HERE="add key here"
COM_COMPONENTBUILDER_ADD_MENU="Add Menu"
COM_COMPONENTBUILDER_ADD_MORE_FIELDS_TO_THIS_ADMIN_VIEW="Add more fields to this admin view"
COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_SMALLIF_SETSMALL="Add to Backup Folder &amp; Sales Server <small>(if set)</small>"
COM_COMPONENTBUILDER_ADD_TO_REPOSITORY_FOLDER="Add to Repository Folder"
COM_COMPONENTBUILDER_ADD_YOUR_OWN_JCB_PACKAGES_TO_THE_COMMUNITY_A_S_GITHUBA_REPOSITORYBR_WATCH_THIS_A_S_TUTORIALA_TO_SEE_HOW="Add your own JCB packages to the community <a %s >gitHub</a> repository.<br />Watch this <a %s >tutorial</a> to see how!"
@@ -253,12 +254,13 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADDRELATIONS_LABEL="Relations"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADMIN_VIEW="Admin View"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADMIN_VIEW_DESCRIPTION="Select an admin view"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADMIN_VIEW_LABEL="View"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CONCATENATE="Concatenate"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_AREA_LABEL="Area"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CONCATENATE_RAQUO_GLUE="Concatenate &raquo; Glue"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CREATED_BY_DESC="The user that created this Admin Fields Relations."
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CREATED_DATE_DESC="The date this Admin Fields Relations was created."
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CREATED_DATE_LABEL="Created Date"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CUSTOM_CODE="Custom Code"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CUSTOM_RAQUO_CODE="Custom &raquo; Code"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_EDIT="Editing the Admin Fields Relations"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ERROR_UNIQUE_ALIAS="Another Admin Fields Relations has the same alias."
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ID="Id"
@@ -269,12 +271,14 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_JOIN_TYPE_LABEL="Join Type"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_LISTFIELD="Listfield"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_LISTFIELD_DESCRIPTION="Select the target list field."
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_LISTFIELD_LABEL="List Field"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODEL="Model"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODIFIED_BY_DESC="The last user that modified this Admin Fields Relations."
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODIFIED_DATE_DESC="The date this Admin Fields Relations was modified."
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODIFIED_DATE_LABEL="Modified Date"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_NEW="A New Admin Fields Relations"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_NOTE_ON_RELATIONS_DESCRIPTION="<p>Here you are able to combine/join multiple fields into one for display in the list view of the admin area.</p><p>You are able to add calculations, or even model the values into one result.</p>"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_NOTE_ON_RELATIONS_DESCRIPTION="<p>Here you are able to combine/join multiple fields into one for display in the list view of the admin area.</p>
<p>You are able to add calculations, or even model the values into one result.</p>"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_NOTE_ON_RELATIONS_LABEL="Relations Implementation"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_PERMISSION="Permissions"
@@ -287,6 +291,7 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_SET_LABEL="Set"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_STATUS="Status"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_VERSION_DESC="A count of the number of times this Admin Fields Relations has been revised."
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_VIEW="View"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RIGHT_IN_TAB="Right in Tab"
COM_COMPONENTBUILDER_ADMIN_FIELDS_RIGHT_OF_TABS="Right of Tabs"
COM_COMPONENTBUILDER_ADMIN_FIELDS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Admin Fields to customise the alias."
+6 -6
View File
@@ -68,14 +68,14 @@ $can = ComponentbuilderHelper::getActions('field');
$canDo = ComponentbuilderHelper::getActions('field',$item,'fields');
?>
<tr>
<td class="nowrap">
<td>
<?php if ($canDo->get('field.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=fieldtype&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'fields.', $canCheckin); ?>
<?php endif; ?>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'fields.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->name); ?></div>
<?php echo $displayData->escape($item->name); ?>
<?php endif; ?>
</td>
<td>
@@ -93,7 +93,7 @@ $can = ComponentbuilderHelper::getActions('field');
<td>
<?php echo JText::_($item->store); ?>
</td>
<td class="nowrap">
<td>
<?php if ($user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fields"><?php echo $displayData->escape($item->category_title); ?></a>
<?php else: ?>
@@ -59,14 +59,14 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
$canDo = ComponentbuilderHelper::getActions('joomla_component',$item,'joomla_components');
?>
<tr>
<td class="nowrap">
<td>
<?php if ($canDo->get('joomla_component.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>&ref=server&refid=<?php echo $id; ?>"><?php echo $displayData->escape($item->system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?>
<?php endif; ?>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?>
<?php endif; ?>
<?php else: ?>
<div class="name"><?php echo $displayData->escape($item->system_name); ?></div>
<?php echo $displayData->escape($item->system_name); ?>
<?php endif; ?>
</td>
<td>
-20
View File
@@ -87,26 +87,6 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin
$addrelations = new Registry;
$addrelations->loadString($item->addrelations);
$item->addrelations = $addrelations->toArray();
}
// check what type of conditions array we have here (should be subform... but just incase)
// This could happen due to huge data sets
if (isset($item->addconditions) && isset($item->addconditions['target_field']))
{
$bucket = array();
foreach($item->addconditions as $option => $values)
{
foreach($values as $nr => $value)
{
$bucket['addconditions'.$nr][$option] = $value;
}
}
$item->addconditions = $bucket;
// update the fields
$conditionsUpdate = new stdClass();
$conditionsUpdate->id = (int) $item->id;
$conditionsUpdate->addconditions = json_encode($bucket);
$this->_db->updateObject('#__componentbuilder_admin_fields_conditions', $conditionsUpdate, 'id');
}
if (!empty($item->id))
+50 -4
View File
@@ -1092,7 +1092,7 @@ class ComponentbuilderModelAjax extends JModelList
{
$result = $this->_db->loadObject();
$result->name = strtolower($result->name);
if (ComponentbuilderHelper::typeField($result->name,'list'))
if (ComponentbuilderHelper::fieldCheck($result->name,'list'))
{
// load the values form params
$xml = json_decode($result->xml);
@@ -1136,15 +1136,15 @@ class ComponentbuilderModelAjax extends JModelList
// return found field options
return $optionSet;
}
elseif (ComponentbuilderHelper::typeField($result->name,'text'))
elseif (ComponentbuilderHelper::fieldCheck($result->name,'text'))
{
return "keywords=\"\"\nlength=\"\"";
}
elseif (ComponentbuilderHelper::typeField($result->name,'dynamic'))
elseif (ComponentbuilderHelper::fieldCheck($result->name,'dynamic'))
{
return 'dynamic_list';
}
elseif (ComponentbuilderHelper::typeField($result->name))
elseif (ComponentbuilderHelper::fieldCheck($result->name))
{
return 'match field type not supported. Select another!';
}
@@ -2567,6 +2567,52 @@ class ComponentbuilderModelAjax extends JModelList
return $xml;
}
// Used in admin_fields_relations
public function getCodeGlueOptions($listfield, $joinfields, $type, $area)
{
// CONCATENATE GLUE
if ($type == 1)
{
// MODEL
if ($area == 1)
{
return ', ';
}
// VIEW
elseif ($area == 2)
{
return '<br />';
}
}
// CUSTOM CODE
elseif ($type == 2)
{
// build fields array
$fields = array_map( function ($id) {
return (int) $id;
}, (array) explode(',', $joinfields));
// add the list field to array
array_unshift($fields, (int) $listfield);
// get field names
$names = array_map( function ($id) {
return '[' . $id . ']=> ' . ComponentbuilderHelper::getVar('field', $id, 'id', 'name');
}, $fields);
// create note
$note = "// ". implode('; ', $names);
// MODEL
if ($area == 1)
{
return $note . PHP_EOL . PHP_EOL . '$item->[' . implode("] . ', ' . \$item->[", $fields) . '];';
}
// VIEW
elseif ($area == 2)
{
return '$this->escape($item->[' . implode("]) . '<br />' . \$this->escape(\$item->[", $fields). ']);' . PHP_EOL . PHP_EOL . $note;
}
}
return false;
}
// Used in get_snippets
public function getSnippets($libraries)
+19
View File
@@ -123,6 +123,8 @@ class ComponentbuilderModelDynamic_gets extends JModelList
$item->main_source = $this->selectionTranslation($item->main_source, 'main_source');
// convert gettype
$item->gettype = $this->selectionTranslation($item->gettype, 'gettype');
// convert addcalculation
$item->addcalculation = $this->selectionTranslation($item->addcalculation, 'addcalculation');
}
}
@@ -168,6 +170,19 @@ class ComponentbuilderModelDynamic_gets extends JModelList
return $gettypeArray[$value];
}
}
// Array of addcalculation language strings
if ($name === 'addcalculation')
{
$addcalculationArray = array(
1 => 'COM_COMPONENTBUILDER_DYNAMIC_GET_YES',
0 => 'COM_COMPONENTBUILDER_DYNAMIC_GET_NO'
);
// Now check if value is found in this array
if (isset($addcalculationArray[$value]) && ComponentbuilderHelper::checkString($addcalculationArray[$value]))
{
return $addcalculationArray[$value];
}
}
return $value;
}
@@ -190,6 +205,10 @@ class ComponentbuilderModelDynamic_gets extends JModelList
// From the componentbuilder_item table
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
// From the componentbuilder_admin_view table.
$query->select($db->quoteName('h.system_name','view_table_main_system_name'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_admin_view', 'h') . ' ON (' . $db->quoteName('a.view_table_main') . ' = ' . $db->quoteName('h.id') . ')');
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
+23 -15
View File
@@ -64,28 +64,36 @@ class JFormFieldAliasbuilder extends JFormFieldList
}
}
}
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','b.name'),array('id','name','type')));
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'b') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('b.id') . ')');
$query->where($db->quoteName('a.published') . ' >= 1');
// filter by fields linked
if (ComponentbuilderHelper::checkArray($fieldIds))
{
// get list of field types that does not work in list views (note, spacer)
$spacers = ComponentbuilderHelper::getSpacerIds();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','b.name'),array('id','name','type')));
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'b') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('b.id') . ')');
$query->where($db->quoteName('a.published') . ' >= 1');
// only load these fields
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')');
}
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
foreach($items as $item)
// none of these field types
if (ComponentbuilderHelper::checkArray($spacers))
{
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [' . $item->type . ']');
$query->where($db->quoteName('a.fieldtype') . ' NOT IN (' . implode(',', $spacers) . ')');
}
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [' . $item->type . ']');
}
return $options;
}
}
return $options;
return array(JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_ADD_MORE_FIELDS_TO_THIS_ADMIN_VIEW')));
}
}
+11 -3
View File
@@ -76,12 +76,20 @@ class JFormFieldJoinfields extends JFormFieldList
// filter by fields linked
if (ComponentbuilderHelper::checkArray($fieldIds))
{
// get list of field types that does not work in list views (note, spacer)
$spacers = ComponentbuilderHelper::getSpacerIds();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name'),array('id','name')));
$query->select($db->quoteName(array('a.id','a.name','t.name'),array('id','name','type')));
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 't') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('t.id') . ')');
$query->where($db->quoteName('a.published') . ' >= 1');
// only load these fields
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')');
// none of these field types
if (ComponentbuilderHelper::checkArray($spacers))
{
$query->where($db->quoteName('a.fieldtype') . ' NOT IN (' . implode(',', $spacers) . ')');
}
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
@@ -90,12 +98,12 @@ class JFormFieldJoinfields extends JFormFieldList
{
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->name);
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [' . $item->type . ']');
}
}
return $options;
}
}
return false;
return array(JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_ADD_MORE_FIELDS_TO_THIS_ADMIN_VIEW')));
}
}
+27 -20
View File
@@ -11,10 +11,33 @@
function getFieldSelectOptions_server(fieldId){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json";
if(token.length > 0 && fieldId > 0){
var request = 'token='+token+'&id='+fieldId;
// little script to set the value
function getCodeGlueOptions(field) {
// get the ID
var id = jQuery(field).attr('id');
var target = id.split('__');
//set the subID
var subID = target[0]+'__'+target[1];
// get listfield value
var listfield = jQuery('#'+subID+'__listfield').val();
// get joinfields values
var joinfields = jQuery('#'+subID+'__joinfields').val();
// get type value
var type = jQuery('#'+subID+'__join_type').val();
// get area value
var area = jQuery('#'+subID+'__area').val();
// get codeGlueOptions
getCodeGlueOptions_server(listfield, joinfields, type, area).done(function(result) {
if(result){
jQuery('#'+subID+'__set').val(result);
}
});
}
function getCodeGlueOptions_server(listfield, joinfields, type, area){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getCodeGlueOptions&format=json";
if(token.length > 0 && listfield > 0 && joinfields.length >= 1 && type > 0 && area > 0) {
var request = 'token='+token+'&listfield='+listfield+'&type='+type+'&area='+area+'&joinfields='+joinfields;
}
return jQuery.ajax({
type: 'GET',
@@ -25,20 +48,4 @@ function getFieldSelectOptions_server(fieldId){
});
}
function getFieldSelectOptions(fieldKey){
// first check if the field is set
if(jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field").length) {
var fieldId = jQuery("#jform_addconditions__addconditions"+fieldKey+"__match_field option:selected").val();
getFieldSelectOptions_server(fieldId).done(function(result) {
if(result){
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val(result);
}
else
{
jQuery('textarea#jform_addconditions__addconditions'+fieldKey+'__match_options').val('');
}
});
}
}
+30 -11
View File
@@ -116,6 +116,7 @@
class="fieldMedium"
multiple="false"
required="false"
onchange="getCodeGlueOptions(this)"
button="false"
/>
<!-- Joinfields Field. Type: Joinfields. (custom) -->
@@ -127,8 +128,26 @@
class="fieldMedium"
multiple="true"
required="false"
onchange="getCodeGlueOptions(this)"
button="false"
/>
<!-- Area Field. Type: List. (joomla) -->
<field
type="list"
name="area"
label="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_AREA_LABEL"
class="list_class"
multiple="false"
required="false"
validate="int"
default="1"
onchange="getCodeGlueOptions(this)">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_MODEL</option>
<option value="2">
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_VIEW</option>
</field>
<!-- Join_type Field. Type: List. (joomla) -->
<field
type="list"
@@ -138,26 +157,26 @@
multiple="false"
required="false"
validate="int"
default="1">
default="1"
onchange="getCodeGlueOptions(this)">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CONCATENATE</option>
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CONCATENATE_RAQUO_GLUE</option>
<option value="2">
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CUSTOM_CODE</option>
COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_CUSTOM_RAQUO_CODE</option>
</field>
<!-- Set Field. Type: Text. (joomla) -->
<!-- Set Field. Type: Textarea. (joomla) -->
<field
type="text"
type="textarea"
name="set"
label="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_SET_LABEL"
size="150"
maxlength="150"
rows="4"
cols="5"
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_SET_DESCRIPTION"
class="text_area"
required="false"
filter="RAW"
class="text_area codefield"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_SET_HINT"
autocomplete="on"
required="false"
/>
</form>
</field>
+3 -2
View File
@@ -1525,7 +1525,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
(3, '', 'The checkbox form field type provides a single checkbox. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Checkbox', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkbox\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be checkbox\"},\"properties1\":{\"name\":\"name\",\"example\":\"show_title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Show title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"value\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) is the value of the parameter if this checkbox is set (usually 1).\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value (usually 0 or 1).\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Show the title of the item\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties7\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (JavaScript use)\"}}', 'provides a single checkbox to be checked or unchecked', '', 1, 4, '', ''),
(4, '', 'The checkboxes form field type provides a set of checkboxes. Note: unlike most standard form field types, such as textfield or checkbox, this field is not an \"out of the box\" solution. It will create checkboxes for you, and submit their values in form of ', 'Checkboxes', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkboxes\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be checkboxs\"},\"properties1\":{\"name\":\"name\",\"example\":\"toppings\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select Toppings\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"option\",\"example\":\"anch|Anchovies,chor|Chorizo,on|Onions,mush|Mushrooms\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default value.\"},\"properties5\":{\"name\":\"description\",\"example\":\"Select the topping of your choice\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides unlimited checkboxes that can be used for multi-select.', '', 1, 2, '', ''),
(5, '', 'Provides a color picker. Enter the color as #ff00ff or pick it from the palet.', 'Color', '{\"properties0\":{\"name\":\"type\",\"example\":\"color\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be color.\"},\"properties1\":{\"name\":\"name\",\"example\":\"backgroundcolor\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"default\",\"example\":\"#FFFFFF\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) provides a color when not set.\"},\"properties3\":{\"name\":\"label\",\"example\":\"Background\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties4\":{\"name\":\"description\",\"example\":\"Select the background color here.\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) tooltip for the form field.\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides a color picker when clicking the input box.', '', 1, 2, '', ''),
(6, '', 'The list form field type provides a drop down list or a list box of other current component table entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Custom', '{\"properties0\":{\"name\":\"type\",\"example\":\"subjects\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type.\"},\"properties1\":{\"name\":\"name\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a Subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties7\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties11\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties13\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties14\":{\"name\":\"extends\",\"example\":\"list\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties15\":{\"name\":\"button\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) to add new button next to field in edit view\"},\"properties16\":{\"name\":\"table\",\"example\":\"#__###component###_subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. The ###TABLE### placeholder holds the table in the php.\"},\"properties17\":{\"name\":\"component\",\"example\":\"com_###component###\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties18\":{\"name\":\"view\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties19\":{\"name\":\"views\",\"example\":\"subjects\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties20\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to. The ###TEXT### placeholder holds the value_field in the php.\"},\"properties21\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key. The ###ID### placeholder holds the key_field in the php.\"},\"properties22\":{\"name\":\"prime_php\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"This field makes sure that the PHP used here is used to build the field type, and other are custom fields with the same field type are ignored. So to avoid that they over write the PHP added here. You should only have one prime per\\/type. To disable remove Line truncated
(6, '', 'The list form field type provides a drop down list or a list box of other current component table entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Custom', '{\"properties0\":{\"name\":\"type\",\"example\":\"subjects\",\"mandatory\":\"1\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type.\"},\"properties1\":{\"name\":\"name\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a Subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"list_class\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties6\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties7\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties11\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties13\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"},\"properties14\":{\"name\":\"extends\",\"example\":\"list\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties15\":{\"name\":\"button\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) to add new button next to field in edit view\"},\"properties16\":{\"name\":\"table\",\"example\":\"#__###component###_subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The table being linked to. The ###TABLE### placeholder holds the table in the php.\"},\"properties17\":{\"name\":\"component\",\"example\":\"com_###component###\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties18\":{\"name\":\"view\",\"example\":\"subject\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties19\":{\"name\":\"views\",\"example\":\"subjects\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties20\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The name of the text field in table linked to. The ###TEXT### placeholder holds the value_field in the php.\"},\"properties21\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key. The ###ID### placeholder holds the key_field in the php.\"},\"properties22\":{\"name\":\"prime_php\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"This field makes sure that the PHP used here is used to build the field type, and other are custom fields with the same field type are ignored. So to avoid that they over write the PHP added here. You should only have one prime per\\/type. To disable remove Line truncated
(7, '', 'The a list of users that can be targeting one or more groups and excluded users that already belongs to an item in a view.', 'CustomUser', '{\"properties0\":{\"name\":\"type\",\"example\":\"staffusers\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) can be anything, just not the same as any other default Joomla field type.\"},\"properties1\":{\"name\":\"name\",\"example\":\"staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Staff\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties5\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties8\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties9\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"\"},\"properties10\":{\"name\":\"hint\",\"example\":\"select a user\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties12\":{\"name\":\"extends\",\"example\":\"user\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"The JFormField sub class that should be extended. The options are (\'list\',\'radio\',\'checkboxes\')\"},\"properties13\":{\"name\":\"table\",\"example\":\"#__users\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The table being linked to. Must be #__users\"},\"properties14\":{\"name\":\"component\",\"example\":\"com_users\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The name of the component where this table is found. Must be com_users\"},\"properties15\":{\"name\":\"view\",\"example\":\"###view###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The single view name if the place this field is added.\"},\"properties16\":{\"name\":\"views\",\"example\":\"###views###\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The list view name if the place this field is added.\"},\"properties17\":{\"name\":\"value_field\",\"example\":\"name\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The name of the text field in table linked to.\"},\"properties18\":{\"name\":\"key_field\",\"example\":\"id\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The field from the linked table to save in this table as the unique key.\"},\"properties19\":{\"name\":\"type_php_1\",\"example\":\"\\/\\/ set the groups array\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getGroups method.\"},\"properties20\":{\"name\":\"type_php_2\",\"example\":\"$groups = JComponentHelper::getParams(\'com_###component###\')->get(\'###type###\');\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getGroups method.\"},\"properties21\":{\"name\":\"type_php_3\",\"example\":\"return $groups;\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"The php for the getGroups method.\"},\"properties22\":{\"name\":\"type_phpx_1\",\"example\":\"\\/\\/ To ensure thLine truncated
(8, '', 'The Editor field type provides a WYSIWYG editor.', 'Editor', '{\"properties0\":{\"name\":\"type\",\"example\":\"editor\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be editor.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mytextblock\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Test Field\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"Some text\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties16\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties4\":{\"name\":\"width\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width (in pixels) of the wysiwyg editor and defaults to 100%.\"},\"properties5\":{\"name\":\"height\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height (in pixels) of the wysiwyg editor and defaults to 250px.\"},\"properties6\":{\"name\":\"cols\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the width of the editor (in columns).\"},\"properties7\":{\"name\":\"rows\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) defines the height of the editor (in rows).\"},\"properties8\":{\"name\":\"buttons\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) can be an array of plugin buttons to be excluded or set to false. The default editors-xtd are: article, image, pagebreak and readmore.\"},\"properties9\":{\"name\":\"hide\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) array of plugin buttons to be hidden. eg... set buttons=\\\"true\\\" hide=\\\"readmore,pagebreak\\\"\"},\"properties10\":{\"name\":\"editor\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"specifies the editor to be used and can include two options (editor=\\\"desired|alternative\\\")\"},\"properties11\":{\"name\":\"filter\",\"example\":\"safehtml\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties15\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'provides an editor area field.', '', 1, 5, '', ''),
(9, '', 'The hidden form field type provides a hidden field for saving a field whose value cannot be altered directly by a user in the Administrator (it can be altered in code or by editing the params.ini file). If the parameter has a saved value this is entered i', 'Hidden', '{\"properties0\":{\"name\":\"type\",\"example\":\"hidden\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be hidden.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mysecretvariable\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"default\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the data which needs to be collected.\"},\"properties5\":{\"name\":\"filter\",\"example\":\"STRING\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties4\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"}}', 'provides a hidden field for saving a form field whose value cannot be altered directly by a user.', '', 1, 2, '', ''),
@@ -1675,7 +1675,8 @@ INSERT INTO `#__componentbuilder_admin_fields_conditions` (`id`, `addconditions`
--
INSERT INTO `#__componentbuilder_admin_fields_relations` (`id`, `addrelations`, `admin_view`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES
(1, '{\"addrelations0\":{\"listfield\":\"201\",\"joinfields\":[\"279\"],\"join_type\":\"1\",\"set\":\" \"}}', 14, 1, '2018-05-22 01:20:34', '2018-05-22 01:37:07', 2, '', 1);
(1, '', 14, 1, '2018-05-22 01:20:34', '2018-05-23 03:37:27', 9, '', 1),
(2, '{\"addrelations0\":{\"listfield\":\"199\",\"joinfields\":[\"351\",\"343\"],\"area\":\"1\",\"join_type\":\"2\",\"set\":\"\\/\\/ [199]=> Name; [351]=> DB Table (main); [343]=> View Table (main)\\r\\n\\r\\n$item->[199] . \', \' . $item->[351] . \', \' . $item->[343];\"},\"addrelations2\":{\"listfield\":\"342\",\"joinfields\":[\"531\"],\"area\":\"1\",\"join_type\":\"1\",\"set\":\", \"}}', 22, 1, '2018-05-23 03:38:52', '2018-05-23 03:46:56', 3, '', 2);
--
-- Dumping data for table `#__componentbuilder_component_admin_views`
@@ -100,32 +100,4 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder');
</div>
</div>
</form>
</div>
<script type="text/javascript">
<?php $numberAddconditions = range(0, count( (array) $this->item->addconditions) + 3, 1);?>
// for the values already set
jQuery(document).ready(function(){
<?php foreach($numberAddconditions as $fieldNr): ?>
jQuery('#adminForm').on('change', '#jform_addconditions__addconditions<?php echo $fieldNr ?>__match_field',function (e) {
e.preventDefault();
getFieldSelectOptions(<?php echo $fieldNr ?>);
});
<?php endforeach; ?>
jQuery(document).on('subform-row-add', function(event, row){
var groupName = jQuery(row).data('group');
var fieldName = groupName.replace(/([0-9])/g, '');
var fieldNr = groupName.replace(/([A-z_])/g, '');
if ('addconditions' === fieldName) {
jQuery('#adminForm').on('change', '#jform_addconditions__addconditions'+fieldNr+'__match_field',function (e) {
e.preventDefault();
getFieldSelectOptions(fieldNr);
});
}
});
});
</script>
</div>
+17 -17
View File
@@ -61,28 +61,28 @@ $edit = "index.php?option=com_componentbuilder&view=admin_views&task=admin_view.
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('admin_view.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('admin_view.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'admin_views.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->system_name); ?>
<?php endif; ?>
</div>
<div class="btn-group" style="margin: 5px 0 0 0;">
<?php if ($canDo->get('admin_view.edit') && $admin_field_id = ComponentbuilderHelper::getVar('admin_fields', $item->id, 'admin_view', 'id')): ?>
<a class="hasTooltip btn btn-mini" href="index.php?option=com_componentbuilder&view=admins_fields&task=admin_fields.edit&id=<?php echo $admin_field_id; ?>&ref=admin_views" title="<?php echo JText::_('COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS'); ?>" ><span class="icon-list"></span></a>
<?php endif; ?>
<?php if ($canDo->get('admin_view.edit') && $admin_relation_id = ComponentbuilderHelper::getVar('admin_fields_relations', $item->id, 'admin_view', 'id')): ?>
<a class="hasTooltip btn btn-mini" href="index.php?option=com_componentbuilder&view=admins_fields_relations&task=admin_fields_relations.edit&id=<?php echo $admin_relation_id; ?>&ref=admin_views" title="<?php echo JText::_('COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS_RELATIONS'); ?>" ><span class="icon-tree-2"></span></a>
<?php endif; ?>
<?php if ($canDo->get('admin_view.edit') && $admin_condition_id = ComponentbuilderHelper::getVar('admin_fields_conditions', $item->id, 'admin_view', 'id')): ?>
<a class="hasTooltip btn btn-mini" href="index.php?option=com_componentbuilder&view=admins_fields_conditions&task=admin_fields_conditions.edit&id=<?php echo $admin_condition_id; ?>&ref=admin_views" title="<?php echo JText::_('COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS_CONDITIONS'); ?>" ><span class="icon-shuffle"></span></a>
<?php endif; ?>
</div>
<div class="btn-group" style="margin: 5px 0 0 0;">
<?php if ($canDo->get('admin_view.edit') && $admin_field_id = ComponentbuilderHelper::getVar('admin_fields', $item->id, 'admin_view', 'id')): ?>
<a class="hasTooltip btn btn-mini" href="index.php?option=com_componentbuilder&view=admins_fields&task=admin_fields.edit&id=<?php echo $admin_field_id; ?>&ref=admin_views" title="<?php echo JText::_('COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS'); ?>" ><span class="icon-list"></span></a>
<?php endif; ?>
<?php if ($canDo->get('admin_view.edit') && $admin_relation_id = ComponentbuilderHelper::getVar('admin_fields_relations', $item->id, 'admin_view', 'id')): ?>
<a class="hasTooltip btn btn-mini" href="index.php?option=com_componentbuilder&view=admins_fields_relations&task=admin_fields_relations.edit&id=<?php echo $admin_relation_id; ?>&ref=admin_views" title="<?php echo JText::_('COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS_RELATIONS'); ?>" ><span class="icon-tree-2"></span></a>
<?php endif; ?>
<?php if ($canDo->get('admin_view.edit') && $admin_condition_id = ComponentbuilderHelper::getVar('admin_fields_conditions', $item->id, 'admin_view', 'id')): ?>
<a class="hasTooltip btn btn-mini" href="index.php?option=com_componentbuilder&view=admins_fields_conditions&task=admin_fields_conditions.edit&id=<?php echo $admin_condition_id; ?>&ref=admin_views" title="<?php echo JText::_('COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS_CONDITIONS'); ?>" ><span class="icon-shuffle"></span></a>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields&task=admin_fie
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('admin_fields.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('admin_fields.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->admin_view_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'admins_fields.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->admin_view_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->admin_view_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('admin_fields.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields_conditions&tas
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('admin_fields_conditions.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('admin_fields_conditions.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->admin_view_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'admins_fields_conditions.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->admin_view_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->admin_view_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('admin_fields_conditions.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=admins_fields_relations&task
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('admin_fields_relations.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('admin_fields_relations.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->admin_view_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'admins_fields_relations.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->admin_view_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->admin_view_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('admin_fields_relations.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=components_admin_views&task=
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('component_admin_views.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('component_admin_views.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->joomla_component_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'components_admin_views.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->joomla_component_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->joomla_component_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('component_admin_views.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=components_config&task=compo
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('component_config.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('component_config.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->joomla_component_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'components_config.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->joomla_component_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->joomla_component_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('component_config.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=components_custom_admin_menu
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('component_custom_admin_menus.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('component_custom_admin_menus.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->joomla_component_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'components_custom_admin_menus.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->joomla_component_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->joomla_component_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('component_custom_admin_menus.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=components_custom_admin_view
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('component_custom_admin_views.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('component_custom_admin_views.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->joomla_component_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'components_custom_admin_views.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->joomla_component_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->joomla_component_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('component_custom_admin_views.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=components_dashboard&task=co
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('component_dashboard.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('component_dashboard.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->joomla_component_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'components_dashboard.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->joomla_component_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->joomla_component_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('component_dashboard.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=components_files_folders&tas
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('component_files_folders.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('component_files_folders.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->joomla_component_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'components_files_folders.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->joomla_component_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->joomla_component_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('component_files_folders.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=components_mysql_tweaks&task
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('component_mysql_tweaks.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('component_mysql_tweaks.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->joomla_component_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'components_mysql_tweaks.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->joomla_component_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->joomla_component_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('component_mysql_tweaks.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=components_site_views&task=c
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('component_site_views.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('component_site_views.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->joomla_component_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'components_site_views.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->joomla_component_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->joomla_component_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('component_site_views.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=components_updates&task=comp
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('component_updates.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('component_updates.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->joomla_component_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'components_updates.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->joomla_component_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->joomla_component_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('component_updates.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=custom_admin_views&task=cust
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('core.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('core.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'custom_admin_views.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->name); ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=custom_codes&task=custom_cod
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('custom_code.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('custom_code.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->component_system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'custom_codes.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->component_system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->component_system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->path); ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_ge
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('dynamic_get.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('dynamic_get.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'dynamic_gets.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo JText::_($item->main_source); ?>
+19 -17
View File
@@ -61,25 +61,25 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('field.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('field.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'fields.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="nowrap">
<?php if ($this->user->authorise('fieldtype.edit', 'com_componentbuilder.fieldtype.' . (int)$item->fieldtype)): ?>
<div class="name">
<div class="name">
<?php if ($this->user->authorise('fieldtype.edit', 'com_componentbuilder.fieldtype.' . (int)$item->fieldtype)): ?>
<a href="index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.edit&id=<?php echo $item->fieldtype; ?>&ref=fields"><?php echo $this->escape($item->fieldtype_name); ?></a>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->fieldtype_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->fieldtype_name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo JText::_($item->datatype); ?>
@@ -94,11 +94,13 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
<?php echo JText::_($item->store); ?>
</td>
<td class="nowrap">
<?php if ($this->user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fields"><?php echo $this->escape($item->category_title); ?></a>
<?php else: ?>
<?php echo $this->escape($item->category_title); ?>
<?php endif; ?>
<div class="name">
<?php if ($this->user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fields"><?php echo $this->escape($item->category_title); ?></a>
<?php else: ?>
<?php echo $this->escape($item->category_title); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('field.edit.state')) : ?>
+13 -11
View File
@@ -61,26 +61,28 @@ $edit = "index.php?option=com_componentbuilder&view=fieldtypes&task=fieldtype.ed
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('fieldtype.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('fieldtype.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'fieldtypes.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->short_description); ?>
</td>
<td class="nowrap">
<?php if ($this->user->authorise('core.edit', 'com_componentbuilder.fieldtypes.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fieldtypes"><?php echo $this->escape($item->category_title); ?></a>
<?php else: ?>
<?php echo $this->escape($item->category_title); ?>
<?php endif; ?>
<div class="name">
<?php if ($this->user->authorise('core.edit', 'com_componentbuilder.fieldtypes.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fieldtypes"><?php echo $this->escape($item->category_title); ?></a>
<?php else: ?>
<?php echo $this->escape($item->category_title); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('fieldtype.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=help_documents&task=help_doc
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('help_document.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('help_document.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->title); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'help_documents.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->title); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo JText::_($item->type); ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('joomla_component.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('joomla_component.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'joomla_components.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->system_name); ?>
<?php endif; ?>
</div>
<div class="btn-group" style="margin: 5px 0 0 0;">
<?php if ($canDo->get('component_admin_views.edit') && $component_admin_views_id = ComponentbuilderHelper::getVar('component_admin_views', $item->id, 'joomla_component', 'id')): ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=language_translations&task=l
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('language_translation.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('language_translation.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $item->source; ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'language_translations.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $item->source; ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $item->source; ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('language_translation.edit.state')) : ?>
+6 -6
View File
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=languages&task=language.edit
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('language.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('language.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'languages.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->langtag); ?>
+12 -12
View File
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=layouts&task=layout.edit";
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('core.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('core.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'layouts.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->alias); ?>
@@ -79,13 +79,13 @@ $edit = "index.php?option=com_componentbuilder&view=layouts&task=layout.edit";
<?php echo $this->escape($item->description); ?>
</td>
<td class="nowrap">
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->dynamic_get)): ?>
<div class="name">
<div class="name">
<?php if ($this->user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int)$item->dynamic_get)): ?>
<a href="index.php?option=com_componentbuilder&view=dynamic_gets&task=dynamic_get.edit&id=<?php echo $item->dynamic_get; ?>&ref=layouts"><?php echo $this->escape($item->dynamic_get_name); ?></a>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->dynamic_get_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->dynamic_get_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('core.edit.state')) : ?>
+6 -6
View File
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=libraries&task=library.edit"
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('library.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('library.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'libraries.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
<div class="btn-group" style="margin: 5px 0 0 0;">
<?php if ($canDo->get('library_config.edit') && $library_config_id = ComponentbuilderHelper::getVar('library_config', $item->id, 'library', 'id')): ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=libraries_config&task=librar
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('library_config.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('library_config.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->library_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'libraries_config.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->library_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->library_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('library_config.edit.state')) : ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=libraries_files_folders_urls
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('library_files_folders_urls.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('library_files_folders_urls.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->library_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'libraries_files_folders_urls.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->library_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->library_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('library_files_folders_urls.edit.state')) : ?>
+6 -6
View File
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=servers&task=server.edit";
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('server.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('server.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'servers.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo JText::_($item->protocol); ?>
+6 -6
View File
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=site_views&task=site_view.ed
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('core.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('core.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->system_name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'site_views.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->system_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->system_name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->name); ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=snippet_types&task=snippet_t
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('snippet_type.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('snippet_type.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'snippet_types.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->description); ?>
+12 -12
View File
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=snippets&task=snippet.edit";
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('core.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('core.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'snippets.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->url); ?>
@@ -82,13 +82,13 @@ $edit = "index.php?option=com_componentbuilder&view=snippets&task=snippet.edit";
<?php echo $this->escape($item->heading); ?>
</td>
<td class="nowrap">
<?php if ($this->user->authorise('library.edit', 'com_componentbuilder.library.' . (int)$item->library)): ?>
<div class="name">
<div class="name">
<?php if ($this->user->authorise('library.edit', 'com_componentbuilder.library.' . (int)$item->library)): ?>
<a href="index.php?option=com_componentbuilder&view=libraries&task=library.edit&id=<?php echo $item->library; ?>&ref=snippets"><?php echo $this->escape($item->library_name); ?></a>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->library_name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->library_name); ?>
<?php endif; ?>
</div>
</td>
<td class="center">
<?php if ($canDo->get('core.edit.state')) : ?>
+6 -6
View File
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=templates&task=template.edit
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('core.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('core.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'templates.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->alias); ?>
@@ -61,16 +61,16 @@ $edit = "index.php?option=com_componentbuilder&view=validation_rules&task=valida
<?php endif; ?>
</td>
<td class="nowrap">
<?php if ($canDo->get('validation_rule.edit')): ?>
<div class="name">
<div class="name">
<?php if ($canDo->get('validation_rule.edit')): ?>
<a href="<?php echo $edit; ?>&id=<?php echo $item->id; ?>"><?php echo $this->escape($item->name); ?></a>
<?php if ($item->checked_out): ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $userChkOut->name, $item->checked_out_time, 'validation_rules.', $canCheckin); ?>
<?php endif; ?>
</div>
<?php else: ?>
<div class="name"><?php echo $this->escape($item->name); ?></div>
<?php endif; ?>
<?php else: ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
</div>
</td>
<td class="hidden-phone">
<?php echo $this->escape($item->short_description); ?>
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>22nd May, 2018</creationDate>
<creationDate>24th May, 2018</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
+70 -28
View File
@@ -1801,7 +1801,7 @@ abstract class ComponentbuilderHelper
return $sufix === "" || ($sufix == substr(strrchr($file, "."), -strlen($sufix)));
}
public static function imageInfo($path,$request = 'type')
public static function imageInfo($path, $request = 'type')
{
// set image
$image = JPATH_SITE.'/'.$path;
@@ -1914,37 +1914,79 @@ abstract class ComponentbuilderHelper
return array_unique($bucket);
}
public static function typeField($type,$option = 'default')
/**
* Field Grouping https://docs.joomla.org/Form_field
**/
protected static $fieldGroups = array(
'default' => array(
'accesslevel', 'cachehandler', 'calendar', 'captcha', 'category', 'checkbox',
'checkboxes', 'color', 'combo', 'componentlayout', 'contentlanguage', 'editor',
'chromestyle', 'contenttype', 'databaseconnection', 'editors', 'email', 'file',
'filelist', 'folderlist', 'groupedlist', 'hidden', 'file', 'headertag', 'helpsite',
'imagelist', 'integer', 'language', 'list', 'media', 'menu', 'note', 'number', 'password',
'plugins', 'radio', 'repeatable', 'range', 'rules', 'subform', 'sessionhandler', 'spacer', 'sql', 'tag',
'tel', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition', 'moduletag',
'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
),
'plain' => array(
'accesslevel', 'checkbox', 'cachehandler', 'calendar', 'category', 'chromestyle', 'color',
'contenttype', 'combo', 'componentlayout', 'databaseconnection', 'editor', 'editors',
'email', 'file', 'filelist', 'folderlist', 'headertag', 'helpsite',
'hidden', 'imagelist', 'integer', 'language', 'media', 'menu',
'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules',
'sessionhandler', 'tag', 'tel', 'text', 'textarea',
'timezone', 'url', 'user', 'usergroup'
),
'text' => array(
'calendar','color','editor','email','password','tel','text','textarea','url','number','range'
),
'list' => array(
'checkboxes','checkbox','list','radio'
),
'dynamic' => array(
'category','headertag','tag','rules','user','file','filelist','folderlist','imagelist','integer','timezone','media','meter'
),
'spacer' => array(
'note', 'spacer'
),
'option' => array(
'plugins', 'checkboxes', 'contentlanguage', 'list', 'radio', 'sql'
),
'special' => array(
'contentlanguage', 'groupedlist', 'moduleposition', 'plugin',
'repeatable', 'templatestyle', 'subform'
)
);
/**
* Field Checker
*
* @param string $type The field type
* @param boolean $option The field grouping
*
* @return boolean if the field was found
*/
public static function fieldCheck($type, $option = 'default')
{
// list of default fields
// https://docs.joomla.org/Form_field
$fields = array(
'default' => array(
'accesslevel','cachehandler','calendar','captcha','category','checkbox',
'checkboxes','color','combo','componentlayout','contentlanguage','editor',
'chromestyle','contenttype','databaseconnection','editors','email','file',
'filelist','folderlist','groupedlist','hidden','file','headertag','helpsite',
'imagelist','integer','language','list','media','menu','note','password',
'plugins','range','radio','repeatable','rules','subform','sessionhandler','spacer','sql','tag',
'tel','menuitem','modulelayout','meter','moduleorder','moduleposition','moduletag',
'templatestyle','text','textarea','timezone','url','user','usergroup'
),
'text' => array(
'calendar','color','editor','email','password','tel','text','textarea','url','number','range'
),
'list' => array(
'checkboxes','checkbox','list','radio'
),
'dynamic' => array(
'category','headertag','tag','rules','user','file','filelist','folderlist','imagelist','integer','timezone','media','meter'
)
);
if (in_array($type,$fields[$option]))
// now check
if (isset(self::$fieldGroups[$option]) && in_array($type, self::$fieldGroups[$option]))
{
return true;
}
return false;
return false;
}
/**
* get the spacer IDs
*
* @return array ids of the spacer field types
*/
public static function getSpacerIds()
{
// get the database object to use quote
$db = JFactory::getDbo();
return self::getVars('fieldtype', (array) array_map(function($name) use($db) { return $db->quote(ucfirst($name)); }, self::$fieldGroups['spacer']), 'name', 'id');
}
/**
@@ -22,6 +22,9 @@ COM_COMPONENTBUILDER_DTLICENSEDTDDSDD="<dt>License</dt><dd>%s</dd>"
COM_COMPONENTBUILDER_DTOWNERDTDDSDD="<dt>Owner</dt><dd>%s</dd>"
COM_COMPONENTBUILDER_DTWEBSITEDTDDSDD="<dt>Website</dt><dd>%s</dd>"
COM_COMPONENTBUILDER_EDIT_S="Edit %s"
COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS="Edit the admin fields"
COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS_CONDITIONS="Edit the admin fields conditions"
COM_COMPONENTBUILDER_EDIT_THE_ADMIN_FIELDS_RELATIONS="Edit the admin fields relations"
COM_COMPONENTBUILDER_EMAIL_S="Email: %s"
COM_COMPONENTBUILDER_EMAIL_WITH_THE_NEW_KEY_WAS_SEND="Email with the new key was send"
COM_COMPONENTBUILDER_EMCOMPANYEM_BSB="<em>Company:</em> <b>%s</b>"
@@ -68,8 +71,19 @@ COM_COMPONENTBUILDER_THE_BPHPSECLIBNETSFTPB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_L
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_PATH_ON_BSB_SERVER="The <b>%s</b> file could not be moved to <b>%s</b> path on <b>%s</b> server."
COM_COMPONENTBUILDER_THE_BSB_FILE_COULD_NOT_BE_MOVED_TO_BSB_SERVER="The <b>%s</b> file could not be moved to <b>%s</b> server."
COM_COMPONENTBUILDER_THE_BSB_LIBRARYCLASS_IS_NOT_AVAILABLE_THIS_LIBRARYCLASS_SHOULD_HAVE_BEEN_ADDED_TO_YOUR_BLIBRARIESVDM_IOVENDORB_FOLDER_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_INFO="The <b>%s</b> library\class is not available! This library\class should have been added to your <b>libraries/vdm_io/vendor</b> folder. Please contact your system administrator for more info!"
COM_COMPONENTBUILDER_THE_COMPONENT_ADMIN_VIEWS="The component admin views"
COM_COMPONENTBUILDER_THE_COMPONENT_CONFIG="The component config"
COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_MENUS="The component custom admin menus"
COM_COMPONENTBUILDER_THE_COMPONENT_CUSTOM_ADMIN_VIEWS="The component custom admin views"
COM_COMPONENTBUILDER_THE_COMPONENT_DASHBOARD="The component dashboard"
COM_COMPONENTBUILDER_THE_COMPONENT_FILES_FOLDERS="The component files & folders"
COM_COMPONENTBUILDER_THE_COMPONENT_MYSQL_TWEAKS="The component mysql tweaks"
COM_COMPONENTBUILDER_THE_COMPONENT_SITE_VIEWS="The component site views"
COM_COMPONENTBUILDER_THE_COMPONENT_UPDATES="The component updates"
COM_COMPONENTBUILDER_THE_FTP_CONNECTION_FOR_BSB_COULD_NOT_BE_MADE_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP connection for <b>%s</b> could not be made. Please check your signature details!"
COM_COMPONENTBUILDER_THE_FTP_SIGNATURE_FOR_BSB_WAS_NOT_WELL_FORMED_PLEASE_CHECK_YOUR_SIGNATURE_DETAILS="The FTP signature for <b>%s</b> was not well formed, please check your signature details!"
COM_COMPONENTBUILDER_THE_LIBRARY_CONFIG_FIELDS="The library config fields"
COM_COMPONENTBUILDER_THE_LIBRARY_FILES_FOLDERS_URLS="The library files, folders & URLs"
COM_COMPONENTBUILDER_THE_LOGIN_TO_BSB_HAS_FAILED_PLEASE_CHECK_THAT_YOUR_DETAILS_ARE_CORRECT="The login to <b>%s</b> has failed, please check that your details are correct!"
COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_CODESCODE="The package key is: <code>%s</code>"
COM_COMPONENTBUILDER_THE_PACKAGE_KEY_IS_S="The package key is: %s"