Added the option to add custom tabs to the edit view of any admin view

This commit is contained in:
Llewellyn van der Merwe 2018-08-24 23:46:41 +02:00
parent 42e85b3944
commit 231d8aa984
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
54 changed files with 4215 additions and 650 deletions

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.8.9) with **ALL** its features and **ALL** concepts totally open-source and free! You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.8.10) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -125,14 +125,14 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 23rd August, 2018 + *Last Build*: 24th August, 2018
+ *Version*: 2.8.9 + *Version*: 2.8.10
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **189114** + *Line count*: **192673**
+ *Field count*: **1064** + *Field count*: **1081**
+ *File count*: **1244** + *File count*: **1273**
+ *Folder count*: **197** + *Folder count*: **201**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.8.9) with **ALL** its features and **ALL** concepts totally open-source and free! You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.8.10) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -125,14 +125,14 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 23rd August, 2018 + *Last Build*: 24th August, 2018
+ *Version*: 2.8.9 + *Version*: 2.8.10
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **189114** + *Line count*: **192673**
+ *Field count*: **1064** + *Field count*: **1081**
+ *File count*: **1244** + *File count*: **1273**
+ *Folder count*: **197** + *Folder count*: **201**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com). > This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -30,6 +30,16 @@
<action name="admin_view.export" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_EXPORT" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_EXPORT_DESC" /> <action name="admin_view.export" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_EXPORT" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_EXPORT_DESC" />
<action name="admin_view.import" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_IMPORT" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_IMPORT_DESC" /> <action name="admin_view.import" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_IMPORT" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_IMPORT_DESC" />
<action name="admin_view.submenu" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU_DESC" /> <action name="admin_view.submenu" title="COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU" description="COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU_DESC" />
<action name="admin_custom_tabs.access" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_ACCESS" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_ACCESS_DESC" />
<action name="admin_custom_tabs.batch" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_BATCH_USE" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_BATCH_USE_DESC" />
<action name="admin_custom_tabs.create" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_CREATE" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_CREATE_DESC" />
<action name="admin_custom_tabs.delete" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_DELETE" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_DELETE_DESC" />
<action name="admin_custom_tabs.edit" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_DESC" />
<action name="admin_custom_tabs.edit.created_by" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_BY_DESC" />
<action name="admin_custom_tabs.edit.created" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_DATE_DESC" />
<action name="admin_custom_tabs.edit.own" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_OWN" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_OWN_DESC" />
<action name="admin_custom_tabs.edit.state" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_STATE" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_STATE_DESC" />
<action name="admin_custom_tabs.version" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_VERSION" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_VERSION_DESC" />
<action name="admin_fields.access" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS_DESC" /> <action name="admin_fields.access" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS_DESC" />
<action name="admin_fields.batch" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_USE" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_USE_DESC" /> <action name="admin_fields.batch" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_USE" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_USE_DESC" />
<action name="admin_fields_conditions.access" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_ACCESS" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_ACCESS_DESC" /> <action name="admin_fields_conditions.access" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_ACCESS" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_ACCESS_DESC" />
@ -582,6 +592,17 @@
<action name="admin_fields_relations.access" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_ACCESS" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_ACCESS_DESC" /> <action name="admin_fields_relations.access" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_ACCESS" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_ACCESS_DESC" />
<action name="admin_fields_relations.version" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_EDIT_VERSION" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_EDIT_VERSION_DESC" /> <action name="admin_fields_relations.version" title="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_EDIT_VERSION" description="COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_EDIT_VERSION_DESC" />
</section> </section>
<section name="admin_custom_tabs">
<action name="admin_custom_tabs.edit" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_DESC" />
<action name="admin_custom_tabs.edit.own" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_OWN" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_OWN_DESC" />
<action name="admin_custom_tabs.edit.state" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_STATE" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_STATE_DESC" />
<action name="admin_custom_tabs.edit.created_by" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_BY_DESC" />
<action name="admin_custom_tabs.edit.created" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_DATE_DESC" />
<action name="admin_custom_tabs.create" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_CREATE" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_CREATE_DESC" />
<action name="admin_custom_tabs.delete" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_DELETE" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_DELETE_DESC" />
<action name="admin_custom_tabs.access" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_ACCESS" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_ACCESS_DESC" />
<action name="admin_custom_tabs.version" title="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_VERSION" description="COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_VERSION_DESC" />
</section>
<section name="component_admin_views"> <section name="component_admin_views">
<action name="component_admin_views.edit" title="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT" description="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_DESC" /> <action name="component_admin_views.edit" title="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT" description="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_DESC" />
<action name="component_admin_views.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_OWN_DESC" /> <action name="component_admin_views.edit.own" title="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_OWN" description="COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_EDIT_OWN_DESC" />

View File

@ -0,0 +1,14 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */
.tab_html { width: 1027px; height: 338px; }

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -110,6 +110,7 @@ class ComponentbuilderController extends JControllerLegacy
'admin_fields' => 'admins_fields', 'admin_fields' => 'admins_fields',
'admin_fields_conditions' => 'admins_fields_conditions', 'admin_fields_conditions' => 'admins_fields_conditions',
'admin_fields_relations' => 'admins_fields_relations', 'admin_fields_relations' => 'admins_fields_relations',
'admin_custom_tabs' => 'admins_custom_tabs',
'component_admin_views' => 'components_admin_views', 'component_admin_views' => 'components_admin_views',
'component_site_views' => 'components_site_views', 'component_site_views' => 'components_site_views',
'component_custom_admin_views' => 'components_custom_admin_views', 'component_custom_admin_views' => 'components_custom_admin_views',

View File

