From 35482416cb56bff2ede48dae5650ec751a4acca1 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 13 Oct 2017 01:14:17 +0200 Subject: [PATCH] Decoupled fields and conditions from admin view as explained in gh-136. Added new admin_fields and admin_fields_conditions tables and moved the data from admin_view to these new tables. --- README.md | 10 +- admin/README.txt | 10 +- admin/access.xml | 11 +- admin/assets/css/admin.css | 2 +- admin/assets/css/admin_fields.css | 27 + admin/assets/css/admin_fields_conditions.css | 27 + admin/assets/css/admin_view.css | 4 +- admin/assets/css/admin_views.css | 4 +- admin/assets/css/admins_fields.css | 27 + admin/assets/css/admins_fields_conditions.css | 27 + admin/assets/css/dashboard.css | 2 +- admin/assets/css/language_translation.css | 4 +- admin/assets/css/language_translations.css | 4 +- admin/assets/js/admin.js | 2 +- admin/componentbuilder.php | 2 +- admin/controller.php | 6 +- admin/controllers/admin_fields.php | 312 +++++++ admin/controllers/admin_fields_conditions.php | 312 +++++++ admin/controllers/admin_view.php | 13 +- admin/controllers/admin_views.php | 4 +- admin/controllers/admins_fields.php | 48 + .../controllers/admins_fields_conditions.php | 48 + admin/controllers/ajax.json.php | 121 ++- admin/controllers/componentbuilder.php | 2 +- admin/controllers/help.php | 2 +- admin/controllers/import.php | 2 +- .../controllers/import_joomla_components.php | 2 +- admin/controllers/language_translation.php | 4 +- admin/controllers/language_translations.php | 4 +- admin/helpers/compiler/a_Get.php | 395 +++++--- admin/helpers/componentbuilder.php | 7 +- admin/helpers/componentbuilderemail.php | 2 +- admin/helpers/headercheck.php | 2 +- admin/helpers/html/batch_.php | 2 +- admin/helpers/indenter.php | 2 +- admin/helpers/js.php | 2 +- admin/helpers/minify.php | 2 +- .../en-GB/en-GB.com_componentbuilder.ini | 257 +++-- .../en-GB/en-GB.com_componentbuilder.sys.ini | 10 +- admin/layouts/admin_fields/fields_above.php | 41 + .../fields_fullwidth.php | 6 +- admin/layouts/admin_fields/index.html | 1 + admin/layouts/admin_fields/publishing.php | 58 ++ .../publlshing.php | 3 +- .../conditions_above.php | 41 + .../conditions_fullwidth.php | 49 + .../admin_fields_conditions/index.html | 1 + .../admin_fields_conditions/publishing.php | 58 ++ .../admin_fields_conditions/publlshing.php | 59 ++ admin/layouts/admin_view/css_fullwidth.php | 2 +- .../admin_view/custom_buttons_fullwidth.php | 2 +- .../admin_view/custom_buttons_left.php | 2 +- .../admin_view/custom_import_fullwidth.php | 2 +- .../fields_conditions_fullwidth.php | 48 + .../admin_view/fields_conditions_left.php | 54 ++ .../admin_view/fields_conditions_right.php | 54 ++ .../admin_view/javascript_fullwidth.php | 2 +- .../linked_components_fullwidth.php | 2 +- admin/layouts/admin_view/mysql_fullwidth.php | 2 +- admin/layouts/admin_view/mysql_left.php | 2 +- admin/layouts/admin_view/php_fullwidth.php | 2 +- admin/layouts/admin_view/publishing.php | 2 +- admin/layouts/admin_view/publlshing.php | 3 +- admin/layouts/admin_view/settings_above.php | 2 +- admin/layouts/admin_view/settings_left.php | 2 +- admin/layouts/admin_view/settings_right.php | 2 +- admin/layouts/admin_view/settings_under.php | 2 +- admin/layouts/batchselection.php | 2 +- .../custom_buttons_fullwidth.php | 2 +- .../custom_admin_view/custom_buttons_left.php | 2 +- .../custom_script_fullwidth.php | 2 +- .../custom_admin_view/details_above.php | 2 +- .../custom_admin_view/details_fullwidth.php | 2 +- .../custom_admin_view/details_left.php | 2 +- .../custom_admin_view/details_right.php | 2 +- .../custom_admin_view/details_rightside.php | 2 +- .../custom_admin_view/details_under.php | 2 +- .../linked_components_fullwidth.php | 2 +- .../layouts/custom_admin_view/publishing.php | 2 +- .../layouts/custom_admin_view/publlshing.php | 3 +- admin/layouts/custom_code/details_above.php | 2 +- .../layouts/custom_code/details_fullwidth.php | 2 +- admin/layouts/custom_code/details_left.php | 2 +- admin/layouts/custom_code/details_right.php | 2 +- admin/layouts/custom_code/details_under.php | 2 +- admin/layouts/custom_code/publishing.php | 2 +- admin/layouts/custom_code/publlshing.php | 3 +- .../layouts/dynamic_get/abacus_fullwidth.php | 2 +- admin/layouts/dynamic_get/abacus_left.php | 2 +- .../dynamic_get/custom_script_fullwidth.php | 2 +- admin/layouts/dynamic_get/joint_fullwidth.php | 2 +- admin/layouts/dynamic_get/main_above.php | 2 +- admin/layouts/dynamic_get/main_fullwidth.php | 2 +- admin/layouts/dynamic_get/main_left.php | 2 +- admin/layouts/dynamic_get/main_right.php | 2 +- admin/layouts/dynamic_get/main_under.php | 2 +- admin/layouts/dynamic_get/publishing.php | 2 +- admin/layouts/dynamic_get/publlshing.php | 3 +- admin/layouts/field/details_fullwidth.php | 2 +- admin/layouts/field/details_left.php | 2 +- admin/layouts/field/details_right.php | 2 +- admin/layouts/field/details_under.php | 2 +- .../field/linked_admin_views_fullwidth.php | 2 +- admin/layouts/field/publishing.php | 2 +- admin/layouts/field/publlshing.php | 3 +- admin/layouts/field/scripts_left.php | 2 +- admin/layouts/field/scripts_right.php | 2 +- admin/layouts/fieldtype/details_fullwidth.php | 2 +- admin/layouts/fieldtype/details_left.php | 2 +- admin/layouts/fieldtype/details_right.php | 2 +- admin/layouts/fieldtype/fields_fullwidth.php | 2 +- admin/layouts/fieldtype/publishing.php | 2 +- admin/layouts/fieldtype/publlshing.php | 3 +- admin/layouts/ftp/details_above.php | 2 +- admin/layouts/ftp/details_fullwidth.php | 2 +- .../ftp/linked_components_fullwidth.php | 2 +- admin/layouts/ftp/publishing.php | 2 +- admin/layouts/ftp/publlshing.php | 3 +- admin/layouts/help_document/details_above.php | 2 +- .../help_document/details_fullwidth.php | 2 +- admin/layouts/help_document/details_left.php | 2 +- admin/layouts/help_document/details_right.php | 2 +- admin/layouts/help_document/details_under.php | 2 +- admin/layouts/help_document/publishing.php | 2 +- admin/layouts/help_document/publlshing.php | 2 +- .../admin_views_fullwidth.php | 2 +- .../custom_admin_views_fullwidth.php | 2 +- .../joomla_component/details_above.php | 2 +- .../layouts/joomla_component/details_left.php | 2 +- .../joomla_component/details_right.php | 2 +- .../joomla_component/details_under.php | 2 +- .../dynamic_build_beta_fullwidth.php | 2 +- .../dynamic_integration_fullwidth.php | 2 +- .../libs_helpers_fullwidth.php | 2 +- admin/layouts/joomla_component/metadata.php | 56 ++ .../joomla_component/mysql_fullwidth.php | 2 +- .../joomla_component/php_fullwidth.php | 2 +- admin/layouts/joomla_component/publishing.php | 10 +- .../layouts/joomla_component/readme_left.php | 2 +- .../layouts/joomla_component/readme_right.php | 2 +- .../joomla_component/settings_left.php | 2 +- .../joomla_component/settings_right.php | 2 +- .../joomla_component/site_views_fullwidth.php | 2 +- .../translation_fullwidth.php | 2 +- admin/layouts/language/details_left.php | 2 +- admin/layouts/language/details_right.php | 2 +- admin/layouts/language/publishing.php | 2 +- admin/layouts/language/publlshing.php | 3 +- .../language_translation/details_above.php | 2 +- .../details_fullwidth.php | 2 +- .../language_translation/publishing.php | 2 +- .../language_translation/publlshing.php | 3 +- .../layout/custom_script_fullwidth.php | 2 +- admin/layouts/layout/details_fullwidth.php | 2 +- admin/layouts/layout/details_left.php | 2 +- admin/layouts/layout/details_right.php | 2 +- admin/layouts/layout/details_rightside.php | 2 +- admin/layouts/layout/details_under.php | 2 +- admin/layouts/layout/publishing.php | 2 +- admin/layouts/layout/publlshing.php | 3 +- .../site_view/custom_buttons_fullwidth.php | 2 +- .../layouts/site_view/custom_buttons_left.php | 2 +- .../site_view/custom_buttons_right.php | 2 +- admin/layouts/site_view/details_above.php | 2 +- admin/layouts/site_view/details_fullwidth.php | 2 +- admin/layouts/site_view/details_left.php | 2 +- admin/layouts/site_view/details_right.php | 2 +- admin/layouts/site_view/details_rightside.php | 2 +- admin/layouts/site_view/details_under.php | 2 +- .../site_view/javascript_css_fullwidth.php | 2 +- .../site_view/linked_components_fullwidth.php | 2 +- admin/layouts/site_view/php_fullwidth.php | 2 +- admin/layouts/site_view/publishing.php | 2 +- admin/layouts/site_view/publlshing.php | 3 +- admin/layouts/snippet/details_above.php | 2 +- admin/layouts/snippet/details_left.php | 2 +- admin/layouts/snippet/details_right.php | 2 +- admin/layouts/snippet/publishing.php | 2 +- admin/layouts/snippet/publlshing.php | 3 +- .../template/custom_script_fullwidth.php | 2 +- admin/layouts/template/details_fullwidth.php | 2 +- admin/layouts/template/details_left.php | 2 +- admin/layouts/template/details_right.php | 2 +- admin/layouts/template/details_rightside.php | 2 +- admin/layouts/template/details_under.php | 2 +- admin/layouts/template/publishing.php | 2 +- admin/layouts/template/publlshing.php | 3 +- admin/models/admin_fields.php | 879 ++++++++++++++++++ admin/models/admin_fields_conditions.php | 879 ++++++++++++++++++ admin/models/admin_view.php | 108 +-- admin/models/admin_views.php | 33 +- admin/models/admins_fields.php | 224 +++++ admin/models/admins_fields_conditions.php | 224 +++++ admin/models/ajax.php | 203 ++-- admin/models/componentbuilder.php | 4 +- admin/models/custom_admin_views.php | 21 - admin/models/custom_codes.php | 21 - admin/models/dynamic_gets.php | 21 - admin/models/field.php | 15 - admin/models/fields.php | 21 - admin/models/fields/adminviewfolderlist.php | 2 +- admin/models/fields/adminviews.php | 2 +- admin/models/fields/articles.php | 2 +- admin/models/fields/component.php | 2 +- admin/models/fields/components.php | 2 +- admin/models/fields/customadminviews.php | 2 +- admin/models/fields/customfilelist.php | 2 +- admin/models/fields/customfolderlist.php | 2 +- admin/models/fields/customgets.php | 2 +- admin/models/fields/dbtables.php | 2 +- admin/models/fields/dynamicget.php | 2 +- admin/models/fields/dynamicgets.php | 2 +- admin/models/fields/fields.php | 2 +- admin/models/fields/fieldsmulti.php | 2 +- admin/models/fields/fieldtypes.php | 2 +- admin/models/fields/ftps.php | 2 +- admin/models/fields/lang.php | 2 +- admin/models/fields/maingets.php | 2 +- admin/models/fields/siteviewfolderlist.php | 2 +- admin/models/fields/siteviews.php | 2 +- admin/models/fields/snippets.php | 2 +- admin/models/fieldtype.php | 15 - admin/models/fieldtypes.php | 21 - admin/models/forms/admin_fields.js | 25 + admin/models/forms/admin_fields.xml | 297 ++++++ admin/models/forms/admin_fields_conditions.js | 57 ++ .../models/forms/admin_fields_conditions.xml | 238 +++++ admin/models/forms/admin_view.js | 32 +- admin/models/forms/admin_view.xml | 592 +++--------- admin/models/forms/custom_admin_view.xml | 9 - admin/models/forms/custom_code.xml | 9 - admin/models/forms/dynamic_get.xml | 9 - admin/models/forms/field.xml | 9 - admin/models/forms/fieldtype.xml | 9 - admin/models/forms/ftp.xml | 9 - admin/models/forms/joomla_component.xml | 49 +- admin/models/forms/language.xml | 9 - admin/models/forms/language_translation.js | 4 +- admin/models/forms/language_translation.xml | 9 - admin/models/forms/layout.xml | 9 - admin/models/forms/site_view.xml | 9 - admin/models/forms/snippet.xml | 9 - admin/models/forms/template.xml | 9 - admin/models/ftps.php | 21 - admin/models/import.php | 2 +- admin/models/import_joomla_components.php | 2 +- admin/models/joomla_component.php | 60 -- admin/models/language_translation.php | 4 +- admin/models/language_translations.php | 25 +- admin/models/languages.php | 21 - admin/models/layouts.php | 21 - admin/models/site_views.php | 21 - admin/models/snippets.php | 21 - admin/models/templates.php | 21 - admin/sql/install.mysql.utf8.sql | 105 ++- admin/sql/uninstall.mysql.utf8.sql | 2 + admin/sql/updates/mysql/2.3.0.sql | 1 - admin/sql/updates/mysql/2.3.1.sql | 1 - admin/sql/updates/mysql/2.3.10.sql | 1 - admin/sql/updates/mysql/2.3.2.sql | 1 - admin/sql/updates/mysql/2.3.3.sql | 1 - admin/sql/updates/mysql/2.3.4.sql | 1 - admin/sql/updates/mysql/2.3.5.sql | 2 - admin/sql/updates/mysql/2.3.6.sql | 1 - admin/sql/updates/mysql/2.3.7.sql | 1 - admin/sql/updates/mysql/2.3.8.sql | 1 - admin/sql/updates/mysql/2.3.9.sql | 1 - admin/sql/updates/mysql/2.4.0.sql | 1 - admin/sql/updates/mysql/2.4.1.sql | 51 - admin/sql/updates/mysql/2.4.10.sql | 1 - admin/sql/updates/mysql/2.4.2.sql | 1 - admin/sql/updates/mysql/2.4.3.sql | 2 - admin/sql/updates/mysql/2.4.4.sql | 1 - admin/sql/updates/mysql/2.4.5.sql | 1 - admin/sql/updates/mysql/2.4.6.sql | 1 - admin/sql/updates/mysql/2.4.7.sql | 1 - admin/sql/updates/mysql/2.4.8.sql | 1 - admin/sql/updates/mysql/2.4.9.sql | 1 - admin/sql/updates/mysql/2.5.6.sql | 24 + admin/sql/updates/mysql/2.5.7.sql | 23 + admin/tables/admin_fields.php | 351 +++++++ admin/tables/admin_fields_conditions.php | 351 +++++++ admin/tables/admin_view.php | 4 +- admin/tables/language_translation.php | 4 +- admin/views/admin_fields/submitbutton.js | 49 + admin/views/admin_fields/tmpl/edit.php | 117 +++ admin/views/admin_fields/tmpl/index.html | 1 + admin/views/admin_fields/view.html.php | 200 ++++ .../admin_fields_conditions/submitbutton.js | 49 + .../admin_fields_conditions/tmpl/edit.php | 144 +++ .../admin_fields_conditions/tmpl/index.html | 1 + .../admin_fields_conditions/view.html.php | 202 ++++ admin/views/admin_view/submitbutton.js | 4 +- admin/views/admin_view/tmpl/edit.php | 33 +- admin/views/admin_view/view.html.php | 15 +- admin/views/admin_views/tmpl/default.php | 4 +- .../admin_views/tmpl/default_batch_body.php | 4 +- .../admin_views/tmpl/default_batch_footer.php | 4 +- admin/views/admin_views/tmpl/default_body.php | 4 +- admin/views/admin_views/tmpl/default_foot.php | 4 +- admin/views/admin_views/tmpl/default_head.php | 4 +- .../admin_views/tmpl/default_toolbar.php | 4 +- admin/views/admin_views/view.html.php | 4 +- admin/views/admins_fields/index.html | 1 + admin/views/admins_fields/tmpl/default.php | 99 ++ .../admins_fields/tmpl/default_batch_body.php | 32 + .../tmpl/default_batch_footer.php | 37 + .../views/admins_fields/tmpl/default_body.php | 108 +++ .../views/admins_fields/tmpl/default_foot.php | 32 + .../views/admins_fields/tmpl/default_head.php | 61 ++ .../admins_fields/tmpl/default_toolbar.php | 59 ++ admin/views/admins_fields/tmpl/index.html | 1 + admin/views/admins_fields/view.html.php | 239 +++++ .../views/admins_fields_conditions/index.html | 1 + .../admins_fields_conditions/tmpl/default.php | 99 ++ .../tmpl/default_batch_body.php | 32 + .../tmpl/default_batch_footer.php | 37 + .../tmpl/default_body.php | 108 +++ .../tmpl/default_foot.php | 32 + .../tmpl/default_head.php | 61 ++ .../tmpl/default_toolbar.php | 59 ++ .../admins_fields_conditions/tmpl/index.html | 1 + .../admins_fields_conditions/view.html.php | 239 +++++ admin/views/componentbuilder/tmpl/default.php | 2 +- ...ult_issues_the_closed_issues_on_github.php | 2 +- ...fault_issues_the_open_issues_on_github.php | 2 +- .../componentbuilder/tmpl/default_main.php | 2 +- .../tmpl/default_readme_information.php | 2 +- .../tmpl/default_releases_information.php | 2 +- ...t_vast_development_method_notice_board.php | 2 +- .../componentbuilder/tmpl/default_vdm.php | 2 +- .../tmpl/default_wiki_tutorials.php | 2 +- admin/views/componentbuilder/view.html.php | 2 +- admin/views/field/tmpl/edit.php | 2 - admin/views/import/tmpl/default.php | 2 +- admin/views/import/view.html.php | 2 +- .../import_joomla_components/tmpl/default.php | 2 +- .../import_joomla_components/view.html.php | 2 +- admin/views/joomla_component/tmpl/edit.php | 4 +- .../language_translation/submitbutton.js | 4 +- .../views/language_translation/tmpl/edit.php | 4 +- .../views/language_translation/view.html.php | 4 +- .../language_translations/tmpl/default.php | 4 +- .../tmpl/default_batch_body.php | 4 +- .../tmpl/default_batch_footer.php | 4 +- .../tmpl/default_body.php | 4 +- .../tmpl/default_foot.php | 4 +- .../tmpl/default_head.php | 4 +- .../tmpl/default_toolbar.php | 4 +- .../views/language_translations/view.html.php | 4 +- componentbuilder.xml | 4 +- componentbuilder_update_server.xml | 408 +------- script.php | 437 +++++++-- site/assets/css/site.css | 2 +- site/assets/js/site.js | 2 +- site/componentbuilder.php | 2 +- site/controller.php | 2 +- site/controllers/api.php | 2 +- site/controllers/help.php | 2 +- site/helpers/category.php | 2 +- site/helpers/categoryfields.php | 2 +- site/helpers/categoryfieldtypes.php | 2 +- site/helpers/componentbuilder.php | 2 +- site/helpers/headercheck.php | 2 +- site/helpers/route.php | 2 +- site/router.php | 2 +- site/views/api/submitbutton.js | 2 +- 367 files changed, 8762 insertions(+), 2210 deletions(-) create mode 100644 admin/assets/css/admin_fields.css create mode 100644 admin/assets/css/admin_fields_conditions.css create mode 100644 admin/assets/css/admins_fields.css create mode 100644 admin/assets/css/admins_fields_conditions.css create mode 100644 admin/controllers/admin_fields.php create mode 100644 admin/controllers/admin_fields_conditions.php create mode 100644 admin/controllers/admins_fields.php create mode 100644 admin/controllers/admins_fields_conditions.php create mode 100644 admin/layouts/admin_fields/fields_above.php rename admin/layouts/{admin_view => admin_fields}/fields_fullwidth.php (95%) create mode 100644 admin/layouts/admin_fields/index.html create mode 100644 admin/layouts/admin_fields/publishing.php rename admin/layouts/{joomla_component => admin_fields}/publlshing.php (96%) create mode 100644 admin/layouts/admin_fields_conditions/conditions_above.php create mode 100644 admin/layouts/admin_fields_conditions/conditions_fullwidth.php create mode 100644 admin/layouts/admin_fields_conditions/index.html create mode 100644 admin/layouts/admin_fields_conditions/publishing.php create mode 100644 admin/layouts/admin_fields_conditions/publlshing.php create mode 100644 admin/layouts/admin_view/fields_conditions_fullwidth.php create mode 100644 admin/layouts/admin_view/fields_conditions_left.php create mode 100644 admin/layouts/admin_view/fields_conditions_right.php create mode 100644 admin/layouts/joomla_component/metadata.php create mode 100644 admin/models/admin_fields.php create mode 100644 admin/models/admin_fields_conditions.php create mode 100644 admin/models/admins_fields.php create mode 100644 admin/models/admins_fields_conditions.php create mode 100644 admin/models/forms/admin_fields.js create mode 100644 admin/models/forms/admin_fields.xml create mode 100644 admin/models/forms/admin_fields_conditions.js create mode 100644 admin/models/forms/admin_fields_conditions.xml delete mode 100644 admin/sql/updates/mysql/2.3.0.sql delete mode 100644 admin/sql/updates/mysql/2.3.1.sql delete mode 100644 admin/sql/updates/mysql/2.3.10.sql delete mode 100644 admin/sql/updates/mysql/2.3.2.sql delete mode 100644 admin/sql/updates/mysql/2.3.3.sql delete mode 100644 admin/sql/updates/mysql/2.3.4.sql delete mode 100644 admin/sql/updates/mysql/2.3.5.sql delete mode 100644 admin/sql/updates/mysql/2.3.6.sql delete mode 100644 admin/sql/updates/mysql/2.3.7.sql delete mode 100644 admin/sql/updates/mysql/2.3.8.sql delete mode 100644 admin/sql/updates/mysql/2.3.9.sql delete mode 100644 admin/sql/updates/mysql/2.4.0.sql delete mode 100644 admin/sql/updates/mysql/2.4.1.sql delete mode 100644 admin/sql/updates/mysql/2.4.10.sql delete mode 100644 admin/sql/updates/mysql/2.4.2.sql delete mode 100644 admin/sql/updates/mysql/2.4.3.sql delete mode 100644 admin/sql/updates/mysql/2.4.4.sql delete mode 100644 admin/sql/updates/mysql/2.4.5.sql delete mode 100644 admin/sql/updates/mysql/2.4.6.sql delete mode 100644 admin/sql/updates/mysql/2.4.7.sql delete mode 100644 admin/sql/updates/mysql/2.4.8.sql delete mode 100644 admin/sql/updates/mysql/2.4.9.sql create mode 100644 admin/sql/updates/mysql/2.5.6.sql create mode 100644 admin/sql/updates/mysql/2.5.7.sql create mode 100644 admin/tables/admin_fields.php create mode 100644 admin/tables/admin_fields_conditions.php create mode 100644 admin/views/admin_fields/submitbutton.js create mode 100644 admin/views/admin_fields/tmpl/edit.php create mode 100644 admin/views/admin_fields/tmpl/index.html create mode 100644 admin/views/admin_fields/view.html.php create mode 100644 admin/views/admin_fields_conditions/submitbutton.js create mode 100644 admin/views/admin_fields_conditions/tmpl/edit.php create mode 100644 admin/views/admin_fields_conditions/tmpl/index.html create mode 100644 admin/views/admin_fields_conditions/view.html.php create mode 100644 admin/views/admins_fields/index.html create mode 100644 admin/views/admins_fields/tmpl/default.php create mode 100644 admin/views/admins_fields/tmpl/default_batch_body.php create mode 100644 admin/views/admins_fields/tmpl/default_batch_footer.php create mode 100644 admin/views/admins_fields/tmpl/default_body.php create mode 100644 admin/views/admins_fields/tmpl/default_foot.php create mode 100644 admin/views/admins_fields/tmpl/default_head.php create mode 100644 admin/views/admins_fields/tmpl/default_toolbar.php create mode 100644 admin/views/admins_fields/tmpl/index.html create mode 100644 admin/views/admins_fields/view.html.php create mode 100644 admin/views/admins_fields_conditions/index.html create mode 100644 admin/views/admins_fields_conditions/tmpl/default.php create mode 100644 admin/views/admins_fields_conditions/tmpl/default_batch_body.php create mode 100644 admin/views/admins_fields_conditions/tmpl/default_batch_footer.php create mode 100644 admin/views/admins_fields_conditions/tmpl/default_body.php create mode 100644 admin/views/admins_fields_conditions/tmpl/default_foot.php create mode 100644 admin/views/admins_fields_conditions/tmpl/default_head.php create mode 100644 admin/views/admins_fields_conditions/tmpl/default_toolbar.php create mode 100644 admin/views/admins_fields_conditions/tmpl/index.html create mode 100644 admin/views/admins_fields_conditions/view.html.php diff --git a/README.md b/README.md index 9a0b2ca43..b2a3eebf0 100644 --- a/README.md +++ b/README.md @@ -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! -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.5.6) 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.5.8) 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://youtu.be/1KBBtQUxMTc) @@ -111,12 +111,12 @@ Component Builder is mapped as a component in itself on my local development env + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 + *Last Build*: 12th October, 2017 -+ *Version*: 2.5.6 ++ *Version*: 2.5.8 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **117008** -+ *File count*: **702** -+ *Folder count*: **121** ++ *Line count*: **123443** ++ *File count*: **740** ++ *Folder count*: **129** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/README.txt b/admin/README.txt index 9a0b2ca43..b2a3eebf0 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -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! -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.5.6) 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.5.8) 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://youtu.be/1KBBtQUxMTc) @@ -111,12 +111,12 @@ Component Builder is mapped as a component in itself on my local development env + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 + *Last Build*: 12th October, 2017 -+ *Version*: 2.5.6 ++ *Version*: 2.5.8 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **117008** -+ *File count*: **702** -+ *Folder count*: **121** ++ *Line count*: **123443** ++ *File count*: **740** ++ *Folder count*: **129** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/access.xml b/admin/access.xml index 0412b8e14..dc989b32a 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -15,7 +15,6 @@ - @@ -23,6 +22,10 @@ + + + + @@ -321,6 +324,12 @@ +
+ +
+
+ +
diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index 65bfa876d..596f2fa77 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/assets/css/admin_fields.css b/admin/assets/css/admin_fields.css new file mode 100644 index 000000000..9354bd1dd --- /dev/null +++ b/admin/assets/css/admin_fields.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 16 of this MVC + @build 12th October, 2017 + @created 12th October, 2017 + @package Component Builder + @subpackage admin_fields.css + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/admin_fields_conditions.css b/admin/assets/css/admin_fields_conditions.css new file mode 100644 index 000000000..951a843cb --- /dev/null +++ b/admin/assets/css/admin_fields_conditions.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 7 of this MVC + @build 12th October, 2017 + @created 12th October, 2017 + @package Component Builder + @subpackage admin_fields_conditions.css + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/admin_view.css b/admin/assets/css/admin_view.css index a85ed845d..22a346cd8 100644 --- a/admin/assets/css/admin_view.css +++ b/admin/assets/css/admin_view.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 126 of this MVC - @build 11th October, 2017 + @version @update number 136 of this MVC + @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.css diff --git a/admin/assets/css/admin_views.css b/admin/assets/css/admin_views.css index 093b45cff..2332f6397 100644 --- a/admin/assets/css/admin_views.css +++ b/admin/assets/css/admin_views.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 126 of this MVC - @build 11th October, 2017 + @version @update number 136 of this MVC + @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views.css diff --git a/admin/assets/css/admins_fields.css b/admin/assets/css/admins_fields.css new file mode 100644 index 000000000..78c8dbb36 --- /dev/null +++ b/admin/assets/css/admins_fields.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 16 of this MVC + @build 12th October, 2017 + @created 12th October, 2017 + @package Component Builder + @subpackage admins_fields.css + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/admins_fields_conditions.css b/admin/assets/css/admins_fields_conditions.css new file mode 100644 index 000000000..7a214503d --- /dev/null +++ b/admin/assets/css/admins_fields_conditions.css @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 7 of this MVC + @build 12th October, 2017 + @created 12th October, 2017 + @package Component Builder + @subpackage admins_fields_conditions.css + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +/* CSS Document */ + + diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index c1d382955..099381f0d 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/assets/css/language_translation.css b/admin/assets/css/language_translation.css index dc0e1a579..8474a3438 100644 --- a/admin/assets/css/language_translation.css +++ b/admin/assets/css/language_translation.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 43 of this MVC - @build 16th September, 2017 + @version @update number 44 of this MVC + @build 12th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language_translation.css diff --git a/admin/assets/css/language_translations.css b/admin/assets/css/language_translations.css index 6729ed30b..8be41edcf 100644 --- a/admin/assets/css/language_translations.css +++ b/admin/assets/css/language_translations.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 43 of this MVC - @build 16th September, 2017 + @version @update number 44 of this MVC + @build 12th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language_translations.css diff --git a/admin/assets/js/admin.js b/admin/assets/js/admin.js index 17bae336f..c819c95e9 100644 --- a/admin/assets/js/admin.js +++ b/admin/assets/js/admin.js @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/componentbuilder.php b/admin/componentbuilder.php index 674cbb969..ff6f1b438 100644 --- a/admin/componentbuilder.php +++ b/admin/componentbuilder.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/controller.php b/admin/controller.php index 42dffc282..556773ee3 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -102,7 +102,9 @@ class ComponentbuilderController extends JControllerLegacy 'language_translation' => 'language_translations', 'language' => 'languages', 'ftp' => 'ftps', - 'help_document' => 'help_documents' + 'help_document' => 'help_documents', + 'admin_fields' => 'admins_fields', + 'admin_fields_conditions' => 'admins_fields_conditions' ); // check if this is a list view if (in_array($view,$views)) diff --git a/admin/controllers/admin_fields.php b/admin/controllers/admin_fields.php new file mode 100644 index 000000000..507ec74b6 --- /dev/null +++ b/admin/controllers/admin_fields.php @@ -0,0 +1,312 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controllerform library +jimport('joomla.application.component.controllerform'); + +/** + * Admin_fields Controller + */ +class ComponentbuilderControllerAdmin_fields extends JControllerForm +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + public function __construct($config = array()) + { + $this->view_list = 'Admins_fields'; // 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()) + { // In the absense of better information, revert to the component permissions. + return parent::allowAdd($data); + } + + /** + * 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; + + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('core.edit', 'com_componentbuilder.admin_fields.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('core.edit.own', 'com_componentbuilder.admin_fields.' . $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('core.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return parent::allowEdit($data, $key); + } + + /** + * 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 12.2 + */ + protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') + { + $tmpl = $this->input->get('tmpl'); + $layout = $this->input->get('layout', 'edit', 'string'); + + $ref = $this->input->get('ref', 0, 'string'); + $refid = $this->input->get('refid', 0, 'int'); + + // Setup redirect info. + + $append = ''; + + if ($refid) + { + $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; + } + elseif ($ref) + { + $append .= '&ref='.(string)$ref; + } + + if ($tmpl) + { + $append .= '&tmpl=' . $tmpl; + } + + if ($layout) + { + $append .= '&layout=' . $layout; + } + + if ($recordId) + { + $append .= '&' . $urlVar . '=' . $recordId; + } + + 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_fields', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=admins_fields' . $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 referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + $cancel = parent::cancel($key); + + if ($cancel) + { + if ($this->refid) + { + $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 + ) + ); + } + } + else + { + // Redirect to the items screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . '&view=' . $this->view_list, 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 referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } + + $saved = parent::save($key, $urlVar); + + if ($this->refid && $saved) + { + $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 && $saved) + { + $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; + } + +} diff --git a/admin/controllers/admin_fields_conditions.php b/admin/controllers/admin_fields_conditions.php new file mode 100644 index 000000000..9562e9fed --- /dev/null +++ b/admin/controllers/admin_fields_conditions.php @@ -0,0 +1,312 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controllerform library +jimport('joomla.application.component.controllerform'); + +/** + * Admin_fields_conditions Controller + */ +class ComponentbuilderControllerAdmin_fields_conditions extends JControllerForm +{ + /** + * Current or most recently performed task. + * + * @var string + * @since 12.2 + * @note Replaces _task. + */ + protected $task; + + public function __construct($config = array()) + { + $this->view_list = 'Admins_fields_conditions'; // 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()) + { // In the absense of better information, revert to the component permissions. + return parent::allowAdd($data); + } + + /** + * 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; + + + if ($recordId) + { + // The record has been set. Check the record permissions. + $permission = $user->authorise('core.edit', 'com_componentbuilder.admin_fields_conditions.' . (int) $recordId); + if (!$permission) + { + if ($user->authorise('core.edit.own', 'com_componentbuilder.admin_fields_conditions.' . $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('core.edit.own', 'com_componentbuilder')) + { + return true; + } + } + } + return false; + } + } + // Since there is no permission, revert to the component permissions. + return parent::allowEdit($data, $key); + } + + /** + * 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 12.2 + */ + protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id') + { + $tmpl = $this->input->get('tmpl'); + $layout = $this->input->get('layout', 'edit', 'string'); + + $ref = $this->input->get('ref', 0, 'string'); + $refid = $this->input->get('refid', 0, 'int'); + + // Setup redirect info. + + $append = ''; + + if ($refid) + { + $append .= '&ref='.(string)$ref.'&refid='.(int)$refid; + } + elseif ($ref) + { + $append .= '&ref='.(string)$ref; + } + + if ($tmpl) + { + $append .= '&tmpl=' . $tmpl; + } + + if ($layout) + { + $append .= '&layout=' . $layout; + } + + if ($recordId) + { + $append .= '&' . $urlVar . '=' . $recordId; + } + + 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_fields_conditions', '', array()); + + // Preset the redirect + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=admins_fields_conditions' . $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 referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + $cancel = parent::cancel($key); + + if ($cancel) + { + if ($this->refid) + { + $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 + ) + ); + } + } + else + { + // Redirect to the items screen. + $this->setRedirect( + JRoute::_( + 'index.php?option=' . $this->option . '&view=' . $this->view_list, 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 referal details + $this->ref = $this->input->get('ref', 0, 'word'); + $this->refid = $this->input->get('refid', 0, 'int'); + + if ($this->ref || $this->refid) + { + // to make sure the item is checkedin on redirect + $this->task = 'save'; + } + + $saved = parent::save($key, $urlVar); + + if ($this->refid && $saved) + { + $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 && $saved) + { + $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; + } + +} diff --git a/admin/controllers/admin_view.php b/admin/controllers/admin_view.php index 405e47d74..0bc2fcd16 100644 --- a/admin/controllers/admin_view.php +++ b/admin/controllers/admin_view.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 126 of this MVC - @build 11th October, 2017 + @version @update number 136 of this MVC + @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.php @@ -59,14 +59,7 @@ class ComponentbuilderControllerAdmin_view extends JControllerForm * @since 1.6 */ protected function allowAdd($data = array()) - { - // Access check. - $access = JFactory::getUser()->authorise('admin_view.access', 'com_componentbuilder'); - if (!$access) - { - return false; - } - // In the absense of better information, revert to the component permissions. + { // In the absense of better information, revert to the component permissions. return parent::allowAdd($data); } diff --git a/admin/controllers/admin_views.php b/admin/controllers/admin_views.php index 91d7a1885..c7023b6e8 100644 --- a/admin/controllers/admin_views.php +++ b/admin/controllers/admin_views.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 126 of this MVC - @build 11th October, 2017 + @version @update number 136 of this MVC + @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views.php diff --git a/admin/controllers/admins_fields.php b/admin/controllers/admins_fields.php new file mode 100644 index 000000000..f8fea80dc --- /dev/null +++ b/admin/controllers/admins_fields.php @@ -0,0 +1,48 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controlleradmin library +jimport('joomla.application.component.controlleradmin'); + +/** + * Admins_fields Controller + */ +class ComponentbuilderControllerAdmins_fields extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_ADMINS_FIELDS'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Admin_fields', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/admins_fields_conditions.php b/admin/controllers/admins_fields_conditions.php new file mode 100644 index 000000000..ec1b57bc4 --- /dev/null +++ b/admin/controllers/admins_fields_conditions.php @@ -0,0 +1,48 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import Joomla controlleradmin library +jimport('joomla.application.component.controlleradmin'); + +/** + * Admins_fields_conditions Controller + */ +class ComponentbuilderControllerAdmins_fields_conditions extends JControllerAdmin +{ + protected $text_prefix = 'COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS'; + /** + * Proxy for getModel. + * @since 2.5 + */ + public function getModel($name = 'Admin_fields_conditions', $prefix = 'ComponentbuilderModel', $config = array()) + { + $model = parent::getModel($name, $prefix, array('ignore_request' => true)); + + return $model; + } +} diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 6838d1cbb..935127758 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -49,6 +49,8 @@ class ComponentbuilderControllerAjax extends JControllerLegacy $this->registerTask('tableColumns', 'ajax'); $this->registerTask('fieldSelectOptions', 'ajax'); $this->registerTask('getImportScripts', 'ajax'); + $this->registerTask('getButton', 'ajax'); + $this->registerTask('getButtonID', 'ajax'); $this->registerTask('templateDetails', 'ajax'); $this->registerTask('getLayoutDetails', 'ajax'); $this->registerTask('dbTableColumns', 'ajax'); @@ -57,8 +59,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy $this->registerTask('checkFunctionName', 'ajax'); $this->registerTask('usedin', 'ajax'); $this->registerTask('snippetDetails', 'ajax'); - $this->registerTask('fieldOptions', 'ajax'); - $this->registerTask('getButton', 'ajax'); + $this->registerTask('fieldOptions', 'ajax'); } public function ajax() @@ -339,6 +340,82 @@ class ComponentbuilderControllerAjax extends JControllerLegacy } } break; + case 'getButton': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $typeValue = $jinput->get('type', NULL, 'WORD'); + if($typeValue && $user->id != 0) + { + $result = $this->getModel('ajax')->getButton($typeValue); + } + else + { + $result = false; + } + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback."(".json_encode($e).");"; + } + else + { + echo "(".json_encode($e).");"; + } + } + break; + case 'getButtonID': + try + { + $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); + $typeValue = $jinput->get('type', NULL, 'WORD'); + if($typeValue && $user->id != 0) + { + $result = $this->getModel('ajax')->getButtonID($typeValue); + } + else + { + $result = false; + } + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback . "(".json_encode($result).");"; + } + elseif($returnRaw) + { + echo json_encode($result); + } + else + { + echo "(".json_encode($result).");"; + } + } + catch(Exception $e) + { + if($callback = $jinput->get('callback', null, 'CMD')) + { + echo $callback."(".json_encode($e).");"; + } + else + { + echo "(".json_encode($e).");"; + } + } + break; case 'templateDetails': try { @@ -688,44 +765,6 @@ class ComponentbuilderControllerAjax extends JControllerLegacy echo "(".json_encode($e).");"; } } - break; - case 'getButton': - try - { - $returnRaw = $jinput->get('raw', false, 'BOOLEAN'); - $typeValue = $jinput->get('type', NULL, 'WORD'); - if($typeValue && $user->id != 0) - { - $result = $this->getModel('ajax')->getButton($typeValue); - } - else - { - $result = false; - } - if($callback = $jinput->get('callback', null, 'CMD')) - { - echo $callback . "(".json_encode($result).");"; - } - elseif($returnRaw) - { - echo json_encode($result); - } - else - { - echo "(".json_encode($result).");"; - } - } - catch(Exception $e) - { - if($callback = $jinput->get('callback', null, 'CMD')) - { - echo $callback."(".json_encode($e).");"; - } - else - { - echo "(".json_encode($e).");"; - } - } break; } } diff --git a/admin/controllers/componentbuilder.php b/admin/controllers/componentbuilder.php index a19441327..598fe4fdb 100644 --- a/admin/controllers/componentbuilder.php +++ b/admin/controllers/componentbuilder.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/controllers/help.php b/admin/controllers/help.php index 2608d7145..14d1f9c80 100644 --- a/admin/controllers/help.php +++ b/admin/controllers/help.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/controllers/import.php b/admin/controllers/import.php index 4ff8ff0f1..1ccc6a0ed 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/controllers/import_joomla_components.php b/admin/controllers/import_joomla_components.php index 8a562e2c1..a4699f9fb 100644 --- a/admin/controllers/import_joomla_components.php +++ b/admin/controllers/import_joomla_components.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/controllers/language_translation.php b/admin/controllers/language_translation.php index 4ce80c8e4..dbbd3f1c5 100644 --- a/admin/controllers/language_translation.php +++ b/admin/controllers/language_translation.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 43 of this MVC - @build 16th September, 2017 + @version @update number 44 of this MVC + @build 12th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language_translation.php diff --git a/admin/controllers/language_translations.php b/admin/controllers/language_translations.php index 262dbcdfc..d11a5317f 100644 --- a/admin/controllers/language_translations.php +++ b/admin/controllers/language_translations.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 43 of this MVC - @build 16th September, 2017 + @version @update number 44 of this MVC + @build 12th October, 2017 @created 3rd April, 2017 @package Component Builder @subpackage language_translations.php diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 06537e21a..b3c7ccf4a 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -1284,30 +1284,76 @@ class Get // reset fields $view->fields = array(); // set fields - $view->addfields = json_decode($view->addfields,true); - // check what type of field array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->addfields['field'])) + if ($addfields = ComponentbuilderHelper::getVar('admin_fields', $id, 'admin_view', 'addfields')) { - $bucket = array(); - foreach($view->addfields as $option => $values) + $view->addfields = json_decode($addfields,true); + // get the admin fields id + $fieldID = ComponentbuilderHelper::getVar('admin_fields', $id, 'admin_view', 'id'); + // check what type of field array we have here (should be subform... but just incase) + // This could happen due to huge data sets + if (isset($view->addfields['field'])) { - foreach($values as $nr => $value) + $bucket = array(); + foreach($view->addfields as $option => $values) { - $bucket['addfields'.$nr][$option] = $value; + foreach($values as $nr => $value) + { + $bucket['addfields'.$nr][$option] = $value; + } + } + $view->addfields = $bucket; + // update the fields + $fieldsUpdate = new stdClass(); + $fieldsUpdate->id = (int) $fieldID; + $fieldsUpdate->addfields = json_encode($bucket); + $this->db->updateObject('#__componentbuilder_admin_fields', $fieldsUpdate, 'id'); + } + // build update SQL + if ($old_view = $this->getHistoryWatch('admin_fields', $fieldID)) + { + // add new fields were added + if (isset($old_view->addfields) && ComponentbuilderHelper::checkJson($old_view->addfields)) + { + $this->setUpdateSQL(json_decode($old_view->addfields, true), $view->addfields, 'field', $name_single); + } + // clear this data + unset($old_view); + } + if (ComponentbuilderHelper::checkArray($view->addfields)) + { + $view->fields = array_values($view->addfields); + // sort the fields acording to order + usort($view->fields, function($a, $b) + { + if (isset($a['order_list']) && isset($b['order_list'])) + { + if ($a['order_list'] != 0 && $b['order_list'] != 0) + { + return $a['order_list'] - $b['order_list']; + } + elseif ($b['order_list'] != 0 && $a['order_list'] == 0) + { + return 1; + } + elseif ($a['order_list'] != 0 && $b['order_list'] == 0) + { + return 0; + } + return 1; + } + return 0; + }); + // load the field data + foreach ($view->fields as $key => &$field) + { + $field['settings'] = $this->getFieldData($field['field'], $name_single, $name_list); } } - $view->addfields = $bucket; - $objectUpdate->addfields = json_encode($bucket); - } + unset($view->addfields); + } // build update SQL if ($old_view = $this->getHistoryWatch('admin_view', $id)) { - // add new fields were added - if (isset($old_view->addfields) && ComponentbuilderHelper::checkJson($old_view->addfields)) - { - $this->setUpdateSQL(json_decode($old_view->addfields, true), $view->addfields, 'field', $name_single); - } // check if the view name changed if (ComponentbuilderHelper::checkString($old_view->name_single)) { @@ -1315,129 +1361,107 @@ class Get } // clear this data unset($old_view); - } - if (ComponentbuilderHelper::checkArray($view->addfields)) - { - $view->fields = array_values($view->addfields); - // sort the fields acording to order - usort($view->fields, function($a, $b) - { - if (isset($a['order_list']) && isset($b['order_list'])) - { - if ($a['order_list'] != 0 && $b['order_list'] != 0) - { - return $a['order_list'] - $b['order_list']; - } - elseif ($b['order_list'] != 0 && $a['order_list'] == 0) - { - return 1; - } - elseif ($a['order_list'] != 0 && $b['order_list'] == 0) - { - return 0; - } - return 1; - } - return 0; - }); - // load the field data - foreach ($view->fields as $key => &$field) - { - $field['settings'] = $this->getFieldData($field['field'], $name_single, $name_list); - } - } - unset($view->addfields); + } // set the conditions - $view->addconditions = json_decode($view->addconditions,true); - // check what type of conditions array we have here (should be subform... but just incase) - // This could happen due to huge data sets - if (isset($view->addconditions['target_field'])) + if ($addconditions = ComponentbuilderHelper::getVar('admin_fields_conditions', $id, 'admin_view', 'addconditions')) { - $bucket = array(); - foreach($view->addconditions as $option => $values) + $view->addconditions = json_decode($addconditions,true); + // get the admin fields id + $conditionsID = ComponentbuilderHelper::getVar('admin_fields_conditions', $id, 'admin_view', 'id'); + // check what type of conditions array we have here (should be subform... but just incase) + // This could happen due to huge data sets + if (isset($view->addconditions['target_field'])) { - foreach($values as $nr => $value) + $bucket = array(); + foreach($view->addconditions as $option => $values) { - $bucket['addconditions'.$nr][$option] = $value; - } - } - $view->addconditions = $bucket; - $objectUpdate->addconditions = json_encode($bucket); - } - if (ComponentbuilderHelper::checkArray($view->addconditions)) - { - $view->conditions = array(); - $ne = 0; - foreach ($view->addconditions as $nr => $conditionValue) - { - if (ComponentbuilderHelper::checkArray($conditionValue['target_field']) && ComponentbuilderHelper::checkArray($view->fields)) - { - foreach ($conditionValue['target_field'] as $fieldKey => $fieldId) + foreach($values as $nr => $value) { - foreach ($view->fields as $fieldValues) + $bucket['addconditions'.$nr][$option] = $value; + } + } + $view->addconditions = $bucket; + // update the fields + $conditionsUpdate = new stdClass(); + $conditionsUpdate->id = (int) $conditionsID; + $conditionsUpdate->addconditions = json_encode($bucket); + $this->db->updateObject('#__componentbuilder_admin_fields_conditions', $conditionsUpdate, 'id'); + } + if (ComponentbuilderHelper::checkArray($view->addconditions)) + { + $view->conditions = array(); + $ne = 0; + foreach ($view->addconditions as $nr => $conditionValue) + { + if (ComponentbuilderHelper::checkArray($conditionValue['target_field']) && ComponentbuilderHelper::checkArray($view->fields)) + { + foreach ($conditionValue['target_field'] as $fieldKey => $fieldId) { - if ((int) $fieldValues['field'] == (int) $fieldId) + foreach ($view->fields as $fieldValues) + { + if ((int) $fieldValues['field'] == (int) $fieldId) + { + // load the field details + $required = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'required="','"'); + $required = ($required == true) ? 'yes' : 'no'; + $filter = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'filter="','"'); + $filter = ComponentbuilderHelper::checkString($filter) ? $filter : 'none'; + // get name + $name = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'name="','"'); + $name = ComponentbuilderHelper::checkString($name) ? $name : $fieldValues['settings']->name; + // get type + $type = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'type="','"'); + $type = ComponentbuilderHelper::checkString($type) ? $type : $fieldValues['settings']->type_name; + // set the field name + $conditionValue['target_field'][$fieldKey] = array( + 'name' => ComponentbuilderHelper::safeString($name), + 'type' => ComponentbuilderHelper::safeString($type), + 'required' => $required, + 'filter' => $filter + ); + break; + } + } + } + } + + // load match field + if (ComponentbuilderHelper::checkArray($view->fields) && isset($conditionValue['match_field'])) + { + foreach ($view->fields as $fieldValue) + { + if ((int) $fieldValue['field'] == (int) $conditionValue['match_field']) { - // load the field details - $required = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'required="','"'); - $required = ($required == true) ? 'yes' : 'no'; - $filter = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'filter="','"'); - $filter = ComponentbuilderHelper::checkString($filter) ? $filter : 'none'; // get name - $name = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'name="','"'); - $name = ComponentbuilderHelper::checkString($name) ? $name : $fieldValues['settings']->name; + $name = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'name="','"'); + $name = ComponentbuilderHelper::checkString($name) ? $name : $fieldValue['settings']->name; // get type - $type = ComponentbuilderHelper::getBetween($fieldValues['settings']->xml,'type="','"'); - $type = ComponentbuilderHelper::checkString($type) ? $type : $fieldValues['settings']->type_name; - // set the field name - $conditionValue['target_field'][$fieldKey] = array( - 'name' => ComponentbuilderHelper::safeString($name), - 'type' => ComponentbuilderHelper::safeString($type), - 'required' => $required, - 'filter' => $filter - ); + $type = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'type="','"'); + $type = ComponentbuilderHelper::checkString($type) ? $type : $fieldValue['settings']->type_name; + // set the field details + $conditionValue['match_name'] = ComponentbuilderHelper::safeString($name); + $conditionValue['match_type'] = ComponentbuilderHelper::safeString($type); + $conditionValue['match_xml'] = $fieldValue['settings']->xml; + // if custom field load field being extended + if (!ComponentbuilderHelper::typeField($type)) + { + $conditionValue['match_extends'] = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'extends="','"'); + } + else + { + $conditionValue['match_extends'] = ''; + } break; } } } + // set condition values + $view->conditions[$ne] = $conditionValue; + $ne++; } - - // load match field - if (ComponentbuilderHelper::checkArray($view->fields) && isset($conditionValue['match_field'])) - { - foreach ($view->fields as $fieldValue) - { - if ((int) $fieldValue['field'] == (int) $conditionValue['match_field']) - { - // get name - $name = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'name="','"'); - $name = ComponentbuilderHelper::checkString($name) ? $name : $fieldValue['settings']->name; - // get type - $type = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'type="','"'); - $type = ComponentbuilderHelper::checkString($type) ? $type : $fieldValue['settings']->type_name; - // set the field details - $conditionValue['match_name'] = ComponentbuilderHelper::safeString($name); - $conditionValue['match_type'] = ComponentbuilderHelper::safeString($type); - $conditionValue['match_xml'] = $fieldValue['settings']->xml; - // if custom field load field being extended - if (!ComponentbuilderHelper::typeField($type)) - { - $conditionValue['match_extends'] = ComponentbuilderHelper::getBetween($fieldValue['settings']->xml,'extends="','"'); - } - else - { - $conditionValue['match_extends'] = ''; - } - break; - } - } - } - // set condition values - $view->conditions[$ne] = $conditionValue; - $ne++; } + unset($view->addconditions); } - unset($view->addconditions); // set linked views $this->linkedAdminViews[$name_single] = null; $view->addlinked_views = json_decode($view->addlinked_views,true); @@ -2385,19 +2409,22 @@ class Get if (ComponentbuilderHelper::checkArray($new) && ComponentbuilderHelper::checkArray($old)) { - foreach ($new as $item) + // check if this is old repeatable field + if (isset($new[$type])) { - // search to see if this is a new value - $newItem = true; - if (isset($item[$type])) + foreach ($new[$type] as $item) { + $newItem = true; // check if this is old repeatable field if (isset($old[$type]) && ComponentbuilderHelper::checkArray($old[$type])) { - if (in_array($item[$type], $old[$type])) + if (!in_array($item, $old[$type])) { - $newItem = false; + // we have a new item, lets add to SQL + $this->setAddSQL($type, $item, $key); } + // add only once + $newItem = false; } elseif (!isset($old[$type])) { @@ -2423,40 +2450,65 @@ class Get { $newItem = false; } - } - else - { - break; - } - // ad if new - if ($newItem) - { - // we have a new item, lets add to SQL - if (!isset($this->addSQL[$type]) || !ComponentbuilderHelper::checkArray($this->addSQL[$type])) + // add if new + if ($newItem) { - $this->addSQL[$type] = array(); + // we have a new item, lets add to SQL + $this->setAddSQL($type, $item[$type], $key); } - // add key if found - if ($key) + } + } + else + { + foreach ($new as $item) + { + // search to see if this is a new value + $newItem = true; + if (isset($item[$type])) { - if (!isset($this->addSQL[$type][$key]) || !ComponentbuilderHelper::checkArray($this->addSQL[$type][$key])) + // check if this is old repeatable field + if (isset($old[$type]) && ComponentbuilderHelper::checkArray($old[$type])) { - $this->addSQL[$type][$key] = array(); + if (in_array($item[$type], $old[$type])) + { + $newItem = false; + } } - $this->addSQL[$type][$key][] = (int) $item[$type]; - } - else - { - // convert adminview id to name - if ('adminview' === $type) + elseif (!isset($old[$type])) { - $this->addSQL[$type][] = ComponentbuilderHelper::safeString($this->getAdminViewData($item[$type])->name_single); + // we have new values + foreach($old as $oldItem) + { + if (isset($oldItem[$type])) + { + if ($oldItem[$type] == $item[$type]) + { + $newItem = false; + break; + } + } + else + { + $newItem = false; + break; + } + } } else { - $this->addSQL[$type][] = (int) $item[$type]; + $newItem = false; } } + else + { + break; + } + // add if new + if ($newItem) + { + // we have a new item, lets add to SQL + $this->setAddSQL($type, $item[$type], $key); + } } } } @@ -2474,6 +2526,45 @@ class Get } } + /** + * Set the add sql + * + * @param string $type The type of values + * @param int $item The item id to add + * @param int $key The id/key where values changed + * + * @return void + */ + protected function setAddSQL($type, $item, $key) + { + // we have a new item, lets add to SQL + if (!isset($this->addSQL[$type]) || !ComponentbuilderHelper::checkArray($this->addSQL[$type])) + { + $this->addSQL[$type] = array(); + } + // add key if found + if ($key) + { + if (!isset($this->addSQL[$type][$key]) || !ComponentbuilderHelper::checkArray($this->addSQL[$type][$key])) + { + $this->addSQL[$type][$key] = array(); + } + $this->addSQL[$type][$key][] = (int) $item; + } + else + { + // convert adminview id to name + if ('adminview' === $type) + { + $this->addSQL[$type][] = ComponentbuilderHelper::safeString($this->getAdminViewData($item)->name_single); + } + else + { + $this->addSQL[$type][] = (int) $item; + } + } + } + /** * Get Item History values * diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index ac289ddac..43cc1752d 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -1393,10 +1393,7 @@ abstract class ComponentbuilderHelper { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_JOOMLA_COMPONENTS'), 'index.php?option=com_componentbuilder&view=joomla_components', $submenu === 'joomla_components'); } - if ($user->authorise('admin_view.access', 'com_componentbuilder') && $user->authorise('admin_view.submenu', 'com_componentbuilder')) - { - JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS'), 'index.php?option=com_componentbuilder&view=admin_views', $submenu === 'admin_views'); - } + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS'), 'index.php?option=com_componentbuilder&view=admin_views', $submenu === 'admin_views'); if ($user->authorise('custom_admin_view.access', 'com_componentbuilder') && $user->authorise('custom_admin_view.submenu', 'com_componentbuilder')) { JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_CUSTOM_ADMIN_VIEWS'), 'index.php?option=com_componentbuilder&view=custom_admin_views', $submenu === 'custom_admin_views'); diff --git a/admin/helpers/componentbuilderemail.php b/admin/helpers/componentbuilderemail.php index 5bc48a64a..7a9aaf45f 100644 --- a/admin/helpers/componentbuilderemail.php +++ b/admin/helpers/componentbuilderemail.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php index 1e4e0f004..1bcdda490 100644 --- a/admin/helpers/headercheck.php +++ b/admin/helpers/headercheck.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index 5da897a35..abac1fa9c 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/helpers/indenter.php b/admin/helpers/indenter.php index 901dacf8b..139d76958 100644 --- a/admin/helpers/indenter.php +++ b/admin/helpers/indenter.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/helpers/js.php b/admin/helpers/js.php index c38eea2d0..c5f9cc013 100644 --- a/admin/helpers/js.php +++ b/admin/helpers/js.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/helpers/minify.php b/admin/helpers/minify.php index b2e45164a..2d03fed9f 100644 --- a/admin/helpers/minify.php +++ b/admin/helpers/minify.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index a7ad37ff4..457eb0750 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -3,10 +3,180 @@ COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_T COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders" COM_COMPONENTBUILDER_ADD_TO_BACKUP_FOLDER_AMP_SALES_SERVER_LTSMALLGTIF_SETLTSMALLGT="Add to Backup Folder & Sales Server <small>(if set)</small>" COM_COMPONENTBUILDER_ADD_TO_REPOSITORY_FOLDER="Add to Repository Folder" +COM_COMPONENTBUILDER_ADMINS_FIELDS="Admins Fields" +COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_OPTIONS="Batch process the selected Admins Fields" +COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_TIP="All changes will be applied to all selected Admins Fields" +COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_USE="Admins Fields Batch Use" +COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch admins fields" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS="Admins Fields Conditions" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_BATCH_OPTIONS="Batch process the selected Admins Fields Conditions" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_BATCH_TIP="All changes will be applied to all selected Admins Fields Conditions" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_BATCH_USE="Admins Fields Conditions Batch Use" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch admins fields conditions" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_EDIT_VERSION="Admins Fields Conditions Edit Version" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version admins fields conditions" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_ARCHIVED="%s Admins Fields Conditions archived." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_ARCHIVED_1="%s Admin Fields Conditions archived." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_CHECKED_IN_0="No Admin Fields Conditions successfully checked in." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_CHECKED_IN_1="%d Admin Fields Conditions successfully checked in." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_CHECKED_IN_MORE="%d Admins Fields Conditions successfully checked in." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_DELETED="%s Admins Fields Conditions deleted." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_DELETED_1="%s Admin Fields Conditions deleted." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_FEATURED="%s Admins Fields Conditions featured." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_FEATURED_1="%s Admin Fields Conditions featured." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_PUBLISHED="%s Admins Fields Conditions published." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_PUBLISHED_1="%s Admin Fields Conditions published." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_TRASHED="%s Admins Fields Conditions trashed." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_TRASHED_1="%s Admin Fields Conditions trashed." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_UNFEATURED="%s Admins Fields Conditions unfeatured." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_UNFEATURED_1="%s Admin Fields Conditions unfeatured." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_UNPUBLISHED="%s Admins Fields Conditions unpublished." +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_N_ITEMS_UNPUBLISHED_1="%s Admin Fields Conditions unpublished." +COM_COMPONENTBUILDER_ADMINS_FIELDS_EDIT_VERSION="Admins Fields Edit Version" +COM_COMPONENTBUILDER_ADMINS_FIELDS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version admins fields" +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_ARCHIVED="%s Admins Fields archived." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_ARCHIVED_1="%s Admin Fields archived." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_CHECKED_IN_0="No Admin Fields successfully checked in." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_CHECKED_IN_1="%d Admin Fields successfully checked in." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_CHECKED_IN_MORE="%d Admins Fields successfully checked in." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_DELETED="%s Admins Fields deleted." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_DELETED_1="%s Admin Fields deleted." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_FEATURED="%s Admins Fields featured." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_FEATURED_1="%s Admin Fields featured." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_PUBLISHED="%s Admins Fields published." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_PUBLISHED_1="%s Admin Fields published." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_TRASHED="%s Admins Fields trashed." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_TRASHED_1="%s Admin Fields trashed." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNFEATURED="%s Admins Fields unfeatured." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNFEATURED_1="%s Admin Fields unfeatured." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNPUBLISHED="%s Admins Fields unpublished." +COM_COMPONENTBUILDER_ADMINS_FIELDS_N_ITEMS_UNPUBLISHED_1="%s Admin Fields unpublished." +COM_COMPONENTBUILDER_ADMIN_FIELDS="Admin Fields" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ABOVE_TABS="Above Tabs" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS="Addfields" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_DESCRIPTION="Setup fields for this view." +COM_COMPONENTBUILDER_ADMIN_FIELDS_ADDFIELDS_LABEL="Fields" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ADMIN_VIEW="Admin View" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ADMIN_VIEW_DESCRIPTION="Select an admin view" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ADMIN_VIEW_LABEL="View" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ALIAS_DESCRIPTION="Select if the field is the alias field." +COM_COMPONENTBUILDER_ADMIN_FIELDS_ALIAS_LABEL="Alias" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ALIGNMENT_DESCRIPTION="Select the field alignment inside a tab/view." +COM_COMPONENTBUILDER_ADMIN_FIELDS_ALIGNMENT_LABEL="Alignment" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS="Admin Fields Conditions" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS="Addconditions" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS_DESCRIPTION="Conditional setup for the above fields." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADDCONDITIONS_LABEL="Conditions" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADMIN_VIEW="Admin View" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADMIN_VIEW_DESCRIPTION="Select an admin view" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADMIN_VIEW_LABEL="View" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST="Any Selection (only 4 list/radio/checkboxes/dynamic_list)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_CHAIN="Chain" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_CONDITIONS="Conditions" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_CREATED_BY_DESC="The user that created this Admin Fields Conditions." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_CREATED_DATE_DESC="The date this Admin Fields Conditions was created." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_EDIT="Editing the Admin Fields Conditions" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ERROR_UNIQUE_ALIAS="Another Admin Fields Conditions has the same alias." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD="Exact Length (only 4 text_field)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_HIDE="Hide" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ID="Id" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ISOLATE="Isolate" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES="Is Not (only 4 list/radio/checkboxes)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_IS_ONLY_FOUR_LISTRADIOCHECKBOXES="Is (only 4 list/radio/checkboxes)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_KEY_WORD_ALL_CASEINSENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word All case-insensitive (only 4 text_field)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_KEY_WORD_ALL_CASESENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word All case-sensitive (only 4 text_field)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_KEY_WORD_ANY_CASEINSENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word Any case-insensitive (only 4 text_field)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_KEY_WORD_ANY_CASESENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word Any case-sensitive (only 4 text_field)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MATCH_BEHAVIOR_DESCRIPTION="Select the match behavior." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MATCH_BEHAVIOR_LABEL="Match Behavior" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MATCH_FIELD="Match Field" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MATCH_FIELD_DESCRIPTION="Select the match field." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MATCH_FIELD_LABEL="Match Field" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MATCH_OPTIONS_HINT="Options here" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MATCH_OPTIONS_LABEL="Match Options" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MAX_LENGTH_ONLY_FOUR_TEXT_FIELD="Max Length (only 4 text_field)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_field)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MODIFIED_BY_DESC="The last user that modified this Admin Fields Conditions." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MODIFIED_DATE_DESC="The date this Admin Fields Conditions was modified." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_NEW="A New Admin Fields Conditions" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_NOTE_ON_CONDITIONS_DESCRIPTION="Here you can add conditional field settings" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_NOTE_ON_CONDITIONS_LABEL="Condition Implementation" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Admin Fields Conditions to customise the alias." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_SHOW="Show" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_STATUS="Status" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_BEHAVIOR_DESCRIPTION="Select the target field/s behavior." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_BEHAVIOR_LABEL="Target Behavior" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_FIELD="Target Field" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_FIELD_DESCRIPTION="Select the target field/s." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_FIELD_LABEL="Target Field/s" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_RELATION_DESCRIPTION="Select the target field/s relation to other of the same target field/s." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_RELATION_LABEL="Target Relation" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_VERSION_DESC="A count of the number of times this Admin Fields Conditions has been revised." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_VERSION_LABEL="Revision" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_BY_DESC="The user that created this Admin Fields." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_BY_LABEL="Created By" +COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_DATE_DESC="The date this Admin Fields was created." +COM_COMPONENTBUILDER_ADMIN_FIELDS_CREATED_DATE_LABEL="Created Date" +COM_COMPONENTBUILDER_ADMIN_FIELDS_EDIT="Editing the Admin Fields" +COM_COMPONENTBUILDER_ADMIN_FIELDS_EDITING="Editing" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ERROR_UNIQUE_ALIAS="Another Admin Fields has the same alias." +COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELD="Field" +COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELDS="Fields" +COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELD_DESCRIPTION="Select a field" +COM_COMPONENTBUILDER_ADMIN_FIELDS_FIELD_LABEL="Field" +COM_COMPONENTBUILDER_ADMIN_FIELDS_FILTER_DESCRIPTION="Select if the field is to be used as a filter in list view, if shown." +COM_COMPONENTBUILDER_ADMIN_FIELDS_FILTER_LABEL="Filter" +COM_COMPONENTBUILDER_ADMIN_FIELDS_FULL_WIDTH_IN_TAB="Full Width in Tab" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ID="Id" +COM_COMPONENTBUILDER_ADMIN_FIELDS_LEFT_IN_TAB="Left in Tab" +COM_COMPONENTBUILDER_ADMIN_FIELDS_LEFT_OF_TABS="Left of Tabs" +COM_COMPONENTBUILDER_ADMIN_FIELDS_LINK_DESCRIPTION="Select if the field is to be used as a link to a single record, if shown." +COM_COMPONENTBUILDER_ADMIN_FIELDS_LINK_LABEL="Link" +COM_COMPONENTBUILDER_ADMIN_FIELDS_LIST_DESCRIPTION="Select if this field should show in the list view." +COM_COMPONENTBUILDER_ADMIN_FIELDS_LIST_LABEL="Admin List" +COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_BY_DESC="The last user that modified this Admin Fields." +COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_BY_LABEL="Modified By" +COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_DESC="The date this Admin Fields was modified." +COM_COMPONENTBUILDER_ADMIN_FIELDS_MODIFIED_DATE_LABEL="Modified Date" +COM_COMPONENTBUILDER_ADMIN_FIELDS_NEW="A New Admin Fields" +COM_COMPONENTBUILDER_ADMIN_FIELDS_NONE="None" +COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_DESCRIPTION="id, asset_id, state, access, ordering, created_by, date_created, modified_by, date_modified, checked_out, checked_out_time, version, hits, metakey, metadesc, metadata (you don't need to add them again)" +COM_COMPONENTBUILDER_ADMIN_FIELDS_NOTE_ON_VIEWS_LABEL="The following fields are added by default to all views" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDERING_LABEL="Ordering" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_EDIT_DESCRIPTION="Order in relation to tab & alignment of admin and site." +COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_EDIT_LABEL="Order in Edit" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_LIST_DESCRIPTION="Ordering in relation to list view of admin and site" +COM_COMPONENTBUILDER_ADMIN_FIELDS_ORDER_LIST_LABEL="Order in list views" +COM_COMPONENTBUILDER_ADMIN_FIELDS_PERMISSION="Permissions" +COM_COMPONENTBUILDER_ADMIN_FIELDS_PERMISSION_DESCRIPTION="What permission to use." +COM_COMPONENTBUILDER_ADMIN_FIELDS_PERMISSION_LABEL="Permissions" +COM_COMPONENTBUILDER_ADMIN_FIELDS_PUBLISHING="Publishing" +COM_COMPONENTBUILDER_ADMIN_FIELDS_RIGHT_IN_TAB="Right in Tab" +COM_COMPONENTBUILDER_ADMIN_FIELDS_RIGHT_OF_TABS="Right of Tabs" +COM_COMPONENTBUILDER_ADMIN_FIELDS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Admin Fields to customise the alias." +COM_COMPONENTBUILDER_ADMIN_FIELDS_SEARCH_DESCRIPTION="Select if the field is to be searchable in list view, if shown." +COM_COMPONENTBUILDER_ADMIN_FIELDS_SEARCH_LABEL="Searchable" +COM_COMPONENTBUILDER_ADMIN_FIELDS_SORT_DESCRIPTION="Select if the field should be sortable in list view, if shown." +COM_COMPONENTBUILDER_ADMIN_FIELDS_SORT_LABEL="Sortable" +COM_COMPONENTBUILDER_ADMIN_FIELDS_STATUS="Status" +COM_COMPONENTBUILDER_ADMIN_FIELDS_TAB_DESCRIPTION="Select the tab this field belongs to." +COM_COMPONENTBUILDER_ADMIN_FIELDS_TAB_LABEL="Tab" +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_UNDERNEATH_TABS="Underneath Tabs" +COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_DESC="A count of the number of times this Admin Fields has been revised." +COM_COMPONENTBUILDER_ADMIN_FIELDS_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_ADMIN_VIEW="Admin View" COM_COMPONENTBUILDER_ADMIN_VIEWS="Admin Views" -COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS="Admin Views Access" -COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS_DESC="Allows the users in this group to access access admin views" COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_OPTIONS="Batch process the selected Admin Views" COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_TIP="All changes will be applied to all selected Admin Views" COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_USE="Admin Views Batch Use" @@ -40,17 +210,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEWS_N_ITEMS_UNPUBLISHED="%s Admin Views unpublished COM_COMPONENTBUILDER_ADMIN_VIEWS_N_ITEMS_UNPUBLISHED_1="%s Admin View unpublished." COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU="Admin Views Submenu" COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU_DESC="Allows the users in this group to update the submenu of the admin view" -COM_COMPONENTBUILDER_ADMIN_VIEW_ABOVE_TABS="Above Tabs" COM_COMPONENTBUILDER_ADMIN_VIEW_ACTION_DESCRIPTION="Enter Action Name Here" COM_COMPONENTBUILDER_ADMIN_VIEW_ACTION_LABEL="Action Name" -COM_COMPONENTBUILDER_ADMIN_VIEW_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)" COM_COMPONENTBUILDER_ADMIN_VIEW_ADD="Add" -COM_COMPONENTBUILDER_ADMIN_VIEW_ADDCONDITIONS="Addconditions" -COM_COMPONENTBUILDER_ADMIN_VIEW_ADDCONDITIONS_DESCRIPTION="Conditional setup for the above fields." -COM_COMPONENTBUILDER_ADMIN_VIEW_ADDCONDITIONS_LABEL="Conditions" -COM_COMPONENTBUILDER_ADMIN_VIEW_ADDFIELDS="Addfields" -COM_COMPONENTBUILDER_ADMIN_VIEW_ADDFIELDS_DESCRIPTION="Setup fields for this view." -COM_COMPONENTBUILDER_ADMIN_VIEW_ADDFIELDS_LABEL="Fields" COM_COMPONENTBUILDER_ADMIN_VIEW_ADDLINKED_VIEWS="Addlinked Views" COM_COMPONENTBUILDER_ADMIN_VIEW_ADDLINKED_VIEWS_DESCRIPTION="Setup the linked views for this view." COM_COMPONENTBUILDER_ADMIN_VIEW_ADDLINKED_VIEWS_LABEL="Linked Views" @@ -123,12 +285,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADMINVIEW_DESCRIPTION="Select an admin view" COM_COMPONENTBUILDER_ADMIN_VIEW_ADMINVIEW_LABEL="View" COM_COMPONENTBUILDER_ADMIN_VIEW_AJAX_INPUT="Ajax Input" COM_COMPONENTBUILDER_ADMIN_VIEW_AJAX_INPUT_LABEL="Ajax Input" -COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_DESCRIPTION="Select if the field is the alias field." -COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_LABEL="Alias" -COM_COMPONENTBUILDER_ADMIN_VIEW_ALIGNMENT_DESCRIPTION="Select the field alignment inside a tab/view." -COM_COMPONENTBUILDER_ADMIN_VIEW_ALIGNMENT_LABEL="Alignment" COM_COMPONENTBUILDER_ADMIN_VIEW_ALNUM="ALNUM" -COM_COMPONENTBUILDER_ADMIN_VIEW_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST="Any Selection (only 4 list/radio/checkboxes/dynamic_list)" COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="Archive" COM_COMPONENTBUILDER_ADMIN_VIEW_ARRAY="ARRAY" COM_COMPONENTBUILDER_ADMIN_VIEW_ARROW_DOWN="Arrow Down" @@ -172,7 +329,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_CAMERA="Camera" COM_COMPONENTBUILDER_ADMIN_VIEW_CAMERA_TWO_VIDEO="Camera 2 / Video" COM_COMPONENTBUILDER_ADMIN_VIEW_CANCEL_CIRCLE="Cancel Circle" COM_COMPONENTBUILDER_ADMIN_VIEW_CART="Cart" -COM_COMPONENTBUILDER_ADMIN_VIEW_CHAIN="Chain" COM_COMPONENTBUILDER_ADMIN_VIEW_CHART="Chart" COM_COMPONENTBUILDER_ADMIN_VIEW_CHECKBOX="Checkbox" COM_COMPONENTBUILDER_ADMIN_VIEW_CHECKBOX_PARTIAL="Checkbox Partial" @@ -227,13 +383,11 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_DESCRIPTION_LABEL="Description" COM_COMPONENTBUILDER_ADMIN_VIEW_DOWNLOAD="Download" COM_COMPONENTBUILDER_ADMIN_VIEW_DUMP="Dump" COM_COMPONENTBUILDER_ADMIN_VIEW_EDIT="Editing the Admin View" -COM_COMPONENTBUILDER_ADMIN_VIEW_EDITING="Editing" COM_COMPONENTBUILDER_ADMIN_VIEW_ENTER="Enter" COM_COMPONENTBUILDER_ADMIN_VIEW_ENVELOPE="Envelope" COM_COMPONENTBUILDER_ADMIN_VIEW_ENVELOPE_OPENED="Envelope Opened" COM_COMPONENTBUILDER_ADMIN_VIEW_EQUALIZER="Equalizer" COM_COMPONENTBUILDER_ADMIN_VIEW_ERROR_UNIQUE_ALIAS="Another Admin View has the same alias." -COM_COMPONENTBUILDER_ADMIN_VIEW_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD="Exact Length (only 4 text_field)" COM_COMPONENTBUILDER_ADMIN_VIEW_EXIT="Exit" COM_COMPONENTBUILDER_ADMIN_VIEW_EXPAND="Expand" COM_COMPONENTBUILDER_ADMIN_VIEW_EXPAND_TWO="Expand 2" @@ -242,10 +396,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_EYE_CLOSE="Eye Close" COM_COMPONENTBUILDER_ADMIN_VIEW_EYE_OPEN="Eye Open" COM_COMPONENTBUILDER_ADMIN_VIEW_FEATURED="Featured" COM_COMPONENTBUILDER_ADMIN_VIEW_FEED="Feed" -COM_COMPONENTBUILDER_ADMIN_VIEW_FIELD="Field" -COM_COMPONENTBUILDER_ADMIN_VIEW_FIELDS="Fields" -COM_COMPONENTBUILDER_ADMIN_VIEW_FIELD_DESCRIPTION="Select a field" -COM_COMPONENTBUILDER_ADMIN_VIEW_FIELD_LABEL="Field" +COM_COMPONENTBUILDER_ADMIN_VIEW_FIELDS_CONDITIONS="Fields & Conditions" COM_COMPONENTBUILDER_ADMIN_VIEW_FILE="File" COM_COMPONENTBUILDER_ADMIN_VIEW_FILE_ADD="File Add" COM_COMPONENTBUILDER_ADMIN_VIEW_FILE_CHECK="File Check" @@ -253,8 +404,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_FILE_MINUS="File Minus" COM_COMPONENTBUILDER_ADMIN_VIEW_FILE_REMOVE="File Remove" COM_COMPONENTBUILDER_ADMIN_VIEW_FILE_TWO="File 2" COM_COMPONENTBUILDER_ADMIN_VIEW_FILTER="Filter" -COM_COMPONENTBUILDER_ADMIN_VIEW_FILTER_DESCRIPTION="Select if the field is to be used as a filter in list view, if shown." -COM_COMPONENTBUILDER_ADMIN_VIEW_FILTER_LABEL="Filter" COM_COMPONENTBUILDER_ADMIN_VIEW_FIRST="First" COM_COMPONENTBUILDER_ADMIN_VIEW_FLAG="Flag" COM_COMPONENTBUILDER_ADMIN_VIEW_FLAG_THREE="Flag 3" @@ -269,14 +418,12 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_FOLDER_REMOVE="Folder Remove" COM_COMPONENTBUILDER_ADMIN_VIEW_FOLDER_THREE="Folder 3" COM_COMPONENTBUILDER_ADMIN_VIEW_FORWARD_CIRCLE="Forward Circle" COM_COMPONENTBUILDER_ADMIN_VIEW_FORWARD_TWO="Forward 2" -COM_COMPONENTBUILDER_ADMIN_VIEW_FULL_WIDTH_IN_TAB="Full Width in Tab" COM_COMPONENTBUILDER_ADMIN_VIEW_GENERIC="Generic" COM_COMPONENTBUILDER_ADMIN_VIEW_GRID="Grid" COM_COMPONENTBUILDER_ADMIN_VIEW_GRID_TWO="Grid 2" COM_COMPONENTBUILDER_ADMIN_VIEW_HEALTH="Health" COM_COMPONENTBUILDER_ADMIN_VIEW_HEART="Heart" COM_COMPONENTBUILDER_ADMIN_VIEW_HEART_TWO="Heart 2" -COM_COMPONENTBUILDER_ADMIN_VIEW_HIDE="Hide" COM_COMPONENTBUILDER_ADMIN_VIEW_HOME="Home" COM_COMPONENTBUILDER_ADMIN_VIEW_HOME_TWO="Home 2" COM_COMPONENTBUILDER_ADMIN_VIEW_HTML="HTML" @@ -310,9 +457,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_INPUT_FILTER_LABEL="Select a Filter" COM_COMPONENTBUILDER_ADMIN_VIEW_INT="INT" COM_COMPONENTBUILDER_ADMIN_VIEW_IN_RELATION_TO_EACH_RECORD="In Relation to each Record" COM_COMPONENTBUILDER_ADMIN_VIEW_IN_RELATION_TO_THE_WHOLE_VIEW="In Relation to the Whole View" -COM_COMPONENTBUILDER_ADMIN_VIEW_ISOLATE="Isolate" -COM_COMPONENTBUILDER_ADMIN_VIEW_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES="Is Not (only 4 list/radio/checkboxes)" -COM_COMPONENTBUILDER_ADMIN_VIEW_IS_ONLY_FOUR_LISTRADIOCHECKBOXES="Is (only 4 list/radio/checkboxes)" COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT="JavaScript" COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE="Javascript Views File" COM_COMPONENTBUILDER_ADMIN_VIEW_JAVASCRIPT_VIEWS_FILE_DESCRIPTION="Add your JavaScript here! [Do not add the script tags]" @@ -335,33 +479,15 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_KEY="Key" COM_COMPONENTBUILDER_ADMIN_VIEW_KEY_DESCRIPTION="The key to use to link the child view." COM_COMPONENTBUILDER_ADMIN_VIEW_KEY_HINT="country" COM_COMPONENTBUILDER_ADMIN_VIEW_KEY_LABEL="Child Key" -COM_COMPONENTBUILDER_ADMIN_VIEW_KEY_WORD_ALL_CASEINSENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word All case-insensitive (only 4 text_field)" -COM_COMPONENTBUILDER_ADMIN_VIEW_KEY_WORD_ALL_CASESENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word All case-sensitive (only 4 text_field)" -COM_COMPONENTBUILDER_ADMIN_VIEW_KEY_WORD_ANY_CASEINSENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word Any case-insensitive (only 4 text_field)" -COM_COMPONENTBUILDER_ADMIN_VIEW_KEY_WORD_ANY_CASESENSITIVE_ONLY_FOUR_TEXT_FIELD="Key Word Any case-sensitive (only 4 text_field)" COM_COMPONENTBUILDER_ADMIN_VIEW_LAMP="Lamp" COM_COMPONENTBUILDER_ADMIN_VIEW_LAST="Last" -COM_COMPONENTBUILDER_ADMIN_VIEW_LEFT_IN_TAB="Left in Tab" -COM_COMPONENTBUILDER_ADMIN_VIEW_LEFT_OF_TABS="Left of Tabs" COM_COMPONENTBUILDER_ADMIN_VIEW_LINK="Link" COM_COMPONENTBUILDER_ADMIN_VIEW_LINKED_COMPONENTS="Linked - Components" -COM_COMPONENTBUILDER_ADMIN_VIEW_LINK_DESCRIPTION="Select if the field is to be used as a link to a single record, if shown." -COM_COMPONENTBUILDER_ADMIN_VIEW_LINK_LABEL="Link" COM_COMPONENTBUILDER_ADMIN_VIEW_LIST="List" -COM_COMPONENTBUILDER_ADMIN_VIEW_LIST_DESCRIPTION="Select if this field should show in the list view." -COM_COMPONENTBUILDER_ADMIN_VIEW_LIST_LABEL="Admin List" COM_COMPONENTBUILDER_ADMIN_VIEW_LIST_TWO="List 2" COM_COMPONENTBUILDER_ADMIN_VIEW_LOCATION="Location" COM_COMPONENTBUILDER_ADMIN_VIEW_LOCK="Lock" COM_COMPONENTBUILDER_ADMIN_VIEW_LOOP="Loop" -COM_COMPONENTBUILDER_ADMIN_VIEW_MATCH_BEHAVIOR_DESCRIPTION="Select the match behavior." -COM_COMPONENTBUILDER_ADMIN_VIEW_MATCH_BEHAVIOR_LABEL="Match Behavior" -COM_COMPONENTBUILDER_ADMIN_VIEW_MATCH_FIELD="Match Field" -COM_COMPONENTBUILDER_ADMIN_VIEW_MATCH_FIELD_DESCRIPTION="Select the match field." -COM_COMPONENTBUILDER_ADMIN_VIEW_MATCH_FIELD_LABEL="Match Field" -COM_COMPONENTBUILDER_ADMIN_VIEW_MATCH_OPTIONS_HINT="Options here" -COM_COMPONENTBUILDER_ADMIN_VIEW_MATCH_OPTIONS_LABEL="Match Options" -COM_COMPONENTBUILDER_ADMIN_VIEW_MAX_LENGTH_ONLY_FOUR_TEXT_FIELD="Max Length (only 4 text_field)" COM_COMPONENTBUILDER_ADMIN_VIEW_MENU="Menu" COM_COMPONENTBUILDER_ADMIN_VIEW_MENU_THREE="Menu 3" COM_COMPONENTBUILDER_ADMIN_VIEW_MENU_TWO="Menu 2" @@ -373,7 +499,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_METHOD_NAME_HINT="Method Name Here" COM_COMPONENTBUILDER_ADMIN_VIEW_METHOD_NAME_LABEL="Method Name" COM_COMPONENTBUILDER_ADMIN_VIEW_MINUS="Minus" COM_COMPONENTBUILDER_ADMIN_VIEW_MINUS_SIGN="Minus Sign" -COM_COMPONENTBUILDER_ADMIN_VIEW_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_field)" COM_COMPONENTBUILDER_ADMIN_VIEW_MOBILE="Mobile" COM_COMPONENTBUILDER_ADMIN_VIEW_MODIFIED_BY_DESC="The last user that modified this Admin View." COM_COMPONENTBUILDER_ADMIN_VIEW_MODIFIED_BY_LABEL="Modified By" @@ -398,28 +523,23 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NEW_TAB="New Tab" COM_COMPONENTBUILDER_ADMIN_VIEW_NEW_TAB_TWO="New Tab 2" COM_COMPONENTBUILDER_ADMIN_VIEW_NEXT="Next" COM_COMPONENTBUILDER_ADMIN_VIEW_NO="No" -COM_COMPONENTBUILDER_ADMIN_VIEW_NONE="None" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_DESCRIPTION="

