Improved the export feature to allow bulk custom overide, and dynamic behaviour towards larger sets. Added function name to custom buttons as a class for CSS styling.
This commit is contained in:
@ -138,7 +138,7 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy
|
||||
if ($this->user->authorise('admin_view.run_expansion', 'com_componentbuilder'))
|
||||
{
|
||||
// add Run Expansion button.
|
||||
JToolBarHelper::custom('admin_views.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
JToolBarHelper::custom('admin_views.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('admin_view.import'))
|
||||
|
@ -339,17 +339,17 @@ class ComponentbuilderViewCompiler extends JViewLegacy
|
||||
if ($this->canDo->get('compiler.run_expansion'))
|
||||
{
|
||||
// add Run Expansion button.
|
||||
JToolBarHelper::custom('compiler.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
JToolBarHelper::custom('compiler.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
}
|
||||
if ($this->canDo->get('compiler.translate'))
|
||||
{
|
||||
// add Translate button.
|
||||
JToolBarHelper::custom('compiler.runTranslator', 'comments-2', '', 'COM_COMPONENTBUILDER_TRANSLATE', false);
|
||||
JToolBarHelper::custom('compiler.runTranslator', 'comments-2 custom-button-runtranslator', '', 'COM_COMPONENTBUILDER_TRANSLATE', false);
|
||||
}
|
||||
if ($this->canDo->get('compiler.clear_tmp'))
|
||||
{
|
||||
// add Clear tmp button.
|
||||
JToolBarHelper::custom('compiler.clearTmp', 'purge', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false);
|
||||
JToolBarHelper::custom('compiler.clearTmp', 'purge custom-button-cleartmp', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
|
@ -138,7 +138,7 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy
|
||||
if ($this->user->authorise('custom_admin_view.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
JToolBarHelper::custom('custom_admin_views.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
JToolBarHelper::custom('custom_admin_views.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('custom_admin_view.import'))
|
||||
|
@ -138,7 +138,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
||||
if ($this->user->authorise('custom_code.run_expansion', 'com_componentbuilder'))
|
||||
{
|
||||
// add Run Expansion button.
|
||||
JToolBarHelper::custom('custom_codes.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
JToolBarHelper::custom('custom_codes.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('custom_code.import'))
|
||||
|
@ -138,7 +138,7 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy
|
||||
if ($this->user->authorise('dynamic_get.run_expansion', 'com_componentbuilder'))
|
||||
{
|
||||
// add Run Expansion button.
|
||||
JToolBarHelper::custom('dynamic_gets.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
JToolBarHelper::custom('dynamic_gets.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('dynamic_get.import'))
|
||||
|
@ -138,7 +138,7 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
if ($this->user->authorise('field.run_expansion', 'com_componentbuilder'))
|
||||
{
|
||||
// add Run Expansion button.
|
||||
JToolBarHelper::custom('fields.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
JToolBarHelper::custom('fields.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('field.import'))
|
||||
|
@ -257,32 +257,32 @@ class ComponentbuilderViewGet_snippets extends JViewLegacy
|
||||
if ($this->canDo->get('get_snippets.custom_admin_views'))
|
||||
{
|
||||
// add Custom Admin Views button.
|
||||
JToolBarHelper::custom('get_snippets.openCustomAdminViews', 'screen', '', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS', false);
|
||||
JToolBarHelper::custom('get_snippets.openCustomAdminViews', 'screen custom-button-opencustomadminviews', '', 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS', false);
|
||||
}
|
||||
if ($this->canDo->get('get_snippets.site_views'))
|
||||
{
|
||||
// add Site Views button.
|
||||
JToolBarHelper::custom('get_snippets.openSiteViews', 'palette', '', 'COM_COMPONENTBUILDER_SITE_VIEWS', false);
|
||||
JToolBarHelper::custom('get_snippets.openSiteViews', 'palette custom-button-opensiteviews', '', 'COM_COMPONENTBUILDER_SITE_VIEWS', false);
|
||||
}
|
||||
if ($this->canDo->get('get_snippets.templates'))
|
||||
{
|
||||
// add Templates button.
|
||||
JToolBarHelper::custom('get_snippets.openTemplates', 'brush', '', 'COM_COMPONENTBUILDER_TEMPLATES', false);
|
||||
JToolBarHelper::custom('get_snippets.openTemplates', 'brush custom-button-opentemplates', '', 'COM_COMPONENTBUILDER_TEMPLATES', false);
|
||||
}
|
||||
if ($this->canDo->get('get_snippets.layouts'))
|
||||
{
|
||||
// add Layouts button.
|
||||
JToolBarHelper::custom('get_snippets.openLayouts', 'brush', '', 'COM_COMPONENTBUILDER_LAYOUTS', false);
|
||||
JToolBarHelper::custom('get_snippets.openLayouts', 'brush custom-button-openlayouts', '', 'COM_COMPONENTBUILDER_LAYOUTS', false);
|
||||
}
|
||||
if ($this->canDo->get('get_snippets.snippets'))
|
||||
{
|
||||
// add Snippets button.
|
||||
JToolBarHelper::custom('get_snippets.openSnippets', 'pin', '', 'COM_COMPONENTBUILDER_SNIPPETS', false);
|
||||
JToolBarHelper::custom('get_snippets.openSnippets', 'pin custom-button-opensnippets', '', 'COM_COMPONENTBUILDER_SNIPPETS', false);
|
||||
}
|
||||
if ($this->canDo->get('get_snippets.libraries'))
|
||||
{
|
||||
// add Libraries button.
|
||||
JToolBarHelper::custom('get_snippets.openLibraries', 'puzzle', '', 'COM_COMPONENTBUILDER_LIBRARIES', false);
|
||||
JToolBarHelper::custom('get_snippets.openLibraries', 'puzzle custom-button-openlibraries', '', 'COM_COMPONENTBUILDER_LIBRARIES', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
|
@ -123,12 +123,12 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
if ($this->user->authorise('joomla_component.clone', 'com_componentbuilder'))
|
||||
{
|
||||
// add Clone button.
|
||||
JToolBarHelper::custom('joomla_components.cloner', 'save-copy', '', 'COM_COMPONENTBUILDER_CLONE', 'true');
|
||||
JToolBarHelper::custom('joomla_components.cloner', 'save-copy custom-button-cloner', '', 'COM_COMPONENTBUILDER_CLONE', 'true');
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder'))
|
||||
{
|
||||
// add Export JCB Packages button.
|
||||
JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', 'true');
|
||||
JToolBarHelper::custom('joomla_components.smartExport', 'download custom-button-smartexport', '', 'COM_COMPONENTBUILDER_EXPORT_JCB_PACKAGES', 'true');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
@ -148,22 +148,22 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy
|
||||
if ($this->user->authorise('joomla_component.import_jcb_packages', 'com_componentbuilder'))
|
||||
{
|
||||
// add Import JCB Packages button.
|
||||
JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES', false);
|
||||
JToolBarHelper::custom('joomla_components.smartImport', 'upload custom-button-smartimport', '', 'COM_COMPONENTBUILDER_IMPORT_JCB_PACKAGES', false);
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.run_expansion', 'com_componentbuilder'))
|
||||
{
|
||||
// add Run Expansion button.
|
||||
JToolBarHelper::custom('joomla_components.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
JToolBarHelper::custom('joomla_components.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.backup', 'com_componentbuilder'))
|
||||
{
|
||||
// add Backup button.
|
||||
JToolBarHelper::custom('joomla_components.backup', 'archive', '', 'COM_COMPONENTBUILDER_BACKUP', false);
|
||||
JToolBarHelper::custom('joomla_components.backup', 'archive custom-button-backup', '', 'COM_COMPONENTBUILDER_BACKUP', false);
|
||||
}
|
||||
if ($this->user->authorise('joomla_component.clear_tmp', 'com_componentbuilder'))
|
||||
{
|
||||
// add Clear tmp button.
|
||||
JToolBarHelper::custom('joomla_components.clearTmp', 'purge', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false);
|
||||
JToolBarHelper::custom('joomla_components.clearTmp', 'purge custom-button-cleartmp', '', 'COM_COMPONENTBUILDER_CLEAR_TMP', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('joomla_component.import'))
|
||||
|
@ -133,12 +133,12 @@ class ComponentbuilderViewJoomla_modules extends JViewLegacy
|
||||
if ($this->user->authorise('joomla_module.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
JToolBarHelper::custom('joomla_modules.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
JToolBarHelper::custom('joomla_modules.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
}
|
||||
if ($this->user->authorise('joomla_module.run_expansion', 'com_componentbuilder'))
|
||||
{
|
||||
// add Run Expansion button.
|
||||
JToolBarHelper::custom('joomla_modules.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
JToolBarHelper::custom('joomla_modules.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
|
@ -133,22 +133,22 @@ class ComponentbuilderViewJoomla_plugins extends JViewLegacy
|
||||
if ($this->user->authorise('joomla_plugin.run_expansion', 'com_componentbuilder'))
|
||||
{
|
||||
// add Run Expansion button.
|
||||
JToolBarHelper::custom('joomla_plugins.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
JToolBarHelper::custom('joomla_plugins.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
}
|
||||
if ($this->user->authorise('joomla_plugin.get_boilerplate', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Boilerplate button.
|
||||
JToolBarHelper::custom('joomla_plugins.getBoilerplate', 'joomla', '', 'COM_COMPONENTBUILDER_GET_BOILERPLATE', false);
|
||||
JToolBarHelper::custom('joomla_plugins.getBoilerplate', 'joomla custom-button-getboilerplate', '', 'COM_COMPONENTBUILDER_GET_BOILERPLATE', false);
|
||||
}
|
||||
if ($this->user->authorise('joomla_plugin.methods', 'com_componentbuilder'))
|
||||
{
|
||||
// add Methods button.
|
||||
JToolBarHelper::custom('joomla_plugins.openClassMethods', 'joomla', '', 'COM_COMPONENTBUILDER_METHODS', false);
|
||||
JToolBarHelper::custom('joomla_plugins.openClassMethods', 'joomla custom-button-openclassmethods', '', 'COM_COMPONENTBUILDER_METHODS', false);
|
||||
}
|
||||
if ($this->user->authorise('joomla_plugin.properties', 'com_componentbuilder'))
|
||||
{
|
||||
// add Properties button.
|
||||
JToolBarHelper::custom('joomla_plugins.openClassProperties', 'joomla', '', 'COM_COMPONENTBUILDER_PROPERTIES', false);
|
||||
JToolBarHelper::custom('joomla_plugins.openClassProperties', 'joomla custom-button-openclassproperties', '', 'COM_COMPONENTBUILDER_PROPERTIES', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
|
@ -138,7 +138,7 @@ class ComponentbuilderViewLanguages extends JViewLegacy
|
||||
if ($this->user->authorise('language.build', 'com_componentbuilder'))
|
||||
{
|
||||
// add Build button.
|
||||
JToolBarHelper::custom('languages.buildLanguages', 'joomla', '', 'COM_COMPONENTBUILDER_BUILD', false);
|
||||
JToolBarHelper::custom('languages.buildLanguages', 'joomla custom-button-buildlanguages', '', 'COM_COMPONENTBUILDER_BUILD', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('language.import'))
|
||||
|
@ -138,7 +138,7 @@ class ComponentbuilderViewLayouts extends JViewLegacy
|
||||
if ($this->user->authorise('layout.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
JToolBarHelper::custom('layouts.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
JToolBarHelper::custom('layouts.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('layout.import'))
|
||||
|
@ -133,7 +133,7 @@ class ComponentbuilderViewLibraries extends JViewLegacy
|
||||
if ($this->user->authorise('library.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
JToolBarHelper::custom('libraries.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
JToolBarHelper::custom('libraries.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
|
@ -138,7 +138,7 @@ class ComponentbuilderViewSite_views extends JViewLegacy
|
||||
if ($this->user->authorise('site_view.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
JToolBarHelper::custom('site_views.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
JToolBarHelper::custom('site_views.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('site_view.import'))
|
||||
|
@ -123,7 +123,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
if ($this->user->authorise('snippet.share_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Share Snippets button.
|
||||
JToolBarHelper::custom('snippets.shareSnippets', 'share', '', 'COM_COMPONENTBUILDER_SHARE_SNIPPETS', 'true');
|
||||
JToolBarHelper::custom('snippets.shareSnippets', 'share custom-button-sharesnippets', '', 'COM_COMPONENTBUILDER_SHARE_SNIPPETS', 'true');
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
|
||||
@ -143,7 +143,7 @@ class ComponentbuilderViewSnippets extends JViewLegacy
|
||||
if ($this->user->authorise('snippet.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
JToolBarHelper::custom('snippets.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
JToolBarHelper::custom('snippets.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('snippet.import'))
|
||||
|
@ -138,7 +138,7 @@ class ComponentbuilderViewTemplates extends JViewLegacy
|
||||
if ($this->user->authorise('template.get_snippets', 'com_componentbuilder'))
|
||||
{
|
||||
// add Get Snippets button.
|
||||
JToolBarHelper::custom('templates.getSnippets', 'search', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
JToolBarHelper::custom('templates.getSnippets', 'search custom-button-getsnippets', '', 'COM_COMPONENTBUILDER_GET_SNIPPETS', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('template.import'))
|
||||
|
@ -138,7 +138,7 @@ class ComponentbuilderViewValidation_rules extends JViewLegacy
|
||||
if ($this->user->authorise('validation_rule.run_expansion', 'com_componentbuilder'))
|
||||
{
|
||||
// add Run Expansion button.
|
||||
JToolBarHelper::custom('validation_rules.runExpansion', 'expand-2', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
JToolBarHelper::custom('validation_rules.runExpansion', 'expand-2 custom-button-runexpansion', '', 'COM_COMPONENTBUILDER_RUN_EXPANSION', false);
|
||||
}
|
||||
|
||||
if ($this->canDo->get('core.import') && $this->canDo->get('validation_rule.import'))
|
||||
|
Reference in New Issue
Block a user