@ -0,0 +1,321 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Admin_custom_tabs Controller
*/
class ComponentbuilderControllerAdmin_custom_tabs extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'Admins_custom_tabs'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('admin_custom_tabs.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('admin_custom_tabs.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('admin_custom_tabs.access', 'com_componentbuilder.admin_custom_tabs.' . (int) $recordId) && $user->authorise('admin_custom_tabs.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('admin_custom_tabs.edit', 'com_componentbuilder.admin_custom_tabs.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('admin_custom_tabs.edit.own', 'com_componentbuilder.admin_custom_tabs.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('admin_custom_tabs.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('admin_custom_tabs.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref . '&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Admin_custom_tabs', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=admins_custom_tabs' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
return;
}
}

View File

@ -0,0 +1,43 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Admins_custom_tabs Controller
*/
class ComponentbuilderControllerAdmins_custom_tabs extends JControllerAdmin
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Admin_custom_tabs', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
}

View File

@ -541,6 +541,13 @@ class Get
*/ */
public $linkedAdminViews = array(); public $linkedAdminViews = array();
/**
* The custom admin view tabs
*
* @var array
*/
public $customTabs = array();
/** /**
* The Add Ajax Switch * The Add Ajax Switch
* *
@ -1455,13 +1462,15 @@ class Get
'b.id', 'b.id',
'c.addconditions', 'c.addconditions',
'c.id', 'c.id',
'r.addrelations' 'r.addrelations',
't.tabs'
), array( ), array(
'addfields', 'addfields',
'addfields_id', 'addfields_id',
'addconditions', 'addconditions',
'addconditions_id', 'addconditions_id',
'addrelations' 'addrelations',
'customtabs'
) )
) )
); );
@ -1469,6 +1478,7 @@ class Get
$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', '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_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->join('LEFT', $this->db->quoteName('#__componentbuilder_admin_fields_relations', 'r') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('r.admin_view') . ')');
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_admin_custom_tabs', 't') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('t.admin_view') . ')');
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
// Reset the query using our newly populated query object. // Reset the query using our newly populated query object.
@ -1533,7 +1543,73 @@ class Get
$view->tables = array_values($view->addtables); $view->tables = array_values($view->addtables);
} }
unset($view->addtables); unset($view->addtables);
// add the tabs
// set custom tabs
$this->customTabs[$name_single] = null;
$view->customtabs = (isset($view->customtabs) && ComponentbuilderHelper::checkJson($view->customtabs)) ? json_decode($view->customtabs, true) : null;
if (ComponentbuilderHelper::checkArray($view->customtabs))
{
// setup custom tabs to global data sets
$this->customTabs[$name_single] = array_map( function ($tab) use($name_single) {
// set the view name
$tab['view'] = $name_single;
// load the dynamic data
$tab['html'] = $this->setDynamicValues($tab['html']);
// set the tab name
$tab['name'] = (isset($tab['name']) && ComponentbuilderHelper::checkString($tab['name'])) ? $tab['name'] : 'Tab';
// set lang
$tab['lang'] = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($tab['view'], 'U') . '_' . ComponentbuilderHelper::safeString($tab['name'], 'U');
$this->langContent['both'][$tab['lang']] = trim($tab['name']);
// set code name
$tab['code'] = ComponentbuilderHelper::safeString($tab['name']);
// check if the permissions for the tab should be added
$_tab = '';
if (isset($tab['permission']) && $tab['permission'] == 1)
{
$_tab = $this->_t(1);
}
// check if the php of the tab is set, if not load it now
if (strpos($tab['html'], 'bootstrap.addTab') === false && strpos($tab['html'], 'bootstrap.endTab') === false)
{
// add the tab
$tmp = PHP_EOL . $_tab . $this->_t(1) . "<?php echo JHtml::_('bootstrap.addTab', '" . $tab['view'] . "Tab', '" . $tab['code'] . "', JText::_('" . $tab['lang'] . "', true)); ?>";
$tmp .= PHP_EOL . $_tab . $this->_t(2) . '<div class="row-fluid form-horizontal-desktop">';
$tmp .= PHP_EOL . $_tab . $this->_t(3) . '<div class="span12">';
$tmp .= PHP_EOL . $_tab . $this->_t(4) . implode(PHP_EOL . $_tab . $this->_t(4), (array) explode(PHP_EOL, trim($tab['html'])));
$tmp .= PHP_EOL . $_tab . $this->_t(3) . '</div>';
$tmp .= PHP_EOL . $_tab . $this->_t(2) . '</div>';
$tmp .= PHP_EOL . $_tab . $this->_t(1) . "<?php echo JHtml::_('bootstrap.endTab'); ?>";
// update html
$tab['html'] = $tmp;
}
else
{
$tab['html'] = PHP_EOL . $_tab. $this->_t(1) . implode(PHP_EOL . $_tab. $this->_t(1), (array) explode(PHP_EOL, trim($tab['html'])));
}
// add the permissions if needed
if (isset($tab['permission']) && $tab['permission'] == 1)
{
$tmp = PHP_EOL . $this->_t(1) . "<?php if (\$this->canDo->get('" . $tab['view'] . "." . $tab['code'] . ".viewtab')) : ?>";
$tmp .= $tab['html'];
$tmp .= PHP_EOL . $this->_t(1) . "<?php endif; ?>";
// update html
$tab['html'] = $tmp;
// set lang for permissions
$tab['lang_permission'] = $tab['lang'] . '_TAB_PERMISSION';
$tab['lang_permission_desc'] = $tab['lang'] . '_TAB_PERMISSION_DESC';
$tab['lang_permission_title'] = $this->placeholders[$this->hhh . 'Views' . $this->hhh] . ' View ' . $tab['name'] . ' Tab';
$this->langContent['both'][$tab['lang_permission']] = $tab['lang_permission_title'];
$this->langContent['both'][$tab['lang_permission_desc']] = 'Allow the users in this group to view ' . $tab['name'] . ' Tab of ' . $this->placeholders[$this->hhh . 'views' . $this->hhh];
// set the sort key
$tab['sortKey'] = ComponentbuilderHelper::safeString($tab['lang_permission_title']);
}
// return tab
return $tab;
}, array_values($view->customtabs));
}
unset($view->customtabs);
// add the local tabs
$view->addtabs = (isset($view->addtabs) && ComponentbuilderHelper::checkJson($view->addtabs)) ? json_decode($view->addtabs, true) : null; $view->addtabs = (isset($view->addtabs) && ComponentbuilderHelper::checkJson($view->addtabs)) ? json_decode($view->addtabs, true) : null;
if (ComponentbuilderHelper::checkArray($view->addtabs)) if (ComponentbuilderHelper::checkArray($view->addtabs))
{ {

View File

@ -7259,6 +7259,8 @@ class Interpretation extends Fields
} }
} }
} }
// custom tab searching array
$searchTabs = array();
// start tab set // start tab set
$bucket = array(); $bucket = array();
$leftside = ''; $leftside = '';
@ -7270,12 +7272,16 @@ class Interpretation extends Fields
ksort($this->tabCounter[$viewName_single]); ksort($this->tabCounter[$viewName_single]);
foreach ($this->tabCounter[$viewName_single] as $tabNr => $tabName) foreach ($this->tabCounter[$viewName_single] as $tabNr => $tabName)
{ {
// check if we must load a custom tab
$tabWidth = 12; $tabWidth = 12;
$lrCounter = 0; $lrCounter = 0;
// set tab lang // set tab lang
$tabLangName = $langView . '_' . ComponentbuilderHelper::safeString($tabName, 'U'); $tabLangName = $langView . '_' . ComponentbuilderHelper::safeString($tabName, 'U');
// set tab code name // set tab code name
$tabCodeName = ComponentbuilderHelper::safeString($tabName); $tabCodeName = ComponentbuilderHelper::safeString($tabName);
/// set the values to use in search latter
$searchTabs[$tabCodeName] = $tabNr;
// add to lang array // add to lang array
if (!isset($this->langContent[$this->lang][$tabLangName])) if (!isset($this->langContent[$this->lang][$tabLangName]))
{ {
@ -7480,6 +7486,11 @@ class Interpretation extends Fields
{ {
$body .= PHP_EOL . PHP_EOL . $this->_t(1) . "<?php echo JHtml::_('bootstrap.startTabSet', '" . $viewName_single . "Tab', array('active' => '" . $tabCodeName . "')); ?>"; $body .= PHP_EOL . PHP_EOL . $this->_t(1) . "<?php echo JHtml::_('bootstrap.startTabSet', '" . $viewName_single . "Tab', array('active' => '" . $tabCodeName . "')); ?>";
} }
// check if custom tab must be added
if (($_customTabHTML = $this->addCustomTabs($searchTabs[$tabCodeName], $viewName_single, 1)) !== false)
{
$body .= $_customTabHTML;
}
// if this is a linked view set permissions // if this is a linked view set permissions
$closeIT = false; $closeIT = false;
if (isset($linkedViewIdentifier) && ComponentbuilderHelper::checkArray($linkedViewIdentifier) && in_array($tabCodeName, $linkedViewIdentifier)) if (isset($linkedViewIdentifier) && ComponentbuilderHelper::checkArray($linkedViewIdentifier) && in_array($tabCodeName, $linkedViewIdentifier))
@ -7530,10 +7541,15 @@ class Interpretation extends Fields
{ {
$body .= PHP_EOL . $this->_t(1) . "<?php endif; ?>"; $body .= PHP_EOL . $this->_t(1) . "<?php endif; ?>";
} }
// check if custom tab must be added
if (($_customTabHTML = $this->addCustomTabs($searchTabs[$tabCodeName], $viewName_single, 2)) !== false)
{
$body .= $_customTabHTML;
}
// set counter // set counter
$tabCounter++; $tabCounter++;
} }
// add option to load forms loded in via plugins // add option to load forms loded in via plugins (TODO) we may want to move these tab locations
$body .= PHP_EOL . PHP_EOL . $this->_t(1) . "<?php \$this->ignore_fieldsets = array('details','metadata','vdmmetadata','accesscontrol'); ?>"; $body .= PHP_EOL . PHP_EOL . $this->_t(1) . "<?php \$this->ignore_fieldsets = array('details','metadata','vdmmetadata','accesscontrol'); ?>";
$body .= PHP_EOL . $this->_t(1) . "<?php \$this->tab_name = '" . $viewName_single . "Tab'; ?>"; $body .= PHP_EOL . $this->_t(1) . "<?php \$this->tab_name = '" . $viewName_single . "Tab'; ?>";
$body .= PHP_EOL . $this->_t(1) . "<?php echo JLayoutHelper::render('joomla.edit.params', \$this); ?>"; $body .= PHP_EOL . $this->_t(1) . "<?php echo JLayoutHelper::render('joomla.edit.params', \$this); ?>";
@ -7698,6 +7714,11 @@ class Interpretation extends Fields
$publishingPer[] = "\$this->canDo->get('" . $core_permission . "')"; $publishingPer[] = "\$this->canDo->get('" . $core_permission . "')";
} }
} }
// check if custom tab must be added
if (($_customTabHTML = $this->addCustomTabs(15, $viewName_single, 1)) !== false)
{
$body .= $_customTabHTML;
}
$body .= PHP_EOL . PHP_EOL . $this->_t(1) . "<?php if (" . implode(' || ', $publishingPer) . ") : ?>"; $body .= PHP_EOL . PHP_EOL . $this->_t(1) . "<?php if (" . implode(' || ', $publishingPer) . ") : ?>";
// set the default publishing tab // set the default publishing tab
$body .= PHP_EOL . $this->_t(1) . "<?php echo JHtml::_('bootstrap.addTab', '" . $viewName_single . "Tab', '" . $tabCodeNameLeft . "', JText:" . ":_('" . $tabLangName . "', true)); ?>"; $body .= PHP_EOL . $this->_t(1) . "<?php echo JHtml::_('bootstrap.addTab', '" . $viewName_single . "Tab', '" . $tabCodeNameLeft . "', JText:" . ":_('" . $tabLangName . "', true)); ?>";
@ -7717,6 +7738,11 @@ class Interpretation extends Fields
$body .= PHP_EOL . $this->_t(2) . "</div>"; $body .= PHP_EOL . $this->_t(2) . "</div>";
$body .= PHP_EOL . $this->_t(1) . "<?php echo JHtml::_('bootstrap.endTab'); ?>"; $body .= PHP_EOL . $this->_t(1) . "<?php echo JHtml::_('bootstrap.endTab'); ?>";
$body .= PHP_EOL . $this->_t(1) . "<?php endif; ?>"; $body .= PHP_EOL . $this->_t(1) . "<?php endif; ?>";
// check if custom tab must be added
if (($_customTabHTML = $this->addCustomTabs(15, $viewName_single, 2)) !== false)
{
$body .= $_customTabHTML;
}
} }
// make sure we dont load it to a view with the name component // make sure we dont load it to a view with the name component
if ($viewName_single != 'component') if ($viewName_single != 'component')
@ -7782,6 +7808,32 @@ class Interpretation extends Fields
return ''; return '';
} }
protected function addCustomTabs($nr, $name_single, $target)
{
// check if this view is having custom tabs
if (isset($this->customTabs[$name_single]) && ComponentbuilderHelper::checkArray($this->customTabs[$name_single]))
{
$html = array();
foreach ($this->customTabs[$name_single] as $customTab)
{
if (ComponentbuilderHelper::checkArray($customTab) && isset($customTab['html']))
{
if ($customTab['tab'] == $nr && $customTab['position'] == $target
&& isset($customTab['html']) && ComponentbuilderHelper::checkString($customTab['html']))
{
$html[] = $customTab['html'];
}
}
}
// return if found
if (ComponentbuilderHelper::checkArray($html))
{
return PHP_EOL . implode(PHP_EOL, $html);
}
}
return false;
}
public function setFadeInEfect(&$view) public function setFadeInEfect(&$view)
{ {
// check if we should load the fade in affect // check if we should load the fade in affect
@ -15201,6 +15253,17 @@ function vdm_dkim() {
// set view name // set view name
$nameView = ComponentbuilderHelper::safeString($view['settings']->name_single); $nameView = ComponentbuilderHelper::safeString($view['settings']->name_single);
$nameViews = ComponentbuilderHelper::safeString($view['settings']->name_list); $nameViews = ComponentbuilderHelper::safeString($view['settings']->name_list);
// add custom tab permissions if found
if (isset($this->customTabs[$nameView]) && ComponentbuilderHelper::checkArray($this->customTabs[$nameView]))
{
foreach ($this->customTabs[$nameView] as $_customTab)
{
if (isset($_customTab['permission']) && $_customTab['permission'] == 1)
{
$this->componentGlobal[$_customTab['sortKey']] = $this->_t(2) . '<action name="' . $_customTab['view'] . '.' . $_customTab['code'] . '.viewtab" title="' . $_customTab['lang_permission'] . '" description="' . $_customTab['lang_permission_desc'] . '" />';
}
}
}
// add the custom permissions to use the buttons of this view // add the custom permissions to use the buttons of this view
$this->addCustomButtonPermissions($view['settings'], $view['settings']->name_single, $nameView); $this->addCustomButtonPermissions($view['settings'], $view['settings']->name_single, $nameView);
if ($nameView != 'component') if ($nameView != 'component')

View File

@ -16,6 +16,46 @@ COM_COMPONENTBUILDER_ADD_MORE_FIELDS_TO_THIS_ADMIN_VIEW="Add more fields to this
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_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_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!" 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!"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS="Admins Custom Tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_ACCESS="Admins Custom Tabs Access"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_ACCESS_DESC="Allows the users in this group to access access admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_BATCH_OPTIONS="Batch process the selected Admins Custom Tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_BATCH_TIP="All changes will be applied to all selected Admins Custom Tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_BATCH_USE="Admins Custom Tabs Batch Use"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_CREATE="Admins Custom Tabs Create"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_CREATE_DESC="Allows the users in this group to create create admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_DELETE="Admins Custom Tabs Delete"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_DELETE_DESC="Allows the users in this group to delete delete admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT="Admins Custom Tabs Edit"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_BY="Admins Custom Tabs Edit Created By"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_DATE="Admins Custom Tabs Edit Created Date"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_DESC="Allows the users in this group to edit the admin custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_OWN="Admins Custom Tabs Edit Own"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_OWN_DESC="Allows the users in this group to edit edit own admins custom tabs created by them"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_STATE="Admins Custom Tabs Edit State"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_STATE_DESC="Allows the users in this group to update the state of the admin custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_VERSION="Admins Custom Tabs Edit Version"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_ARCHIVED="%s Admins Custom Tabs archived."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_ARCHIVED_1="%s Admin Custom Tabs archived."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_CHECKED_IN_0="No Admin Custom Tabs successfully checked in."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_CHECKED_IN_1="%d Admin Custom Tabs successfully checked in."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_CHECKED_IN_MORE="%d Admins Custom Tabs successfully checked in."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_DELETED="%s Admins Custom Tabs deleted."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_DELETED_1="%s Admin Custom Tabs deleted."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_FEATURED="%s Admins Custom Tabs featured."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_FEATURED_1="%s Admin Custom Tabs featured."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_PUBLISHED="%s Admins Custom Tabs published."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_PUBLISHED_1="%s Admin Custom Tabs published."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_TRASHED="%s Admins Custom Tabs trashed."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_TRASHED_1="%s Admin Custom Tabs trashed."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_UNFEATURED="%s Admins Custom Tabs unfeatured."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_UNFEATURED_1="%s Admin Custom Tabs unfeatured."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_UNPUBLISHED="%s Admins Custom Tabs unpublished."
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_N_ITEMS_UNPUBLISHED_1="%s Admin Custom Tabs unpublished."
COM_COMPONENTBUILDER_ADMINS_FIELDS="Admins Fields" COM_COMPONENTBUILDER_ADMINS_FIELDS="Admins Fields"
COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS="Admins Fields Access" COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS="Admins Fields Access"
COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS_DESC="Allows the users in this group to access access admins fields" COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS_DESC="Allows the users in this group to access access admins fields"
@ -137,6 +177,47 @@ COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_N_ITEMS_UNFEATURED_1="%s Admin Fiel
COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_N_ITEMS_UNPUBLISHED="%s Admins Fields Relations unpublished." COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_N_ITEMS_UNPUBLISHED="%s Admins Fields Relations unpublished."
COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_N_ITEMS_UNPUBLISHED_1="%s Admin Fields Relations unpublished." COM_COMPONENTBUILDER_ADMINS_FIELDS_RELATIONS_N_ITEMS_UNPUBLISHED_1="%s Admin Fields Relations unpublished."
COM_COMPONENTBUILDER_ADMIN_BEHAVIOUR="Admin Behaviour" COM_COMPONENTBUILDER_ADMIN_BEHAVIOUR="Admin Behaviour"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS="Admin Custom Tabs"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW="Admin View"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_DESCRIPTION="Select an admin view"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_LABEL="View"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_AFTER_SELECTED_TAB="After selected tab"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_BEFORE_SELECTED_TAB="Before selected tab"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_BY_DESC="The user that created this Admin Custom Tabs."
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_DATE_DESC="The date this Admin Custom Tabs was created."
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_DATE_LABEL="Created Date"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_EDIT="Editing the Admin Custom Tabs"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ERROR_UNIQUE_ALIAS="Another Admin Custom Tabs has the same alias."
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_HINT="// Add the tab HTML here. To access php values <?php echo $this->methodname->value; ?>"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_LABEL="HTML"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ID="Id"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_BY_DESC="The last user that modified this Admin Custom Tabs."
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_DATE_DESC="The date this Admin Custom Tabs was modified."
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_DATE_LABEL="Modified Date"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_DESCRIPTION="Enter Name Here"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_HINT="Name Here"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_LABEL="Name"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NEW="A New Admin Custom Tabs"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION="Permissions"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION_DESCRIPTION="control "
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION_LABEL="Permission"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_POSITION_DESCRIPTION="position of custom tab"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_POSITION_LABEL="Target"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PUBLISHING="Publishing"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Admin Custom Tabs to customise the alias."
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_STATUS="Status"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TAB="Tab"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS="Tabs"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS_DESCRIPTION="Set your custom tabs here in relation to your other tabs."
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS_LABEL="Tabs"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TAB_DESCRIPTION="Select the correct tab."
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TAB_LABEL="Admin Tabs"
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_VERSION_DESC="A count of the number of times this Admin Custom Tabs has been revised."
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_ADMIN_FIELDS="Admin Fields" COM_COMPONENTBUILDER_ADMIN_FIELDS="Admin Fields"
COM_COMPONENTBUILDER_ADMIN_FIELDS_ABOVE_TABS="Above Tabs" COM_COMPONENTBUILDER_ADMIN_FIELDS_ABOVE_TABS="Above Tabs"
COM_COMPONENTBUILDER_ADMIN_FIELDS_ACCESS="Access" COM_COMPONENTBUILDER_ADMIN_FIELDS_ACCESS="Access"
@ -307,8 +388,8 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_SORT_DESCRIPTION="Select if the field should b
COM_COMPONENTBUILDER_ADMIN_FIELDS_SORT_LABEL="Sortable" COM_COMPONENTBUILDER_ADMIN_FIELDS_SORT_LABEL="Sortable"
COM_COMPONENTBUILDER_ADMIN_FIELDS_STATUS="Status" COM_COMPONENTBUILDER_ADMIN_FIELDS_STATUS="Status"
COM_COMPONENTBUILDER_ADMIN_FIELDS_TAB="Tab" COM_COMPONENTBUILDER_ADMIN_FIELDS_TAB="Tab"
COM_COMPONENTBUILDER_ADMIN_FIELDS_TAB_DESCRIPTION="Select the tab this field belongs to." COM_COMPONENTBUILDER_ADMIN_FIELDS_TAB_DESCRIPTION="Select the correct tab."
COM_COMPONENTBUILDER_ADMIN_FIELDS_TAB_LABEL="Tab" COM_COMPONENTBUILDER_ADMIN_FIELDS_TAB_LABEL="Admin Tabs"
COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_DESCRIPTION="Select if the field is the title field." COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_DESCRIPTION="Select if the field is the title field."
COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_LABEL="Title" COM_COMPONENTBUILDER_ADMIN_FIELDS_TITLE_LABEL="Title"
COM_COMPONENTBUILDER_ADMIN_FIELDS_UNDERNEATH_TABS="Underneath Tabs" COM_COMPONENTBUILDER_ADMIN_FIELDS_UNDERNEATH_TABS="Underneath Tabs"
@ -718,6 +799,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION="<hr />
<div id='display_admin_fields_conditions'>Display of the fields conditions will load here!</div>" <div id='display_admin_fields_conditions'>Display of the fields conditions will load here!</div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION="<h5>Welcome to the new improved fields and conditions layout.</h5><div class='note_create_edit_notice_p'><p>We had to remove the repeatable fields layouts since Joomla has depreciated it. With this new improved layout we trust your experience will be better then ever before.</p><p>You can still <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=32m28s' target='_blank'>watch the tutorials</a>, and though it was made during the time repeatable fields were still being used, the various concepts and layouts still look mostly the same.</p></div>" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION="<h5>Welcome to the new improved fields and conditions layout.</h5><div class='note_create_edit_notice_p'><p>We had to remove the repeatable fields layouts since Joomla has depreciated it. With this new improved layout we trust your experience will be better then ever before.</p><p>You can still <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=32m28s' target='_blank'>watch the tutorials</a>, and though it was made during the time repeatable fields were still being used, the various concepts and layouts still look mostly the same.</p></div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL="Fields &amp; Conditions" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL="Fields &amp; Conditions"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CUSTOM_TABS_NOTE_DESCRIPTION="You can add more custom tabs to this admin view, these tabs are generally used for static HTML content or Ajax generated fields/content. You can not have an admin view with only custom tabs, they can only be used as an add-on, not a stand alone."
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_DESCRIPTION="<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_DESCRIPTION="<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_LABEL="Linked To" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_LINKED_TO_NOTICE_LABEL="Linked To"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION="You can link other views that has relationship with this view. Please watch this <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=22m20s' target='_blank'>tutorial</a> for more info. " COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION="You can link other views that has relationship with this view. Please watch this <a href='https://youtu.be/CdSKSCTzmRA?list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=22m20s' target='_blank'>tutorial</a> for more info. "
@ -6601,6 +6683,7 @@ COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>." COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on <a %s >gitHub</a> and can be imported by simply making a selection and then clicking the <b>[Get Package]</b> button.<br />Some of these packages would require a key, since they are not free. <a %s >Get a key today!</a>."
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED="These options are not available to the field if <b>None DB</b> option is selected." COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_NOT_AVAILABLE_TO_THE_FIELD_IF_BNONE_DBB_OPTION_IS_SELECTED="These options are not available to the field if <b>None DB</b> option is selected."
COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED="These options are only available to the field if <b>Show in list view</b> option is selected." COM_COMPONENTBUILDER_THESE_OPTIONS_ARE_ONLY_AVAILABLE_TO_THE_FIELD_IF_BSHOW_IN_LIST_VIEWB_OPTION_IS_SELECTED="These options are only available to the field if <b>Show in list view</b> option is selected."
COM_COMPONENTBUILDER_THE_ADMIN_CUSTOM_TABS="The admin custom tabs"
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS="The admin fields" COM_COMPONENTBUILDER_THE_ADMIN_FIELDS="The admin fields"
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS="The admin fields conditions" COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS="The admin fields conditions"
COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_RELATIONS="The admin fields relations" COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_RELATIONS="The admin fields relations"

View File

@ -1,4 +1,24 @@
COM_COMPONENTBUILDER="Component Builder" COM_COMPONENTBUILDER="Component Builder"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_ACCESS="Admins Custom Tabs Access"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_ACCESS_DESC="Allows the users in this group to access access admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_BATCH_USE="Admins Custom Tabs Batch Use"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_CREATE="Admins Custom Tabs Create"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_CREATE_DESC="Allows the users in this group to create create admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_DELETE="Admins Custom Tabs Delete"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_DELETE_DESC="Allows the users in this group to delete delete admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT="Admins Custom Tabs Edit"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_BY="Admins Custom Tabs Edit Created By"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_DATE="Admins Custom Tabs Edit Created Date"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_DESC="Allows the users in this group to edit the admin custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_OWN="Admins Custom Tabs Edit Own"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_OWN_DESC="Allows the users in this group to edit edit own admins custom tabs created by them"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_STATE="Admins Custom Tabs Edit State"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_STATE_DESC="Allows the users in this group to update the state of the admin custom tabs"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_VERSION="Admins Custom Tabs Edit Version"
COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version admins custom tabs"
COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS="Admins Fields Access" COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS="Admins Fields Access"
COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS_DESC="Allows the users in this group to access access admins fields" COM_COMPONENTBUILDER_ADMINS_FIELDS_ACCESS_DESC="Allows the users in this group to access access admins fields"
COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_USE="Admins Fields Batch Use" COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_USE="Admins Fields Batch Use"

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,43 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'created',
'created_by',
'modified',
'modified_by'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,45 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'published',
'ordering',
'access',
'version',
'hits',
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,26 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = array(
'admin_view'
);
?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field){
echo $form->renderField($field);
} ?>
</div>

View File

@ -0,0 +1,33 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'tabs'
);
?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<div class="control-group">
<div class="control-label">
<?php echo $form->getLabel($field); ?>
</div>
<div class="controls">
<?php echo $form->getInput($field); ?>
</div>
</div>
<?php endforeach; ?>
</div>

View File

@ -19,6 +19,7 @@ $fields = $displayData->get('fields') ?: array(
'addpermissions', 'addpermissions',
'note_on_tabs', 'note_on_tabs',
'addtabs', 'addtabs',
'note_custom_tabs_note',
'note_on_linked_views', 'note_on_linked_views',
'addlinked_views' 'addlinked_views'
); );

View File

@ -0,0 +1,864 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
/**
* Componentbuilder Admin_custom_tabs Model
*/
class ComponentbuilderModelAdmin_custom_tabs extends JModelAdmin
{
/**
* @var string The prefix to use with controller messages.
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER';
/**
* The type alias for this content type.
*
* @var string
* @since 3.2
*/
public $typeAlias = 'com_componentbuilder.admin_custom_tabs';
/**
* Returns a Table object, always creating it
*
* @param type $type The table type to instantiate
* @param string $prefix A prefix for the table class name. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JTable A database object
*
* @since 1.6
*/
public function getTable($type = 'admin_custom_tabs', $prefix = 'ComponentbuilderTable', $config = array())
{
// add table path for when model gets used from other component
$this->addTablePath(JPATH_ADMINISTRATOR . '/components/com_componentbuilder/tables');
// get instance of the table
return JTable::getInstance($type, $prefix, $config);
}
/**
* Method to get a single record.
*
* @param integer $pk The id of the primary key.
*
* @return mixed Object on success, false on failure.
*
* @since 1.6
*/
public function getItem($pk = null)
{
if ($item = parent::getItem($pk))
{
if (!empty($item->params) && !is_array($item->params))
{
// Convert the params field to an array.
$registry = new Registry;
$registry->loadString($item->params);
$item->params = $registry->toArray();
}
if (!empty($item->metadata))
{
// Convert the metadata field to an array.
$registry = new Registry;
$registry->loadString($item->metadata);
$item->metadata = $registry->toArray();
}
if (!empty($item->tabs))
{
// Convert the tabs field to an array.
$tabs = new Registry;
$tabs->loadString($item->tabs);
$item->tabs = $tabs->toArray();
}
if (!empty($item->id))
{
$item->tags = new JHelperTags;
$item->tags->getTagIds($item->id, 'com_componentbuilder.admin_custom_tabs');
}
}
return $item;
}
/**
* Method to get the record form.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
* @param array $options Optional array of options for the form creation.
*
* @return mixed A JForm object on success, false on failure
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true, $options = array('control' => 'jform'))
{
// set load data option
$options['load_data'] = $loadData;
// Get the form.
$form = $this->loadForm('com_componentbuilder.admin_custom_tabs', 'admin_custom_tabs', $options);
if (empty($form))
{
return false;
}
$jinput = JFactory::getApplication()->input;
// The front end calls this model and uses a_id to avoid id clashes so we need to check for that first.
if ($jinput->get('a_id'))
{
$id = $jinput->get('a_id', 0, 'INT');
}
// The back end uses id so we use that the rest of the time and set it to 0 by default.
else
{
$id = $jinput->get('id', 0, 'INT');
}
$user = JFactory::getUser();
// Check for existing item.
// Modify the form based on Edit State access controls.
if ($id != 0 && (!$user->authorise('admin_custom_tabs.edit.state', 'com_componentbuilder.admin_custom_tabs.' . (int) $id))
|| ($id == 0 && !$user->authorise('admin_custom_tabs.edit.state', 'com_componentbuilder')))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
$form->setFieldAttribute('published', 'disabled', 'true');
// Disable fields while saving.
$form->setFieldAttribute('ordering', 'filter', 'unset');
$form->setFieldAttribute('published', 'filter', 'unset');
}
// If this is a new item insure the greated by is set.
if (0 == $id)
{
// Set the created_by to this user
$form->setValue('created_by', null, $user->id);
}
// Modify the form based on Edit Creaded By access controls.
if ($id != 0 && (!$user->authorise('admin_custom_tabs.edit.created_by', 'com_componentbuilder.admin_custom_tabs.' . (int) $id))
|| ($id == 0 && !$user->authorise('admin_custom_tabs.edit.created_by', 'com_componentbuilder')))
{
// Disable fields for display.
$form->setFieldAttribute('created_by', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('created_by', 'readonly', 'true');
// Disable fields while saving.
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
// Modify the form based on Edit Creaded Date access controls.
if ($id != 0 && (!$user->authorise('admin_custom_tabs.edit.created', 'com_componentbuilder.admin_custom_tabs.' . (int) $id))
|| ($id == 0 && !$user->authorise('admin_custom_tabs.edit.created', 'com_componentbuilder')))
{
// Disable fields for display.
$form->setFieldAttribute('created', 'disabled', 'true');
// Disable fields while saving.
$form->setFieldAttribute('created', 'filter', 'unset');
}
// Only load these values if no id is found
if (0 == $id)
{
// Set redirected view name
$redirectedView = $jinput->get('ref', null, 'STRING');
// Set field name (or fall back to view name)
$redirectedField = $jinput->get('field', $redirectedView, 'STRING');
// Set redirected view id
$redirectedId = $jinput->get('refid', 0, 'INT');
// Set field id (or fall back to redirected view id)
$redirectedValue = $jinput->get('field_id', $redirectedId, 'INT');
if (0 != $redirectedValue && $redirectedField)
{
// Now set the local-redirected field default value
$form->setValue($redirectedField, null, $redirectedValue);
}
}
return $form;
}
/**
* Method to get the script that have to be included on the form
*
* @return string script files
*/
public function getScript()
{
return 'administrator/components/com_componentbuilder/models/forms/admin_custom_tabs.js';
}
/**
* Method to test whether a record can be deleted.
*
* @param object $record A record object.
*
* @return boolean True if allowed to delete the record. Defaults to the permission set in the component.
*
* @since 1.6
*/
protected function canDelete($record)
{
if (!empty($record->id))
{
if ($record->published != -2)
{
return;
}
$user = JFactory::getUser();
// The record has been set. Check the record permissions.
return $user->authorise('admin_custom_tabs.delete', 'com_componentbuilder.admin_custom_tabs.' . (int) $record->id);
}
return false;
}
/**
* Method to test whether a record can have its state edited.
*
* @param object $record A record object.
*
* @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
*
* @since 1.6
*/
protected function canEditState($record)
{
$user = JFactory::getUser();
$recordId = (!empty($record->id)) ? $record->id : 0;
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('admin_custom_tabs.edit.state', 'com_componentbuilder.admin_custom_tabs.' . (int) $recordId);
if (!$permission && !is_null($permission))
{
return false;
}
}
// In the absense of better information, revert to the component permissions.
return $user->authorise('admin_custom_tabs.edit.state', 'com_componentbuilder');
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
* @since 2.5
*/
protected function allowEdit($data = array(), $key = 'id')
{
// Check specific edit permission then general edit permission.
$user = JFactory::getUser();
return $user->authorise('admin_custom_tabs.edit', 'com_componentbuilder.admin_custom_tabs.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or $user->authorise('admin_custom_tabs.edit', 'com_componentbuilder');
}
/**
* Prepare and sanitise the table data prior to saving.
*
* @param JTable $table A JTable object.
*
* @return void
*
* @since 1.6
*/
protected function prepareTable($table)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
if (isset($table->name))
{
$table->name = htmlspecialchars_decode($table->name, ENT_QUOTES);
}
if (isset($table->alias) && empty($table->alias))
{
$table->generateAlias();
}
if (empty($table->id))
{
$table->created = $date->toSql();
// set the user
if ($table->created_by == 0 || empty($table->created_by))
{
$table->created_by = $user->id;
}
// Set ordering to the last item if not set
if (empty($table->ordering))
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('MAX(ordering)')
->from($db->quoteName('#__componentbuilder_admin_custom_tabs'));
$db->setQuery($query);
$max = $db->loadResult();
$table->ordering = $max + 1;
}
}
else
{
$table->modified = $date->toSql();
$table->modified_by = $user->id;
}
if (!empty($table->id))
{
// Increment the items version number.
$table->version++;
}
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
*
* @since 1.6
*/
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = JFactory::getApplication()->getUserState('com_componentbuilder.edit.admin_custom_tabs.data', array());
if (empty($data))
{
$data = $this->getItem();
}
return $data;
}
/**
* Method to get the unique fields of this table.
*
* @return mixed An array of field names, boolean false if none is set.
*
* @since 3.0
*/
protected function getUniqeFields()
{
return false;
}
/**
* Method to delete one or more records.
*
* @param array &$pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
* @since 12.2
*/
public function delete(&$pks)
{
if (!parent::delete($pks))
{
return false;
}
return true;
}
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
*
* @since 12.2
*/
public function publish(&$pks, $value = 1)
{
if (!parent::publish($pks, $value))
{
return false;
}
return true;
}
/**
* Method to perform batch operations on an item or a set of items.
*
* @param array $commands An array of commands to perform.
* @param array $pks An array of item ids.
* @param array $contexts An array of item contexts.
*
* @return boolean Returns true on success, false on failure.
*
* @since 12.2
*/
public function batch($commands, $pks, $contexts)
{
// Sanitize ids.
$pks = array_unique($pks);
JArrayHelper::toInteger($pks);
// Remove any values of zero.
if (array_search(0, $pks, true))
{
unset($pks[array_search(0, $pks, true)]);
}
if (empty($pks))
{
$this->setError(JText::_('JGLOBAL_NO_ITEM_SELECTED'));
return false;
}
$done = false;
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->contentType = new JUcmType;
$this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('admin_custom_tabs');
$this->batchSet = true;
if (!$this->canDo->get('core.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
if ($this->type == false)
{
$type = new JUcmType;
$this->type = $type->getTypeByAlias($this->typeAlias);
}
$this->tagsObserver = $this->table->getObserverOfClass('JTableObserverTags');
if (!empty($commands['move_copy']))
{
$cmd = JArrayHelper::getValue($commands, 'move_copy', 'c');
if ($cmd == 'c')
{
$result = $this->batchCopy($commands, $pks, $contexts);
if (is_array($result))
{
foreach ($result as $old => $new)
{
$contexts[$new] = $contexts[$old];
}
$pks = array_values($result);
}
else
{
return false;
}
}
elseif ($cmd == 'm' && !$this->batchMove($commands, $pks, $contexts))
{
return false;
}
$done = true;
}
if (!$done)
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
// Clear the cache
$this->cleanCache();
return true;
}
/**
* Batch copy items to a new category or current.
*
* @param integer $values The new values.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return mixed An array of new IDs on success, boolean false on failure.
*
* @since 12.2
*/
protected function batchCopy($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->canDo = ComponentbuilderHelper::getActions('admin_custom_tabs');
}
if (!$this->canDo->get('admin_custom_tabs.create') && !$this->canDo->get('admin_custom_tabs.batch'))
{
return false;
}
// get list of uniqe fields
$uniqeFields = $this->getUniqeFields();
// remove move_copy from array
unset($values['move_copy']);
// make sure published is set
if (!isset($values['published']))
{
$values['published'] = 0;
}
elseif (isset($values['published']) && !$this->canDo->get('admin_custom_tabs.edit.state'))
{
$values['published'] = 0;
}
$newIds = array();
// Parent exists so let's proceed
while (!empty($pks))
{
// Pop the first ID off the stack
$pk = array_shift($pks);
$this->table->reset();
// only allow copy if user may edit this item.
if (!$this->user->authorise('admin_custom_tabs.edit', $contexts[$pk]))
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
// Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// Only for strings
if (ComponentbuilderHelper::checkString($this->table->admin_view) && !is_numeric($this->table->admin_view))
{
$this->table->admin_view = $this->generateUniqe('admin_view',$this->table->admin_view);
}
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
if (strlen($value) > 0 && isset($this->table->$key))
{
$this->table->$key = $value;
}
}
}
// update all uniqe fields
if (ComponentbuilderHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
{
$this->table->$uniqeField = $this->generateUniqe($uniqeField,$this->table->$uniqeField);
}
}
// Reset the ID because we are making a copy
$this->table->id = 0;
// TODO: Deal with ordering?
// $this->table->ordering = 1;
// Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
return false;
}
if (!empty($this->type))
{
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
return false;
}
// Get the new item ID
$newId = $this->table->get('id');
// Add the new ID to the array
$newIds[$pk] = $newId;
}
// Clean the cache
$this->cleanCache();
return $newIds;
}
/**
* Batch move items to a new category
*
* @param integer $value The new category ID.
* @param array $pks An array of row IDs.
* @param array $contexts An array of item contexts.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 12.2
*/
protected function batchMove($values, $pks, $contexts)
{
if (empty($this->batchSet))
{
// Set some needed variables.
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
$this->canDo = ComponentbuilderHelper::getActions('admin_custom_tabs');
}
if (!$this->canDo->get('admin_custom_tabs.edit') && !$this->canDo->get('admin_custom_tabs.batch'))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// make sure published only updates if user has the permission.
if (isset($values['published']) && !$this->canDo->get('admin_custom_tabs.edit.state'))
{
unset($values['published']);
}
// remove move_copy from array
unset($values['move_copy']);
// Parent exists so we proceed
foreach ($pks as $pk)
{
if (!$this->user->authorise('admin_custom_tabs.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
return false;
}
// Check that the row actually exists
if (!$this->table->load($pk))
{
if ($error = $this->table->getError())
{
// Fatal error
$this->setError($error);
return false;
}
else
{
// Not fatal error
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
continue;
}
}
// insert all set values.
if (ComponentbuilderHelper::checkArray($values))
{
foreach ($values as $key => $value)
{
// Do special action for access.
if ('access' === $key && strlen($value) > 0)
{
$this->table->$key = $value;
}
elseif (strlen($value) > 0 && isset($this->table->$key))
{
$this->table->$key = $value;
}
}
}
// Check the row.
if (!$this->table->check())
{
$this->setError($this->table->getError());
return false;
}
if (!empty($this->type))
{
$this->createTagsHelper($this->tagsObserver, $this->type, $pk, $this->typeAlias, $this->table);
}
// Store the row.
if (!$this->table->store())
{
$this->setError($this->table->getError());
return false;
}
}
// Clean the cache
$this->cleanCache();
return true;
}
/**
* Method to save the form data.
*
* @param array $data The form data.
*
* @return boolean True on success.
*
* @since 1.6
*/
public function save($data)
{
$input = JFactory::getApplication()->input;
$filter = JFilterInput::getInstance();
// set the metadata to the Item Data
if (isset($data['metadata']) && isset($data['metadata']['author']))
{
$data['metadata']['author'] = $filter->clean($data['metadata']['author'], 'TRIM');
$metadata = new JRegistry;
$metadata->loadArray($data['metadata']);
$data['metadata'] = (string) $metadata;
}
// Set the tabs items to data.
if (isset($data['tabs']) && is_array($data['tabs']))
{
$tabs = new JRegistry;
$tabs->loadArray($data['tabs']);
$data['tabs'] = (string) $tabs;
}
elseif (!isset($data['tabs']))
{
// Set the empty tabs to data
$data['tabs'] = '';
}
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))
{
$params = new JRegistry;
$params->loadArray($data['params']);
$data['params'] = (string) $params;
}
// Alter the uniqe field for save as copy
if ($input->get('task') === 'save2copy')
{
// Automatic handling of other uniqe fields
$uniqeFields = $this->getUniqeFields();
if (ComponentbuilderHelper::checkArray($uniqeFields))
{
foreach ($uniqeFields as $uniqeField)
{
$data[$uniqeField] = $this->generateUniqe($uniqeField,$data[$uniqeField]);
}
}
}
if (parent::save($data))
{
return true;
}
return false;
}
/**
* Method to generate a uniqe value.
*
* @param string $field name.
* @param string $value data.
*
* @return string New value.
*
* @since 3.0
*/
protected function generateUniqe($field,$value)
{
// set field value uniqe
$table = $this->getTable();
while ($table->load(array($field => $value)))
{
$value = JString::increment($value);
}
return $value;
}
/**
* Method to change the title
*
* @param string $title The title.
*
* @return array Contains the modified title and alias.
*
*/
protected function _generateNewTitle($title)
{
// Alter the title
$table = $this->getTable();
while ($table->load(array('title' => $title)))
{
$title = JString::increment($title);
}
return $title;
}
}