The scripts that are automatic added to the input fields below is identical to the default import scripts used. Adapt them to your own custom needs.

" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ADVANCED_IMPORT_LABEL="Advanced notice." COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_DESCRIPTION="

Please do not change this area unless you would like to add special import to this view that goes beyond the default import concept that Component Builder already does automatic if this view is set to have import & export in the component area where this view is linked to the component.

" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_BEGINNER_IMPORT_LABEL="Beginners notice." -COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_CONDITIONS_DESCRIPTION="Here you can add conditional field settings" -COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_CONDITIONS_LABEL="Condition Implementation" +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_BUTTONS_DESCRIPTION="
" +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_DISPLAY_DESCRIPTION="
Display of the fields will load here!
" +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_DESCRIPTION="Here we can add some description to explain how things now work." +COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_CREATE_EDIT_NOTICE_LABEL="Fields & Conditions" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_DESCRIPTION="Only if you add permissions here will this view have permissions." COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_PERMISSIONS_LABEL="Permission Implementation" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_DESCRIPTION="If no tabs has been set all fields will be displayed together in one tab." COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_LABEL="Tab Setup Options" -COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_VIEWS_DESCRIPTION="id, asset_id, state, access, ordering, created_by, date_created, modified_by, date_modified, checked_out, checked_out_time, version, hits, metakey, metadesc, metadata (you don't need to add them again)" -COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_VIEWS_LABEL="The following fields are added by default to all views" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTIFICATION="Notification" COM_COMPONENTBUILDER_ADMIN_VIEW_NOTIFICATION_CIRCLE="Notification Circle" COM_COMPONENTBUILDER_ADMIN_VIEW_NOT_REQUIRED="Not Required" COM_COMPONENTBUILDER_ADMIN_VIEW_ONLY_FUNCTION="Only Function" COM_COMPONENTBUILDER_ADMIN_VIEW_ORDERING_LABEL="Ordering" -COM_COMPONENTBUILDER_ADMIN_VIEW_ORDER_EDIT_DESCRIPTION="Order in relation to tab & alignment of admin and site." -COM_COMPONENTBUILDER_ADMIN_VIEW_ORDER_EDIT_LABEL="Order in Edit" -COM_COMPONENTBUILDER_ADMIN_VIEW_ORDER_LIST_DESCRIPTION="Ordering in relation to list view of admin and site" -COM_COMPONENTBUILDER_ADMIN_VIEW_ORDER_LIST_LABEL="Order in list views" COM_COMPONENTBUILDER_ADMIN_VIEW_PALETTE="Palette" COM_COMPONENTBUILDER_ADMIN_VIEW_PARAGRAPH_CENTER="Paragraph Center" COM_COMPONENTBUILDER_ADMIN_VIEW_PARAGRAPH_JUSTIFY="Paragraph Justify" @@ -434,8 +554,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_PAUSE_CIRCLE="Pause Circle" COM_COMPONENTBUILDER_ADMIN_VIEW_PENCIL="Pencil" COM_COMPONENTBUILDER_ADMIN_VIEW_PENCIL_TWO="Pencil 2" COM_COMPONENTBUILDER_ADMIN_VIEW_PERMISSION="Permissions" -COM_COMPONENTBUILDER_ADMIN_VIEW_PERMISSION_DESCRIPTION="What permission to use." -COM_COMPONENTBUILDER_ADMIN_VIEW_PERMISSION_LABEL="Permissions" COM_COMPONENTBUILDER_ADMIN_VIEW_PHONE="Phone" COM_COMPONENTBUILDER_ADMIN_VIEW_PHONE_TWO="Phone 2" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP="PHP" @@ -562,8 +680,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY="readonly" COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE="read/write" COM_COMPONENTBUILDER_ADMIN_VIEW_REMOVE="Remove" COM_COMPONENTBUILDER_ADMIN_VIEW_REPLY="Reply" -COM_COMPONENTBUILDER_ADMIN_VIEW_RIGHT_IN_TAB="Right in Tab" -COM_COMPONENTBUILDER_ADMIN_VIEW_RIGHT_OF_TABS="Right of Tabs" COM_COMPONENTBUILDER_ADMIN_VIEW_SAVE_COPY="Save Copy" COM_COMPONENTBUILDER_ADMIN_VIEW_SAVE_NEW="Save New" COM_COMPONENTBUILDER_ADMIN_VIEW_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Admin View to customise the alias." @@ -571,8 +687,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_SCISSORS="Scissors" COM_COMPONENTBUILDER_ADMIN_VIEW_SCREEN="Screen" COM_COMPONENTBUILDER_ADMIN_VIEW_SCREWDRIVER="Screwdriver" COM_COMPONENTBUILDER_ADMIN_VIEW_SEARCH="Search" -COM_COMPONENTBUILDER_ADMIN_VIEW_SEARCH_DESCRIPTION="Select if the field is to be searchable in list view, if shown." -COM_COMPONENTBUILDER_ADMIN_VIEW_SEARCH_LABEL="Searchable" COM_COMPONENTBUILDER_ADMIN_VIEW_SELECTION="Selection" COM_COMPONENTBUILDER_ADMIN_VIEW_SETTINGS="Settings" COM_COMPONENTBUILDER_ADMIN_VIEW_SHARE="Share" @@ -582,7 +696,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION="Short Description" COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_DESCRIPTION="Enter short description" COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT="Your Short Description Here" COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_LABEL="Short Description" -COM_COMPONENTBUILDER_ADMIN_VIEW_SHOW="Show" COM_COMPONENTBUILDER_ADMIN_VIEW_SHUFFLE="Shuffle" COM_COMPONENTBUILDER_ADMIN_VIEW_SIGNUP="Signup" COM_COMPONENTBUILDER_ADMIN_VIEW_SINGLE="Single" @@ -592,8 +705,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_SMILEY_NEUTRAL_TWO="Smiley Neutral 2" COM_COMPONENTBUILDER_ADMIN_VIEW_SMILEY_SAD="Smiley Sad" COM_COMPONENTBUILDER_ADMIN_VIEW_SMILEY_SAD_TWO="Smiley Sad 2" COM_COMPONENTBUILDER_ADMIN_VIEW_SMILEY_TWO="Smiley 2" -COM_COMPONENTBUILDER_ADMIN_VIEW_SORT_DESCRIPTION="Select if the field should be sortable in list view, if shown." -COM_COMPONENTBUILDER_ADMIN_VIEW_SORT_LABEL="Sortable" COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCE="Source" COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_DESCRIPTION="Map the Source to this view's fields.
// First Table Map.
SourceField => viewField
// Other Tables Map.
firstTableKeySourceField == keySourceField
SourceField => viewField" COM_COMPONENTBUILDER_ADMIN_VIEW_SOURCEMAP_HINT="SourceField => viewField" @@ -625,32 +736,21 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_TAG="Tag" COM_COMPONENTBUILDER_ADMIN_VIEW_TAGS="Tags" COM_COMPONENTBUILDER_ADMIN_VIEW_TAGS_TWO="Tags 2" COM_COMPONENTBUILDER_ADMIN_VIEW_TAG_TWO="Tag 2" -COM_COMPONENTBUILDER_ADMIN_VIEW_TARGET_BEHAVIOR_DESCRIPTION="Select the target field/s behavior." -COM_COMPONENTBUILDER_ADMIN_VIEW_TARGET_BEHAVIOR_LABEL="Target Behavior" COM_COMPONENTBUILDER_ADMIN_VIEW_TARGET_DESCRIPTION="Set the target view type" -COM_COMPONENTBUILDER_ADMIN_VIEW_TARGET_FIELD="Target Field" -COM_COMPONENTBUILDER_ADMIN_VIEW_TARGET_FIELD_DESCRIPTION="Select the target field/s." -COM_COMPONENTBUILDER_ADMIN_VIEW_TARGET_FIELD_LABEL="Target Field/s" COM_COMPONENTBUILDER_ADMIN_VIEW_TARGET_LABEL="Target" -COM_COMPONENTBUILDER_ADMIN_VIEW_TARGET_RELATION_DESCRIPTION="Select the target field/s relation to other of the same target field/s." -COM_COMPONENTBUILDER_ADMIN_VIEW_TARGET_RELATION_LABEL="Target Relation" COM_COMPONENTBUILDER_ADMIN_VIEW_TASK_NAME_DESCRIPTION="Enter Task Name Here" COM_COMPONENTBUILDER_ADMIN_VIEW_TASK_NAME_HINT="Task Name Here" COM_COMPONENTBUILDER_ADMIN_VIEW_TASK_NAME_LABEL="Task Name" COM_COMPONENTBUILDER_ADMIN_VIEW_THUMBS_DOWN="Thumbs Down" COM_COMPONENTBUILDER_ADMIN_VIEW_THUMBS_UP="Thumbs Up" -COM_COMPONENTBUILDER_ADMIN_VIEW_TITLE_DESCRIPTION="Select if the field is the title field." -COM_COMPONENTBUILDER_ADMIN_VIEW_TITLE_LABEL="Title" COM_COMPONENTBUILDER_ADMIN_VIEW_TREE="Tree" COM_COMPONENTBUILDER_ADMIN_VIEW_TREE_TWO="Tree 2" COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE="Type" COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_DESCRIPTION="for list target" COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL="Type" COM_COMPONENTBUILDER_ADMIN_VIEW_UINT="UINT" -COM_COMPONENTBUILDER_ADMIN_VIEW_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)" COM_COMPONENTBUILDER_ADMIN_VIEW_UNARCHIVE="Unarchive" COM_COMPONENTBUILDER_ADMIN_VIEW_UNBLOCK="Unblock" -COM_COMPONENTBUILDER_ADMIN_VIEW_UNDERNEATH_TABS="Underneath Tabs" COM_COMPONENTBUILDER_ADMIN_VIEW_UNDO="Undo" COM_COMPONENTBUILDER_ADMIN_VIEW_UNDO_TWO="Undo 2" COM_COMPONENTBUILDER_ADMIN_VIEW_UNFEATURED="Unfeatured" @@ -723,6 +823,7 @@ COM_COMPONENTBUILDER_BSB_EMCOMPONENT_DETAILSEM="%s component details< COM_COMPONENTBUILDER_BSB_HAS_ID_MISMATCH_OF_SELECTED_BFIELDB_SO_THE_IDS_WAS_REMOVED="%s has id mismatch of selected field. So the id:%s was removed!" COM_COMPONENTBUILDER_BSITE_VIEW_IN_SB_HAS_ID_MISMATCH_OF_SELECTED_BSITE_VIEWB_SO_THE_IDS_WAS_REMOVED="Site view in %s has id mismatch of selected site view. So the id:%s was removed!" COM_COMPONENTBUILDER_BSNIPPETB_IDS_MISMATCH_IN_BSB="Snippet id:%s mismatch in %s." +COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED="Button to create %s will show once %s is saved." COM_COMPONENTBUILDER_BVIEW_TABLE_MAINB_IDS_MISMATCH_IN_BSB="View table main id:%s mismatch in %s." COM_COMPONENTBUILDER_CHECK_YOUR_OWNER_DETAILS_IT_HAS_NOT_BEEN_SET_OPEN_THE_JCB_GLOBAL_OPTIONS_GO_TO_THE_COMPANY_TAB_AND_ADD_THE_CORRECT_COMPANY_DETAILS_THERE="Check your owner details, it has not been set. Open the JCB Global Options, go to the Company tab and add the correct company details there." COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp" @@ -1015,6 +1116,7 @@ COM_COMPONENTBUILDER_CONTRIBUTORS="Contributors" COM_COMPONENTBUILDER_COPYRIGHT="Copyright" COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s" COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s" +COM_COMPONENTBUILDER_CREATE_S_FOR_THIS_S="Create %s for this %s" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW="Custom Admin View" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS="Custom Admin Views" COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS_ACCESS="Custom Admin Views Access" @@ -1960,6 +2062,7 @@ COM_COMPONENTBUILDER_EDIT_CREATED_BY_DESC=" Allows users in this group to edit c COM_COMPONENTBUILDER_EDIT_CREATED_DATE="Edit Created Date" COM_COMPONENTBUILDER_EDIT_CREATED_DATE_DESC=" Allows users in this group to edit created date." COM_COMPONENTBUILDER_EDIT_S="Edit %s" +COM_COMPONENTBUILDER_EDIT_S_FOR_THIS_S="Edit %s for this %s" COM_COMPONENTBUILDER_EDIT_VERSIONS="Edit Version" COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions." COM_COMPONENTBUILDER_EMAIL="Email" diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini index c9d93c783..9da821953 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -1,6 +1,12 @@ COM_COMPONENTBUILDER="Component Builder" -COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS="Admin Views Access" -COM_COMPONENTBUILDER_ADMIN_VIEWS_ACCESS_DESC="Allows the users in this group to access access admin views" +COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_USE="Admins Fields Batch Use" +COM_COMPONENTBUILDER_ADMINS_FIELDS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch admins fields" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_BATCH_USE="Admins Fields Conditions Batch Use" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch admins fields conditions" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_EDIT_VERSION="Admins Fields Conditions Edit Version" +COM_COMPONENTBUILDER_ADMINS_FIELDS_CONDITIONS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version admins fields conditions" +COM_COMPONENTBUILDER_ADMINS_FIELDS_EDIT_VERSION="Admins Fields Edit Version" +COM_COMPONENTBUILDER_ADMINS_FIELDS_EDIT_VERSION_DESC="Allows users in this group to edit versions of version admins fields" COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_USE="Admin Views Batch Use" COM_COMPONENTBUILDER_ADMIN_VIEWS_BATCH_USE_DESC="Allows users in this group to use batch copy/update method of batch admin views" COM_COMPONENTBUILDER_ADMIN_VIEWS_DASHBOARD_ADD="Admin Views Dashboard Add" diff --git a/admin/layouts/admin_fields/fields_above.php b/admin/layouts/admin_fields/fields_above.php new file mode 100644 index 000000000..23ec9f312 --- /dev/null +++ b/admin/layouts/admin_fields/fields_above.php @@ -0,0 +1,41 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'admin_view' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/admin_view/fields_fullwidth.php b/admin/layouts/admin_fields/fields_fullwidth.php similarity index 95% rename from admin/layouts/admin_view/fields_fullwidth.php rename to admin/layouts/admin_fields/fields_fullwidth.php index 315c8f2cd..69aeab513 100644 --- a/admin/layouts/admin_view/fields_fullwidth.php +++ b/admin/layouts/admin_fields/fields_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -31,9 +31,7 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'note_on_views', - 'addfields', - 'note_on_conditions', - 'addconditions' + 'addfields' ); ?> diff --git a/admin/layouts/admin_fields/index.html b/admin/layouts/admin_fields/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/admin_fields/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/admin_fields/publishing.php b/admin/layouts/admin_fields/publishing.php new file mode 100644 index 000000000..fb681cf40 --- /dev/null +++ b/admin/layouts/admin_fields/publishing.php @@ -0,0 +1,58 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// 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; + } + } +} diff --git a/admin/layouts/joomla_component/publlshing.php b/admin/layouts/admin_fields/publlshing.php similarity index 96% rename from admin/layouts/joomla_component/publlshing.php rename to admin/layouts/admin_fields/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/joomla_component/publlshing.php +++ b/admin/layouts/admin_fields/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/admin_fields_conditions/conditions_above.php b/admin/layouts/admin_fields_conditions/conditions_above.php new file mode 100644 index 000000000..0b6ff91d1 --- /dev/null +++ b/admin/layouts/admin_fields_conditions/conditions_above.php @@ -0,0 +1,41 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = array( + 'admin_view' +); + +?> +
+ renderField($field); + } ?> +
diff --git a/admin/layouts/admin_fields_conditions/conditions_fullwidth.php b/admin/layouts/admin_fields_conditions/conditions_fullwidth.php new file mode 100644 index 000000000..282485ce4 --- /dev/null +++ b/admin/layouts/admin_fields_conditions/conditions_fullwidth.php @@ -0,0 +1,49 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_on_conditions', + 'addconditions' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/admin_fields_conditions/index.html b/admin/layouts/admin_fields_conditions/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/layouts/admin_fields_conditions/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/layouts/admin_fields_conditions/publishing.php b/admin/layouts/admin_fields_conditions/publishing.php new file mode 100644 index 000000000..fb681cf40 --- /dev/null +++ b/admin/layouts/admin_fields_conditions/publishing.php @@ -0,0 +1,58 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// 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; + } + } +} diff --git a/admin/layouts/admin_fields_conditions/publlshing.php b/admin/layouts/admin_fields_conditions/publlshing.php new file mode 100644 index 000000000..ad942d2f1 --- /dev/null +++ b/admin/layouts/admin_fields_conditions/publlshing.php @@ -0,0 +1,59 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// 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', + '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; + } + } +} diff --git a/admin/layouts/admin_view/css_fullwidth.php b/admin/layouts/admin_view/css_fullwidth.php index 3e66a213e..723bff5bc 100644 --- a/admin/layouts/admin_view/css_fullwidth.php +++ b/admin/layouts/admin_view/css_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/custom_buttons_fullwidth.php b/admin/layouts/admin_view/custom_buttons_fullwidth.php index 6beef7b10..dcfd33f63 100644 --- a/admin/layouts/admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/admin_view/custom_buttons_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/custom_buttons_left.php b/admin/layouts/admin_view/custom_buttons_left.php index 864ee61b8..2725c535c 100644 --- a/admin/layouts/admin_view/custom_buttons_left.php +++ b/admin/layouts/admin_view/custom_buttons_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/custom_import_fullwidth.php b/admin/layouts/admin_view/custom_import_fullwidth.php index 869154d06..c60c1a6d6 100644 --- a/admin/layouts/admin_view/custom_import_fullwidth.php +++ b/admin/layouts/admin_view/custom_import_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/fields_conditions_fullwidth.php b/admin/layouts/admin_view/fields_conditions_fullwidth.php new file mode 100644 index 000000000..17a6aca8c --- /dev/null +++ b/admin/layouts/admin_view/fields_conditions_fullwidth.php @@ -0,0 +1,48 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_create_edit_display' +); + +?> +
+ +
+
+ getLabel($field); ?> +
+
+ getInput($field); ?> +
+
+ +
diff --git a/admin/layouts/admin_view/fields_conditions_left.php b/admin/layouts/admin_view/fields_conditions_left.php new file mode 100644 index 000000000..8c9af1fe7 --- /dev/null +++ b/admin/layouts/admin_view/fields_conditions_left.php @@ -0,0 +1,54 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_create_edit_notice' +); + +$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; + } + } +} diff --git a/admin/layouts/admin_view/fields_conditions_right.php b/admin/layouts/admin_view/fields_conditions_right.php new file mode 100644 index 000000000..69071374c --- /dev/null +++ b/admin/layouts/admin_view/fields_conditions_right.php @@ -0,0 +1,54 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +$fields = $displayData->get('fields') ?: array( + 'note_create_edit_buttons' +); + +$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; + } + } +} diff --git a/admin/layouts/admin_view/javascript_fullwidth.php b/admin/layouts/admin_view/javascript_fullwidth.php index b1fdcecd3..524350d58 100644 --- a/admin/layouts/admin_view/javascript_fullwidth.php +++ b/admin/layouts/admin_view/javascript_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/linked_components_fullwidth.php b/admin/layouts/admin_view/linked_components_fullwidth.php index c2750f0d3..955fc207a 100644 --- a/admin/layouts/admin_view/linked_components_fullwidth.php +++ b/admin/layouts/admin_view/linked_components_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/mysql_fullwidth.php b/admin/layouts/admin_view/mysql_fullwidth.php index 597276414..b0d3bdc94 100644 --- a/admin/layouts/admin_view/mysql_fullwidth.php +++ b/admin/layouts/admin_view/mysql_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/mysql_left.php b/admin/layouts/admin_view/mysql_left.php index 11d3e75d3..bc7bf48a6 100644 --- a/admin/layouts/admin_view/mysql_left.php +++ b/admin/layouts/admin_view/mysql_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/php_fullwidth.php b/admin/layouts/admin_view/php_fullwidth.php index 213e39020..63fefe8fc 100644 --- a/admin/layouts/admin_view/php_fullwidth.php +++ b/admin/layouts/admin_view/php_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/publishing.php b/admin/layouts/admin_view/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/admin_view/publishing.php +++ b/admin/layouts/admin_view/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/publlshing.php b/admin/layouts/admin_view/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/admin_view/publlshing.php +++ b/admin/layouts/admin_view/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/admin_view/settings_above.php b/admin/layouts/admin_view/settings_above.php index 61f4bc533..fb478bd95 100644 --- a/admin/layouts/admin_view/settings_above.php +++ b/admin/layouts/admin_view/settings_above.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/settings_left.php b/admin/layouts/admin_view/settings_left.php index c44cccebb..d097ef3c7 100644 --- a/admin/layouts/admin_view/settings_left.php +++ b/admin/layouts/admin_view/settings_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/settings_right.php b/admin/layouts/admin_view/settings_right.php index 6b197abbe..c1fe36818 100644 --- a/admin/layouts/admin_view/settings_right.php +++ b/admin/layouts/admin_view/settings_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/admin_view/settings_under.php b/admin/layouts/admin_view/settings_under.php index 0ff35d1b3..162833565 100644 --- a/admin/layouts/admin_view/settings_under.php +++ b/admin/layouts/admin_view/settings_under.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index 4290e2d32..83fcedc36 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php index d8d80d24e..3c75a77c4 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/custom_buttons_left.php b/admin/layouts/custom_admin_view/custom_buttons_left.php index 864ee61b8..2725c535c 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_left.php +++ b/admin/layouts/custom_admin_view/custom_buttons_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/custom_script_fullwidth.php b/admin/layouts/custom_admin_view/custom_script_fullwidth.php index c24827da7..c5e7bc878 100644 --- a/admin/layouts/custom_admin_view/custom_script_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_script_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/details_above.php b/admin/layouts/custom_admin_view/details_above.php index cf5d9da9e..f23dac70d 100644 --- a/admin/layouts/custom_admin_view/details_above.php +++ b/admin/layouts/custom_admin_view/details_above.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/details_fullwidth.php b/admin/layouts/custom_admin_view/details_fullwidth.php index 424473003..cf0e1f4c9 100644 --- a/admin/layouts/custom_admin_view/details_fullwidth.php +++ b/admin/layouts/custom_admin_view/details_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/details_left.php b/admin/layouts/custom_admin_view/details_left.php index 6b747dfa0..e97d5302c 100644 --- a/admin/layouts/custom_admin_view/details_left.php +++ b/admin/layouts/custom_admin_view/details_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/details_right.php b/admin/layouts/custom_admin_view/details_right.php index 558cd9ed8..30ff71078 100644 --- a/admin/layouts/custom_admin_view/details_right.php +++ b/admin/layouts/custom_admin_view/details_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/details_rightside.php b/admin/layouts/custom_admin_view/details_rightside.php index 6d3dee0c3..199ef5937 100644 --- a/admin/layouts/custom_admin_view/details_rightside.php +++ b/admin/layouts/custom_admin_view/details_rightside.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/details_under.php b/admin/layouts/custom_admin_view/details_under.php index 752bff74f..21469c10a 100644 --- a/admin/layouts/custom_admin_view/details_under.php +++ b/admin/layouts/custom_admin_view/details_under.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/linked_components_fullwidth.php b/admin/layouts/custom_admin_view/linked_components_fullwidth.php index 1549e536f..44cbfd749 100644 --- a/admin/layouts/custom_admin_view/linked_components_fullwidth.php +++ b/admin/layouts/custom_admin_view/linked_components_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/publishing.php b/admin/layouts/custom_admin_view/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/custom_admin_view/publishing.php +++ b/admin/layouts/custom_admin_view/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_admin_view/publlshing.php b/admin/layouts/custom_admin_view/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/custom_admin_view/publlshing.php +++ b/admin/layouts/custom_admin_view/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/custom_code/details_above.php b/admin/layouts/custom_code/details_above.php index eb338613b..ebcb00eb4 100644 --- a/admin/layouts/custom_code/details_above.php +++ b/admin/layouts/custom_code/details_above.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_code/details_fullwidth.php b/admin/layouts/custom_code/details_fullwidth.php index 2edfab238..fb2c9dd47 100644 --- a/admin/layouts/custom_code/details_fullwidth.php +++ b/admin/layouts/custom_code/details_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_code/details_left.php b/admin/layouts/custom_code/details_left.php index 32a271892..11332d983 100644 --- a/admin/layouts/custom_code/details_left.php +++ b/admin/layouts/custom_code/details_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_code/details_right.php b/admin/layouts/custom_code/details_right.php index 68f4ee2a3..44a1536e1 100644 --- a/admin/layouts/custom_code/details_right.php +++ b/admin/layouts/custom_code/details_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_code/details_under.php b/admin/layouts/custom_code/details_under.php index 752bff74f..21469c10a 100644 --- a/admin/layouts/custom_code/details_under.php +++ b/admin/layouts/custom_code/details_under.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_code/publishing.php b/admin/layouts/custom_code/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/custom_code/publishing.php +++ b/admin/layouts/custom_code/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/custom_code/publlshing.php b/admin/layouts/custom_code/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/custom_code/publlshing.php +++ b/admin/layouts/custom_code/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/dynamic_get/abacus_fullwidth.php b/admin/layouts/dynamic_get/abacus_fullwidth.php index eaaa21a1f..9a3d8998a 100644 --- a/admin/layouts/dynamic_get/abacus_fullwidth.php +++ b/admin/layouts/dynamic_get/abacus_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/dynamic_get/abacus_left.php b/admin/layouts/dynamic_get/abacus_left.php index 2a36cca6b..b7e511227 100644 --- a/admin/layouts/dynamic_get/abacus_left.php +++ b/admin/layouts/dynamic_get/abacus_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/dynamic_get/custom_script_fullwidth.php b/admin/layouts/dynamic_get/custom_script_fullwidth.php index 20b8488a1..480bce0cf 100644 --- a/admin/layouts/dynamic_get/custom_script_fullwidth.php +++ b/admin/layouts/dynamic_get/custom_script_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/dynamic_get/joint_fullwidth.php b/admin/layouts/dynamic_get/joint_fullwidth.php index b77201752..60e46f647 100644 --- a/admin/layouts/dynamic_get/joint_fullwidth.php +++ b/admin/layouts/dynamic_get/joint_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/dynamic_get/main_above.php b/admin/layouts/dynamic_get/main_above.php index 6b03e7818..5a9ac9720 100644 --- a/admin/layouts/dynamic_get/main_above.php +++ b/admin/layouts/dynamic_get/main_above.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/dynamic_get/main_fullwidth.php b/admin/layouts/dynamic_get/main_fullwidth.php index 45e8f669b..b69ad2324 100644 --- a/admin/layouts/dynamic_get/main_fullwidth.php +++ b/admin/layouts/dynamic_get/main_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/dynamic_get/main_left.php b/admin/layouts/dynamic_get/main_left.php index 196da991b..4887d7ac9 100644 --- a/admin/layouts/dynamic_get/main_left.php +++ b/admin/layouts/dynamic_get/main_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/dynamic_get/main_right.php b/admin/layouts/dynamic_get/main_right.php index 68c078370..6dc1fe383 100644 --- a/admin/layouts/dynamic_get/main_right.php +++ b/admin/layouts/dynamic_get/main_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/dynamic_get/main_under.php b/admin/layouts/dynamic_get/main_under.php index 224591950..e714dcb1f 100644 --- a/admin/layouts/dynamic_get/main_under.php +++ b/admin/layouts/dynamic_get/main_under.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/dynamic_get/publishing.php b/admin/layouts/dynamic_get/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/dynamic_get/publishing.php +++ b/admin/layouts/dynamic_get/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/dynamic_get/publlshing.php b/admin/layouts/dynamic_get/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/dynamic_get/publlshing.php +++ b/admin/layouts/dynamic_get/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/field/details_fullwidth.php b/admin/layouts/field/details_fullwidth.php index 318390af1..efe14f575 100644 --- a/admin/layouts/field/details_fullwidth.php +++ b/admin/layouts/field/details_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/field/details_left.php b/admin/layouts/field/details_left.php index e8c391328..e4bfa611e 100644 --- a/admin/layouts/field/details_left.php +++ b/admin/layouts/field/details_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/field/details_right.php b/admin/layouts/field/details_right.php index 531f66b6b..78805a53f 100644 --- a/admin/layouts/field/details_right.php +++ b/admin/layouts/field/details_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/field/details_under.php b/admin/layouts/field/details_under.php index 752bff74f..21469c10a 100644 --- a/admin/layouts/field/details_under.php +++ b/admin/layouts/field/details_under.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/field/linked_admin_views_fullwidth.php b/admin/layouts/field/linked_admin_views_fullwidth.php index 8fad49a7d..1740a412a 100644 --- a/admin/layouts/field/linked_admin_views_fullwidth.php +++ b/admin/layouts/field/linked_admin_views_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/field/publishing.php b/admin/layouts/field/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/field/publishing.php +++ b/admin/layouts/field/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/field/publlshing.php b/admin/layouts/field/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/field/publlshing.php +++ b/admin/layouts/field/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/field/scripts_left.php b/admin/layouts/field/scripts_left.php index 35661ade1..29cca0a17 100644 --- a/admin/layouts/field/scripts_left.php +++ b/admin/layouts/field/scripts_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/field/scripts_right.php b/admin/layouts/field/scripts_right.php index c459c580b..8454b21ae 100644 --- a/admin/layouts/field/scripts_right.php +++ b/admin/layouts/field/scripts_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/fieldtype/details_fullwidth.php b/admin/layouts/fieldtype/details_fullwidth.php index 29a43f549..8fe616fc4 100644 --- a/admin/layouts/fieldtype/details_fullwidth.php +++ b/admin/layouts/fieldtype/details_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/fieldtype/details_left.php b/admin/layouts/fieldtype/details_left.php index fa046b014..49a1c01e7 100644 --- a/admin/layouts/fieldtype/details_left.php +++ b/admin/layouts/fieldtype/details_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/fieldtype/details_right.php b/admin/layouts/fieldtype/details_right.php index 8bcf0197d..f2dd1ef0e 100644 --- a/admin/layouts/fieldtype/details_right.php +++ b/admin/layouts/fieldtype/details_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 09868f512..1a7278104 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/fieldtype/publishing.php b/admin/layouts/fieldtype/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/fieldtype/publishing.php +++ b/admin/layouts/fieldtype/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/fieldtype/publlshing.php b/admin/layouts/fieldtype/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/fieldtype/publlshing.php +++ b/admin/layouts/fieldtype/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/ftp/details_above.php b/admin/layouts/ftp/details_above.php index 06d39f38d..ddf73b2ea 100644 --- a/admin/layouts/ftp/details_above.php +++ b/admin/layouts/ftp/details_above.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/ftp/details_fullwidth.php b/admin/layouts/ftp/details_fullwidth.php index 224ba4fdb..74c89401a 100644 --- a/admin/layouts/ftp/details_fullwidth.php +++ b/admin/layouts/ftp/details_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/ftp/linked_components_fullwidth.php b/admin/layouts/ftp/linked_components_fullwidth.php index cff85088b..81441858e 100644 --- a/admin/layouts/ftp/linked_components_fullwidth.php +++ b/admin/layouts/ftp/linked_components_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/ftp/publishing.php b/admin/layouts/ftp/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/ftp/publishing.php +++ b/admin/layouts/ftp/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/ftp/publlshing.php b/admin/layouts/ftp/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/ftp/publlshing.php +++ b/admin/layouts/ftp/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index 85058e0cb..a43418bfa 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index 4526b7d3f..b815e1f5d 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index a23705fe0..bf20ea1b8 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index ecb08d1c9..a4b6056f6 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index 752bff74f..21469c10a 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/help_document/publlshing.php b/admin/layouts/help_document/publlshing.php index 414f558f4..ad942d2f1 100644 --- a/admin/layouts/help_document/publlshing.php +++ b/admin/layouts/help_document/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/admin_views_fullwidth.php b/admin/layouts/joomla_component/admin_views_fullwidth.php index 6c931c449..44b541fc7 100644 --- a/admin/layouts/joomla_component/admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/admin_views_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php index ae812db1f..22a7f2d94 100644 --- a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/details_above.php b/admin/layouts/joomla_component/details_above.php index cf5d9da9e..f23dac70d 100644 --- a/admin/layouts/joomla_component/details_above.php +++ b/admin/layouts/joomla_component/details_above.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/details_left.php b/admin/layouts/joomla_component/details_left.php index bb6bec6d1..cc99d2903 100644 --- a/admin/layouts/joomla_component/details_left.php +++ b/admin/layouts/joomla_component/details_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/details_right.php b/admin/layouts/joomla_component/details_right.php index d0a9163a5..29575f88c 100644 --- a/admin/layouts/joomla_component/details_right.php +++ b/admin/layouts/joomla_component/details_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/details_under.php b/admin/layouts/joomla_component/details_under.php index 752bff74f..21469c10a 100644 --- a/admin/layouts/joomla_component/details_under.php +++ b/admin/layouts/joomla_component/details_under.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php index edfae3f11..59b12684e 100644 --- a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php index 6aa316ece..c0c76492c 100644 --- a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/libs_helpers_fullwidth.php b/admin/layouts/joomla_component/libs_helpers_fullwidth.php index 59c81b734..fdf3c095a 100644 --- a/admin/layouts/joomla_component/libs_helpers_fullwidth.php +++ b/admin/layouts/joomla_component/libs_helpers_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/metadata.php b/admin/layouts/joomla_component/metadata.php new file mode 100644 index 000000000..1ce02c258 --- /dev/null +++ b/admin/layouts/joomla_component/metadata.php @@ -0,0 +1,56 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file + +defined('_JEXEC') or die('Restricted access'); + +$form = $displayData->getForm(); + +// JLayout for standard handling of metadata fields in the administrator content edit screens. +$fieldSets = $form->getFieldsets('metadata'); +?> + + $fieldSet) : ?> + description) && trim($fieldSet->description)) : ?> +

escape(JText::_($fieldSet->description)); ?>

+ + + renderField('metadesc'); + echo $form->renderField('metakey'); + } + + foreach ($form->getFieldset($name) as $field) + { + if ($field->name != 'jform[metadata][tags][]') + { + echo $field->renderField(); + } + } ?> + diff --git a/admin/layouts/joomla_component/mysql_fullwidth.php b/admin/layouts/joomla_component/mysql_fullwidth.php index b583cf211..33e3b0c57 100644 --- a/admin/layouts/joomla_component/mysql_fullwidth.php +++ b/admin/layouts/joomla_component/mysql_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/php_fullwidth.php b/admin/layouts/joomla_component/php_fullwidth.php index 3a527eeb0..50884943e 100644 --- a/admin/layouts/joomla_component/php_fullwidth.php +++ b/admin/layouts/joomla_component/php_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/publishing.php b/admin/layouts/joomla_component/publishing.php index 124f89ba1..d5c295540 100644 --- a/admin/layouts/joomla_component/publishing.php +++ b/admin/layouts/joomla_component/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -34,7 +34,13 @@ $fields = $displayData->get('fields') ?: array( 'created', 'created_by', 'modified', - 'modified_by' + 'modified_by', + 'published', + 'ordering', + 'access', + 'version', + 'hits', + 'id' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); diff --git a/admin/layouts/joomla_component/readme_left.php b/admin/layouts/joomla_component/readme_left.php index ffa7e2432..a4bed1ca4 100644 --- a/admin/layouts/joomla_component/readme_left.php +++ b/admin/layouts/joomla_component/readme_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/readme_right.php b/admin/layouts/joomla_component/readme_right.php index cce9880fe..7c5b9c3bc 100644 --- a/admin/layouts/joomla_component/readme_right.php +++ b/admin/layouts/joomla_component/readme_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/settings_left.php b/admin/layouts/joomla_component/settings_left.php index d1017c034..0e1305dab 100644 --- a/admin/layouts/joomla_component/settings_left.php +++ b/admin/layouts/joomla_component/settings_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/settings_right.php b/admin/layouts/joomla_component/settings_right.php index 33461e68f..b97449d7c 100644 --- a/admin/layouts/joomla_component/settings_right.php +++ b/admin/layouts/joomla_component/settings_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/site_views_fullwidth.php b/admin/layouts/joomla_component/site_views_fullwidth.php index b5409ec3d..ae8b3114b 100644 --- a/admin/layouts/joomla_component/site_views_fullwidth.php +++ b/admin/layouts/joomla_component/site_views_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/joomla_component/translation_fullwidth.php b/admin/layouts/joomla_component/translation_fullwidth.php index d88364bbe..96a982f3f 100644 --- a/admin/layouts/joomla_component/translation_fullwidth.php +++ b/admin/layouts/joomla_component/translation_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/language/details_left.php b/admin/layouts/language/details_left.php index c7c1f0cce..9401a56e4 100644 --- a/admin/layouts/language/details_left.php +++ b/admin/layouts/language/details_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/language/details_right.php b/admin/layouts/language/details_right.php index 2d2b05d7e..62441e6d3 100644 --- a/admin/layouts/language/details_right.php +++ b/admin/layouts/language/details_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/language/publishing.php b/admin/layouts/language/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/language/publishing.php +++ b/admin/layouts/language/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/language/publlshing.php b/admin/layouts/language/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/language/publlshing.php +++ b/admin/layouts/language/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/language_translation/details_above.php b/admin/layouts/language_translation/details_above.php index 115f6aef7..b5b4aef34 100644 --- a/admin/layouts/language_translation/details_above.php +++ b/admin/layouts/language_translation/details_above.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/language_translation/details_fullwidth.php b/admin/layouts/language_translation/details_fullwidth.php index 647bedfb1..eb1d0117a 100644 --- a/admin/layouts/language_translation/details_fullwidth.php +++ b/admin/layouts/language_translation/details_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/language_translation/publishing.php b/admin/layouts/language_translation/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/language_translation/publishing.php +++ b/admin/layouts/language_translation/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/language_translation/publlshing.php b/admin/layouts/language_translation/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/language_translation/publlshing.php +++ b/admin/layouts/language_translation/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/layout/custom_script_fullwidth.php b/admin/layouts/layout/custom_script_fullwidth.php index 9037e7b79..32ecee070 100644 --- a/admin/layouts/layout/custom_script_fullwidth.php +++ b/admin/layouts/layout/custom_script_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/layout/details_fullwidth.php b/admin/layouts/layout/details_fullwidth.php index 112ffc15a..54b2f1ee2 100644 --- a/admin/layouts/layout/details_fullwidth.php +++ b/admin/layouts/layout/details_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/layout/details_left.php b/admin/layouts/layout/details_left.php index fc2b93218..6df1fb844 100644 --- a/admin/layouts/layout/details_left.php +++ b/admin/layouts/layout/details_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/layout/details_right.php b/admin/layouts/layout/details_right.php index e211859a8..9b2e232c3 100644 --- a/admin/layouts/layout/details_right.php +++ b/admin/layouts/layout/details_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/layout/details_rightside.php b/admin/layouts/layout/details_rightside.php index 0b1ec7323..d462afb5f 100644 --- a/admin/layouts/layout/details_rightside.php +++ b/admin/layouts/layout/details_rightside.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/layout/details_under.php b/admin/layouts/layout/details_under.php index 752bff74f..21469c10a 100644 --- a/admin/layouts/layout/details_under.php +++ b/admin/layouts/layout/details_under.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/layout/publishing.php b/admin/layouts/layout/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/layout/publishing.php +++ b/admin/layouts/layout/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/layout/publlshing.php b/admin/layouts/layout/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/layout/publlshing.php +++ b/admin/layouts/layout/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/site_view/custom_buttons_fullwidth.php b/admin/layouts/site_view/custom_buttons_fullwidth.php index 983e181e6..969ef17a5 100644 --- a/admin/layouts/site_view/custom_buttons_fullwidth.php +++ b/admin/layouts/site_view/custom_buttons_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/custom_buttons_left.php b/admin/layouts/site_view/custom_buttons_left.php index 55086c164..04b569c28 100644 --- a/admin/layouts/site_view/custom_buttons_left.php +++ b/admin/layouts/site_view/custom_buttons_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/custom_buttons_right.php b/admin/layouts/site_view/custom_buttons_right.php index 83f244633..208628d3f 100644 --- a/admin/layouts/site_view/custom_buttons_right.php +++ b/admin/layouts/site_view/custom_buttons_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/details_above.php b/admin/layouts/site_view/details_above.php index cf5d9da9e..f23dac70d 100644 --- a/admin/layouts/site_view/details_above.php +++ b/admin/layouts/site_view/details_above.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/details_fullwidth.php b/admin/layouts/site_view/details_fullwidth.php index 424473003..cf0e1f4c9 100644 --- a/admin/layouts/site_view/details_fullwidth.php +++ b/admin/layouts/site_view/details_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/details_left.php b/admin/layouts/site_view/details_left.php index 6b747dfa0..e97d5302c 100644 --- a/admin/layouts/site_view/details_left.php +++ b/admin/layouts/site_view/details_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/details_right.php b/admin/layouts/site_view/details_right.php index e211859a8..9b2e232c3 100644 --- a/admin/layouts/site_view/details_right.php +++ b/admin/layouts/site_view/details_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/details_rightside.php b/admin/layouts/site_view/details_rightside.php index 6d3dee0c3..199ef5937 100644 --- a/admin/layouts/site_view/details_rightside.php +++ b/admin/layouts/site_view/details_rightside.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/details_under.php b/admin/layouts/site_view/details_under.php index 752bff74f..21469c10a 100644 --- a/admin/layouts/site_view/details_under.php +++ b/admin/layouts/site_view/details_under.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/javascript_css_fullwidth.php b/admin/layouts/site_view/javascript_css_fullwidth.php index 5a9fdf03e..055a6e300 100644 --- a/admin/layouts/site_view/javascript_css_fullwidth.php +++ b/admin/layouts/site_view/javascript_css_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/linked_components_fullwidth.php b/admin/layouts/site_view/linked_components_fullwidth.php index 791b66d23..cfb7fcb47 100644 --- a/admin/layouts/site_view/linked_components_fullwidth.php +++ b/admin/layouts/site_view/linked_components_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/php_fullwidth.php b/admin/layouts/site_view/php_fullwidth.php index 12356d149..754c7f23e 100644 --- a/admin/layouts/site_view/php_fullwidth.php +++ b/admin/layouts/site_view/php_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/publishing.php b/admin/layouts/site_view/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/site_view/publishing.php +++ b/admin/layouts/site_view/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/site_view/publlshing.php b/admin/layouts/site_view/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/site_view/publlshing.php +++ b/admin/layouts/site_view/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/snippet/details_above.php b/admin/layouts/snippet/details_above.php index 627d9bbf6..35bc05647 100644 --- a/admin/layouts/snippet/details_above.php +++ b/admin/layouts/snippet/details_above.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/snippet/details_left.php b/admin/layouts/snippet/details_left.php index fa2029108..f1ba0a275 100644 --- a/admin/layouts/snippet/details_left.php +++ b/admin/layouts/snippet/details_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/snippet/details_right.php b/admin/layouts/snippet/details_right.php index 44fa2ea43..72b9af6c0 100644 --- a/admin/layouts/snippet/details_right.php +++ b/admin/layouts/snippet/details_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/snippet/publishing.php b/admin/layouts/snippet/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/snippet/publishing.php +++ b/admin/layouts/snippet/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/snippet/publlshing.php b/admin/layouts/snippet/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/snippet/publlshing.php +++ b/admin/layouts/snippet/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/layouts/template/custom_script_fullwidth.php b/admin/layouts/template/custom_script_fullwidth.php index 9037e7b79..32ecee070 100644 --- a/admin/layouts/template/custom_script_fullwidth.php +++ b/admin/layouts/template/custom_script_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/template/details_fullwidth.php b/admin/layouts/template/details_fullwidth.php index 69a7693af..f874474c4 100644 --- a/admin/layouts/template/details_fullwidth.php +++ b/admin/layouts/template/details_fullwidth.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/template/details_left.php b/admin/layouts/template/details_left.php index fc2b93218..6df1fb844 100644 --- a/admin/layouts/template/details_left.php +++ b/admin/layouts/template/details_left.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/template/details_right.php b/admin/layouts/template/details_right.php index e211859a8..9b2e232c3 100644 --- a/admin/layouts/template/details_right.php +++ b/admin/layouts/template/details_right.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/template/details_rightside.php b/admin/layouts/template/details_rightside.php index 0b1ec7323..d462afb5f 100644 --- a/admin/layouts/template/details_rightside.php +++ b/admin/layouts/template/details_rightside.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/template/details_under.php b/admin/layouts/template/details_under.php index 752bff74f..21469c10a 100644 --- a/admin/layouts/template/details_under.php +++ b/admin/layouts/template/details_under.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/template/publishing.php b/admin/layouts/template/publishing.php index 124f89ba1..fb681cf40 100644 --- a/admin/layouts/template/publishing.php +++ b/admin/layouts/template/publishing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/layouts/template/publlshing.php b/admin/layouts/template/publlshing.php index 7b4a2be8e..ad942d2f1 100644 --- a/admin/layouts/template/publlshing.php +++ b/admin/layouts/template/publlshing.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -33,7 +33,6 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'published', 'ordering', - 'access', 'version', 'hits', 'id' diff --git a/admin/models/admin_fields.php b/admin/models/admin_fields.php new file mode 100644 index 000000000..2c8aa3729 --- /dev/null +++ b/admin/models/admin_fields.php @@ -0,0 +1,879 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +// import Joomla modelform library +jimport('joomla.application.component.modeladmin'); + +/** + * Componentbuilder Admin_fields Model + */ +class ComponentbuilderModelAdmin_fields 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_fields'; + + /** + * 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_fields', $prefix = 'ComponentbuilderTable', $config = array()) + { + 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)) + { + // 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->addfields)) + { + // Convert the addfields field to an array. + $addfields = new Registry; + $addfields->loadString($item->addfields); + $item->addfields = $addfields->toArray(); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.admin_fields'); + } + } + + 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. + * + * @return mixed A JForm object on success, false on failure + * + * @since 1.6 + */ + public function getForm($data = array(), $loadData = true) + { + // Get the form. + $form = $this->loadForm('com_componentbuilder.admin_fields', 'admin_fields', array('control' => 'jform', 'load_data' => $loadData)); + + 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('core.edit.state', 'com_componentbuilder.admin_fields.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.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 (!$user->authorise('core.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 (!$user->authorise('core.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 field name + $redirectedField = $jinput->get('ref', null, 'STRING'); + // Set redirected field value + $redirectedValue = $jinput->get('refid', 0, '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_fields.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('core.delete', 'com_componentbuilder.admin_fields.' . (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('core.edit.state', 'com_componentbuilder.admin_fields.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return parent::canEditState($record); + } + + /** + * 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. + + return JFactory::getUser()->authorise('core.edit', 'com_componentbuilder.admin_fields.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + } + + /** + * 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_fields')); + $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_fields.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_fields'); + $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->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('admin_fields'); + } + + if (!$this->canDo->get('core.create') || !$this->canDo->get('core.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('core.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('core.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; + } + } + + $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->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('admin_fields'); + } + + if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.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('core.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('core.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 addfields items to data. + if (isset($data['addfields']) && is_array($data['addfields'])) + { + $addfields = new JRegistry; + $addfields->loadArray($data['addfields']); + $data['addfields'] = (string) $addfields; + } + elseif (!isset($data['addfields'])) + { + // Set the empty addfields to data + $data['addfields'] = ''; + } + + // 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 & alias. + * + * @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; + } +} diff --git a/admin/models/admin_fields_conditions.php b/admin/models/admin_fields_conditions.php new file mode 100644 index 000000000..87be74748 --- /dev/null +++ b/admin/models/admin_fields_conditions.php @@ -0,0 +1,879 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\Registry\Registry; + +// import Joomla modelform library +jimport('joomla.application.component.modeladmin'); + +/** + * Componentbuilder Admin_fields_conditions Model + */ +class ComponentbuilderModelAdmin_fields_conditions 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_fields_conditions'; + + /** + * 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_fields_conditions', $prefix = 'ComponentbuilderTable', $config = array()) + { + 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)) + { + // 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->addconditions)) + { + // Convert the addconditions field to an array. + $addconditions = new Registry; + $addconditions->loadString($item->addconditions); + $item->addconditions = $addconditions->toArray(); + } + + if (!empty($item->id)) + { + $item->tags = new JHelperTags; + $item->tags->getTagIds($item->id, 'com_componentbuilder.admin_fields_conditions'); + } + } + + 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. + * + * @return mixed A JForm object on success, false on failure + * + * @since 1.6 + */ + public function getForm($data = array(), $loadData = true) + { + // Get the form. + $form = $this->loadForm('com_componentbuilder.admin_fields_conditions', 'admin_fields_conditions', array('control' => 'jform', 'load_data' => $loadData)); + + 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('core.edit.state', 'com_componentbuilder.admin_fields_conditions.' . (int) $id)) + || ($id == 0 && !$user->authorise('core.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 (!$user->authorise('core.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 (!$user->authorise('core.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 field name + $redirectedField = $jinput->get('ref', null, 'STRING'); + // Set redirected field value + $redirectedValue = $jinput->get('refid', 0, '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_fields_conditions.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('core.delete', 'com_componentbuilder.admin_fields_conditions.' . (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('core.edit.state', 'com_componentbuilder.admin_fields_conditions.' . (int) $recordId); + if (!$permission && !is_null($permission)) + { + return false; + } + } + // In the absense of better information, revert to the component permissions. + return parent::canEditState($record); + } + + /** + * 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. + + return JFactory::getUser()->authorise('core.edit', 'com_componentbuilder.admin_fields_conditions.'. ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key); + } + + /** + * 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_fields_conditions')); + $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_fields_conditions.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_fields_conditions'); + $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->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('admin_fields_conditions'); + } + + if (!$this->canDo->get('core.create') || !$this->canDo->get('core.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('core.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('core.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; + } + } + + $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->contentType = new JUcmType; + $this->type = $this->contentType->getTypeByTable($this->tableClassName); + $this->canDo = ComponentbuilderHelper::getActions('admin_fields_conditions'); + } + + if (!$this->canDo->get('core.edit') && !$this->canDo->get('core.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('core.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('core.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 addconditions items to data. + if (isset($data['addconditions']) && is_array($data['addconditions'])) + { + $addconditions = new JRegistry; + $addconditions->loadArray($data['addconditions']); + $data['addconditions'] = (string) $addconditions; + } + elseif (!isset($data['addconditions'])) + { + // Set the empty addconditions to data + $data['addconditions'] = ''; + } + + // 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 & alias. + * + * @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; + } +} diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 82277ad41..3be57afe9 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 126 of this MVC - @build 11th October, 2017 + @version @update number 136 of this MVC + @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.php @@ -64,6 +64,11 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin public function getTable($type = 'admin_view', $prefix = 'ComponentbuilderTable', $config = array()) { return JTable::getInstance($type, $prefix, $config); + } + + public function getVDM() + { + return $this->vastDevMod; } /** @@ -119,22 +124,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->addlinked_views = $addlinked_views->toArray(); } - if (!empty($item->addfields)) - { - // Convert the addfields field to an array. - $addfields = new Registry; - $addfields->loadString($item->addfields); - $item->addfields = $addfields->toArray(); - } - - if (!empty($item->addconditions)) - { - // Convert the addconditions field to an array. - $addconditions = new Registry; - $addconditions->loadString($item->addconditions); - $item->addconditions = $addconditions->toArray(); - } - if (!empty($item->custom_button)) { // Convert the custom_button field to an array. @@ -261,10 +250,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_display = base64_decode($item->php_import_display); } - if (!empty($item->php_getitem)) + if (!empty($item->css_view)) { - // base64 Decode php_getitem. - $item->php_getitem = base64_decode($item->php_getitem); + // base64 Decode css_view. + $item->css_view = base64_decode($item->css_view); } if (!empty($item->php_import_save)) @@ -273,12 +262,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_save = base64_decode($item->php_import_save); } - if (!empty($item->css_view)) - { - // base64 Decode css_view. - $item->css_view = base64_decode($item->css_view); - } - if (!empty($item->css_views)) { // base64 Decode css_views. @@ -351,11 +334,38 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_setdata = base64_decode($item->php_import_setdata); } + if (!empty($item->php_getitem)) + { + // base64 Decode php_getitem. + $item->php_getitem = base64_decode($item->php_getitem); + } + if (!empty($item->php_import_ext)) { // base64 Decode php_import_ext. $item->php_import_ext = base64_decode($item->php_import_ext); + } + + + if (empty($item->id)) + { + $id = 0; } + else + { + $id = $item->id; + } + // set the id and view name to session + if ($vdm = ComponentbuilderHelper::get('admin_view__'.$id)) + { + $this->vastDevMod = $vdm; + } + else + { + $this->vastDevMod = ComponentbuilderHelper::randomkey(50); + ComponentbuilderHelper::set($this->vastDevMod, 'admin_view__'.$id); + ComponentbuilderHelper::set('admin_view__'.$id, $this->vastDevMod); + } if (!empty($item->id)) { @@ -1192,32 +1202,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['addlinked_views'] = ''; } - // Set the addfields items to data. - if (isset($data['addfields']) && is_array($data['addfields'])) - { - $addfields = new JRegistry; - $addfields->loadArray($data['addfields']); - $data['addfields'] = (string) $addfields; - } - elseif (!isset($data['addfields'])) - { - // Set the empty addfields to data - $data['addfields'] = ''; - } - - // Set the addconditions items to data. - if (isset($data['addconditions']) && is_array($data['addconditions'])) - { - $addconditions = new JRegistry; - $addconditions->loadArray($data['addconditions']); - $data['addconditions'] = (string) $addconditions; - } - elseif (!isset($data['addconditions'])) - { - // Set the empty addconditions to data - $data['addconditions'] = ''; - } - // Set the custom_button items to data. if (isset($data['custom_button']) && is_array($data['custom_button'])) { @@ -1359,10 +1343,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import_display'] = base64_encode($data['php_import_display']); } - // Set the php_getitem string to base64 string. - if (isset($data['php_getitem'])) + // Set the css_view string to base64 string. + if (isset($data['css_view'])) { - $data['php_getitem'] = base64_encode($data['php_getitem']); + $data['css_view'] = base64_encode($data['css_view']); } // Set the php_import_save string to base64 string. @@ -1371,12 +1355,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import_save'] = base64_encode($data['php_import_save']); } - // Set the css_view string to base64 string. - if (isset($data['css_view'])) - { - $data['css_view'] = base64_encode($data['css_view']); - } - // Set the css_views string to base64 string. if (isset($data['css_views'])) { @@ -1449,6 +1427,12 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_import_setdata'] = base64_encode($data['php_import_setdata']); } + // Set the php_getitem string to base64 string. + if (isset($data['php_getitem'])) + { + $data['php_getitem'] = base64_encode($data['php_getitem']); + } + // Set the php_import_ext string to base64 string. if (isset($data['php_import_ext'])) { diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index d5a7380bb..7f62d32cd 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 126 of this MVC - @build 11th October, 2017 + @version @update number 136 of this MVC + @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views.php @@ -148,21 +148,6 @@ class ComponentbuilderModelAdmin_views extends JModelList { $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 . ')'); - } // Filter by search. $search = $this->getState('filter.search'); if (!empty($search)) @@ -214,12 +199,6 @@ class ComponentbuilderModelAdmin_views extends JModelList // From the componentbuilder_admin_view table $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); $query->where('a.id IN (' . implode(',',$pks) . ')'); - // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) - { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); - } // Order the results by ordering $query->order('a.ordering ASC'); @@ -270,12 +249,10 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->sql = base64_decode($item->sql); // decode php_import_display $item->php_import_display = base64_decode($item->php_import_display); - // decode php_getitem - $item->php_getitem = base64_decode($item->php_getitem); - // decode php_import_save - $item->php_import_save = base64_decode($item->php_import_save); // decode css_view $item->css_view = base64_decode($item->css_view); + // decode php_import_save + $item->php_import_save = base64_decode($item->php_import_save); // decode css_views $item->css_views = base64_decode($item->css_views); // decode javascript_view_file @@ -300,6 +277,8 @@ class ComponentbuilderModelAdmin_views extends JModelList $item->html_import_view = base64_decode($item->html_import_view); // decode php_import_setdata $item->php_import_setdata = base64_decode($item->php_import_setdata); + // decode php_getitem + $item->php_getitem = base64_decode($item->php_getitem); // decode php_import_ext $item->php_import_ext = base64_decode($item->php_import_ext); // unset the values we don't want exported. diff --git a/admin/models/admins_fields.php b/admin/models/admins_fields.php new file mode 100644 index 000000000..b375ff59e --- /dev/null +++ b/admin/models/admins_fields.php @@ -0,0 +1,224 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the Joomla modellist library +jimport('joomla.application.component.modellist'); + +/** + * Admins_fields Model + */ +class ComponentbuilderModelAdmins_fields 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(); + + // 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_fields', '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)'); + } + + // 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_fields')); + $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_fields'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/admins_fields_conditions.php b/admin/models/admins_fields_conditions.php new file mode 100644 index 000000000..36979f431 --- /dev/null +++ b/admin/models/admins_fields_conditions.php @@ -0,0 +1,224 @@ + + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// import the Joomla modellist library +jimport('joomla.application.component.modellist'); + +/** + * Admins_fields_conditions Model + */ +class ComponentbuilderModelAdmins_fields_conditions 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(); + + // 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_fields_conditions', '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)'); + } + + // 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_fields_conditions')); + $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_fields_conditions'))->set($fields)->where($conditions); + + $db->setQuery($query); + + $db->execute(); + } + } + + return false; + } +} diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 10f0319ec..1783571a6 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -177,6 +177,131 @@ class ComponentbuilderModelAjax extends JModelList } // Used in admin_view + + protected $viewid = array(); + + protected function getViewID($call = 'table') + { + if (!isset($this->viewid[$call])) + { + // get the vdm key + $jinput = JFactory::getApplication()->input; + $vdm = $jinput->get('vdm', null, 'WORD'); + if ($vdm) + { + if ($view = ComponentbuilderHelper::get($vdm)) + { + $current = (array) explode('__', $view); + if (ComponentbuilderHelper::checkString($current[0]) && isset($current[1]) && is_numeric($current[1])) + { + // get the view name & id + $this->viewid[$call] = array( + 'a_id' => (int) $current[1], + 'a_view' => $current[0] + ); + } + } + } + } + if (isset($this->viewid[$call])) + { + return $this->viewid[$call]; + } + return false; + } + + protected $buttonArray = array( + 'admin_fields' => 'admins_fields', + 'admin_fields_conditions' => 'admins_fields_conditions', + 'language' => true); + + public function getButton($type) + { + if (isset($this->buttonArray[$type])) + { + $user = JFactory::getUser(); + // only add if user allowed to create + if ($user->authorise($type.'.create', 'com_componentbuilder')) + { + // get the view name & id + $values = $this->getViewID(); + // check if new item + $ref = ''; + if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id']; + } + // build the button + $button = '
+
+ +
+ +
'; + // return the button attached to input field + return $button; + } + return ''; + } + return false; + } + + public function getButtonID($type) + { + if (isset($this->buttonArray[$type])) + { + $user = JFactory::getUser(); + // only add if user allowed to create + if ($user->authorise($type.'.create', 'com_componentbuilder')) + { + // get the view name & id + $values = $this->getViewID(); + // check if new item + $ref = ''; + if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view'])) + { + // only load referal if not new item. + $ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id']; + // get item id + if ($id = ComponentbuilderHelper::getVar($type, $values['a_id'], $values['a_view'], 'id')) + { + $buttonText = JText::sprintf('COM_COMPONENTBUILDER_EDIT_S_FOR_THIS_S', ComponentbuilderHelper::safeString($type, 'w'), ComponentbuilderHelper::safeString($values['a_view'], 'w')); + $editThis = 'index.php?option=com_componentbuilder&view='.$this->buttonArray[$type].'&task='.$type.'.edit&id='.$id; + $icon = 'icon-apply'; + } + else + { + $buttonText = JText::sprintf('COM_COMPONENTBUILDER_CREATE_S_FOR_THIS_S', ComponentbuilderHelper::safeString($type, 'w'), ComponentbuilderHelper::safeString($values['a_view'], 'w')); + $editThis = 'index.php?option=com_componentbuilder&view='.$type.'&layout=edit'; + $icon = 'icon-new'; + } + // build the button + $button = '
+
+ +
+ +
'; + // return the button attached to input field + return $button; + } + return '
' . JText::sprintf('COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED', ComponentbuilderHelper::safeString($type, 'w'), ComponentbuilderHelper::safeString($values['a_view'], 'w')) . '
'; + } + } + return ''; + } + public static function getImportScripts($type) { // get from global helper @@ -1008,81 +1133,5 @@ class ComponentbuilderModelAjax extends JModelList return $field; } return false; - } - - // Used in language_translation - - protected $viewid = array(); - - protected function getViewID($call = 'table') - { - if (!isset($this->viewid[$call])) - { - // get the vdm key - $jinput = JFactory::getApplication()->input; - $vdm = $jinput->get('vdm', null, 'WORD'); - if ($vdm) - { - if ($view = ComponentbuilderHelper::get($vdm)) - { - $current = (array) explode('__', $view); - if (ComponentbuilderHelper::checkString($current[0]) && isset($current[1]) && is_numeric($current[1])) - { - // get the view name & id - $this->viewid[$call] = array( - 'a_id' => (int) $current[1], - 'a_view' => $current[0] - ); - } - } - } - } - if (isset($this->viewid[$call])) - { - return $this->viewid[$call]; - } - return false; - } - - protected $buttonArray = array( - 'language' => true); - - public function getButton($type) - { - if (isset($this->buttonArray[$type])) - { - $user = JFactory::getUser(); - // only add if user allowed to create - if ($user->authorise($type.'.create', 'com_componentbuilder')) - { - // get the input from url - $jinput = JFactory::getApplication()->input; - // get the view name & id - $values = $this->getViewID(); - // check if new item - $ref = ''; - if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view'])) - { - // only load referal if not new item. - $ref = '&ref=' . $values['a_view'] . '&refid=' . $values['a_id']; - } - // build the button - $button = '
-
- -
- -
'; - // return the button attached to input field - return $button; - } - return ''; - } - return false; } } diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 0e19fdc4c..398a23be7 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @@ -54,8 +54,6 @@ class ComponentbuilderModelComponentbuilder extends JModelList 'joomla_components.submenu' => 'joomla_component.submenu', 'joomla_components.dashboard_list' => 'joomla_component.dashboard_list', 'joomla_component.dashboard_add' => 'joomla_component.dashboard_add', - 'admin_views.access' => 'admin_view.access', - 'admin_view.access' => 'admin_view.access', 'admin_views.submenu' => 'admin_view.submenu', 'admin_views.dashboard_list' => 'admin_view.dashboard_list', 'admin_view.dashboard_add' => 'admin_view.dashboard_add', diff --git a/admin/models/custom_admin_views.php b/admin/models/custom_admin_views.php index a9627583a..26b6ae595 100644 --- a/admin/models/custom_admin_views.php +++ b/admin/models/custom_admin_views.php @@ -169,21 +169,6 @@ class ComponentbuilderModelCustom_admin_views extends JModelList { $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 . ')'); - } // Filter by search. $search = $this->getState('filter.search'); if (!empty($search)) @@ -235,12 +220,6 @@ class ComponentbuilderModelCustom_admin_views extends JModelList // From the componentbuilder_custom_admin_view table $query->from($db->quoteName('#__componentbuilder_custom_admin_view', 'a')); $query->where('a.id IN (' . implode(',',$pks) . ')'); - // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) - { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); - } // Order the results by ordering $query->order('a.ordering ASC'); diff --git a/admin/models/custom_codes.php b/admin/models/custom_codes.php index a2bb144a4..82d9221be 100644 --- a/admin/models/custom_codes.php +++ b/admin/models/custom_codes.php @@ -254,21 +254,6 @@ class ComponentbuilderModelCustom_codes extends JModelList { $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 . ')'); - } // Filter by search. $search = $this->getState('filter.search'); if (!empty($search)) @@ -340,12 +325,6 @@ class ComponentbuilderModelCustom_codes extends JModelList // From the componentbuilder_custom_code table $query->from($db->quoteName('#__componentbuilder_custom_code', 'a')); $query->where('a.id IN (' . implode(',',$pks) . ')'); - // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) - { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); - } // Order the results by ordering $query->order('a.ordering ASC'); diff --git a/admin/models/dynamic_gets.php b/admin/models/dynamic_gets.php index 9849b23e9..fe86b820f 100644 --- a/admin/models/dynamic_gets.php +++ b/admin/models/dynamic_gets.php @@ -214,21 +214,6 @@ class ComponentbuilderModelDynamic_gets extends JModelList { $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 . ')'); - } // Filter by search. $search = $this->getState('filter.search'); if (!empty($search)) @@ -290,12 +275,6 @@ class ComponentbuilderModelDynamic_gets extends JModelList // From the componentbuilder_dynamic_get table $query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a')); $query->where('a.id IN (' . implode(',',$pks) . ')'); - // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) - { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); - } // Order the results by ordering $query->order('a.ordering ASC'); diff --git a/admin/models/field.php b/admin/models/field.php index dcb250c83..3604b418a 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -155,21 +155,6 @@ class ComponentbuilderModelField extends JModelAdmin // From the componentbuilder_admin_view table $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); - // 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 . ')'); - } - // Order the results by ordering $query->order('a.published ASC'); $query->order('a.ordering ASC'); diff --git a/admin/models/fields.php b/admin/models/fields.php index fd02aa0b8..8756f7e0d 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -286,21 +286,6 @@ class ComponentbuilderModelFields extends JModelList { $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 . ')'); - } // Filter by search. $search = $this->getState('filter.search'); if (!empty($search)) @@ -399,12 +384,6 @@ class ComponentbuilderModelFields extends JModelList // From the componentbuilder_field table $query->from($db->quoteName('#__componentbuilder_field', 'a')); $query->where('a.id IN (' . implode(',',$pks) . ')'); - // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) - { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); - } // Order the results by ordering $query->order('a.ordering ASC'); diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php index 0acdd4eeb..208ef6616 100644 --- a/admin/models/fields/adminviewfolderlist.php +++ b/admin/models/fields/adminviewfolderlist.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/adminviews.php b/admin/models/fields/adminviews.php index 470bc23d2..077fcc271 100644 --- a/admin/models/fields/adminviews.php +++ b/admin/models/fields/adminviews.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php index df11b6111..c14e6d885 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/component.php b/admin/models/fields/component.php index 774845828..ccb86a672 100644 --- a/admin/models/fields/component.php +++ b/admin/models/fields/component.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/components.php b/admin/models/fields/components.php index d654521fd..66bdb14d5 100644 --- a/admin/models/fields/components.php +++ b/admin/models/fields/components.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/customadminviews.php b/admin/models/fields/customadminviews.php index f95d84373..4b64cd33f 100644 --- a/admin/models/fields/customadminviews.php +++ b/admin/models/fields/customadminviews.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/customfilelist.php b/admin/models/fields/customfilelist.php index e7363a2e7..bc69b8833 100644 --- a/admin/models/fields/customfilelist.php +++ b/admin/models/fields/customfilelist.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/customfolderlist.php b/admin/models/fields/customfolderlist.php index db587a064..666be06d7 100644 --- a/admin/models/fields/customfolderlist.php +++ b/admin/models/fields/customfolderlist.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/customgets.php b/admin/models/fields/customgets.php index 4e612bb25..09df4d3f5 100644 --- a/admin/models/fields/customgets.php +++ b/admin/models/fields/customgets.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/dbtables.php b/admin/models/fields/dbtables.php index 86c8ff3f7..e60ed4939 100644 --- a/admin/models/fields/dbtables.php +++ b/admin/models/fields/dbtables.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/dynamicget.php b/admin/models/fields/dynamicget.php index 7f42c8294..28f9e2073 100644 --- a/admin/models/fields/dynamicget.php +++ b/admin/models/fields/dynamicget.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/dynamicgets.php b/admin/models/fields/dynamicgets.php index f508a74ff..5cfac4ced 100644 --- a/admin/models/fields/dynamicgets.php +++ b/admin/models/fields/dynamicgets.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/fields.php b/admin/models/fields/fields.php index 381d6fe41..cbeb0dca4 100644 --- a/admin/models/fields/fields.php +++ b/admin/models/fields/fields.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/fieldsmulti.php b/admin/models/fields/fieldsmulti.php index f7151708c..731c207cc 100644 --- a/admin/models/fields/fieldsmulti.php +++ b/admin/models/fields/fieldsmulti.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/fieldtypes.php b/admin/models/fields/fieldtypes.php index 2731ea2ae..fba9ce108 100644 --- a/admin/models/fields/fieldtypes.php +++ b/admin/models/fields/fieldtypes.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/ftps.php b/admin/models/fields/ftps.php index 2a3f680ba..3ae998a9f 100644 --- a/admin/models/fields/ftps.php +++ b/admin/models/fields/ftps.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/lang.php b/admin/models/fields/lang.php index 866dc3c88..877ca35ea 100644 --- a/admin/models/fields/lang.php +++ b/admin/models/fields/lang.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/maingets.php b/admin/models/fields/maingets.php index ad51b4201..b18f26dbb 100644 --- a/admin/models/fields/maingets.php +++ b/admin/models/fields/maingets.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php index 685f28b35..e1a17660e 100644 --- a/admin/models/fields/siteviewfolderlist.php +++ b/admin/models/fields/siteviewfolderlist.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/siteviews.php b/admin/models/fields/siteviews.php index e861f95bb..dac3d1c10 100644 --- a/admin/models/fields/siteviews.php +++ b/admin/models/fields/siteviews.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fields/snippets.php b/admin/models/fields/snippets.php index 07315804f..7ba01126e 100644 --- a/admin/models/fields/snippets.php +++ b/admin/models/fields/snippets.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.5.6 + @version 2.5.8 @build 12th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 86239e209..11677cf67 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -154,21 +154,6 @@ class ComponentbuilderModelFieldtype extends JModelAdmin $query->where('a.fieldtype = -5'); } - // 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 . ')'); - } - // Order the results by ordering $query->order('a.published ASC'); $query->order('a.ordering ASC'); diff --git a/admin/models/fieldtypes.php b/admin/models/fieldtypes.php index e0bd6aa57..48c35adf6 100644 --- a/admin/models/fieldtypes.php +++ b/admin/models/fieldtypes.php @@ -171,21 +171,6 @@ class ComponentbuilderModelFieldtypes extends JModelList { $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 . ')'); - } // Filter by search. $search = $this->getState('filter.search'); if (!empty($search)) @@ -259,12 +244,6 @@ class ComponentbuilderModelFieldtypes extends JModelList // From the componentbuilder_fieldtype table $query->from($db->quoteName('#__componentbuilder_fieldtype', 'a')); $query->where('a.id IN (' . implode(',',$pks) . ')'); - // Implement View Level Access - if (!$user->authorise('core.options', 'com_componentbuilder')) - { - $groups = implode(',', $user->getAuthorisedViewLevels()); - $query->where('a.access IN (' . $groups . ')'); - } // Order the results by ordering $query->order('a.ordering ASC'); diff --git a/admin/models/forms/admin_fields.js b/admin/models/forms/admin_fields.js new file mode 100644 index 000000000..9cf522a5d --- /dev/null +++ b/admin/models/forms/admin_fields.js @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 16 of this MVC + @build 12th October, 2017 + @created 12th October, 2017 + @package Component Builder + @subpackage admin_fields.js + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + + diff --git a/admin/models/forms/admin_fields.xml b/admin/models/forms/admin_fields.xml new file mode 100644 index 000000000..ad594989f --- /dev/null +++ b/admin/models/forms/admin_fields.xml @@ -0,0 +1,297 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/admin_fields_conditions.js b/admin/models/forms/admin_fields_conditions.js new file mode 100644 index 000000000..8622ccdac --- /dev/null +++ b/admin/models/forms/admin_fields_conditions.js @@ -0,0 +1,57 @@ +/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/ + __ __ _ _____ _ _ __ __ _ _ _ + \ \ / / | | | __ \ | | | | | \/ | | | | | | | + \ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| | + \ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` | + \ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| | + \/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_| + | | + |_| +/-------------------------------------------------------------------------------------------------------------------------------/ + + @version @update number 7 of this MVC + @build 12th October, 2017 + @created 12th October, 2017 + @package Component Builder + @subpackage admin_fields_conditions.js + @author Llewellyn van der Merwe + @copyright Copyright (C) 2015. All Rights Reserved + @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + + Builds Complex Joomla Components + +/-----------------------------------------------------------------------------------------------------------------------------*/ + + + +function getFieldSelectOptions_server(fieldId){ + var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json"; + if(token.length > 0 && fieldId > 0){ + var request = 'token='+token+'&id='+fieldId; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} + +function getFieldSelectOptions(fieldKey, table_, nr_){ + // first check if the field is set + if(jQuery("#jform_addconditions"+table_+"_addconditions"+fieldKey+nr_+"_match_field").length) { + var fieldId = jQuery("#jform_addconditions"+table_+"_addconditions"+fieldKey+nr_+"_match_field option:selected").val(); + getFieldSelectOptions_server(fieldId).done(function(result) { + if(result){ + jQuery('textarea#jform_addconditions'+table_+'_addconditions'+fieldKey+nr_+'_match_options').val(result); + } + else + { + jQuery('textarea#jform_addconditions'+table_+'_addconditions'+fieldKey+nr_+'_match_options').val(''); + } + }); + } +} + + diff --git a/admin/models/forms/admin_fields_conditions.xml b/admin/models/forms/admin_fields_conditions.xml new file mode 100644 index 000000000..1bc5c2ed6 --- /dev/null +++ b/admin/models/forms/admin_fields_conditions.xml @@ -0,0 +1,238 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ \ No newline at end of file diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index a4d42ebe0..89b4c3c6c 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 126 of this MVC - @build 11th October, 2017 + @version @update number 136 of this MVC + @build 12th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.js @@ -1178,10 +1178,38 @@ function isSet(val) jQuery(document).ready(function() { + // set button + addButtonID('admin_fields','create_edit_buttons'); // <-- first var valueSwitch = jQuery("#jform_add_custom_import input[type='radio']:checked").val(); getImportScripts(valueSwitch); + addButtonID('admin_fields_conditions','create_edit_buttons'); // <-- second }); +function addData(result,where){ + jQuery(where).closest('.control-group').parent().append(result); +} + +function addButtonID_server(type){ + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod); + if(token.length > 0 && type.length > 0){ + var request = 'token='+token+'&type='+type; + } + return jQuery.ajax({ + type: 'GET', + url: getUrl, + dataType: 'jsonp', + data: request, + jsonp: 'callback' + }); +} +function addButtonID(type,where){ + addButtonID_server(type).done(function(result) { + if(result){ + addData(result,'#jform_'+where); + } + }) +} + function getFieldSelectOptions_server(fieldId){ var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldSelectOptions&format=json"; if(token.length > 0 && fieldId > 0){ diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index 81b034823..1966c1cc8 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -57,15 +57,6 @@ readonly="true" filter="unset" /> - - - - + + - - -