View File

@ -86,6 +86,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->metadata = $registry->toArray(); $item->metadata = $registry->toArray();
} }
if (!empty($item->php_import_headers))
{
// base64 Decode php_import_headers.
$item->php_import_headers = base64_decode($item->php_import_headers);
}
if (!empty($item->html_import_view)) if (!empty($item->html_import_view))
{ {
// base64 Decode html_import_view. // base64 Decode html_import_view.
@ -98,10 +104,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_import_save = base64_decode($item->php_import_save); $item->php_import_save = base64_decode($item->php_import_save);
} }
if (!empty($item->php_import_headers)) if (!empty($item->php_getitem))
{ {
// base64 Decode php_import_headers. // base64 Decode php_getitem.
$item->php_import_headers = base64_decode($item->php_import_headers); $item->php_getitem = base64_decode($item->php_getitem);
} }
if (!empty($item->php_getitems)) if (!empty($item->php_getitems))
@ -116,108 +122,108 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
} }
if (!empty($item->css_view))
{
// base64 Decode css_view.
$item->css_view = base64_decode($item->css_view);
}
if (!empty($item->php_getlistquery)) if (!empty($item->php_getlistquery))
{ {
// base64 Decode php_getlistquery. // base64 Decode php_getlistquery.
$item->php_getlistquery = base64_decode($item->php_getlistquery); $item->php_getlistquery = base64_decode($item->php_getlistquery);
} }
if (!empty($item->css_view))
{
// base64 Decode css_view.
$item->css_view = base64_decode($item->css_view);
}
if (!empty($item->php_getform)) if (!empty($item->php_getform))
{ {
// base64 Decode php_getform. // base64 Decode php_getform.
$item->php_getform = base64_decode($item->php_getform); $item->php_getform = base64_decode($item->php_getform);
} }
if (!empty($item->css_views))
{
// base64 Decode css_views.
$item->css_views = base64_decode($item->css_views);
}
if (!empty($item->php_before_save)) if (!empty($item->php_before_save))
{ {
// base64 Decode php_before_save. // base64 Decode php_before_save.
$item->php_before_save = base64_decode($item->php_before_save); $item->php_before_save = base64_decode($item->php_before_save);
} }
if (!empty($item->css_views))
{
// base64 Decode css_views.
$item->css_views = base64_decode($item->css_views);
}
if (!empty($item->php_save)) if (!empty($item->php_save))
{ {
// base64 Decode php_save. // base64 Decode php_save.
$item->php_save = base64_decode($item->php_save); $item->php_save = base64_decode($item->php_save);
} }
if (!empty($item->javascript_view_file))
{
// base64 Decode javascript_view_file.
$item->javascript_view_file = base64_decode($item->javascript_view_file);
}
if (!empty($item->php_postsavehook)) if (!empty($item->php_postsavehook))
{ {
// base64 Decode php_postsavehook. // base64 Decode php_postsavehook.
$item->php_postsavehook = base64_decode($item->php_postsavehook); $item->php_postsavehook = base64_decode($item->php_postsavehook);
} }
if (!empty($item->javascript_view_file))
{
// base64 Decode javascript_view_file.
$item->javascript_view_file = base64_decode($item->javascript_view_file);
}
if (!empty($item->php_allowadd)) if (!empty($item->php_allowadd))
{ {
// base64 Decode php_allowadd. // base64 Decode php_allowadd.
$item->php_allowadd = base64_decode($item->php_allowadd); $item->php_allowadd = base64_decode($item->php_allowadd);
} }
if (!empty($item->javascript_view_footer))
{
// base64 Decode javascript_view_footer.
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
}
if (!empty($item->php_allowedit)) if (!empty($item->php_allowedit))
{ {
// base64 Decode php_allowedit. // base64 Decode php_allowedit.
$item->php_allowedit = base64_decode($item->php_allowedit); $item->php_allowedit = base64_decode($item->php_allowedit);
} }
if (!empty($item->javascript_view_footer))
{
// base64 Decode javascript_view_footer.
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
}
if (!empty($item->php_batchcopy)) if (!empty($item->php_batchcopy))
{ {
// base64 Decode php_batchcopy. // base64 Decode php_batchcopy.
$item->php_batchcopy = base64_decode($item->php_batchcopy); $item->php_batchcopy = base64_decode($item->php_batchcopy);
} }
if (!empty($item->javascript_views_file))
{
// base64 Decode javascript_views_file.
$item->javascript_views_file = base64_decode($item->javascript_views_file);
}
if (!empty($item->php_batchmove)) if (!empty($item->php_batchmove))
{ {
// base64 Decode php_batchmove. // base64 Decode php_batchmove.
$item->php_batchmove = base64_decode($item->php_batchmove); $item->php_batchmove = base64_decode($item->php_batchmove);
} }
if (!empty($item->javascript_views_file))
{
// base64 Decode javascript_views_file.
$item->javascript_views_file = base64_decode($item->javascript_views_file);
}
if (!empty($item->php_before_publish)) if (!empty($item->php_before_publish))
{ {
// base64 Decode php_before_publish. // base64 Decode php_before_publish.
$item->php_before_publish = base64_decode($item->php_before_publish); $item->php_before_publish = base64_decode($item->php_before_publish);
} }
if (!empty($item->javascript_views_footer))
{
// base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
}
if (!empty($item->php_after_publish)) if (!empty($item->php_after_publish))
{ {
// base64 Decode php_after_publish. // base64 Decode php_after_publish.
$item->php_after_publish = base64_decode($item->php_after_publish); $item->php_after_publish = base64_decode($item->php_after_publish);
} }
if (!empty($item->javascript_views_footer))
{
// base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
}
if (!empty($item->php_before_delete)) if (!empty($item->php_before_delete))
{ {
// base64 Decode php_before_delete. // base64 Decode php_before_delete.
@ -230,36 +236,36 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_after_delete = base64_decode($item->php_after_delete); $item->php_after_delete = base64_decode($item->php_after_delete);
} }
if (!empty($item->php_controller))
{
// base64 Decode php_controller.
$item->php_controller = base64_decode($item->php_controller);
}
if (!empty($item->php_document)) if (!empty($item->php_document))
{ {
// base64 Decode php_document. // base64 Decode php_document.
$item->php_document = base64_decode($item->php_document); $item->php_document = base64_decode($item->php_document);
} }
if (!empty($item->php_controller))
{
// base64 Decode php_controller.
$item->php_controller = base64_decode($item->php_controller);
}
if (!empty($item->php_model)) if (!empty($item->php_model))
{ {
// base64 Decode php_model. // base64 Decode php_model.
$item->php_model = base64_decode($item->php_model); $item->php_model = base64_decode($item->php_model);
} }
if (!empty($item->php_controller_list))
{
// base64 Decode php_controller_list.
$item->php_controller_list = base64_decode($item->php_controller_list);
}
if (!empty($item->sql)) if (!empty($item->sql))
{ {
// base64 Decode sql. // base64 Decode sql.
$item->sql = base64_decode($item->sql); $item->sql = base64_decode($item->sql);
} }
if (!empty($item->php_controller_list))
{
// base64 Decode php_controller_list.
$item->php_controller_list = base64_decode($item->php_controller_list);
}
if (!empty($item->php_model_list)) if (!empty($item->php_model_list))
{ {
// base64 Decode php_model_list. // base64 Decode php_model_list.
@ -272,18 +278,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_import_display = base64_decode($item->php_import_display); $item->php_import_display = base64_decode($item->php_import_display);
} }
if (!empty($item->php_ajaxmethod))
{
// base64 Decode php_ajaxmethod.
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
}
if (!empty($item->php_import)) if (!empty($item->php_import))
{ {
// base64 Decode php_import. // base64 Decode php_import.
$item->php_import = base64_decode($item->php_import); $item->php_import = base64_decode($item->php_import);
} }
if (!empty($item->php_ajaxmethod))
{
// base64 Decode php_ajaxmethod.
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
}
if (!empty($item->php_import_setdata)) if (!empty($item->php_import_setdata))
{ {
// base64 Decode php_import_setdata. // base64 Decode php_import_setdata.
@ -296,10 +302,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->php_import_ext = base64_decode($item->php_import_ext); $item->php_import_ext = base64_decode($item->php_import_ext);
} }
if (!empty($item->php_getitem)) if (!empty($item->addtables))
{ {
// base64 Decode php_getitem. // Convert the addtables field to an array.
$item->php_getitem = base64_decode($item->php_getitem); $addtables = new Registry;
$addtables->loadString($item->addtables);
$item->addtables = $addtables->toArray();
} }
if (!empty($item->addpermissions)) if (!empty($item->addpermissions))
@ -326,14 +334,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$item->addlinked_views = $addlinked_views->toArray(); $item->addlinked_views = $addlinked_views->toArray();
} }
if (!empty($item->addtables))
{
// Convert the addtables field to an array.
$addtables = new Registry;
$addtables->loadString($item->addtables);
$item->addtables = $addtables->toArray();
}
if (!empty($item->alias_builder)) if (!empty($item->alias_builder))
{ {
// Convert the alias_builder field to an array. // Convert the alias_builder field to an array.
@ -1220,6 +1220,19 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['system_name'] = $data['name_single']; $data['system_name'] = $data['name_single'];
} }
// Set the addtables items to data.
if (isset($data['addtables']) && is_array($data['addtables']))
{
$addtables = new JRegistry;
$addtables->loadArray($data['addtables']);
$data['addtables'] = (string) $addtables;
}
elseif (!isset($data['addtables']))
{
// Set the empty addtables to data
$data['addtables'] = '';
}
// Set the addpermissions items to data. // Set the addpermissions items to data.
if (isset($data['addpermissions']) && is_array($data['addpermissions'])) if (isset($data['addpermissions']) && is_array($data['addpermissions']))
{ {
@ -1259,19 +1272,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['addlinked_views'] = ''; $data['addlinked_views'] = '';
} }
// Set the addtables items to data.
if (isset($data['addtables']) && is_array($data['addtables']))
{
$addtables = new JRegistry;
$addtables->loadArray($data['addtables']);
$data['addtables'] = (string) $addtables;
}
elseif (!isset($data['addtables']))
{
// Set the empty addtables to data
$data['addtables'] = '';
}
// Set the alias_builder items to data. // Set the alias_builder items to data.
if (isset($data['alias_builder']) && is_array($data['alias_builder'])) if (isset($data['alias_builder']) && is_array($data['alias_builder']))
{ {
@ -1311,6 +1311,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['ajax_input'] = ''; $data['ajax_input'] = '';
} }
// Set the php_import_headers string to base64 string.
if (isset($data['php_import_headers']))
{
$data['php_import_headers'] = base64_encode($data['php_import_headers']);
}
// Set the html_import_view string to base64 string. // Set the html_import_view string to base64 string.
if (isset($data['html_import_view'])) if (isset($data['html_import_view']))
{ {
@ -1323,10 +1329,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_import_save'] = base64_encode($data['php_import_save']); $data['php_import_save'] = base64_encode($data['php_import_save']);
} }
// Set the php_import_headers string to base64 string. // Set the php_getitem string to base64 string.
if (isset($data['php_import_headers'])) if (isset($data['php_getitem']))
{ {
$data['php_import_headers'] = base64_encode($data['php_import_headers']); $data['php_getitem'] = base64_encode($data['php_getitem']);
} }
// Set the php_getitems string to base64 string. // Set the php_getitems string to base64 string.
@ -1341,108 +1347,108 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']); $data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']);
} }
// Set the css_view string to base64 string.
if (isset($data['css_view']))
{
$data['css_view'] = base64_encode($data['css_view']);
}
// Set the php_getlistquery string to base64 string. // Set the php_getlistquery string to base64 string.
if (isset($data['php_getlistquery'])) if (isset($data['php_getlistquery']))
{ {
$data['php_getlistquery'] = base64_encode($data['php_getlistquery']); $data['php_getlistquery'] = base64_encode($data['php_getlistquery']);
} }
// Set the css_view string to base64 string.
if (isset($data['css_view']))
{
$data['css_view'] = base64_encode($data['css_view']);
}
// Set the php_getform string to base64 string. // Set the php_getform string to base64 string.
if (isset($data['php_getform'])) if (isset($data['php_getform']))
{ {
$data['php_getform'] = base64_encode($data['php_getform']); $data['php_getform'] = base64_encode($data['php_getform']);
} }
// Set the css_views string to base64 string.
if (isset($data['css_views']))
{
$data['css_views'] = base64_encode($data['css_views']);
}
// Set the php_before_save string to base64 string. // Set the php_before_save string to base64 string.
if (isset($data['php_before_save'])) if (isset($data['php_before_save']))
{ {
$data['php_before_save'] = base64_encode($data['php_before_save']); $data['php_before_save'] = base64_encode($data['php_before_save']);
} }
// Set the css_views string to base64 string.
if (isset($data['css_views']))
{
$data['css_views'] = base64_encode($data['css_views']);
}
// Set the php_save string to base64 string. // Set the php_save string to base64 string.
if (isset($data['php_save'])) if (isset($data['php_save']))
{ {
$data['php_save'] = base64_encode($data['php_save']); $data['php_save'] = base64_encode($data['php_save']);
} }
// Set the javascript_view_file string to base64 string.
if (isset($data['javascript_view_file']))
{
$data['javascript_view_file'] = base64_encode($data['javascript_view_file']);
}
// Set the php_postsavehook string to base64 string. // Set the php_postsavehook string to base64 string.
if (isset($data['php_postsavehook'])) if (isset($data['php_postsavehook']))
{ {
$data['php_postsavehook'] = base64_encode($data['php_postsavehook']); $data['php_postsavehook'] = base64_encode($data['php_postsavehook']);
} }
// Set the javascript_view_file string to base64 string.
if (isset($data['javascript_view_file']))
{
$data['javascript_view_file'] = base64_encode($data['javascript_view_file']);
}
// Set the php_allowadd string to base64 string. // Set the php_allowadd string to base64 string.
if (isset($data['php_allowadd'])) if (isset($data['php_allowadd']))
{ {
$data['php_allowadd'] = base64_encode($data['php_allowadd']); $data['php_allowadd'] = base64_encode($data['php_allowadd']);
} }
// Set the javascript_view_footer string to base64 string.
if (isset($data['javascript_view_footer']))
{
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
}
// Set the php_allowedit string to base64 string. // Set the php_allowedit string to base64 string.
if (isset($data['php_allowedit'])) if (isset($data['php_allowedit']))
{ {
$data['php_allowedit'] = base64_encode($data['php_allowedit']); $data['php_allowedit'] = base64_encode($data['php_allowedit']);
} }
// Set the javascript_view_footer string to base64 string.
if (isset($data['javascript_view_footer']))
{
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
}
// Set the php_batchcopy string to base64 string. // Set the php_batchcopy string to base64 string.
if (isset($data['php_batchcopy'])) if (isset($data['php_batchcopy']))
{ {
$data['php_batchcopy'] = base64_encode($data['php_batchcopy']); $data['php_batchcopy'] = base64_encode($data['php_batchcopy']);
} }
// Set the javascript_views_file string to base64 string.
if (isset($data['javascript_views_file']))
{
$data['javascript_views_file'] = base64_encode($data['javascript_views_file']);
}
// Set the php_batchmove string to base64 string. // Set the php_batchmove string to base64 string.
if (isset($data['php_batchmove'])) if (isset($data['php_batchmove']))
{ {
$data['php_batchmove'] = base64_encode($data['php_batchmove']); $data['php_batchmove'] = base64_encode($data['php_batchmove']);
} }
// Set the javascript_views_file string to base64 string.
if (isset($data['javascript_views_file']))
{
$data['javascript_views_file'] = base64_encode($data['javascript_views_file']);
}
// Set the php_before_publish string to base64 string. // Set the php_before_publish string to base64 string.
if (isset($data['php_before_publish'])) if (isset($data['php_before_publish']))
{ {
$data['php_before_publish'] = base64_encode($data['php_before_publish']); $data['php_before_publish'] = base64_encode($data['php_before_publish']);
} }
// Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer']))
{
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
}
// Set the php_after_publish string to base64 string. // Set the php_after_publish string to base64 string.
if (isset($data['php_after_publish'])) if (isset($data['php_after_publish']))
{ {
$data['php_after_publish'] = base64_encode($data['php_after_publish']); $data['php_after_publish'] = base64_encode($data['php_after_publish']);
} }
// Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer']))
{
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
}
// Set the php_before_delete string to base64 string. // Set the php_before_delete string to base64 string.
if (isset($data['php_before_delete'])) if (isset($data['php_before_delete']))
{ {
@ -1455,36 +1461,36 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_after_delete'] = base64_encode($data['php_after_delete']); $data['php_after_delete'] = base64_encode($data['php_after_delete']);
} }
// Set the php_controller string to base64 string.
if (isset($data['php_controller']))
{
$data['php_controller'] = base64_encode($data['php_controller']);
}
// Set the php_document string to base64 string. // Set the php_document string to base64 string.
if (isset($data['php_document'])) if (isset($data['php_document']))
{ {
$data['php_document'] = base64_encode($data['php_document']); $data['php_document'] = base64_encode($data['php_document']);
} }
// Set the php_controller string to base64 string.
if (isset($data['php_controller']))
{
$data['php_controller'] = base64_encode($data['php_controller']);
}
// Set the php_model string to base64 string. // Set the php_model string to base64 string.
if (isset($data['php_model'])) if (isset($data['php_model']))
{ {
$data['php_model'] = base64_encode($data['php_model']); $data['php_model'] = base64_encode($data['php_model']);
} }
// Set the php_controller_list string to base64 string.
if (isset($data['php_controller_list']))
{
$data['php_controller_list'] = base64_encode($data['php_controller_list']);
}
// Set the sql string to base64 string. // Set the sql string to base64 string.
if (isset($data['sql'])) if (isset($data['sql']))
{ {
$data['sql'] = base64_encode($data['sql']); $data['sql'] = base64_encode($data['sql']);
} }
// Set the php_controller_list string to base64 string.
if (isset($data['php_controller_list']))
{
$data['php_controller_list'] = base64_encode($data['php_controller_list']);
}
// Set the php_model_list string to base64 string. // Set the php_model_list string to base64 string.
if (isset($data['php_model_list'])) if (isset($data['php_model_list']))
{ {
@ -1497,18 +1503,18 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_import_display'] = base64_encode($data['php_import_display']); $data['php_import_display'] = base64_encode($data['php_import_display']);
} }
// Set the php_ajaxmethod string to base64 string.
if (isset($data['php_ajaxmethod']))
{
$data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']);
}
// Set the php_import string to base64 string. // Set the php_import string to base64 string.
if (isset($data['php_import'])) if (isset($data['php_import']))
{ {
$data['php_import'] = base64_encode($data['php_import']); $data['php_import'] = base64_encode($data['php_import']);
} }
// Set the php_ajaxmethod string to base64 string.
if (isset($data['php_ajaxmethod']))
{
$data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']);
}
// Set the php_import_setdata string to base64 string. // Set the php_import_setdata string to base64 string.
if (isset($data['php_import_setdata'])) if (isset($data['php_import_setdata']))
{ {
@ -1521,12 +1527,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
$data['php_import_ext'] = base64_encode($data['php_import_ext']); $data['php_import_ext'] = base64_encode($data['php_import_ext']);
} }
// Set the php_getitem string to base64 string.
if (isset($data['php_getitem']))
{
$data['php_getitem'] = base64_encode($data['php_getitem']);
}
// Set the Params Items to data // Set the Params Items to data
if (isset($data['params']) && is_array($data['params'])) if (isset($data['params']) && is_array($data['params']))
{ {

View File

@ -31,8 +31,8 @@ class ComponentbuilderModelAdmin_views extends JModelList
'a.name_single','name_single', 'a.name_single','name_single',
'a.short_description','short_description', 'a.short_description','short_description',
'a.add_fadein','add_fadein', 'a.add_fadein','add_fadein',
'a.type','type',
'a.add_custom_import','add_custom_import', 'a.add_custom_import','add_custom_import',
'a.type','type',
'a.add_custom_button','add_custom_button', 'a.add_custom_button','add_custom_button',
'a.add_php_ajax','add_php_ajax' 'a.add_php_ajax','add_php_ajax'
); );
@ -67,12 +67,12 @@ class ComponentbuilderModelAdmin_views extends JModelList
$add_fadein = $this->getUserStateFromRequest($this->context . '.filter.add_fadein', 'filter_add_fadein'); $add_fadein = $this->getUserStateFromRequest($this->context . '.filter.add_fadein', 'filter_add_fadein');
$this->setState('filter.add_fadein', $add_fadein); $this->setState('filter.add_fadein', $add_fadein);
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
$this->setState('filter.type', $type);
$add_custom_import = $this->getUserStateFromRequest($this->context . '.filter.add_custom_import', 'filter_add_custom_import'); $add_custom_import = $this->getUserStateFromRequest($this->context . '.filter.add_custom_import', 'filter_add_custom_import');
$this->setState('filter.add_custom_import', $add_custom_import); $this->setState('filter.add_custom_import', $add_custom_import);
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
$this->setState('filter.type', $type);
$add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button'); $add_custom_button = $this->getUserStateFromRequest($this->context . '.filter.add_custom_button', 'filter_add_custom_button');
$this->setState('filter.add_custom_button', $add_custom_button); $this->setState('filter.add_custom_button', $add_custom_button);
@ -136,10 +136,10 @@ class ComponentbuilderModelAdmin_views extends JModelList
{ {
// convert add_fadein // convert add_fadein
$item->add_fadein = $this->selectionTranslation($item->add_fadein, 'add_fadein'); $item->add_fadein = $this->selectionTranslation($item->add_fadein, 'add_fadein');
// convert type
$item->type = $this->selectionTranslation($item->type, 'type');
// convert add_custom_import // convert add_custom_import
$item->add_custom_import = $this->selectionTranslation($item->add_custom_import, 'add_custom_import'); $item->add_custom_import = $this->selectionTranslation($item->add_custom_import, 'add_custom_import');
// convert type
$item->type = $this->selectionTranslation($item->type, 'type');
// convert add_custom_button // convert add_custom_button
$item->add_custom_button = $this->selectionTranslation($item->add_custom_button, 'add_custom_button'); $item->add_custom_button = $this->selectionTranslation($item->add_custom_button, 'add_custom_button');
// convert add_php_ajax // convert add_php_ajax
@ -172,19 +172,6 @@ class ComponentbuilderModelAdmin_views extends JModelList
return $add_fadeinArray[$value]; return $add_fadeinArray[$value];
} }
} }
// Array of type language strings
if ($name === 'type')
{
$typeArray = array(
1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE',
2 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY'
);
// Now check if value is found in this array
if (isset($typeArray[$value]) && ComponentbuilderHelper::checkString($typeArray[$value]))
{
return $typeArray[$value];
}
}
// Array of add_custom_import language strings // Array of add_custom_import language strings
if ($name === 'add_custom_import') if ($name === 'add_custom_import')
{ {
@ -198,6 +185,19 @@ class ComponentbuilderModelAdmin_views extends JModelList
return $add_custom_importArray[$value]; return $add_custom_importArray[$value];
} }
} }
// Array of type language strings
if ($name === 'type')
{
$typeArray = array(
1 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE',
2 => 'COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY'
);
// Now check if value is found in this array
if (isset($typeArray[$value]) && ComponentbuilderHelper::checkString($typeArray[$value]))
{
return $typeArray[$value];
}
}
// Array of add_custom_button language strings // Array of add_custom_button language strings
if ($name === 'add_custom_button') if ($name === 'add_custom_button')
{ {
@ -282,7 +282,7 @@ class ComponentbuilderModelAdmin_views extends JModelList
else else
{ {
$search = $db->quote('%' . $db->escape($search) . '%'); $search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.description LIKE '.$search.' OR a.type LIKE '.$search.' OR a.name_list LIKE '.$search.')'); $query->where('(a.system_name LIKE '.$search.' OR a.name_single LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.description LIKE '.$search.' OR a.name_list LIKE '.$search.' OR a.type LIKE '.$search.')');
} }
} }
@ -291,16 +291,16 @@ class ComponentbuilderModelAdmin_views extends JModelList
{ {
$query->where('a.add_fadein = ' . $db->quote($db->escape($add_fadein))); $query->where('a.add_fadein = ' . $db->quote($db->escape($add_fadein)));
} }
// Filter by Type.
if ($type = $this->getState('filter.type'))
{
$query->where('a.type = ' . $db->quote($db->escape($type)));
}
// Filter by Add_custom_import. // Filter by Add_custom_import.
if ($add_custom_import = $this->getState('filter.add_custom_import')) if ($add_custom_import = $this->getState('filter.add_custom_import'))
{ {
$query->where('a.add_custom_import = ' . $db->quote($db->escape($add_custom_import))); $query->where('a.add_custom_import = ' . $db->quote($db->escape($add_custom_import)));
} }
// Filter by Type.
if ($type = $this->getState('filter.type'))
{
$query->where('a.type = ' . $db->quote($db->escape($type)));
}
// Filter by Add_custom_button. // Filter by Add_custom_button.
if ($add_custom_button = $this->getState('filter.add_custom_button')) if ($add_custom_button = $this->getState('filter.add_custom_button'))
{ {
@ -376,78 +376,78 @@ class ComponentbuilderModelAdmin_views extends JModelList
continue; continue;
} }
// decode php_import_headers
$item->php_import_headers = base64_decode($item->php_import_headers);
// decode html_import_view // decode html_import_view
$item->html_import_view = base64_decode($item->html_import_view); $item->html_import_view = base64_decode($item->html_import_view);
// decode php_import_save // decode php_import_save
$item->php_import_save = base64_decode($item->php_import_save); $item->php_import_save = base64_decode($item->php_import_save);
// decode php_import_headers // decode php_getitem
$item->php_import_headers = base64_decode($item->php_import_headers); $item->php_getitem = base64_decode($item->php_getitem);
// decode php_getitems // decode php_getitems
$item->php_getitems = base64_decode($item->php_getitems); $item->php_getitems = base64_decode($item->php_getitems);
// decode php_getitems_after_all // decode php_getitems_after_all
$item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode php_getlistquery // decode php_getlistquery
$item->php_getlistquery = base64_decode($item->php_getlistquery); $item->php_getlistquery = base64_decode($item->php_getlistquery);
// decode css_view
$item->css_view = base64_decode($item->css_view);
// decode php_getform // decode php_getform
$item->php_getform = base64_decode($item->php_getform); $item->php_getform = base64_decode($item->php_getform);
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode php_before_save // decode php_before_save
$item->php_before_save = base64_decode($item->php_before_save); $item->php_before_save = base64_decode($item->php_before_save);
// decode css_views
$item->css_views = base64_decode($item->css_views);
// decode php_save // decode php_save
$item->php_save = base64_decode($item->php_save); $item->php_save = base64_decode($item->php_save);
// decode javascript_view_file
$item->javascript_view_file = base64_decode($item->javascript_view_file);
// decode php_postsavehook // decode php_postsavehook
$item->php_postsavehook = base64_decode($item->php_postsavehook); $item->php_postsavehook = base64_decode($item->php_postsavehook);
// decode javascript_view_file
$item->javascript_view_file = base64_decode($item->javascript_view_file);
// decode php_allowadd // decode php_allowadd
$item->php_allowadd = base64_decode($item->php_allowadd); $item->php_allowadd = base64_decode($item->php_allowadd);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode php_allowedit // decode php_allowedit
$item->php_allowedit = base64_decode($item->php_allowedit); $item->php_allowedit = base64_decode($item->php_allowedit);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode php_batchcopy // decode php_batchcopy
$item->php_batchcopy = base64_decode($item->php_batchcopy); $item->php_batchcopy = base64_decode($item->php_batchcopy);
// decode javascript_views_file
$item->javascript_views_file = base64_decode($item->javascript_views_file);
// decode php_batchmove // decode php_batchmove
$item->php_batchmove = base64_decode($item->php_batchmove); $item->php_batchmove = base64_decode($item->php_batchmove);
// decode javascript_views_file
$item->javascript_views_file = base64_decode($item->javascript_views_file);
// decode php_before_publish // decode php_before_publish
$item->php_before_publish = base64_decode($item->php_before_publish); $item->php_before_publish = base64_decode($item->php_before_publish);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode php_after_publish // decode php_after_publish
$item->php_after_publish = base64_decode($item->php_after_publish); $item->php_after_publish = base64_decode($item->php_after_publish);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode php_before_delete // decode php_before_delete
$item->php_before_delete = base64_decode($item->php_before_delete); $item->php_before_delete = base64_decode($item->php_before_delete);
// decode php_after_delete // decode php_after_delete
$item->php_after_delete = base64_decode($item->php_after_delete); $item->php_after_delete = base64_decode($item->php_after_delete);
// decode php_controller
$item->php_controller = base64_decode($item->php_controller);
// decode php_document // decode php_document
$item->php_document = base64_decode($item->php_document); $item->php_document = base64_decode($item->php_document);
// decode php_controller
$item->php_controller = base64_decode($item->php_controller);
// decode php_model // decode php_model
$item->php_model = base64_decode($item->php_model); $item->php_model = base64_decode($item->php_model);
// decode php_controller_list
$item->php_controller_list = base64_decode($item->php_controller_list);
// decode sql // decode sql
$item->sql = base64_decode($item->sql); $item->sql = base64_decode($item->sql);
// decode php_controller_list
$item->php_controller_list = base64_decode($item->php_controller_list);
// decode php_model_list // decode php_model_list
$item->php_model_list = base64_decode($item->php_model_list); $item->php_model_list = base64_decode($item->php_model_list);
// decode php_import_display // decode php_import_display
$item->php_import_display = base64_decode($item->php_import_display); $item->php_import_display = base64_decode($item->php_import_display);
// decode php_ajaxmethod
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// decode php_import // decode php_import
$item->php_import = base64_decode($item->php_import); $item->php_import = base64_decode($item->php_import);
// decode php_ajaxmethod
$item->php_ajaxmethod = base64_decode($item->php_ajaxmethod);
// decode php_import_setdata // decode php_import_setdata
$item->php_import_setdata = base64_decode($item->php_import_setdata); $item->php_import_setdata = base64_decode($item->php_import_setdata);
// decode php_import_ext // decode php_import_ext
$item->php_import_ext = base64_decode($item->php_import_ext); $item->php_import_ext = base64_decode($item->php_import_ext);
// decode php_getitem
$item->php_getitem = base64_decode($item->php_getitem);
// unset the values we don't want exported. // unset the values we don't want exported.
unset($item->asset_id); unset($item->asset_id);
unset($item->checked_out); unset($item->checked_out);
@ -512,8 +512,8 @@ class ComponentbuilderModelAdmin_views extends JModelList
$id .= ':' . $this->getState('filter.name_single'); $id .= ':' . $this->getState('filter.name_single');
$id .= ':' . $this->getState('filter.short_description'); $id .= ':' . $this->getState('filter.short_description');
$id .= ':' . $this->getState('filter.add_fadein'); $id .= ':' . $this->getState('filter.add_fadein');
$id .= ':' . $this->getState('filter.type');
$id .= ':' . $this->getState('filter.add_custom_import'); $id .= ':' . $this->getState('filter.add_custom_import');
$id .= ':' . $this->getState('filter.type');
$id .= ':' . $this->getState('filter.add_custom_button'); $id .= ':' . $this->getState('filter.add_custom_button');
$id .= ':' . $this->getState('filter.add_php_ajax'); $id .= ':' . $this->getState('filter.add_php_ajax');

View File

@ -0,0 +1,237 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Admins_custom_tabs Model
*/
class ComponentbuilderModelAdmins_custom_tabs extends JModelList
{
public function __construct($config = array())
{
if (empty($config['filter_fields']))
{
$config['filter_fields'] = array(
'a.id','id',
'a.published','published',
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by'
);
}
parent::__construct($config);
}
/**
* Method to auto-populate the model state.
*
* @return void
*/
protected function populateState($ordering = null, $direction = null)
{
$app = JFactory::getApplication();
// Adjust the context to support modal layouts.
if ($layout = $app->input->get('layout'))
{
$this->context .= '.' . $layout;
}
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
$created_by = $this->getUserStateFromRequest($this->context . '.filter.created_by', 'filter_created_by', '');
$this->setState('filter.created_by', $created_by);
$created = $this->getUserStateFromRequest($this->context . '.filter.created', 'filter_created');
$this->setState('filter.created', $created);
// List state information.
parent::populateState($ordering, $direction);
}
/**
* Method to get an array of data items.
*
* @return mixed An array of data items on success, false on failure.
*/
public function getItems()
{
// check in items
$this->checkInNow();
// load parent items
$items = parent::getItems();
// set values to display correctly.
if (ComponentbuilderHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
$access = (JFactory::getUser()->authorise('admin_custom_tabs.access', 'com_componentbuilder.admin_custom_tabs.' . (int) $item->id) && JFactory::getUser()->authorise('admin_custom_tabs.access', 'com_componentbuilder'));
if (!$access)
{
unset($items[$nr]);
continue;
}
}
}
// return items
return $items;
}
/**
* Method to build an SQL query to load the list data.
*
* @return string An SQL query
*/
protected function getListQuery()
{
// Get the user object.
$user = JFactory::getUser();
// Create a new query object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
// Select some fields
$query->select('a.*');
// From the componentbuilder_item table
$query->from($db->quoteName('#__componentbuilder_admin_custom_tabs', 'a'));
// From the componentbuilder_admin_view table.
$query->select($db->quoteName('g.system_name','admin_view_system_name'));
$query->join('LEFT', $db->quoteName('#__componentbuilder_admin_view', 'g') . ' ON (' . $db->quoteName('a.admin_view') . ' = ' . $db->quoteName('g.id') . ')');
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published))
{
$query->where('a.published = ' . (int) $published);
}
elseif ($published === '')
{
$query->where('(a.published = 0 OR a.published = 1)');
}
// Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access');
// Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// Implement View Level Access
if (!$user->authorise('core.options', 'com_componentbuilder'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'asc');
if ($orderCol != '')
{
$query->order($db->escape($orderCol . ' ' . $orderDirn));
}
return $query;
}
/**
* Method to get a store id based on model configuration state.
*
* @return string A store id.
*
*/
protected function getStoreId($id = '')
{
// Compile the store id.
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
return parent::getStoreId($id);
}
/**
* Build an SQL query to checkin all items left checked out longer then a set time.
*
* @return a bool
*
*/
protected function checkInNow()
{
// Get set check in time
$time = JComponentHelper::getParams('com_componentbuilder')->get('check_in');
if ($time)
{
// Get a db connection.
$db = JFactory::getDbo();
// reset query
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__componentbuilder_admin_custom_tabs'));
$db->setQuery($query);
$db->execute();
if ($db->getNumRows())
{
// Get Yesterdays date
$date = JFactory::getDate()->modify($time)->toSql();
// reset query
$query = $db->getQuery(true);
// Fields to update.
$fields = array(
$db->quoteName('checked_out_time') . '=\'0000-00-00 00:00:00\'',
$db->quoteName('checked_out') . '=0'
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('checked_out') . '!=0',
$db->quoteName('checked_out_time') . '<\''.$date.'\''
);
// Check table
$query->update($db->quoteName('#__componentbuilder_admin_custom_tabs'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
}
}
return false;
}
}

View File

@ -251,6 +251,7 @@ class ComponentbuilderModelAjax extends JModelList
'admin_fields' => 'admins_fields', 'admin_fields' => 'admins_fields',
'admin_fields_conditions' => 'admins_fields_conditions', 'admin_fields_conditions' => 'admins_fields_conditions',
'admin_fields_relations' => 'admins_fields_relations', 'admin_fields_relations' => 'admins_fields_relations',
'admin_custom_tabs' => 'admins_custom_tabs',
'validation_rule' => 'validation_rules', 'validation_rule' => 'validation_rules',
'field' => 'fields', 'field' => 'fields',
'component_admin_views' => 'components_admin_views' , 'component_admin_views' => 'components_admin_views' ,

View File

@ -130,6 +130,9 @@ class ComponentbuilderModelComponentbuilder extends JModelList
'admin_fields_relations.create' => 'admin_fields_relations.create', 'admin_fields_relations.create' => 'admin_fields_relations.create',
'admins_fields_relations.access' => 'admin_fields_relations.access', 'admins_fields_relations.access' => 'admin_fields_relations.access',
'admin_fields_relations.access' => 'admin_fields_relations.access', 'admin_fields_relations.access' => 'admin_fields_relations.access',
'admin_custom_tabs.create' => 'admin_custom_tabs.create',
'admins_custom_tabs.access' => 'admin_custom_tabs.access',
'admin_custom_tabs.access' => 'admin_custom_tabs.access',
'component_admin_views.create' => 'component_admin_views.create', 'component_admin_views.create' => 'component_admin_views.create',
'components_admin_views.access' => 'component_admin_views.access', 'components_admin_views.access' => 'component_admin_views.access',
'component_admin_views.access' => 'component_admin_views.access', 'component_admin_views.access' => 'component_admin_views.access',

View File

@ -43,9 +43,27 @@ class JFormFieldViewtabs extends JFormFieldList
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.addtabs'),array('id','addtabs'))); $query->select($db->quoteName(array('a.id','a.addtabs'),array('id','addtabs')));
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); $query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
if ($fieldsID > 0)
{
$query->join('LEFT', $db->quoteName('#__componentbuilder_admin_fields', 'b') . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.admin_view') . ')'); $query->join('LEFT', $db->quoteName('#__componentbuilder_admin_fields', 'b') . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('b.admin_view') . ')');
$query->where($db->quoteName('a.published') . ' >= 1');
$query->where($db->quoteName('b.id') . ' = ' . (int) $fieldsID); $query->where($db->quoteName('b.id') . ' = ' . (int) $fieldsID);
}
else
{
// get the refs if found
$ref = $jinput->get('ref', 0, 'WORD');
$refid = $jinput->getInt('refid', 0);
if ('admin_view' === $ref && $refid > 0)
{
$query->where($db->quoteName('a.id') . ' = ' . (int) $refid);
}
else
{
// kry maar niks
$query->where($db->quoteName('a.id') . ' = 0');
}
}
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.addtabs ASC'); $query->order('a.addtabs ASC');
$db->setQuery((string)$query); $db->setQuery((string)$query);
$item = $db->loadObject(); $item = $db->loadObject();

View File

@ -0,0 +1,11 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

View File

@ -0,0 +1,203 @@
<?xml version="1.0" encoding="utf-8"?>
<form
addrulepath="/administrator/components/com_componentbuilder/models/rules"
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
<fieldset name="details">
<!-- Default Fields. -->
<!-- Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_DATE_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_DATE_DESC"
size="22"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_BY_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_CREATED_BY_DESC"
/>
<!-- Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
<option value="1">
JPUBLISHED</option>
<option value="0">
JUNPUBLISHED</option>
<option value="2">
JARCHIVED</option>
<option value="-2">
JTRASHED</option>
</field>
<!-- Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_DATE_LABEL" description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_DATE_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_BY_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_MODIFIED_BY_DESC"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
default="1"
required="false"
/>
<!-- Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
class="inputbox validate-ordering"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ORDERING_LABEL"
description=""
default="0"
size="6"
required="false"
/>
<!-- Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
class="readonly"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_VERSION_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_VERSION_DESC"
size="6"
readonly="true"
filter="unset"
/>
<!-- Dynamic Fields. -->
<!-- Admin_view Field. Type: Adminviewsreadonly. (custom) -->
<field
type="adminviewsreadonly"
name="admin_view"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_DESCRIPTION"
class="list_class"
multiple="false"
required="true"
readonly="true"
button="false"
/>
<!-- Tabs Field. Type: Subform. (joomla) -->
<field
type="subform"
name="tabs"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS_DESCRIPTION"
icon="list"
max="5">
<form hidden="true" name="list_tabs_modal" repeat="true">
<!-- Tab Field. Type: Viewtabs. (custom) -->
<field
type="viewtabs"
name="tab"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TAB_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TAB_DESCRIPTION"
class="fieldMedium"
multiple="false"
default="1"
required="false"
button="false"
/>
<!-- Position Field. Type: List. (joomla) -->
<field
type="list"
name="position"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_POSITION_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_POSITION_DESCRIPTION"
class="list_class"
multiple="false"
required="false"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_BEFORE_SELECTED_TAB</option>
<option value="2">
COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_AFTER_SELECTED_TAB</option>
</field>
<!-- Name Field. Type: Text. (joomla) -->
<field
type="text"
name="name"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_LABEL"
size="40"
maxlength="150"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="STRING"
message="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NAME_HINT"
/>
<!-- Permission Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"
name="permission"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION_LABEL"
value="1"
required="false"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION_DESCRIPTION"
class="inputbox"
/>
<!-- Html Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="html"
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_LABEL"
rows="20"
cols="30"
class="text_area tab_html"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_HTML_HINT"
required="false"
/>
</form>
</field>
</fieldset>
<!-- Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"
label="Permissions in relation to this admin_custom_tabs"
translate_label="false"
filter="rules"
validate="rules"
class="inputbox"
component="com_componentbuilder"
section="admin_custom_tabs"
/>
</fieldset>
</form>

View File

@ -1273,6 +1273,8 @@ jQuery(document).ready(function()
addButton('field','create_edit_buttons'); // <-- third addButton('field','create_edit_buttons'); // <-- third
// set button // set button
addButtonID('admin_fields_relations','create_edit_buttons', 1); // <-- forth addButtonID('admin_fields_relations','create_edit_buttons', 1); // <-- forth
// set button
addButtonID('admin_custom_tabs','addtabs-lbl', 1); // <-- fifth
}); });
function checkAliasField() { function checkAliasField() {

View File

@ -128,11 +128,11 @@
message="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_MESSAGE" message="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_MESSAGE"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT"
/> />
<!-- Add_php_batchmove Field. Type: Radio. (joomla) --> <!-- Add_php_batchcopy Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_batchmove" name="add_php_batchcopy"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -142,11 +142,11 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Add_php_allowedit Field. Type: Radio. (joomla) --> <!-- Add_php_allowadd Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_allowedit" name="add_php_allowadd"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWEDIT_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWADD_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -156,11 +156,11 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Add_php_postsavehook Field. Type: Radio. (joomla) --> <!-- Add_php_save Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_postsavehook" name="add_php_save"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_POSTSAVEHOOK_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_SAVE_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -170,11 +170,11 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Add_php_before_save Field. Type: Radio. (joomla) --> <!-- Add_php_getform Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_before_save" name="add_php_getform"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETFORM_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -184,25 +184,11 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Add_php_getlistquery Field. Type: Radio. (joomla) --> <!-- Add_php_getitems_after_all Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_getlistquery" name="add_php_getitems_after_all"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETLISTQUERY_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Add_php_getitems Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_getitems"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -220,11 +206,11 @@
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_DESCRIPTION"
directory="" directory=""
/> />
<!-- Add_sql Field. Type: Radio. (joomla) --> <!-- Add_php_document Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_sql" name="add_php_document"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_SQL_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -278,11 +264,11 @@
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION"
directory="" directory=""
/> />
<!-- Add_php_after_publish Field. Type: Radio. (joomla) --> <!-- Add_php_before_publish Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_after_publish" name="add_php_before_publish"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -292,24 +278,12 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Html_import_view Field. Type: Textarea. (joomla) --> <!-- Add_custom_import Field. Type: Radio. (joomla) -->
<field
type="textarea"
name="html_import_view"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_HINT"
required="true"
/>
<!-- Add_php_after_delete Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_after_delete" name="add_custom_import"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_DESCRIPTION"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -319,6 +293,71 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Add_php_before_delete Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_before_delete"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Name_list Field. Type: Text. (joomla) -->
<field
type="text"
name="name_list"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_LABEL"
size="40"
maxlength="150"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_DESCRIPTION"
class="inputbox"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_MESSAGE"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_HINT"
/>
<!-- Addtables Field. Type: Subform. (joomla) -->
<field
type="subform"
name="addtables"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABLES_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
icon="list">
<form hidden="true" name="list_addtables_modal" repeat="true">
<!-- Table Field. Type: Dbtables. (custom) -->
<field
type="dbtables"
name="table"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE_LABEL"
class="list_class"
multiple="false"
default="0"
required="false"
button="false"
/>
<!-- Sourcemap Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="sourcemap"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_LABEL"
rows="22"
cols="30"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_DESCRIPTION"
class="text_area span4"
filter="HTML"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_HINT"
required="false"
/>
</form>
</field>
<!-- Type Field. Type: List. (joomla) --> <!-- Type Field. Type: List. (joomla) -->
<field <field
type="list" type="list"
@ -334,34 +373,46 @@
<option value="2"> <option value="2">
COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY</option> COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY</option>
</field> </field>
<!-- Note_beginner_import Field. Type: Note. A None Database Field. (joomla) --> <!-- Php_import_headers Field. Type: Textarea. (joomla) -->
<field type="note" name="note_beginner_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION" heading="h4" class="alert alert-info note_beginner_import" /> <field
type="textarea"
name="php_import_headers"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_HINT"
required="true"
/>
<!-- Not_required Field. Type: Hidden. (joomla) --> <!-- Not_required Field. Type: Hidden. (joomla) -->
<field <field
type="hidden" type="hidden"
name="not_required" name="not_required"
default="[]" default="[]"
/> />
<!-- Php_import_save Field. Type: Textarea. (joomla) --> <!-- Add_php_getitems Field. Type: Radio. (joomla) -->
<field
type="textarea"
name="php_import_save"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_HINT"
required="true"
/>
<!-- Note_on_permissions Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_on_permissions" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION" heading="h4" class="alert alert-info note_on_permissions" />
<!-- Add_php_getitems_after_all Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_getitems_after_all" name="add_php_getitems"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Note_on_permissions Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_on_permissions" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION" heading="h4" class="alert alert-info note_on_permissions" />
<!-- Add_php_getlistquery Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_getlistquery"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETLISTQUERY_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -444,11 +495,11 @@
</field> </field>
</form> </form>
</field> </field>
<!-- Add_php_getform Field. Type: Radio. (joomla) --> <!-- Add_php_before_save Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_getform" name="add_php_before_save"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETFORM_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -460,11 +511,11 @@
</field> </field>
<!-- Note_on_tabs Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_on_tabs Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_on_tabs" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_DESCRIPTION" heading="h4" class="alert alert-info note_on_tabs" /> <field type="note" name="note_on_tabs" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_DESCRIPTION" heading="h4" class="alert alert-info note_on_tabs" />
<!-- Add_php_save Field. Type: Radio. (joomla) --> <!-- Add_php_postsavehook Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_save" name="add_php_postsavehook"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_SAVE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_POSTSAVEHOOK_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -502,11 +553,27 @@
/> />
</form> </form>
</field> </field>
<!-- Add_php_allowadd Field. Type: Radio. (joomla) --> <!-- Add_php_allowedit Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_allowadd" name="add_php_allowedit"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWADD_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWEDIT_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Note_custom_tabs_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_custom_tabs_note" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CUSTOM_TABS_NOTE_DESCRIPTION" heading="h5" class="alert alert-success note_custom_tabs_note" />
<!-- Add_php_batchmove Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_php_batchmove"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -518,11 +585,11 @@
</field> </field>
<!-- Note_on_linked_views Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_on_linked_views Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_on_linked_views" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION" heading="h4" class="alert alert-info note_on_linked_views" /> <field type="note" name="note_on_linked_views" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_LINKED_VIEWS_DESCRIPTION" heading="h4" class="alert alert-info note_on_linked_views" />
<!-- Add_php_batchcopy Field. Type: Radio. (joomla) --> <!-- Add_php_after_publish Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_batchcopy" name="add_php_after_publish"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -621,11 +688,11 @@
</field> </field>
</form> </form>
</field> </field>
<!-- Add_php_before_publish Field. Type: Radio. (joomla) --> <!-- Add_php_after_delete Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_before_publish" name="add_php_after_delete"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -637,11 +704,11 @@
</field> </field>
<!-- Note_create_edit_notice Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_create_edit_notice Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_create_edit_notice" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION" heading="h4" class="alert alert-info note_create_edit_notice" /> <field type="note" name="note_create_edit_notice" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION" heading="h4" class="alert alert-info note_create_edit_notice" />
<!-- Add_php_before_delete Field. Type: Radio. (joomla) --> <!-- Add_sql Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
name="add_php_before_delete" name="add_sql"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_SQL_LABEL"
class="btn-group btn-group-yesno" class="btn-group btn-group-yesno"
default="0" default="0"
required="true"> required="true">
@ -665,74 +732,38 @@
<option value="2"> <option value="2">
COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM</option> COM_COMPONENTBUILDER_ADMIN_VIEW_CUSTOM</option>
</field> </field>
<!-- Add_php_document Field. Type: Radio. (joomla) --> <!-- Note_beginner_import Field. Type: Note. A None Database Field. (joomla) -->
<field <field type="note" name="note_beginner_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION" heading="h4" class="alert alert-info note_beginner_import" />
type="radio"
name="add_php_document"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Note_alias_builder_custom Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_alias_builder_custom Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_alias_builder_custom" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_DESCRIPTION" heading="h4" class="alert alert-info note_alias_builder_custom" showon="alias_builder_type:2" /> <field type="note" name="note_alias_builder_custom" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_CUSTOM_DESCRIPTION" heading="h4" class="alert alert-info note_alias_builder_custom" showon="alias_builder_type:2" />
<!-- Addtables Field. Type: Subform. (joomla) --> <!-- Html_import_view Field. Type: Textarea. (joomla) -->
<field
type="subform"
name="addtables"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABLES_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
icon="list">
<form hidden="true" name="list_addtables_modal" repeat="true">
<!-- Table Field. Type: Dbtables. (custom) -->
<field
type="dbtables"
name="table"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE_LABEL"
class="list_class"
multiple="false"
default="0"
required="false"
button="false"
/>
<!-- Sourcemap Field. Type: Textarea. (joomla) -->
<field <field
type="textarea" type="textarea"
name="sourcemap" name="html_import_view"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_LABEL"
rows="22" rows="30"
cols="30" cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_DESCRIPTION"
class="text_area span4" class="text_area span12"
filter="HTML" filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_HINT" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_HTML_IMPORT_VIEW_HINT"
required="false" required="true"
/> />
</form>
</field>
<!-- Note_alias_builder_default Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_alias_builder_default Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_alias_builder_default" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_DESCRIPTION" heading="h4" class="alert alert-info note_alias_builder_default" showon="alias_builder_type:1" /> <field type="note" name="note_alias_builder_default" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ALIAS_BUILDER_DEFAULT_DESCRIPTION" heading="h4" class="alert alert-info note_alias_builder_default" showon="alias_builder_type:1" />
<!-- Add_custom_import Field. Type: Radio. (joomla) --> <!-- Php_import_save Field. Type: Textarea. (joomla) -->
<field <field
type="radio" type="textarea"
name="add_custom_import" name="php_import_save"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_CUSTOM_IMPORT_DESCRIPTION" rows="30"
class="btn-group btn-group-yesno" cols="15"
default="0" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_DESCRIPTION"
required="true"> class="text_area span12"
<!-- Option Set. --> filter="raw"
<option value="1"> hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE_HINT"
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option> required="true"
<option value="0"> />
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field>
<!-- Alias_builder Field. Type: Aliasbuilder. (custom) --> <!-- Alias_builder Field. Type: Aliasbuilder. (custom) -->
<field <field
type="aliasbuilder" type="aliasbuilder"
@ -743,39 +774,25 @@
multiple="true" multiple="true"
showon="alias_builder_type:2" showon="alias_builder_type:2"
/> />
<!-- Php_import_headers Field. Type: Textarea. (joomla) --> <!-- Php_getitem Field. Type: Editor. (joomla) -->
<field <field
type="textarea" type="editor"
name="php_import_headers" name="php_getitem"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL"
rows="30" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION"
width="100%"
height="450px"
cols="15" cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_DESCRIPTION" rows="30"
class="text_area span12" buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw" filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HEADERS_HINT"
required="true" required="true"
validate="code"
/> />
<!-- Note_create_edit_buttons Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_create_edit_buttons Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_create_edit_buttons" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION" class="note_create_edit_buttons" /> <field type="note" name="note_create_edit_buttons" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION" class="note_create_edit_buttons" />
<!-- Name_list Field. Type: Text. (joomla) -->
<field
type="text"
name="name_list"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_LABEL"
size="40"
maxlength="150"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_DESCRIPTION"
class="inputbox"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_MESSAGE"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LIST_HINT"
/>
<!-- Note_create_edit_display Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_create_edit_display" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION" class="note_create_edit_display" />
<!-- Php_getitems Field. Type: Editor. (joomla) --> <!-- Php_getitems Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
@ -793,6 +810,25 @@
required="true" required="true"
validate="code" validate="code"
/> />
<!-- Note_create_edit_display Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_create_edit_display" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION" class="note_create_edit_display" />
<!-- Php_getitems_after_all Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_getitems_after_all"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Add_css_view Field. Type: Radio. (joomla) --> <!-- Add_css_view Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
@ -807,12 +843,12 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Php_getitems_after_all Field. Type: Editor. (joomla) --> <!-- Php_getlistquery Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_getitems_after_all" name="php_getlistquery"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -841,12 +877,12 @@
required="true" required="true"
validate="code" validate="code"
/> />
<!-- Php_getlistquery Field. Type: Editor. (joomla) --> <!-- Php_getform Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_getlistquery" name="php_getform"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETFORM_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETFORM_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -872,12 +908,12 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Php_getform Field. Type: Editor. (joomla) --> <!-- Php_before_save Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_getform" name="php_before_save"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETFORM_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_SAVE_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETFORM_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_SAVE_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -906,12 +942,12 @@
required="true" required="true"
validate="code" validate="code"
/> />
<!-- Php_before_save Field. Type: Editor. (joomla) --> <!-- Php_save Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_before_save" name="php_save"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_SAVE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_SAVE_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -937,12 +973,12 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Php_save Field. Type: Editor. (joomla) --> <!-- Php_postsavehook Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_save" name="php_postsavehook"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -971,12 +1007,12 @@
required="true" required="true"
validate="code" validate="code"
/> />
<!-- Php_postsavehook Field. Type: Editor. (joomla) --> <!-- Php_allowadd Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_postsavehook" name="php_allowadd"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWADD_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWADD_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -1002,12 +1038,12 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Php_allowadd Field. Type: Editor. (joomla) --> <!-- Php_allowedit Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_allowadd" name="php_allowedit"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWADD_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWADD_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -1036,12 +1072,12 @@
required="true" required="true"
validate="code" validate="code"
/> />
<!-- Php_allowedit Field. Type: Editor. (joomla) --> <!-- Php_batchcopy Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_allowedit" name="php_batchcopy"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -1067,12 +1103,12 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Php_batchcopy Field. Type: Editor. (joomla) --> <!-- Php_batchmove Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_batchcopy" name="php_batchmove"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -1101,12 +1137,12 @@
required="true" required="true"
validate="code" validate="code"
/> />
<!-- Php_batchmove Field. Type: Editor. (joomla) --> <!-- Php_before_publish Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_batchmove" name="php_before_publish"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -1132,12 +1168,12 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Php_before_publish Field. Type: Editor. (joomla) --> <!-- Php_after_publish Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_before_publish" name="php_after_publish"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -1166,12 +1202,12 @@
required="true" required="true"
validate="code" validate="code"
/> />
<!-- Php_after_publish Field. Type: Editor. (joomla) --> <!-- Php_before_delete Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_after_publish" name="php_before_delete"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -1197,12 +1233,12 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Php_before_delete Field. Type: Editor. (joomla) --> <!-- Php_after_delete Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_before_delete" name="php_after_delete"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -1723,16 +1759,16 @@
</field> </field>
</form> </form>
</field> </field>
<!-- Php_after_delete Field. Type: Editor. (joomla) --> <!-- Php_document Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_after_delete" name="php_document"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
rows="30" rows="50"
buttons="no" buttons="no"
syntax="php" syntax="php"
editor="codemirror|none" editor="codemirror|none"
@ -1757,40 +1793,6 @@
required="false" required="false"
validate="code" validate="code"
/> />
<!-- Php_document Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_document"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_DOCUMENT_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="50"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
<!-- Php_model Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_model"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="false"
validate="code"
/>
<!-- Source Field. Type: Radio. (joomla) --> <!-- Source Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
@ -1804,12 +1806,12 @@
<option value="2"> <option value="2">
COM_COMPONENTBUILDER_ADMIN_VIEW_DUMP</option> COM_COMPONENTBUILDER_ADMIN_VIEW_DUMP</option>
</field> </field>
<!-- Php_controller_list Field. Type: Editor. (joomla) --> <!-- Php_model Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
name="php_controller_list" name="php_model"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_MODEL_DESCRIPTION"
width="100%" width="100%"
height="450px" height="450px"
cols="15" cols="15"
@ -1834,6 +1836,25 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SQL_HINT" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SQL_HINT"
required="true" required="true"
/> />
<!-- Php_controller_list Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_controller_list"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_CONTROLLER_LIST_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="false"
validate="code"
/>
<!-- Note_advanced_import Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_advanced_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION" heading="h4" class="alert alert-success note_advanced_import" />
<!-- Php_model_list Field. Type: Editor. (joomla) --> <!-- Php_model_list Field. Type: Editor. (joomla) -->
<field <field
type="editor" type="editor"
@ -1851,8 +1872,19 @@
required="false" required="false"
validate="code" validate="code"
/> />
<!-- Note_advanced_import Field. Type: Note. A None Database Field. (joomla) --> <!-- Php_import_display Field. Type: Textarea. (joomla) -->
<field type="note" name="note_advanced_import" label="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL" description="COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION" heading="h4" class="alert alert-success note_advanced_import" /> <field
type="textarea"
name="php_import_display"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT"
required="true"
/>
<!-- Add_php_ajax Field. Type: Radio. (joomla) --> <!-- Add_php_ajax Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
@ -1867,17 +1899,17 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Php_import_display Field. Type: Textarea. (joomla) --> <!-- Php_import Field. Type: Textarea. (joomla) -->
<field <field
type="textarea" type="textarea"
name="php_import_display" name="php_import"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL"
rows="30" rows="30"
cols="15" cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DESCRIPTION"
class="text_area span12" class="text_area span12"
filter="raw" filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT"
required="true" required="true"
/> />
<!-- Php_ajaxmethod Field. Type: Editor. (joomla) --> <!-- Php_ajaxmethod Field. Type: Editor. (joomla) -->
@ -1897,17 +1929,17 @@
required="true" required="true"
validate="code" validate="code"
/> />
<!-- Php_import Field. Type: Textarea. (joomla) --> <!-- Php_import_setdata Field. Type: Textarea. (joomla) -->
<field <field
type="textarea" type="textarea"
name="php_import" name="php_import_setdata"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_LABEL"
rows="30" rows="30"
cols="15" cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_DESCRIPTION"
class="text_area span12" class="text_area span12"
filter="raw" filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_HINT"
required="true" required="true"
/> />
<!-- Ajax_input Field. Type: Subform. (joomla) --> <!-- Ajax_input Field. Type: Subform. (joomla) -->
@ -2041,17 +2073,17 @@
/> />
</form> </form>
</field> </field>
<!-- Php_import_setdata Field. Type: Textarea. (joomla) --> <!-- Php_import_ext Field. Type: Textarea. (joomla) -->
<field <field
type="textarea" type="textarea"
name="php_import_setdata" name="php_import_ext"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_LABEL"
rows="30" rows="30"
cols="15" cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_DESCRIPTION"
class="text_area span12" class="text_area span12"
filter="raw" filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SETDATA_HINT" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_HINT"
required="true" required="true"
/> />
<!-- Add_php_getitem Field. Type: Radio. (joomla) --> <!-- Add_php_getitem Field. Type: Radio. (joomla) -->
@ -2068,36 +2100,6 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option> COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
</field> </field>
<!-- Php_import_ext Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="php_import_ext"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_LABEL"
rows="30"
cols="15"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_DESCRIPTION"
class="text_area span12"
filter="raw"
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_HINT"
required="true"
/>
<!-- Php_getitem Field. Type: Editor. (joomla) -->
<field
type="editor"
name="php_getitem"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION"
width="100%"
height="450px"
cols="15"
rows="30"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="true"
validate="code"
/>
</fieldset> </fieldset>
<!-- Access Control Fields. --> <!-- Access Control Fields. -->

View File

@ -700,8 +700,8 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$tables = array( $tables = array(
'validation_rule', 'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view', 'validation_rule', 'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view',
'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code', 'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code',
'admin_fields', 'admin_fields_conditions', 'admin_fields_relations', 'component_admin_views', 'component_site_views', 'admin_fields', 'admin_fields_conditions', 'admin_fields_relations', 'admin_custom_tabs', 'component_admin_views',
'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks', 'component_site_views', 'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks',
'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders' 'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders'
); );
// get prefix // get prefix
@ -2161,6 +2161,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
case 'admin_fields': case 'admin_fields':
case 'admin_fields_conditions': case 'admin_fields_conditions':
case 'admin_fields_relations': case 'admin_fields_relations':
case 'admin_custom_tabs':
// diverged id already updated // diverged id already updated
if (!$diverged) if (!$diverged)
{ {
@ -2217,8 +2218,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
$item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR); $item = ComponentbuilderHelper::convertRepeatableFields($item, $updaterR);
} }
// update the subform ids // update the subform ids
if (isset($updaterT) && ComponentbuilderHelper::checkArray($updaterT))
{
$this->updateSubformsIDs($item, $type, $updaterT); $this->updateSubformsIDs($item, $type, $updaterT);
} }
}
// remove all fields/columns not part of the current table // remove all fields/columns not part of the current table
$this->removingFields($type, $item); $this->removingFields($type, $item);
// final action prep // final action prep
@ -2613,6 +2617,7 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
case 'admin_fields': case 'admin_fields':
case 'admin_fields_conditions': case 'admin_fields_conditions':
case 'admin_fields_relations': case 'admin_fields_relations':
case 'admin_custom_tabs':
// get by admin_view (since there should only be one of each name) // get by admin_view (since there should only be one of each name)
$getter = array('admin_view'); $getter = array('admin_view');
$this->specialValue = array(); $this->specialValue = array();

View File

@ -310,6 +310,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
$this->setData('admin_fields', array_values($this->smartIDs['admin_view']), 'admin_view'); $this->setData('admin_fields', array_values($this->smartIDs['admin_view']), 'admin_view');
$this->setData('admin_fields_conditions', array_values($this->smartIDs['admin_view']), 'admin_view'); $this->setData('admin_fields_conditions', array_values($this->smartIDs['admin_view']), 'admin_view');
$this->setData('admin_fields_relations', array_values($this->smartIDs['admin_view']), 'admin_view'); $this->setData('admin_fields_relations', array_values($this->smartIDs['admin_view']), 'admin_view');
$this->setData('admin_custom_tabs', array_values($this->smartIDs['admin_view']), 'admin_view');
} }
// add validation rules // add validation rules
if (isset($this->smartIDs['validation_rule']) && ComponentbuilderHelper::checkArray($this->smartIDs['validation_rule'])) if (isset($this->smartIDs['validation_rule']) && ComponentbuilderHelper::checkArray($this->smartIDs['validation_rule']))
@ -852,8 +853,8 @@ class ComponentbuilderModelJoomla_components extends JModelList
$tables = array( $tables = array(
'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view', 'fieldtype', 'field', 'admin_view', 'snippet', 'dynamic_get', 'custom_admin_view', 'site_view',
'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code', 'template', 'layout', 'joomla_component', 'language', 'language_translation', 'custom_code',
'admin_fields', 'admin_fields_conditions', 'admin_fields_relations', 'component_admin_views', 'component_site_views', 'admin_fields', 'admin_fields_conditions', 'admin_fields_relations', 'admin_custom_tabs', 'component_admin_views',
'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks', 'component_site_views', 'component_custom_admin_views', 'component_updates', 'component_mysql_tweaks',
'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders' 'component_custom_admin_menus', 'component_config', 'component_dashboard', 'component_files_folders'
); );
// smart table loop // smart table loop

View File

@ -235,27 +235,27 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` (
KEY `idx_modifiedby` (`modified_by`), KEY `idx_modifiedby` (`modified_by`),
KEY `idx_state` (`published`), KEY `idx_state` (`published`),
KEY `idx_name_single` (`name_single`), KEY `idx_name_single` (`name_single`),
KEY `idx_add_php_batchmove` (`add_php_batchmove`), KEY `idx_add_php_batchcopy` (`add_php_batchcopy`),
KEY `idx_add_php_allowedit` (`add_php_allowedit`), KEY `idx_add_php_allowadd` (`add_php_allowadd`),
KEY `idx_add_php_postsavehook` (`add_php_postsavehook`), KEY `idx_add_php_save` (`add_php_save`),
KEY `idx_add_php_before_save` (`add_php_before_save`), KEY `idx_add_php_getform` (`add_php_getform`),
KEY `idx_add_php_getlistquery` (`add_php_getlistquery`), KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`),
KEY `idx_add_php_getitems` (`add_php_getitems`), KEY `idx_add_php_document` (`add_php_document`),
KEY `idx_add_sql` (`add_sql`),
KEY `idx_add_fadein` (`add_fadein`), KEY `idx_add_fadein` (`add_fadein`),
KEY `idx_add_php_before_publish` (`add_php_before_publish`),
KEY `idx_add_custom_import` (`add_custom_import`),
KEY `idx_add_php_before_delete` (`add_php_before_delete`),
KEY `idx_name_list` (`name_list`),
KEY `idx_type` (`type`),
KEY `idx_add_php_getitems` (`add_php_getitems`),
KEY `idx_add_php_getlistquery` (`add_php_getlistquery`),
KEY `idx_add_php_before_save` (`add_php_before_save`),
KEY `idx_add_php_postsavehook` (`add_php_postsavehook`),
KEY `idx_add_php_allowedit` (`add_php_allowedit`),
KEY `idx_add_php_batchmove` (`add_php_batchmove`),
KEY `idx_add_php_after_publish` (`add_php_after_publish`), KEY `idx_add_php_after_publish` (`add_php_after_publish`),
KEY `idx_add_php_after_delete` (`add_php_after_delete`), KEY `idx_add_php_after_delete` (`add_php_after_delete`),
KEY `idx_type` (`type`), KEY `idx_add_sql` (`add_sql`),
KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`),
KEY `idx_add_php_getform` (`add_php_getform`),
KEY `idx_add_php_save` (`add_php_save`),
KEY `idx_add_php_allowadd` (`add_php_allowadd`),
KEY `idx_add_php_batchcopy` (`add_php_batchcopy`),
KEY `idx_add_php_before_publish` (`add_php_before_publish`),
KEY `idx_add_php_before_delete` (`add_php_before_delete`),
KEY `idx_add_php_document` (`add_php_document`),
KEY `idx_add_custom_import` (`add_custom_import`),
KEY `idx_name_list` (`name_list`),
KEY `idx_add_css_view` (`add_css_view`), KEY `idx_add_css_view` (`add_css_view`),
KEY `idx_add_css_views` (`add_css_views`), KEY `idx_add_css_views` (`add_css_views`),
KEY `idx_add_javascript_view_file` (`add_javascript_view_file`), KEY `idx_add_javascript_view_file` (`add_javascript_view_file`),
@ -990,6 +990,32 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_fields_relations` (
KEY `idx_admin_view` (`admin_view`) KEY `idx_admin_view` (`admin_view`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_custom_tabs` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
`admin_view` INT(11) NOT NULL DEFAULT 0,
`tabs` TEXT NOT NULL,
`params` text NOT NULL DEFAULT '',
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`checked_out` int(11) unsigned NOT NULL DEFAULT 0,
`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`version` INT(10) unsigned NOT NULL DEFAULT 1,
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_createdby` (`created_by`),
KEY `idx_modifiedby` (`modified_by`),
KEY `idx_state` (`published`),
KEY `idx_admin_view` (`admin_view`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_admin_views` ( CREATE TABLE IF NOT EXISTS `#__componentbuilder_component_admin_views` (
`id` INT(11) NOT NULL AUTO_INCREMENT, `id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.', `asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',

View File

@ -18,6 +18,7 @@ DROP TABLE IF EXISTS `#__componentbuilder_help_document`;
DROP TABLE IF EXISTS `#__componentbuilder_admin_fields`; DROP TABLE IF EXISTS `#__componentbuilder_admin_fields`;
DROP TABLE IF EXISTS `#__componentbuilder_admin_fields_conditions`; DROP TABLE IF EXISTS `#__componentbuilder_admin_fields_conditions`;
DROP TABLE IF EXISTS `#__componentbuilder_admin_fields_relations`; DROP TABLE IF EXISTS `#__componentbuilder_admin_fields_relations`;
DROP TABLE IF EXISTS `#__componentbuilder_admin_custom_tabs`;
DROP TABLE IF EXISTS `#__componentbuilder_component_admin_views`; DROP TABLE IF EXISTS `#__componentbuilder_component_admin_views`;
DROP TABLE IF EXISTS `#__componentbuilder_component_site_views`; DROP TABLE IF EXISTS `#__componentbuilder_component_site_views`;
DROP TABLE IF EXISTS `#__componentbuilder_component_custom_admin_views`; DROP TABLE IF EXISTS `#__componentbuilder_component_custom_admin_views`;

View File

@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_custom_tabs` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
`admin_view` INT(11) NOT NULL DEFAULT 0,
`tabs` TEXT NOT NULL,
`params` text NOT NULL DEFAULT '',
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`checked_out` int(11) unsigned NOT NULL DEFAULT 0,
`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`version` INT(10) unsigned NOT NULL DEFAULT 1,
`hits` INT(10) unsigned NOT NULL DEFAULT 0,
`access` INT(10) unsigned NOT NULL DEFAULT 0,
`ordering` INT(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_createdby` (`created_by`),
KEY `idx_modifiedby` (`modified_by`),
KEY `idx_state` (`published`),
KEY `idx_admin_view` (`admin_view`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;

View File

@ -0,0 +1,321 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\Registry\Registry;
/**
* Admins_custom_tabs Table class
*/
class ComponentbuilderTableAdmin_custom_tabs extends JTable
{
/**
* Ensure the params and metadata in json encoded in the bind method
*
* @var array
* @since 3.3
*/
protected $_jsonEncode = array('params', 'metadata');
/**
* Constructor
*
* @param object Database connector object
*/
function __construct(&$db)
{
parent::__construct('#__componentbuilder_admin_custom_tabs', 'id', $db);
// Adding History Options
JTableObserverContenthistory::createObserver($this, array('typeAlias' => 'com_componentbuilder.admin_custom_tabs'));
}
public function bind($array, $ignore = '')
{
if (isset($array['params']) && is_array($array['params']))
{
$registry = new JRegistry;
$registry->loadArray($array['params']);
$array['params'] = (string) $registry;
}
if (isset($array['metadata']) && is_array($array['metadata']))
{
$registry = new JRegistry;
$registry->loadArray($array['metadata']);
$array['metadata'] = (string) $registry;
}
// Bind the rules.
if (isset($array['rules']) && is_array($array['rules']))
{
$rules = new JAccessRules($array['rules']);
$this->setRules($rules);
}
return parent::bind($array, $ignore);
}
/**
* Overload the store method for the Admin_custom_tabs table.
*
* @param boolean Toggle whether null values should be updated.
* @return boolean True on success, false on failure.
* @since 1.6
*/
public function store($updateNulls = false)
{
$date = JFactory::getDate();
$user = JFactory::getUser();
if ($this->id)
{
// Existing item
$this->modified = $date->toSql();
$this->modified_by = $user->get('id');
}
else
{
// New admin_custom_tabs. A admin_custom_tabs created and created_by field can be set by the user,
// so we don't touch either of these if they are set.
if (!(int) $this->created)
{
$this->created = $date->toSql();
}
if (empty($this->created_by))
{
$this->created_by = $user->get('id');
}
}
if (isset($this->alias))
{
// Verify that the alias is unique
$table = JTable::getInstance('admin_custom_tabs', 'ComponentbuilderTable');
if ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->setError(JText::_('COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ERROR_UNIQUE_ALIAS'));
return false;
}
}
if (isset($this->url))
{
// Convert IDN urls to punycode
$this->url = JStringPunycode::urlToPunycode($this->url);
}
if (isset($this->website))
{
// Convert IDN urls to punycode
$this->website = JStringPunycode::urlToPunycode($this->website);
}
return parent::store($updateNulls);
}
/**
* Overloaded check method to ensure data integrity.
*
* @return boolean True on success.
*/
public function check()
{
if (isset($this->alias))
{
// Generate a valid alias
$this->generateAlias();
$table = JTable::getInstance('admin_custom_tabs', 'componentbuilderTable');
while ($table->load(array('alias' => $this->alias)) && ($table->id != $this->id || $this->id == 0))
{
$this->alias = JString::increment($this->alias, 'dash');
}
}
/*
* Clean up keywords -- eliminate extra spaces between phrases
* and cr (\r) and lf (\n) characters from string.
* Only process if not empty.
*/
if (!empty($this->metakey))
{
// Array of characters to remove.
$bad_characters = array("\n", "\r", "\"", "<", ">");
// Remove bad characters.
$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey);
// Create array using commas as delimiter.
$keys = explode(',', $after_clean);
$clean_keys = array();
foreach ($keys as $key)
{
// Ignore blank keywords.
if (trim($key))
{
$clean_keys[] = trim($key);
}
}
// Put array back together delimited by ", "
$this->metakey = implode(", ", $clean_keys);
}
// Clean up description -- eliminate quotes and <> brackets
if (!empty($this->metadesc))
{
// Only process if not empty
$bad_characters = array("\"", "<", ">");
$this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc);
}
// If we don't have any access rules set at this point just use an empty JAccessRules class
if (!$this->getRules())
{
$rules = $this->getDefaultAssetValues('com_componentbuilder.admin_custom_tabs.'.$this->id);
$this->setRules($rules);
}
// Set ordering
if ($this->published < 0)
{
// Set ordering to 0 if state is archived or trashed
$this->ordering = 0;
}
return true;
}
/**
* Gets the default asset values for a component.
*
* @param $string $component The component asset name to search for
*
* @return JAccessRules The JAccessRules object for the asset
*/
protected function getDefaultAssetValues($component, $try = true)
{
// Need to find the asset id by the name of the component.
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
->where($db->quoteName('name') . ' = ' . $db->quote($component));
$db->setQuery($query);
$db->execute();
if ($db->loadRowList())
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
}
// try again
elseif ($try)
{
$try = explode('.',$component);
$result = $this->getDefaultAssetValues($try[0], false);
if ($result instanceof JAccessRules)
{
if (isset($try[1]))
{
$_result = (string) $result;
$_result = json_decode($_result);
foreach ($_result as $name => &$rule)
{
$v = explode('.', $name);
if ($try[1] !== $v[0])
{
// remove since it is not part of this view
unset($_result->$name);
}
else
{
// clear the value since we inherit
$rule = array();
}
}
// check if there are any view values remaining
if (count( (array) $_result))
{
$_result = json_encode($_result);
$_result = array($_result);
// Instantiate and return the JAccessRules object for the asset rules.
$rules = new JAccessRules;
$rules->mergeCollection($_result);
return $rules;
}
}
return $result;
}
}
return JAccess::getAssetRules(0);
}
/**
* Method to compute the default name of the asset.
* The default name is in the form 'table_name.id'
* where id is the value of the primary key of the table.
*
* @return string
* @since 2.5
*/
protected function _getAssetName()
{
$k = $this->_tbl_key;
return 'com_componentbuilder.admin_custom_tabs.'.(int) $this->$k;
}
/**
* Method to return the title to use for the asset table.
*
* @return string
* @since 2.5
*/
protected function _getAssetTitle()
{
if (isset($this->title))
{
return $this->title;
}
return '';
}
/**
* Get the parent asset id for the record
*
* @return int
* @since 2.5
*/
protected function _getAssetParentId(JTable $table = NULL, $id = NULL)
{
$asset = JTable::getInstance('Asset');
$asset->loadByName('com_componentbuilder');
return $asset->id;
}
/**
* This view does not actually have an alias
*
* @return bool
*/
public function generateAlias()
{
return false;
}
}

View File

@ -0,0 +1,35 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
Joomla.submitbutton = function(task)
{
if (task == ''){
return false;
} else {
var isValid=true;
var action = task.split('.');
if (action[1] != 'cancel' && action[1] != 'close'){
var forms = $$('form.form-validate');
for (var i=0;i<forms.length;i++){
if (!document.formvalidator.isValid(forms[i])){
isValid = false;
break;
}
}
}
if (isValid){
Joomla.submitform(task);
return true;
} else {
alert(Joomla.JText._('admin_custom_tabs, some values are not acceptable.','Some values are unacceptable'));
return false;
}
}
}

View File

@ -0,0 +1,107 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_componentbuilder');
?>
<script type="text/javascript">
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
jQuery('#loading').show();
// when page is ready remove and show
jQuery(window).load(function() {
jQuery('#componentbuilder_loader').fadeIn('fast');
jQuery('#loading').hide();
});
</script>
<div id="componentbuilder_loader" style="display: none;">
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<?php echo JLayoutHelper::render('admin_custom_tabs.tabs_above', $this); ?>
<div class="form-horizontal">
<?php echo JHtml::_('bootstrap.startTabSet', 'admin_custom_tabsTab', array('active' => 'tabs')); ?>
<?php echo JHtml::_('bootstrap.addTab', 'admin_custom_tabsTab', 'tabs', JText::_('COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_TABS', true)); ?>
<div class="row-fluid form-horizontal-desktop">
</div>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<?php echo JLayoutHelper::render('admin_custom_tabs.tabs_fullwidth', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php $this->ignore_fieldsets = array('details','metadata','vdmmetadata','accesscontrol'); ?>
<?php $this->tab_name = 'admin_custom_tabsTab'; ?>
<?php echo JLayoutHelper::render('joomla.edit.params', $this); ?>
<?php if ($this->canDo->get('admin_custom_tabs.delete') || $this->canDo->get('admin_custom_tabs.edit.created_by') || $this->canDo->get('admin_custom_tabs.edit.state') || $this->canDo->get('admin_custom_tabs.edit.created')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'admin_custom_tabsTab', 'publishing', JText::_('COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PUBLISHING', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('admin_custom_tabs.publishing', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('admin_custom_tabs.publlshing', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'admin_custom_tabsTab', 'permissions', JText::_('COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_PERMISSION', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<fieldset class="adminform">
<div class="adminformlist">
<?php foreach ($this->form->getFieldset('accesscontrol') as $field): ?>
<div>
<?php echo $field->label; echo $field->input;?>
</div>
<div class="clearfix"></div>
<?php endforeach; ?>
</div>
</fieldset>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<div>
<input type="hidden" name="task" value="admin_custom_tabs.edit" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
</div>
</form>
</div>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,193 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Admin_custom_tabs View class
*/
class ComponentbuilderViewAdmin_custom_tabs extends JViewLegacy
{
/**
* display method of View
* @return void
*/
public function display($tpl = null)
{
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = ComponentbuilderHelper::getActions('admin_custom_tabs',$this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');
$this->refid = $jinput->get('refid', 0, 'int');
$return = $jinput->get('return', null, 'base64');
// set the referral string
$this->referral = '';
if ($this->refid && $this->ref)
{
// return to the item that referred to this item
$this->referral = '&ref=' . (string)$this->ref . '&refid=' . (int)$this->refid;
}
elseif($this->ref)
{
// return to the list view that referred to this item
$this->referral = '&ref=' . (string)$this->ref;
}
// check return value
if (!is_null($return))
{
// add the return value
$this->referral .= '&return=' . (string)$return;
}
// Set the toolbar
$this->addToolBar();
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode("\n", $errors), 500);
}
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$userId = $user->id;
$isNew = $this->item->id == 0;
JToolbarHelper::title( JText::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_EDIT'), 'pencil-2 article-add');
// Built the actions for new and existing records.
if (ComponentbuilderHelper::checkString($this->referral))
{
if ($this->canDo->get('admin_custom_tabs.create') && $isNew)
{
// We can create the record.
JToolBarHelper::save('admin_custom_tabs.save', 'JTOOLBAR_SAVE');
}
elseif ($this->canDo->get('admin_custom_tabs.edit'))
{
// We can save the record.
JToolBarHelper::save('admin_custom_tabs.save', 'JTOOLBAR_SAVE');
}
if ($isNew)
{
// Do not creat but cancel.
JToolBarHelper::cancel('admin_custom_tabs.cancel', 'JTOOLBAR_CANCEL');
}
else
{
// We can close it.
JToolBarHelper::cancel('admin_custom_tabs.cancel', 'JTOOLBAR_CLOSE');
}
}
else
{
if ($isNew)
{
// For new records, check the create permission.
if ($this->canDo->get('admin_custom_tabs.create'))
{
JToolBarHelper::apply('admin_custom_tabs.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('admin_custom_tabs.save', 'JTOOLBAR_SAVE');
JToolBarHelper::custom('admin_custom_tabs.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
};
JToolBarHelper::cancel('admin_custom_tabs.cancel', 'JTOOLBAR_CANCEL');
}
else
{
if ($this->canDo->get('admin_custom_tabs.edit'))
{
// We can save the new record
JToolBarHelper::apply('admin_custom_tabs.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('admin_custom_tabs.save', 'JTOOLBAR_SAVE');
// We can save this record, but check the create permission to see
// if we can return to make a new one.
if ($this->canDo->get('admin_custom_tabs.create'))
{
JToolBarHelper::custom('admin_custom_tabs.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
}
}
$canVersion = ($this->canDo->get('core.version') && $this->canDo->get('admin_custom_tabs.version'));
if ($this->state->params->get('save_history', 1) && $this->canDo->get('admin_custom_tabs.edit') && $canVersion)
{
JToolbarHelper::versions('com_componentbuilder.admin_custom_tabs', $this->item->id);
}
if ($this->canDo->get('admin_custom_tabs.create'))
{
JToolBarHelper::custom('admin_custom_tabs.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
}
JToolBarHelper::cancel('admin_custom_tabs.cancel', 'JTOOLBAR_CLOSE');
}
}
JToolbarHelper::divider();
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admin_custom_tabs');
if (ComponentbuilderHelper::checkString($help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
}
}
/**
* Escapes a value for output in a view script.
*
* @param mixed $var The output to escape.
*
* @return mixed The escaped value.
*/
public function escape($var)
{
if(strlen($var) > 30)
{
// use the helper htmlEscape method instead and shorten the string
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true, 30);
}
// use the helper htmlEscape method instead.
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
}
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$isNew = ($this->item->id < 1);
if (!isset($this->document))
{
$this->document = JFactory::getDocument();
}
$this->document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_NEW' : 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_EDIT'));
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admin_custom_tabs.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_custom_tabs/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
JText::script('view not acceptable. Error');
}
}

View File

@ -96,7 +96,12 @@ $edit = "index.php?option=com_componentbuilder&view=admin_views&task=admin_view.
'view' => 'admin_fields_conditions', 'view' => 'admin_fields_conditions',
'views' => 'admins_fields_conditions', 'views' => 'admins_fields_conditions',
'title' => JText::_('COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS'), 'title' => JText::_('COM_COMPONENTBUILDER_THE_ADMIN_FIELDS_CONDITIONS'),
'icon' => 'shuffle') 'icon' => 'shuffle'),
array(
'view' => 'admin_custom_tabs',
'views' => 'admins_custom_tabs',
'title' => JText::_('COM_COMPONENTBUILDER_THE_ADMIN_CUSTOM_TABS'),
'icon' => 'folder-plus')
); );
} }
?> ?>

View File

@ -206,28 +206,6 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
} }
} }
// Set Type Selection
$this->typeOptions = $this->getTheTypeSelections();
if ($this->typeOptions)
{
// Type Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -',
'filter_type',
JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type'))
);
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// Type Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -',
'batch[type]',
JHtml::_('select.options', $this->typeOptions, 'value', 'text')
);
}
}
// Set Add Custom Import Selection // Set Add Custom Import Selection
$this->add_custom_importOptions = $this->getTheAdd_custom_importSelections(); $this->add_custom_importOptions = $this->getTheAdd_custom_importSelections();
if ($this->add_custom_importOptions) if ($this->add_custom_importOptions)
@ -250,6 +228,28 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
} }
} }
// Set Type Selection
$this->typeOptions = $this->getTheTypeSelections();
if ($this->typeOptions)
{
// Type Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -',
'filter_type',
JHtml::_('select.options', $this->typeOptions, 'value', 'text', $this->state->get('filter.type'))
);
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// Type Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL').' -',
'batch[type]',
JHtml::_('select.options', $this->typeOptions, 'value', 'text')
);
}
}
// Set Add Custom Button Selection // Set Add Custom Button Selection
$this->add_custom_buttonOptions = $this->getTheAdd_custom_buttonSelections(); $this->add_custom_buttonOptions = $this->getTheAdd_custom_buttonSelections();
if ($this->add_custom_buttonOptions) if ($this->add_custom_buttonOptions)
@ -381,42 +381,6 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
return false; return false;
} }
protected function getTheTypeSelections()
{
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('type'));
$query->from($db->quoteName('#__componentbuilder_admin_view'));
$query->order($db->quoteName('type') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$results = $db->loadColumn();
if ($results)
{
// get model
$model = $this->getModel();
$results = array_unique($results);
$_filter = array();
foreach ($results as $type)
{
// Translate the type selection
$text = $model->selectionTranslation($type,'type');
// Now add the type and its text to the options array
$_filter[] = JHtml::_('select.option', $type, JText::_($text));
}
return $_filter;
}
return false;
}
protected function getTheAdd_custom_importSelections() protected function getTheAdd_custom_importSelections()
{ {
// Get a db connection. // Get a db connection.
@ -453,6 +417,42 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
return false; return false;
} }
protected function getTheTypeSelections()
{
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('type'));
$query->from($db->quoteName('#__componentbuilder_admin_view'));
$query->order($db->quoteName('type') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$results = $db->loadColumn();
if ($results)
{
// get model
$model = $this->getModel();
$results = array_unique($results);
$_filter = array();
foreach ($results as $type)
{
// Translate the type selection
$text = $model->selectionTranslation($type,'type');
// Now add the type and its text to the options array
$_filter[] = JHtml::_('select.option', $type, JText::_($text));
}
return $_filter;
}
return false;
}
protected function getTheAdd_custom_buttonSelections() protected function getTheAdd_custom_buttonSelections()
{ {
// Get a db connection. // Get a db connection.

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,85 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// load tooltip behavior
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
$saveOrderingUrl = 'index.php?option=com_componentbuilder&task=admins_custom_tabs.saveOrderAjax&tmpl=component';
JHtml::_('sortablelist.sortable', 'admin_custom_tabsList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<script type="text/javascript">
Joomla.orderTable = function()
{
table = document.getElementById("sortTable");
direction = document.getElementById("directionTable");
order = table.options[table.selectedIndex].value;
if (order != '<?php echo $this->listOrder; ?>')
{
dirn = 'asc';
}
else
{
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, '');
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=admins_custom_tabs'); ?>" method="post" name="adminForm" id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif; ?>
<?php if (empty($this->items)): ?>
<?php echo $this->loadTemplate('toolbar');?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<?php echo $this->loadTemplate('toolbar');?>
<table class="table table-striped" id="admin_custom_tabsList">
<thead><?php echo $this->loadTemplate('head');?></thead>
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
<tbody><?php echo $this->loadTemplate('body');?></tbody>
</table>
<?php //Load the batch processing form. ?>
<?php if ($this->canCreate && $this->canEdit) : ?>
<?php echo JHtml::_(
'bootstrap.renderModal',
'collapseModal',
array(
'title' => JText::_('COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_BATCH_OPTIONS'),
'footer' => $this->loadTemplate('batch_footer')
),
$this->loadTemplate('batch_body')
); ?>
<?php endif; ?>
<input type="hidden" name="filter_order" value="" />
<input type="hidden" name="filter_order_Dir" value="" />
<input type="hidden" name="boxchecked" value="0" />
</div>
<?php endif; ?>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>

View File

@ -0,0 +1,18 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<p><?php echo JText::_('COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay; ?>

View File

@ -0,0 +1,23 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button" onclick="" data-dismiss="modal">
<?php echo JText::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit" onclick="Joomla.submitbutton('admin_custom_tabs.batch');">
<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>

View File

@ -0,0 +1,94 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$edit = "index.php?option=com_componentbuilder&view=admins_custom_tabs&task=admin_custom_tabs.edit";
?>
<?php foreach ($this->items as $i => $item): ?>
<?php
$canCheckin = $this->user->authorise('core.manage', 'com_checkin') || $item->checked_out == $this->user->id || $item->checked_out == 0;
$userChkOut = JFactory::getUser($item->checked_out);
$canDo = ComponentbuilderHelper::getActions('admin_custom_tabs',$item,'admins_custom_tabs');
?>
<tr class="row<?php echo $i % 2; ?>">
<td class="order nowrap center hidden-phone">
<?php if ($canDo->get('admin_custom_tabs.edit.state')): ?>
<?php
if ($this->saveOrder)
{
$iconClass = ' inactive';
}
else
{
$iconClass = ' inactive tip-top" hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED');
}
?>
<span class="sortable-handler<?php echo $iconClass; ?>">
<i class="icon-menu"></i>
</span>
<?php if ($this->saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5"
value="<?php echo $item->ordering; ?>" class="width-20 text-area-order " />
<?php endif; ?>
<?php else: ?>
&#8942;
<?php endif; ?>
</td>
<td class="nowrap center">
<?php if ($canDo->get('admin_custom_tabs.edit')): ?>
<?php if ($item->checked_out) : ?>
<?php if ($canCheckin) : ?>
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
<?php else: ?>
&#9633;
<?php endif; ?>
<?php else: ?>
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
<?php endif; ?>
<?php else: ?>
&#9633;
<?php endif; ?>
</td>
<td class="nowrap">
<div class="name">
<?php if ($canDo->get('admin_custom_tabs.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_custom_tabs.', $canCheckin); ?>
<?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_custom_tabs.edit.state')) : ?>
<?php if ($item->checked_out) : ?>
<?php if ($canCheckin) : ?>
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'admins_custom_tabs.', true, 'cb'); ?>
<?php else: ?>
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'admins_custom_tabs.', false, 'cb'); ?>
<?php endif; ?>
<?php else: ?>
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'admins_custom_tabs.', true, 'cb'); ?>
<?php endif; ?>
<?php else: ?>
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'admins_custom_tabs.', false, 'cb'); ?>
<?php endif; ?>
</td>
<td class="nowrap center hidden-phone">
<?php echo $item->id; ?>
</td>
</tr>
<?php endforeach; ?>

View File

@ -0,0 +1,18 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<tr>
<td colspan="5"><?php echo $this->pagination->getListFooter(); ?></td>
</tr>

View File

@ -0,0 +1,47 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<tr>
<?php if ($this->canEdit&& $this->canState): ?>
<th width="1%" class="nowrap center hidden-phone">
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
</th>
<th width="20" class="nowrap center">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<?php else: ?>
<th width="20" class="nowrap center hidden-phone">
&#9662;
</th>
<th width="20" class="nowrap center">
&#9632;
</th>
<?php endif; ?>
<th class="nowrap" >
<?php echo JText::_('COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_LABEL'); ?>
</th>
<?php if ($this->canState): ?>
<th width="10" class="nowrap center" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_STATUS', 'published', $this->listDirn, $this->listOrder); ?>
</th>
<?php else: ?>
<th width="10" class="nowrap center" >
<?php echo JText::_('COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_STATUS'); ?>
</th>
<?php endif; ?>
<th width="5" class="nowrap center hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ID', 'id', $this->listDirn, $this->listOrder); ?>
</th>
</tr>

View File

@ -0,0 +1,45 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<div id="filter-bar" class="btn-toolbar">
<div class="filter-search btn-group pull-left">
<label for="filter_search" class="element-invisible"><?php echo JText::_('Search');?></label>
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('Search Admins_custom_tabs'); ?>" />
</div>
<div class="btn-group pull-left">
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC');?></label>
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC');?></option>
<option value="asc" <?php if ($this->listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
<option value="desc" <?php if ($this->listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
</select>
</div>
<div class="btn-group pull-right">
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY');?></label>
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option>
<?php echo JHtml::_('select.options', $this->getSortFields(), 'value', 'text', $this->listOrder);?>
</select>
</div>
</div>
<div class="clearfix"> </div>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,224 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Componentbuilder View class for the Admins_custom_tabs
*/
class ComponentbuilderViewAdmins_custom_tabs extends JViewLegacy
{
/**
* Admins_custom_tabs view display method
* @return void
*/
function display($tpl = null)
{
if ($this->getLayout() !== 'modal')
{
// Include helper submenu
ComponentbuilderHelper::addSubmenu('admins_custom_tabs');
}
// Assign data to the view
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->user = JFactory::getUser();
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = $this->listOrder == 'ordering';
// get global action permissions
$this->canDo = ComponentbuilderHelper::getActions('admin_custom_tabs');
$this->canEdit = $this->canDo->get('admin_custom_tabs.edit');
$this->canState = $this->canDo->get('admin_custom_tabs.edit.state');
$this->canCreate = $this->canDo->get('admin_custom_tabs.create');
$this->canDelete = $this->canDo->get('admin_custom_tabs.delete');
$this->canBatch = $this->canDo->get('core.batch');
// We don't need toolbar in the modal window.
if ($this->getLayout() !== 'modal')
{
$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();
// load the batch html
if ($this->canCreate && $this->canEdit && $this->canState)
{
$this->batchDisplay = JHtmlBatch_::render();
}
}
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode("\n", $errors), 500);
}
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS'), 'joomla');
JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=admins_custom_tabs');
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
if ($this->canCreate)
{
JToolBarHelper::addNew('admin_custom_tabs.add');
}
// Only load if there are items
if (ComponentbuilderHelper::checkArray($this->items))
{
if ($this->canEdit)
{
JToolBarHelper::editList('admin_custom_tabs.edit');
}
if ($this->canState)
{
JToolBarHelper::publishList('admins_custom_tabs.publish');
JToolBarHelper::unpublishList('admins_custom_tabs.unpublish');
JToolBarHelper::archiveList('admins_custom_tabs.archive');
if ($this->canDo->get('core.admin'))
{
JToolBarHelper::checkin('admins_custom_tabs.checkin');
}
}
// Add a batch button
if ($this->canBatch && $this->canCreate && $this->canEdit && $this->canState)
{
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
// set the batch button name
$title = JText::_('JTOOLBAR_BATCH');
// Instantiate a new JLayoutFile instance and render the batch button
$layout = new JLayoutFile('joomla.toolbar.batch');
// add the button to the page
$dhtml = $layout->render(array('title' => $title));
$bar->appendButton('Custom', $dhtml, 'batch');
}
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
{
JToolbarHelper::deleteList('', 'admins_custom_tabs.delete', 'JTOOLBAR_EMPTY_TRASH');
}
elseif ($this->canState && $this->canDelete)
{
JToolbarHelper::trash('admins_custom_tabs.trash');
}
}
// set help url for this view if found
$help_url = ComponentbuilderHelper::getHelpUrl('admins_custom_tabs');
if (ComponentbuilderHelper::checkString($help_url))
{
JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url);
}
// add the options comp button
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
JToolBarHelper::preferences('com_componentbuilder');
}
if ($this->canState)
{
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_PUBLISHED'),
'filter_published',
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
);
// only load if batch allowed
if ($this->canBatch)
{
JHtmlBatch_::addListSelection(
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_STATE'),
'batch[published]',
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions', array('all' => false)), 'value', 'text', '', true)
);
}
}
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_ACCESS'),
'filter_access',
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
);
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
JHtmlBatch_::addListSelection(
JText::_('COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS'),
'batch[access]',
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
);
}
}
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
if (!isset($this->document))
{
$this->document = JFactory::getDocument();
}
$this->document->setTitle(JText::_('COM_COMPONENTBUILDER_ADMINS_CUSTOM_TABS'));
$this->document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/admins_custom_tabs.css", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
}
/**
* Escapes a value for output in a view script.
*
* @param mixed $var The output to escape.
*
* @return mixed The escaped value.
*/
public function escape($var)
{
if(strlen($var) > 50)
{
// use the helper htmlEscape method instead and shorten the string
return ComponentbuilderHelper::htmlEscape($var, $this->_charset, true);
}
// use the helper htmlEscape method instead.
return ComponentbuilderHelper::htmlEscape($var, $this->_charset);
}
/**
* Returns an array of fields the table can be sorted by
*
* @return array Array containing the field name to sort by as the key and display text as value
*/
protected function getSortFields()
{
return array(
'a.sorting' => JText::_('JGRID_HEADING_ORDERING'),
'a.published' => JText::_('JSTATUS'),
'a.id' => JText::_('JGRID_HEADING_ID')
);
}
}

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>23rd August, 2018</creationDate> <creationDate>24th August, 2018</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl> <authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
<copyright>Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.</copyright> <copyright>Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license> <license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>2.8.9</version> <version>2.8.10</version>
<description><![CDATA[ <description><![CDATA[
<h1>Component Builder (v.2.8.9)</h1> <h1>Component Builder (v.2.8.10)</h1>
<div style="clear: both;"></div> <div style="clear: both;"></div>
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. <p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.

View File

@ -449,7 +449,7 @@
<version>2.8.6</version> <version>2.8.6</version>
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl> <infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
<downloads> <downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.8.8/JCB_v2.8.8.zip</downloadurl> <downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.8.10/JCB_v2.8.10.zip</downloadurl>
</downloads> </downloads>
<tags> <tags>
<tag>stable</tag> <tag>stable</tag>
@ -466,7 +466,7 @@
<version>2.8.7</version> <version>2.8.7</version>
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl> <infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
<downloads> <downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.8.8/JCB_v2.8.8.zip</downloadurl> <downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.8.10/JCB_v2.8.10.zip</downloadurl>
</downloads> </downloads>
<tags> <tags>
<tag>stable</tag> <tag>stable</tag>
@ -483,7 +483,7 @@
<version>2.8.8</version> <version>2.8.8</version>
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl> <infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
<downloads> <downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.8.8/JCB_v2.8.8.zip</downloadurl> <downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.8.10/JCB_v2.8.10.zip</downloadurl>
</downloads> </downloads>
<tags> <tags>
<tag>stable</tag> <tag>stable</tag>
@ -500,7 +500,24 @@
<version>2.8.9</version> <version>2.8.9</version>
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl> <infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
<downloads> <downloads>
<downloadurl type="full" format="zip">http://domain.com/demo.zip</downloadurl> <downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.8.10/JCB_v2.8.10.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>http://www.joomlacomponentbuilder.com</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Component Builder</name>
<description>Builds Complex Joomla Components</description>
<element>com_componentbuilder</element>
<type>component</type>
<version>2.8.10</version>
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.8.10/JCB_v2.8.10.zip</downloadurl>
</downloads> </downloads>
<tags> <tags>
<tag>stable</tag> <tag>stable</tag>

View File

@ -1934,6 +1934,92 @@ class com_componentbuilderInstallerScript
} }
} }
// Create a new query object.
$query = $db->getQuery(true);
// Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
// Where Admin_custom_tabs alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.admin_custom_tabs') );
$db->setQuery($query);
// Execute query to see if alias is found
$db->execute();
$admin_custom_tabs_found = $db->getNumRows();
// Now check if there were any rows
if ($admin_custom_tabs_found)
{
// Since there are load the needed admin_custom_tabs type ids
$admin_custom_tabs_ids = $db->loadColumn();
// Remove Admin_custom_tabs from the content type table
$admin_custom_tabs_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.admin_custom_tabs') );
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($admin_custom_tabs_condition);
$db->setQuery($query);
// Execute the query to remove Admin_custom_tabs items
$admin_custom_tabs_done = $db->execute();
if ($admin_custom_tabs_done)
{
// If succesfully remove Admin_custom_tabs add queued success message.
$app->enqueueMessage(JText::_('The (com_componentbuilder.admin_custom_tabs) type alias was removed from the <b>#__content_type</b> table'));
}
// Remove Admin_custom_tabs items from the contentitem tag map table
$admin_custom_tabs_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_componentbuilder.admin_custom_tabs') );
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($admin_custom_tabs_condition);
$db->setQuery($query);
// Execute the query to remove Admin_custom_tabs items
$admin_custom_tabs_done = $db->execute();
if ($admin_custom_tabs_done)
{
// If succesfully remove Admin_custom_tabs add queued success message.
$app->enqueueMessage(JText::_('The (com_componentbuilder.admin_custom_tabs) type alias was removed from the <b>#__contentitem_tag_map</b> table'));
}
// Remove Admin_custom_tabs items from the ucm content table
$admin_custom_tabs_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_componentbuilder.admin_custom_tabs') );
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($admin_custom_tabs_condition);
$db->setQuery($query);
// Execute the query to remove Admin_custom_tabs items
$admin_custom_tabs_done = $db->execute();
if ($admin_custom_tabs_done)
{
// If succesfully remove Admin_custom_tabs add queued success message.
$app->enqueueMessage(JText::_('The (com_componentbuilder.admin_custom_tabs) type alias was removed from the <b>#__ucm_content</b> table'));
}
// Make sure that all the Admin_custom_tabs items are cleared from DB
foreach ($admin_custom_tabs_ids as $admin_custom_tabs_id)
{
// Remove Admin_custom_tabs items from the ucm base table
$admin_custom_tabs_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $admin_custom_tabs_id);
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($admin_custom_tabs_condition);
$db->setQuery($query);
// Execute the query to remove Admin_custom_tabs items
$db->execute();
// Remove Admin_custom_tabs items from the ucm history table
$admin_custom_tabs_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $admin_custom_tabs_id);
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($admin_custom_tabs_condition);
$db->setQuery($query);
// Execute the query to remove Admin_custom_tabs items
$db->execute();
}
}
// Create a new query object. // Create a new query object.
$query = $db->getQuery(true); $query = $db->getQuery(true);
// Select id from content type table // Select id from content type table
@ -3378,9 +3464,9 @@ class com_componentbuilderInstallerScript
$admin_view->type_title = 'Componentbuilder Admin_view'; $admin_view->type_title = 'Componentbuilder Admin_view';
$admin_view->type_alias = 'com_componentbuilder.admin_view'; $admin_view->type_alias = 'com_componentbuilder.admin_view';
$admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_getitems","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","short_description":"short_description","add_php_batchmove":"add_php_batchmove","add_php_allowedit":"add_php_allowedit","add_php_postsavehook":"add_php_postsavehook","add_php_before_save":"add_php_before_save","add_php_getlistquery":"add_php_getlistquery","add_php_getitems":"add_php_getitems","icon":"icon","add_sql":"add_sql","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","icon_add":"icon_add","add_php_after_publish":"add_php_after_publish","html_import_view":"html_import_view","add_php_after_delete":"add_php_after_delete","type":"type","not_required":"not_required","php_import_save":"php_import_save","add_php_getitems_after_all":"add_php_getitems_after_all","add_php_getform":"add_php_getform","add_php_save":"add_php_save","add_php_allowadd":"add_php_allowadd","add_php_batchcopy":"add_php_batchcopy","add_php_before_publish":"add_php_before_publish","add_php_before_delete":"add_php_before_delete","alias_builder_type":"alias_builder_type","add_php_document":"add_php_document","add_custom_import":"add_custom_import","alias_builder":"alias_builder","php_import_headers":"php_import_headers","name_list":"name_list","php_getitems":"php_getitems","add_css_view":"add_css_view","php_getitems_after_all":"php_getitems_after_all","css_view":"css_view","php_getlistquery":"php_getlistquery","add_css_views":"add_css_views","php_getform":"php_getform","css_views":"css_views","php_before_save":"php_before_save","add_javascript_view_file":"add_javascript_view_file","php_save":"php_save","javascript_view_file":"javascript_view_file","php_postsavehook":"php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","php_allowadd":"php_allowadd","javascript_view_footer":"javascript_view_footer","php_allowedit":"php_allowedit","add_javascript_views_file":"add_javascript_views_file","php_batchcopy":"php_batchcopy","javascript_views_file":"javascript_views_file","php_batchmove":"php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","php_before_publish":"php_before_publish","javascript_views_footer":"javascript_views_footer","php_after_publish":"php_after_publish","add_custom_button":"add_custom_button","php_before_delete":"php_before_delete","php_after_delete":"php_after_delete","php_controller":"php_controller","php_document":"php_document","php_model":"php_model","source":"source","php_controller_list":"php_controller_list","sql":"sql","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","php_import_display":"php_import_display","php_ajaxmethod":"php_ajaxmethod","php_import":"php_import","php_import_setdata":"php_import_setdata","add_php_getitem":"add_php_getitem","php_import_ext":"php_import_ext","php_getitem":"php_getitem"}}'; $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_getitem","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","short_description":"short_description","add_php_batchcopy":"add_php_batchcopy","add_php_allowadd":"add_php_allowadd","add_php_save":"add_php_save","add_php_getform":"add_php_getform","add_php_getitems_after_all":"add_php_getitems_after_all","icon":"icon","add_php_document":"add_php_document","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","icon_add":"icon_add","add_php_before_publish":"add_php_before_publish","add_custom_import":"add_custom_import","add_php_before_delete":"add_php_before_delete","name_list":"name_list","type":"type","php_import_headers":"php_import_headers","not_required":"not_required","add_php_getitems":"add_php_getitems","add_php_getlistquery":"add_php_getlistquery","add_php_before_save":"add_php_before_save","add_php_postsavehook":"add_php_postsavehook","add_php_allowedit":"add_php_allowedit","add_php_batchmove":"add_php_batchmove","add_php_after_publish":"add_php_after_publish","add_php_after_delete":"add_php_after_delete","add_sql":"add_sql","alias_builder_type":"alias_builder_type","html_import_view":"html_import_view","php_import_save":"php_import_save","alias_builder":"alias_builder","php_getitem":"php_getitem","php_getitems":"php_getitems","php_getitems_after_all":"php_getitems_after_all","add_css_view":"add_css_view","php_getlistquery":"php_getlistquery","css_view":"css_view","php_getform":"php_getform","add_css_views":"add_css_views","php_before_save":"php_before_save","css_views":"css_views","php_save":"php_save","add_javascript_view_file":"add_javascript_view_file","php_postsavehook":"php_postsavehook","javascript_view_file":"javascript_view_file","php_allowadd":"php_allowadd","add_javascript_view_footer":"add_javascript_view_footer","php_allowedit":"php_allowedit","javascript_view_footer":"javascript_view_footer","php_batchcopy":"php_batchcopy","add_javascript_views_file":"add_javascript_views_file","php_batchmove":"php_batchmove","javascript_views_file":"javascript_views_file","php_before_publish":"php_before_publish","add_javascript_views_footer":"add_javascript_views_footer","php_after_publish":"php_after_publish","javascript_views_footer":"javascript_views_footer","php_before_delete":"php_before_delete","add_custom_button":"add_custom_button","php_after_delete":"php_after_delete","php_document":"php_document","php_controller":"php_controller","source":"source","php_model":"php_model","sql":"sql","php_controller_list":"php_controller_list","php_model_list":"php_model_list","php_import_display":"php_import_display","add_php_ajax":"add_php_ajax","php_import":"php_import","php_ajaxmethod":"php_ajaxmethod","php_import_setdata":"php_import_setdata","php_import_ext":"php_import_ext","add_php_getitem":"add_php_getitem"}}';
$admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute'; $admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute';
$admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_batchmove","add_php_allowedit","add_php_postsavehook","add_php_before_save","add_php_getlistquery","add_php_getitems","add_sql","add_fadein","add_php_after_publish","add_php_after_delete","type","add_php_getitems_after_all","add_php_getform","add_php_save","add_php_allowadd","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","add_custom_import","add_css_view","add_css_views","add_javascript_view_file","add_javascript_view_footer","add_javascript_views_file","add_javascript_views_footer","add_custom_button","source","add_php_ajax","add_php_getitem"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}'; $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_batchcopy","add_php_allowadd","add_php_save","add_php_getform","add_php_getitems_after_all","add_php_document","add_fadein","add_php_before_publish","add_custom_import","add_php_before_delete","type","add_php_getitems","add_php_getlistquery","add_php_before_save","add_php_postsavehook","add_php_allowedit","add_php_batchmove","add_php_after_publish","add_php_after_delete","add_sql","add_css_view","add_css_views","add_javascript_view_file","add_javascript_view_footer","add_javascript_views_file","add_javascript_views_footer","add_custom_button","source","add_php_ajax","add_php_getitem"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}';
// Set the object into the content types table. // Set the object into the content types table.
$admin_view_Inserted = $db->insertObject('#__content_types', $admin_view); $admin_view_Inserted = $db->insertObject('#__content_types', $admin_view);
@ -3625,6 +3711,18 @@ class com_componentbuilderInstallerScript
// Set the object into the content types table. // Set the object into the content types table.
$admin_fields_relations_Inserted = $db->insertObject('#__content_types', $admin_fields_relations); $admin_fields_relations_Inserted = $db->insertObject('#__content_types', $admin_fields_relations);
// Create the admin_custom_tabs content type object.
$admin_custom_tabs = new stdClass();
$admin_custom_tabs->type_title = 'Componentbuilder Admin_custom_tabs';
$admin_custom_tabs->type_alias = 'com_componentbuilder.admin_custom_tabs';
$admin_custom_tabs->table = '{"special": {"dbtable": "#__componentbuilder_admin_custom_tabs","key": "id","type": "Admin_custom_tabs","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$admin_custom_tabs->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "admin_view","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"admin_view":"admin_view"}}';
$admin_custom_tabs->router = 'ComponentbuilderHelperRoute::getAdmin_custom_tabsRoute';
$admin_custom_tabs->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_custom_tabs.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","admin_view"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "admin_view","targetTable": "#__componentbuilder_admin_view","targetColumn": "id","displayColumn": "system_name"}]}';
// Set the object into the content types table.
$admin_custom_tabs_Inserted = $db->insertObject('#__content_types', $admin_custom_tabs);
// Create the component_admin_views content type object. // Create the component_admin_views content type object.
$component_admin_views = new stdClass(); $component_admin_views = new stdClass();
$component_admin_views->type_title = 'Componentbuilder Component_admin_views'; $component_admin_views->type_title = 'Componentbuilder Component_admin_views';
@ -3829,9 +3927,9 @@ class com_componentbuilderInstallerScript
$admin_view->type_title = 'Componentbuilder Admin_view'; $admin_view->type_title = 'Componentbuilder Admin_view';
$admin_view->type_alias = 'com_componentbuilder.admin_view'; $admin_view->type_alias = 'com_componentbuilder.admin_view';
$admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_getitems","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","short_description":"short_description","add_php_batchmove":"add_php_batchmove","add_php_allowedit":"add_php_allowedit","add_php_postsavehook":"add_php_postsavehook","add_php_before_save":"add_php_before_save","add_php_getlistquery":"add_php_getlistquery","add_php_getitems":"add_php_getitems","icon":"icon","add_sql":"add_sql","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","icon_add":"icon_add","add_php_after_publish":"add_php_after_publish","html_import_view":"html_import_view","add_php_after_delete":"add_php_after_delete","type":"type","not_required":"not_required","php_import_save":"php_import_save","add_php_getitems_after_all":"add_php_getitems_after_all","add_php_getform":"add_php_getform","add_php_save":"add_php_save","add_php_allowadd":"add_php_allowadd","add_php_batchcopy":"add_php_batchcopy","add_php_before_publish":"add_php_before_publish","add_php_before_delete":"add_php_before_delete","alias_builder_type":"alias_builder_type","add_php_document":"add_php_document","add_custom_import":"add_custom_import","alias_builder":"alias_builder","php_import_headers":"php_import_headers","name_list":"name_list","php_getitems":"php_getitems","add_css_view":"add_css_view","php_getitems_after_all":"php_getitems_after_all","css_view":"css_view","php_getlistquery":"php_getlistquery","add_css_views":"add_css_views","php_getform":"php_getform","css_views":"css_views","php_before_save":"php_before_save","add_javascript_view_file":"add_javascript_view_file","php_save":"php_save","javascript_view_file":"javascript_view_file","php_postsavehook":"php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","php_allowadd":"php_allowadd","javascript_view_footer":"javascript_view_footer","php_allowedit":"php_allowedit","add_javascript_views_file":"add_javascript_views_file","php_batchcopy":"php_batchcopy","javascript_views_file":"javascript_views_file","php_batchmove":"php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","php_before_publish":"php_before_publish","javascript_views_footer":"javascript_views_footer","php_after_publish":"php_after_publish","add_custom_button":"add_custom_button","php_before_delete":"php_before_delete","php_after_delete":"php_after_delete","php_controller":"php_controller","php_document":"php_document","php_model":"php_model","source":"source","php_controller_list":"php_controller_list","sql":"sql","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","php_import_display":"php_import_display","php_ajaxmethod":"php_ajaxmethod","php_import":"php_import","php_import_setdata":"php_import_setdata","add_php_getitem":"add_php_getitem","php_import_ext":"php_import_ext","php_getitem":"php_getitem"}}'; $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "php_getitem","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","short_description":"short_description","add_php_batchcopy":"add_php_batchcopy","add_php_allowadd":"add_php_allowadd","add_php_save":"add_php_save","add_php_getform":"add_php_getform","add_php_getitems_after_all":"add_php_getitems_after_all","icon":"icon","add_php_document":"add_php_document","add_fadein":"add_fadein","description":"description","icon_category":"icon_category","icon_add":"icon_add","add_php_before_publish":"add_php_before_publish","add_custom_import":"add_custom_import","add_php_before_delete":"add_php_before_delete","name_list":"name_list","type":"type","php_import_headers":"php_import_headers","not_required":"not_required","add_php_getitems":"add_php_getitems","add_php_getlistquery":"add_php_getlistquery","add_php_before_save":"add_php_before_save","add_php_postsavehook":"add_php_postsavehook","add_php_allowedit":"add_php_allowedit","add_php_batchmove":"add_php_batchmove","add_php_after_publish":"add_php_after_publish","add_php_after_delete":"add_php_after_delete","add_sql":"add_sql","alias_builder_type":"alias_builder_type","html_import_view":"html_import_view","php_import_save":"php_import_save","alias_builder":"alias_builder","php_getitem":"php_getitem","php_getitems":"php_getitems","php_getitems_after_all":"php_getitems_after_all","add_css_view":"add_css_view","php_getlistquery":"php_getlistquery","css_view":"css_view","php_getform":"php_getform","add_css_views":"add_css_views","php_before_save":"php_before_save","css_views":"css_views","php_save":"php_save","add_javascript_view_file":"add_javascript_view_file","php_postsavehook":"php_postsavehook","javascript_view_file":"javascript_view_file","php_allowadd":"php_allowadd","add_javascript_view_footer":"add_javascript_view_footer","php_allowedit":"php_allowedit","javascript_view_footer":"javascript_view_footer","php_batchcopy":"php_batchcopy","add_javascript_views_file":"add_javascript_views_file","php_batchmove":"php_batchmove","javascript_views_file":"javascript_views_file","php_before_publish":"php_before_publish","add_javascript_views_footer":"add_javascript_views_footer","php_after_publish":"php_after_publish","javascript_views_footer":"javascript_views_footer","php_before_delete":"php_before_delete","add_custom_button":"add_custom_button","php_after_delete":"php_after_delete","php_document":"php_document","php_controller":"php_controller","source":"source","php_model":"php_model","sql":"sql","php_controller_list":"php_controller_list","php_model_list":"php_model_list","php_import_display":"php_import_display","add_php_ajax":"add_php_ajax","php_import":"php_import","php_ajaxmethod":"php_ajaxmethod","php_import_setdata":"php_import_setdata","php_import_ext":"php_import_ext","add_php_getitem":"add_php_getitem"}}';
$admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute'; $admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute';
$admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_batchmove","add_php_allowedit","add_php_postsavehook","add_php_before_save","add_php_getlistquery","add_php_getitems","add_sql","add_fadein","add_php_after_publish","add_php_after_delete","type","add_php_getitems_after_all","add_php_getform","add_php_save","add_php_allowadd","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","add_custom_import","add_css_view","add_css_views","add_javascript_view_file","add_javascript_view_footer","add_javascript_views_file","add_javascript_views_footer","add_custom_button","source","add_php_ajax","add_php_getitem"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}'; $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_batchcopy","add_php_allowadd","add_php_save","add_php_getform","add_php_getitems_after_all","add_php_document","add_fadein","add_php_before_publish","add_custom_import","add_php_before_delete","type","add_php_getitems","add_php_getlistquery","add_php_before_save","add_php_postsavehook","add_php_allowedit","add_php_batchmove","add_php_after_publish","add_php_after_delete","add_sql","add_css_view","add_css_views","add_javascript_view_file","add_javascript_view_footer","add_javascript_views_file","add_javascript_views_footer","add_custom_button","source","add_php_ajax","add_php_getitem"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "alias_builder","targetTable": "#__componentbuilder_field","targetColumn": "id","displayColumn": "name"}]}';
// Check if admin_view type is already in content_type DB. // Check if admin_view type is already in content_type DB.
$admin_view_id = null; $admin_view_id = null;
@ -4433,6 +4531,35 @@ class com_componentbuilderInstallerScript
$admin_fields_relations_Inserted = $db->insertObject('#__content_types', $admin_fields_relations); $admin_fields_relations_Inserted = $db->insertObject('#__content_types', $admin_fields_relations);
} }
// Create the admin_custom_tabs content type object.
$admin_custom_tabs = new stdClass();
$admin_custom_tabs->type_title = 'Componentbuilder Admin_custom_tabs';
$admin_custom_tabs->type_alias = 'com_componentbuilder.admin_custom_tabs';
$admin_custom_tabs->table = '{"special": {"dbtable": "#__componentbuilder_admin_custom_tabs","key": "id","type": "Admin_custom_tabs","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$admin_custom_tabs->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "admin_view","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"admin_view":"admin_view"}}';
$admin_custom_tabs->router = 'ComponentbuilderHelperRoute::getAdmin_custom_tabsRoute';
$admin_custom_tabs->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_custom_tabs.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","admin_view"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "admin_view","targetTable": "#__componentbuilder_admin_view","targetColumn": "id","displayColumn": "system_name"}]}';
// Check if admin_custom_tabs type is already in content_type DB.
$admin_custom_tabs_id = null;
$query = $db->getQuery(true);
$query->select($db->quoteName(array('type_id')));
$query->from($db->quoteName('#__content_types'));
$query->where($db->quoteName('type_alias') . ' LIKE '. $db->quote($admin_custom_tabs->type_alias));
$db->setQuery($query);
$db->execute();
// Set the object into the content types table.
if ($db->getNumRows())
{
$admin_custom_tabs->type_id = $db->loadResult();
$admin_custom_tabs_Updated = $db->updateObject('#__content_types', $admin_custom_tabs, 'type_id');
}
else
{
$admin_custom_tabs_Inserted = $db->insertObject('#__content_types', $admin_custom_tabs);
}
// Create the component_admin_views content type object. // Create the component_admin_views content type object.
$component_admin_views = new stdClass(); $component_admin_views = new stdClass();
$component_admin_views->type_title = 'Componentbuilder Component_admin_views'; $component_admin_views->type_title = 'Componentbuilder Component_admin_views';
@ -4989,7 +5116,7 @@ class com_componentbuilderInstallerScript
echo '<a target="_blank" href="http://www.joomlacomponentbuilder.com" title="Component Builder"> echo '<a target="_blank" href="http://www.joomlacomponentbuilder.com" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/> <img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a> </a>
<h3>Upgrade to Version 2.8.9 Was Successful! Let us know if anything is not working as expected.</h3>'; <h3>Upgrade to Version 2.8.10 Was Successful! Let us know if anything is not working as expected.</h3>';
} }
} }