diff --git a/README.md b/README.md index 25bc1a267..053490eb9 100644 --- a/README.md +++ b/README.md @@ -148,10 +148,10 @@ TODO + *Version*: 2.10.10 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **278234** ++ *Line count*: **280105** + *Field count*: **1503** -+ *File count*: **1755** -+ *Folder count*: **278** ++ *File count*: **1769** ++ *Folder count*: **280** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/README.txt b/admin/README.txt index 25bc1a267..053490eb9 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -148,10 +148,10 @@ TODO + *Version*: 2.10.10 + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **278234** ++ *Line count*: **280105** + *Field count*: **1503** -+ *File count*: **1755** -+ *Folder count*: **278** ++ *File count*: **1769** ++ *Folder count*: **280** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). > Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) diff --git a/admin/access.xml b/admin/access.xml index e5398db15..5f9297b07 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -71,6 +71,9 @@ + + + diff --git a/admin/assets/css/assistant.css b/admin/assets/css/assistant.css new file mode 100644 index 000000000..f073948a4 --- /dev/null +++ b/admin/assets/css/assistant.css @@ -0,0 +1,15 @@ +/** + * @package Joomla.Component.Builder + * + * @created 30th April, 2015 + * @author Llewellyn van der Merwe + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +/* CSS Document */ + +.j-sidebar-container { +margin: -37px 0 0 -1px !important; +} diff --git a/admin/assets/images/icons/assistant.png b/admin/assets/images/icons/assistant.png new file mode 100644 index 000000000..27294fa3f Binary files /dev/null and b/admin/assets/images/icons/assistant.png differ diff --git a/admin/assets/js/assistant.js b/admin/assets/js/assistant.js new file mode 100644 index 000000000..6254ec7a4 --- /dev/null +++ b/admin/assets/js/assistant.js @@ -0,0 +1,593 @@ +/** + * @package Joomla.Component.Builder + * + * @created 30th April, 2015 + * @author Llewellyn van der Merwe + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +/* JS Document */ + +var noticeboard = "https://vdm.bz/componentbuilder-noticeboard-md"; +var proboard = "https://vdm.bz/componentbuilder-pro-noticeboard-md"; +jQuery(document).ready(function () { + jQuery.get(noticeboard) + .success(function(board) { + if (board.length > 5) { + jQuery("#noticeboard-md").html(marked(board)); + getIS(1,board).done(function(result) { + if (result){ + jQuery("#vdm-new-notice").show(); + getIS(2,board); + } + }); + } else { + jQuery("#noticeboard-md").html(all_is_good); + } + }) + .error(function(jqXHR, textStatus, errorThrown) { + jQuery("#noticeboard-md").html(all_is_good); + }); + jQuery.get(proboard) + .success(function(board) { + if (board.length > 5) { + jQuery("#proboard-md").html(marked(board)); + } else { + jQuery("#proboard-md").html(all_is_good); + } + }) + .error(function(jqXHR, textStatus, errorThrown) { + jQuery("#proboard-md").html(all_is_good); + }); +}); +// to check is READ/NEW +function getIS(type,notice){ + if (type == 1) { + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isNew&format=json&raw=true"); + } else if (type == 2) { + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.isRead&format=json&raw=true"); + } + if(token.length > 0 && notice.length){ + var request = token+"=1¬ice="+notice; + } + return jQuery.ajax({ + type: "POST", + url: getUrl, + dataType: 'json', + data: request, + jsonp: false + }); +} + + +// start the moment the document is ready +jQuery(document).ready(function () { + // just get the available categories + getCategories(plansPath); +}); + +// add an ajax call tracker +var ajaxcall = null; +var fromLocal = false; + +jQuery(document).ready(function(){ + jQuery('body').on('click','.getreaction',function(){ + // Ajax request + var btn = jQuery(this); + btn.prop('disabled', true); + setTimeout(function(){ + btn.prop('disabled', false); + }, 3000); + var type = btn.data('type'); + if ('getCategories' === type) { + getCategories(plansPath); + } else if ('getPlans' === type) { + var name = btn.data('name'); + getPlans(plansPath, name); + } else if ('all' === type) { + var status = btn.data('status'); + bulkPlanGithub(status); + } else if ('bulk' === type) { + checkBulkPlanGithub(); + } else if ('get' === type) { + var path = btn.data('path'); + var status = btn.data('status'); + setPlanGithub(path, status); + } else { + var path = btn.data('path'); + getPlanModal(path, type); + } + }); +}); + +// load every thing once ready +jQuery(document).ajaxStop(function () { + if (0 === jQuery.active) { + //do something special + if ('plans' === ajaxcall) { + setTimeout( function() { + jQuery('#plans-github').html('

'+Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY_PLANS')+'

'); + jQuery('#plans-display').show(); + jQuery('#plans-grid').trigger('display.uk.check'); + jQuery('#loading').hide(); + }, 1000); + } + } +}); + +// get the categories +function getCategories(path) { + var _paths = jQuery.jStorage.get('JCB-Plans-Paths', null); + // always hide the plans display + jQuery('#plans-display').hide(); + // always reset the grid + jQuery('#categories-grid').html(''); + // set the ajax scope + ajaxcall = 'categories'; + if (_paths) { + buildCategories(_paths); + } else { + jQuery.get(path) + .success(function(paths) { + // load only this category paths + jQuery.jStorage.set('JCB-Plans-Paths', paths, {TTL: expire}); + buildCategories(paths); + }) + .error(function(jqXHR, textStatus, errorThrown) { + jQuery('#plans-github').html(returnError); + }); + } +} + +// build the ibraries object +function buildCategories(paths) { + var _temp = jQuery.jStorage.get('JCB-Categories', null); + if (_temp) { + setCategories(_temp); + } else { + var temp = {}; + jQuery.each(paths.tree, function(key,value) { + if (value.path.match(".json$")) { + var categoryName = value.path.split(/ -(.+)/)[0]; + categoryName = categoryName.trim() + temp[categoryName] = categoryName; + } + }); + // load only this category paths + jQuery.jStorage.set('JCB-Categories', temp, {TTL: expire}); + setCategories(temp); + } +} + +// set the categories +function setCategories(names) { + // now load the category buttons + jQuery.each(names, function(value) { + setCategory(value); + }); + setTimeout( function() { + jQuery('#plans-github').html('

'+Joomla.JText._('COM_COMPONENTBUILDER_AVAILABLE_CATEGORIES')+'

'); + jQuery('#categories-display').show(); + jQuery('#categories-grid').trigger('display.uk.check'); + }, 1000); +} + +// set the plans +function setCategory(name) { + // get useful ID + var keyID = getKeyID(name); + // build the category display + var html = '
'; + html += '
'; + html += '

' + name + '

'; + html += '
'; + // set the data buttons + html += setCategoryButtons(name); + // close the box panel + html += '
'; + html += '
'; + // now we have the category + jQuery('#categories-grid').append(html); +} + +function setCategoryButtons(name) { + return ''; +} + +// get the plans +function getPlans(path, categoryName) { + jQuery('#loading').show(); + // get local values if set + var _paths = jQuery.jStorage.get('JCB-Plans-Paths', null); + // always reset the grid + jQuery('#plans-grid').html(''); + // always hide categories + jQuery('#categories-display').hide(); + // set the ajax scope + ajaxcall = 'plans'; + fromLocal = false; + if (_paths) { + setPlans(_paths, categoryName); + jQuery('#plans-github').html('

'+Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY_PLANS')+'

'); + } else { + jQuery.get(path) + .success(function(paths) { + // load only this category paths + jQuery.jStorage.set('JCB-Plans-Paths', paths, {TTL: expire}); + setPlans(paths, categoryName); + }) + .error(function(jqXHR, textStatus, errorThrown) { + jQuery('#plans-github').html(returnError); + }); + } + // only use if loading localy + if (fromLocal) { + jQuery('#plans-display').show(); + jQuery('#plans-grid').trigger('display.uk.check'); + jQuery('#loading').hide(); + } +} + +// set the plans +function setPlans(paths, categoryName) { + // set the ajax scope + ajaxcall = 'plans'; + jQuery.each(paths.tree, function(key,value) { + if (value.path.match(".json$") && value.path.match("^"+categoryName)) { + var _plan = jQuery.jStorage.get(value.path, null); + if (_plan) { + setPlan(_plan, value.path); + fromLocal = true; + } else { + jQuery.get(planPath+value.path) + .success(function(plan) { + // convert the string to json.object + plan = jQuery.parseJSON(plan); + jQuery.jStorage.set(value.path, plan, {TTL: expire}); + setPlan(plan, value.path); + }) + .error(function(jqXHR, textStatus, errorThrown) { + // we could do more + }); + } + } + }); +} + +// set the plans +function setPlan(plan, key) { + // get useful ID + var keyID = getKeyID(key); + // get the status + var status = getPlanStatus(plan, key); + // add to bulk updater + if ('equal' !== status) { + bulkItems[status].push(key); + } + // build the plan display + var html = '
'; + html += '
'; + html += '
'; + html += '

' + plan.category+ ' - (' + plan.type + ') ' + plan.name + '

'; + html += plan.heading + '
'; + // set the data buttons + html += setDataButtons(plan, key, status); + // set the plan ref button + html += setRefButtons(plan, key, status, keyID); + // set the contributor buttons + html += setContributorButtons(plan, key); + // close the box panel + html += '
'; + html += '
'; + // now we have the plan + jQuery('#plans-grid').append(html); +} + +// set the plan status +function getPlanStatus(plan, key) { + // check if JCB already has this plan + if(local_plans.hasOwnProperty(key)){ + // first get local time stamp + var local_created = strtotime(local_plans[key].created); + var local_modified = strtotime(local_plans[key].modified); + // now get github time stamps + var created = strtotime(plan.created); + var modified = strtotime(plan.modified); + // work out the status + if (local_created == created) { + if (local_modified == modified) { + return 'equal'; + } else if (local_modified > modified) { + return 'ahead'; + } else if (local_modified < modified) { + return 'behind'; + } + } + return 'diverged'; + } + return 'new'; +} + +function setDataButtons(plan, key, status) { + var html = '
'; + html += ''; + html += ''; + html += ''; + html += '
'; + // return data buttons + return html; +} + +function setRefButtons(plan, key, status, keyID) { + var html = ''; + // set the update button + html += '
'; + if ('equal' !== status) { + if ('new' === status) { + var tooltip = Joomla.JText._('COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_INSTALL_IT_LOCALLY'); + } else { + var tooltip = Joomla.JText._('COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION'); + } + html += ''; + } else { + html += ''; + } + html += '
'; + // return data buttons + return html; +} + +function setContributorButtons(plan, key) { + // set the contributor name + if (plan.contributor_company) { + var contributor_name = plan.contributor_company; + } else if (plan.contributor_name) { + var contributor_name = plan.contributor_name; + } else { + var contributor_name = Joomla.JText._('COM_COMPONENTBUILDER_JCB_COMMUNITY'); + } + // set the contributor url + if (plan.contributor_website) { + var contributor_url = plan.contributor_website; + } else if (plan.contributor_email) { + var contributor_url = 'mailto:'+plan.contributor_email; + } else { + var contributor_url = 'https://github.com/vdm-io/Joomla-Component-Builder-Plans'; + } + var html = '
'; + html += ''; + html += ' ' + contributor_name + ''; + html += ' '+Joomla.JText._('COM_COMPONENTBUILDER_VIEW_BLAME')+''; + html += '
'; + // return contributor buttons + return html; +} + +// do a bulk update +function checkBulkPlanGithub() { + // check if there is new items + if (bulkItems.new.length === 0) { + jQuery('#bulk-button-new').prop('disabled', true); + jQuery('#bulk-button-new').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_PLANS_AT_THIS_TIME')); + jQuery('#bulk-notice-new').show(); + } + // check if there is diverged items + if (bulkItems.diverged.length === 0) { + jQuery('#bulk-button-diverged').prop('disabled', true); + jQuery('#bulk-button-diverged').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_DIVERGED_PLANS_AT_THIS_TIME')); + jQuery('#bulk-notice-diverged').show(); + } + // check if there is ahead items + if (bulkItems.ahead.length === 0) { + jQuery('#bulk-button-ahead').prop('disabled', true); + jQuery('#bulk-button-ahead').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_AHEAD_PLANS_AT_THIS_TIME')); + jQuery('#bulk-notice-ahead').show(); + } + // check if there is behind items + if (bulkItems.behind.length === 0) { + jQuery('#bulk-button-behind').prop('disabled', true); + jQuery('#bulk-button-behind').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_PLANS_AT_THIS_TIME')); + jQuery('#bulk-notice-behind').show(); + } + // check if all we should close the all button + if (bulkItems.behind.length === 0 && bulkItems.new.length === 0 && bulkItems.ahead.length === 0 && bulkItems.diverged.length === 0) { + jQuery('#bulk-button-all').prop('disabled', true); + jQuery('#bulk-button-all').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_THERE_ARE_NO_PLANS_TO_UPDATE_AT_THIS_TIME')); + jQuery('#bulk-notice-all').show(); + } +} + +// do a bulk update +function bulkPlanGithub(status) { + // if all then trigger those with values + if ('all' === status) { + bulkPlanGithub('behind'); + bulkPlanGithub('new'); + bulkPlanGithub('ahead'); + bulkPlanGithub('diverged'); + } else if (bulkItems[status].length > 0) { + jQuery.each(bulkItems[status], function(i, key){ + setTimeout(function(){ + doBulkUpdate_server(key, status).done(function(result) { + if (result.message) { + // only show errors + if ('error' === result.status || 'warning' === result.status) { + UIkit.notify(result.message, {status: result.status}); + } + // update local items + if ('success' === result.status) { + // get key ID + var keyID = getKeyID(key); + // update plan if we can + updatePlanDisplay(keyID, 'equal'); + } + } else { + UIkit.notify(Joomla.JText._('COM_COMPONENTBUILDER_PLAN_COULD_NOT_BE_UPDATEDSAVED'), {status:'danger'}); + } + }); + }, 200); + }); + // reset array + bulkItems[status].length = 0; + // update the buttons (since we only do the bulk update once) + checkBulkPlanGithub(); + } +} + +function doBulkUpdate_server(path, status) { + // set the ajax scope + ajaxcall = null; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.setPlanGithub&format=json&raw=true"); + if (token.length > 0 && path.length > 0 && status.length > 0) { + var request = token+'=1&path='+path+'&status='+status; + } + return jQuery.ajax({ + type: 'POST', + url: getUrl, + dataType: 'json', + data: request, + jsonp: false + }); +} + +// set the plan from gitHub +function setPlanGithub(key, status) { + var message = getConfirmUpdate(status); + UIkit.modal.confirm(message, function(){ + // will be executed on confirm. + setPlanGithub_server(key, status).done(function(result) { + if (result.message) { + UIkit.notify(result.message, {status: result.status}); + if ('success' === result.status) { + // get key ID + var keyID = getKeyID(key); + // update plan if we can + updatePlanDisplay(keyID, 'equal'); + } + } else { + UIkit.notify(Joomla.JText._('COM_COMPONENTBUILDER_PLAN_COULD_NOT_BE_UPDATEDSAVED'), {status:'danger'}); + } + }); + }); +} + +function setPlanGithub_server(path, status) { + // set the ajax scope + ajaxcall = null; + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.setPlanGithub&format=json&raw=true"); + if (token.length > 0 && path.length > 0 && status.length > 0) { + var request = token+'=1&path='+path+'&status='+status; + } + return jQuery.ajax({ + type: 'POST', + url: getUrl, + dataType: 'json', + data: request, + jsonp: false + }); +} + +// update the plan display +function updatePlanDisplay(keyID, status) { + // update badge + jQuery('#'+keyID+'-badge').html(' ' +status); + jQuery('#'+keyID+'-badge').attr('href' , '#'+status+'-meaning'); + // update button + if ('equal' === status) { + // update notice + jQuery('#'+keyID+'-getbutton').attr('title', Joomla.JText._('COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION')); + jQuery('#'+keyID+'-getbutton').prop('disabled', true); + jQuery('#'+keyID+'-getbutton').html(' ' + Joomla.JText._('COM_COMPONENTBUILDER_LOCAL_PLAN')); + // counter delay just incase + setTimeout(function(){ + jQuery('#'+keyID+'-getbutton').prop('disabled', true); + }, 2000); + } + // update the data filter + jQuery('#'+keyID+'-panel').attr('data-uk-filter', status); + // tell the grid to update + jQuery('#plans-grid').trigger('display.uk.check'); +} + +// set the modal +function getPlanModal(key, type) { + // set the ajax scope + ajaxcall = 'plans'; + var _plan = jQuery.jStorage.get(key, null); + if (_plan) { + // show modal + showPlanModal(_plan, type); + } else { + jQuery.get('https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder-Plans/master/'+key) + .success(function(plan) { + // convert the string to json.object + plan = jQuery.parseJSON(plan); + jQuery.jStorage.set(key, plan, {TTL: expire}); + // show modal + showPlanModal(plan, type); + }) + .error(function(jqXHR, textStatus, errorThrown) { + // we could do more + }); + } +} + +// show the modal +function showPlanModal(plan, type) { + var html = '
'; + html += ''; + html += '

' + plan.category + ' - (' + plan.type + ') ' + plan.name + '

'; + if ('contributor' === type) { + html += '
'; + html += '
'+Joomla.JText._('COM_COMPONENTBUILDER_COMPANY_NAME')+'
'; + html += '
'+plan.contributor_company+'
'; + html += '
'+Joomla.JText._('COM_COMPONENTBUILDER_AUTHOR_NAME')+'
'; + html += '
'+plan.contributor_name+'
'; + html += '
'+Joomla.JText._('COM_COMPONENTBUILDER_AUTHOR_EMAIL')+'
'; + html += '
'+plan.contributor_email+'
'; + html += '
'+Joomla.JText._('COM_COMPONENTBUILDER_AUTHOR_WEBSITE')+'
'; + html += '
'+plan.contributor_website+'
'; + html += '
'; + } else { + html += '
'; + } + html += '
C: ' + plan.created + ' | M: ' + plan.modified + ''; + html += '
'; + // get current page position + var scroll = jQuery(window).scrollTop(); + // add html to modal + var modal = UIkit.modal.blockUI(html, {center:true, bgclose:true}).on({ + 'hide.uk.modal': function(){ + // scroll fix since the modal pops to the top of the page + jQuery(window).scrollTop(scroll); + } + }); + // show modal + modal.show(); +} + +// get key ID +function getKeyID(key) { + // get useful ID + var keyID = key.replace('-', ''); + keyID = keyID.replace('.json', ''); + keyID = keyID.replace(/\s+/ig, '-'); + keyID = keyID.replace(/\(/g, ''); + keyID = keyID.replace(/\)/g, ''); + // return the id build + return keyID; +} + +// get key ID +function getKeyID(key) { + // get useful ID + var keyID = key.replace('-', ''); + keyID = keyID.replace('.json', ''); + keyID = keyID.replace(/\s+/ig, '-'); + keyID = keyID.replace(/\(/g, ''); + keyID = keyID.replace(/\)/g, ''); + // return the id build + return keyID; +} diff --git a/admin/controllers/assistant.php b/admin/controllers/assistant.php new file mode 100644 index 000000000..01f208b39 --- /dev/null +++ b/admin/controllers/assistant.php @@ -0,0 +1,30 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Componentbuilder Assistant Controller + */ +class ComponentbuilderControllerAssistant extends JControllerLegacy +{ + public function __construct($config) + { + parent::__construct($config); + } + + public function dashboard() + { + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder', false)); + return; + } +} diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 48d4122f8..828a7c244 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -5707,6 +5707,11 @@ abstract class ComponentbuilderHelper $user = JFactory::getUser(); // load the submenus to sidebar JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_DASHBOARD'), 'index.php?option=com_componentbuilder&view=componentbuilder', $submenu === 'componentbuilder'); + // Access control (assistant.submenu). + if ($user->authorise('assistant.submenu', 'com_componentbuilder')) + { + JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_ASSISTANT'), 'index.php?option=com_componentbuilder&view=assistant', $submenu === 'assistant'); + } // Access control (compiler.submenu). if ($user->authorise('compiler.submenu', 'com_componentbuilder')) { diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index d3cd3e44e..b653b2a72 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -7,6 +7,7 @@ COM_COMPONENTBUILDER_ACCESS="Access" COM_COMPONENTBUILDER_ACCESS_BULK_TOOLS="Access Bulk Tools" COM_COMPONENTBUILDER_ACCESS_DENIED="Access denied!" COM_COMPONENTBUILDER_ACTIVE_ONLY_FOUR_TEXT_FIELD="Active (only 4 text_field)" +COM_COMPONENTBUILDER_ADD="Add" COM_COMPONENTBUILDER_ADD_ACCESS="Add Access" COM_COMPONENTBUILDER_ADD_CORRESPONDING_LINE_NUMBERS_TO_THE_DYNAMIC_COMMENTS_SO_TO_SEE_WHERE_IN_THE_COMPILER_THE_LINES_OF_CODE_WAS_BUILD_THIS_WILL_HELP_IF_YOU_NEED_TO_GET_MORE_TECHNICAL_WITH_AN_ISSUE_ON_GITHUB_OR_EVEN_FOR_YOUR_OWN_DEBUGGING="Add corresponding line numbers to the dynamic comments, so to see where in the compiler the lines of code was build. This will help if you need to get more technical with an issue on github, or even for your own debugging." COM_COMPONENTBUILDER_ADD_CUSTOM_CODE_PLACEHOLDERS="Add Custom Code Placeholders" @@ -1364,6 +1365,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_YOUTUBE="Youtube" COM_COMPONENTBUILDER_ADMIN_VIEW_ZOOM_IN="Zoom In" COM_COMPONENTBUILDER_ADMIN_VIEW_ZOOM_OUT="Zoom Out" COM_COMPONENTBUILDER_AHEAD="Ahead" +COM_COMPONENTBUILDER_AHEAD_MEANS_YOUR_BLOCAL_PLANB_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_HAS_A_BNEWER_MODIFIED_DATEB_THEN_THE_COMMUNITY_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE="Ahead means your local plan (with the same name, category and type) has a newer modified date then the community plan (with the same name, category and type)." COM_COMPONENTBUILDER_AHEAD_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BNEWER_MODIFIED_DATEB_THEN_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE="Ahead means your local snippet (with the same name, library and type) has a newer modified date then the community snippet (with the same name, library and type)." COM_COMPONENTBUILDER_AJAX="Ajax" COM_COMPONENTBUILDER_ALIAS="Alias" @@ -1385,11 +1387,20 @@ COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_CONTINUE="Are you sure you w COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_REPLACE_YOUR_LOCAL_SNIPPET_WITH_THIS_JCB_COMMUNITY_SNIPPET="Are you sure you would like to replace your local snippet with this JCB community snippet?" COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_UPDATE_YOUR_LOCAL_SNIPPET_WITH_THIS_NEWER_JCB_COMMUNITY_SNIPPET="Are you sure you would like to update your local snippet with this newer JCB community snippet?" COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WOULD_LIKE_TO_UPDATE_YOUR_LOCAL_SNIPPET_WITH_THIS_OLDER_JCB_COMMUNITY_SNIPPET="Are you sure you would like to update your local snippet with this older JCB community snippet?" +COM_COMPONENTBUILDER_ASSISTANT="Assistant" +COM_COMPONENTBUILDER_ASSISTANT_ACCESS="Assistant Access" +COM_COMPONENTBUILDER_ASSISTANT_ACCESS_DESC="Allows the users in this group to access assistant." +COM_COMPONENTBUILDER_ASSISTANT_DASHBOARD_LIST="Assistant Dashboard List" +COM_COMPONENTBUILDER_ASSISTANT_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Assistant" +COM_COMPONENTBUILDER_ASSISTANT_DESC="The Assistant" +COM_COMPONENTBUILDER_ASSISTANT_SUBMENU="Assistant Submenu" +COM_COMPONENTBUILDER_ASSISTANT_SUBMENU_DESC="Allows the users in this group to submenu of Assistant" COM_COMPONENTBUILDER_AUTHOR="Author" COM_COMPONENTBUILDER_AUTHOR_EMAIL="Author Email" COM_COMPONENTBUILDER_AUTHOR_NAME="Author Name" COM_COMPONENTBUILDER_AUTHOR_WEBSITE="Author Website" COM_COMPONENTBUILDER_AUTO_CHECKIN="Auto Check-in" +COM_COMPONENTBUILDER_AVAILABLE_CATEGORIES="Available Categories" COM_COMPONENTBUILDER_AVAILABLE_LIBRARIES="Available Libraries" COM_COMPONENTBUILDER_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING="A few closed issues from Github is loading" COM_COMPONENTBUILDER_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open issues from Github is loading" @@ -1399,6 +1410,7 @@ COM_COMPONENTBUILDER_BACKUP="Backup" COM_COMPONENTBUILDER_BACKUP_FAILED_PLEASE_TRY_AGAIN_IF_THE_ERROR_CONTINUE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="Backup failed, please try again. If the error continue, please contact your system administrator." COM_COMPONENTBUILDER_BACKUP_LOCAL_DATA_FIRST="Backup Local Data First" COM_COMPONENTBUILDER_BACKUP_WAS_DONE_SUCCESSFULLY="Backup was done successfully" +COM_COMPONENTBUILDER_BACK_TO_CATEGORIES="Back to Categories" COM_COMPONENTBUILDER_BACK_TO_LIBRARIES="Back to Libraries" COM_COMPONENTBUILDER_BADMIN_FIELDS_RELATIONSB_IDS_MISMATCH_IN_BFIELDSB_AND_WAS_NOT_UPDATED_IN_THE_CUSTOM_CODE="Admin fields relations id:%s mismatch in field:%s, and was not updated in the custom code." COM_COMPONENTBUILDER_BASIC_TUTORIAL_ON_GIT_BSB="Basic Tutorial on git: %s" @@ -1406,6 +1418,7 @@ COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_WE_COULD_NOT_LOAD_THE_CHECKSUM_FOR COM_COMPONENTBUILDER_BBEST_TO_NOT_CONTINUEBBR_YOU_CAN_REFRESH_AND_TRY_AGAINBR_BUT_NOTE_THAT_THIS_PACKAGE_BFAILEDB_CHECKSUM_VALIDATION_THIS_COULD_BE_A_SERIOUS_SECURITY_BREACH_DO_NOT_CONTINUE="Best to not continue!
You can Refresh and try again.
But note that this package FAILED checksum validation, this could be a serious security breach! DO NOT CONTINUE!!!" COM_COMPONENTBUILDER_BCUSTOM_FILESB_NOT_MOVED_TO_CORRECT_LOCATION="Custom files not moved to correct location!" COM_COMPONENTBUILDER_BEHIND="Behind" +COM_COMPONENTBUILDER_BEHIND_MEANS_YOUR_BLOCAL_PLANB_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_HAS_A_BOLDER_MODIFIED_DATEB_THEN_THE_COMMUNITY_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE="Behind means your local plan (with the same name, category and type) has a older modified date then the community plan (with the same name, category and type)." COM_COMPONENTBUILDER_BEHIND_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BOLDER_MODIFIED_DATEB_THEN_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE="Behind means your local snippet (with the same name, library and type) has a older modified date then the community snippet (with the same name, library and type)." COM_COMPONENTBUILDER_BETA_RELEASE="Beta Release" COM_COMPONENTBUILDER_BE_CAUTIOUS_DO_NOT_CONTINUE_UNLESS_YOU_TRUST_THE_ORIGIN_OF_THIS_PACKAGE="Be cautious! Do not continue unless you trust the origin of this package!" @@ -1424,16 +1437,23 @@ COM_COMPONENTBUILDER_BSB_WAS_FOUND="%s was found!" COM_COMPONENTBUILDER_BTHE_EXPANSION_WAS_SUCCESSFULLYB_TO_SEE_MORE_INFORMATION_CHANGE_THE_BRETURN_OPTIONS_FOR_BUILDB_TO_BDISPLAY_MESSAGEB_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TABB="The expansion was successfully! to see more information change the Return Options for Build to Display Message in the global options of JCB under the Development Method tab." COM_COMPONENTBUILDER_BTHE_TMP_FOLDER_HAS_BEEN_CLEAR_SUCCESSFULLYB="The tmp folder has been clear successfully!" COM_COMPONENTBUILDER_BUILD="Build" +COM_COMPONENTBUILDER_BUILDER="Builder" COM_COMPONENTBUILDER_BUILDIN="Build-in" COM_COMPONENTBUILDER_BULK="Bulk" +COM_COMPONENTBUILDER_BULK_GET_ALL_NEW_PLANS="Bulk Get All New Plans" COM_COMPONENTBUILDER_BULK_GET_ALL_NEW_SNIPPETS="Bulk Get All New Snippets" COM_COMPONENTBUILDER_BULK_TOOLS="Bulk Tools" +COM_COMPONENTBUILDER_BULK_UPDATE_ALL_AHEAD_PLANS="Bulk Update All Ahead Plans" COM_COMPONENTBUILDER_BULK_UPDATE_ALL_AHEAD_SNIPPETS="Bulk Update All Ahead Snippets" +COM_COMPONENTBUILDER_BULK_UPDATE_ALL_AVAILABLE_PLANS="Bulk Update All Available Plans" COM_COMPONENTBUILDER_BULK_UPDATE_ALL_AVAILABLE_SNIPPETS="Bulk Update All Available Snippets" +COM_COMPONENTBUILDER_BULK_UPDATE_ALL_DIVERGED_PLANS="Bulk Update All Diverged Plans" COM_COMPONENTBUILDER_BULK_UPDATE_ALL_DIVERGED_SNIPPETS="Bulk Update All Diverged Snippets" +COM_COMPONENTBUILDER_BULK_UPDATE_ALL_OUT_DATED_PLANS="Bulk Update All Out Dated Plans" COM_COMPONENTBUILDER_BULK_UPDATE_ALL_OUT_DATED_SNIPPETS="Bulk Update All Out Dated Snippets" COM_COMPONENTBUILDER_BUTTON_TO_CREATE_S_WILL_SHOW_ONCE_S_IS_SAVED_FOR_THE_FIRST_TIME="Button to create %s will show once %s is saved for the first time." COM_COMPONENTBUILDER_CANCEL="Cancel" +COM_COMPONENTBUILDER_CATEGORIES="Categories" COM_COMPONENTBUILDER_CHAIN="Chain" 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_CLASS_EXTENDINGS="Class Extendings" @@ -1752,6 +1772,7 @@ COM_COMPONENTBUILDER_COMPILER_SUBMENU_DESC="Allows the users in this group to su COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS="Compiler Translate Button Access" COM_COMPONENTBUILDER_COMPILER_TRANSLATE_BUTTON_ACCESS_DESC="Allows the users in this group to access the translate button." COM_COMPONENTBUILDER_COMPILE_COMPONENT="Compile Component" +COM_COMPONENTBUILDER_COMPONENT="Component" COM_COMPONENTBUILDER_COMPONENTS="Components" COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS="Components Admin Views" COM_COMPONENTBUILDER_COMPONENTS_ADMIN_VIEWS_ACCESS="Components Admin Views Access" @@ -2894,6 +2915,7 @@ COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_SAVE_WARNING="Alias already existed so COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_STATUS="Status" COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_VERSION_DESC="A count of the number of times this Component Dashboard has been revised." COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_VERSION_LABEL="Version" +COM_COMPONENTBUILDER_COMPONENT_DETAILS="Component Details" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS="Component Files & Folders" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFILES="Addfiles" COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFILESFULLPATH="Addfilesfullpath" @@ -4345,6 +4367,7 @@ COM_COMPONENTBUILDER_DASHBOARD="Component Builder Dashboard" COM_COMPONENTBUILDER_DASHBOARD_ADD_RECORD="Dashboard (add record)" COM_COMPONENTBUILDER_DASHBOARD_ADMIN_VIEWS="Admin Views

" COM_COMPONENTBUILDER_DASHBOARD_ADMIN_VIEW_ADD="Add Admin View

" +COM_COMPONENTBUILDER_DASHBOARD_ASSISTANT="Assistant

" COM_COMPONENTBUILDER_DASHBOARD_COMPILER="Compiler

" COM_COMPONENTBUILDER_DASHBOARD_CUSTOM_ADMIN_VIEWS="Custom Admin Views

" COM_COMPONENTBUILDER_DASHBOARD_CUSTOM_ADMIN_VIEW_ADD="Add Custom Admin View

" @@ -4382,7 +4405,9 @@ COM_COMPONENTBUILDER_DEFAULT_VIEW="Default View" COM_COMPONENTBUILDER_DESCRIPTION="Description" COM_COMPONENTBUILDER_DETAILS="Details" COM_COMPONENTBUILDER_DISPLAY_SWITCH_FOR_DYNAMIC_PLACEMENT_IN_RELATION_TO_THE_USE_OF_THE_FIELD_IN_MENU_AND_GLOBAL_CONFIGURATION_OPTIONS_SO_THE_CONFIG_OPTION_WILL_ONLY_ADD_THE_FIELD_TO_THE_GLOBAL_CONFIGURATION_AREA_MENU_WILL_ADD_THE_FIELD_ONLY_TO_THE_MENU_AREA="Display switch for dynamic placement in relation to the use of the field in menu and global configuration options. So the (config) option will only add the field to the global configuration area, (menu) will add the field only to the menu area." +COM_COMPONENTBUILDER_DISPLAY_VIEW="Display View" COM_COMPONENTBUILDER_DIVERGED="Diverged" +COM_COMPONENTBUILDER_DIVERGED_MEANS_YOUR_BLOCAL_PLANB_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_HAS_A_BDIVERGEDB_FROM_THE_COMMUNITY_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_IN_THAT_IT_DOES_NOT_HAVE_THE_SAME_BCREATIONB_OR_BMODIFIED_DATEB="Diverged means your local plan (with the same name, category and type) has a diverged from the community plan (with the same name, category and type) in that it does not have the same creation or modified date." COM_COMPONENTBUILDER_DIVERGED_MEANS_YOUR_BLOCAL_SNIPPETB_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_A_BDIVERGEDB_FROM_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_IN_THAT_IT_DOES_NOT_HAVE_THE_SAME_BCREATIONB_OR_BMODIFIED_DATEB="Diverged means your local snippet (with the same name, library and type) has a diverged from the community snippet (with the same name, library and type) in that it does not have the same creation or modified date." COM_COMPONENTBUILDER_DOES_THIS_PACKAGE_REQUIRE_A_KEY_TO_INSTALL="Does this package require a key to install." COM_COMPONENTBUILDER_DOWNLOAD="download" @@ -4737,6 +4762,7 @@ COM_COMPONENTBUILDER_EMLICENSEEM_BSB="License: %s" COM_COMPONENTBUILDER_EMOWNEREM_BSB="Owner: %s" COM_COMPONENTBUILDER_EMWEBSITEEM_BSB="Website: %s" COM_COMPONENTBUILDER_EQUAL="Equal" +COM_COMPONENTBUILDER_EQUAL_MEANS_THAT_THE_COMMUNITY_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_AND_YOUR_LOCAL_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_HAS_THE_SAME_BCREATIONB_AND_BMODIFIED_DATEB="Equal means that the community plan (with the same name, category and type) and your local plan (with the same name, category and type) has the same creation and modified date." COM_COMPONENTBUILDER_EQUAL_MEANS_THAT_THE_COMMUNITY_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_AND_YOUR_LOCAL_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_HAS_THE_SAME_BCREATIONB_AND_BMODIFIED_DATEB="Equal means that the community snippet (with the same name, library and type) and your local snippet (with the same name, library and type) has the same creation and modified date." COM_COMPONENTBUILDER_ERROR="Error" COM_COMPONENTBUILDER_ERROR_THE_PATH_HAS_A_MISMATCH_AND_COULD_THEREFORE_NOT_RETRIEVE_THE_SNIPPET_FROM_GITHUB="Error! The path has a mismatch and could therefore not retrieve the snippet from gitHub!" @@ -5263,13 +5289,16 @@ COM_COMPONENTBUILDER_FREEOPEN="Free/Open" COM_COMPONENTBUILDER_FULL_WIDTH_IN_TAB="Full Width in Tab" COM_COMPONENTBUILDER_FUNCTION_NAME_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Function name already taken, please try again." COM_COMPONENTBUILDER_GENERAL_OVERVIEW_OF_HOW_THINGS_WORK_BSB="General overview of how things work: %s" +COM_COMPONENTBUILDER_GETTING_AVAILABLE_CATEGORIES="Getting available categories" COM_COMPONENTBUILDER_GETTING_AVAILABLE_LIBRARIES="Getting available libraries" COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_FAILED_IF_THE_ISSUE_CONTINUES_INFORM_YOUR_SYSTEM_ADMINISTRATOR="Getting joomla_plugin boilerplate failed, if the issue continues, inform your system administrator!" COM_COMPONENTBUILDER_GETTING_JOOMLA_PLUGIN_BOILERPLATE_WAS_SUCCESSFULLY="Getting joomla_plugin boilerplate was successfully!" +COM_COMPONENTBUILDER_GET_ALL_NEW_PLANS="Get All New Plans" COM_COMPONENTBUILDER_GET_ALL_NEW_SNIPPETS="Get All New Snippets" COM_COMPONENTBUILDER_GET_AN_ACCOUNT_WITH_GITHUB_BSB="Get an Account with gitHub: %s" COM_COMPONENTBUILDER_GET_BOILERPLATE="Get Boilerplate" COM_COMPONENTBUILDER_GET_PACKAGE="Get Package" +COM_COMPONENTBUILDER_GET_PLAN="Get plan" COM_COMPONENTBUILDER_GET_SNIPPET="Get snippet" COM_COMPONENTBUILDER_GET_SNIPPETS="Get Snippets" COM_COMPONENTBUILDER_GET_SNIPPETS_ACCESS="Get Snippets Access" @@ -5291,6 +5320,8 @@ COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU="Get Snippets Submenu" COM_COMPONENTBUILDER_GET_SNIPPETS_SUBMENU_DESC="Allows the users in this group to submenu of Get Snippets" COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS="Get Snippets Templates Button Access" COM_COMPONENTBUILDER_GET_SNIPPETS_TEMPLATES_BUTTON_ACCESS_DESC="Allows the users in this group to access the templates button." +COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_INSTALL_IT_LOCALLY="Get the plan from gitHub and install it locally" +COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION="Get the plan from gitHub and update the local version" COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_INSTALL_IT_LOCALLY="Get the snippet from gitHub and install it locally" COM_COMPONENTBUILDER_GET_THE_SNIPPET_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION="Get the snippet from gitHub and update the local version" COM_COMPONENTBUILDER_GLOBAL="Global" @@ -5489,6 +5520,7 @@ COM_COMPONENTBUILDER_IS_ONLY_FOUR_LISTRADIOCHECKBOXES="Is (only 4 list/radio/che COM_COMPONENTBUILDER_IWEBSITEI_BSB="Website: %s" COM_COMPONENTBUILDER_JCB_COMMUNITY="JCB Community" COM_COMPONENTBUILDER_JCB_COMMUNITY_PACKAGES="JCB Community Packages" +COM_COMPONENTBUILDER_JCB_COMMUNITY_PLANS="JCB Community Plans" COM_COMPONENTBUILDER_JCB_COMMUNITY_SNIPPETS="JCB Community Snippets" COM_COMPONENTBUILDER_JCB_PACKAGE_IMPORT="JCB Package Import" COM_COMPONENTBUILDER_JCB_PACKAGE_INFO_PATH_DOES_NOT_WORK_WE_ADVICE_YOU_BNOT_TO_CONTINUEB_WITH_THE_IMPORT_OF_THE_SELECTED_PACKAGE="JCB Package info path does not work, we advice you not to continue with the import of the selected package!" @@ -7010,6 +7042,7 @@ COM_COMPONENTBUILDER_JOOMLA_PLUGIN_VERSION_DESC="A count of the number of times COM_COMPONENTBUILDER_JOOMLA_PLUGIN_VERSION_LABEL="Version" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_YES="Yes" COM_COMPONENTBUILDER_JOOMLA_PLUGIN_ZIP="ZIP" +COM_COMPONENTBUILDER_JUST_GET_ALL_PLANS="Just Get All Plans" COM_COMPONENTBUILDER_JUST_GET_ALL_SNIPPETS="Just Get All Snippets" COM_COMPONENTBUILDER_KEEP_HISTORY="Keep History" COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS="- Keep Original Access -" @@ -7688,9 +7721,11 @@ COM_COMPONENTBUILDER_LINK_LOCAL_DYNAMIC="Link & Local (dynamic)" COM_COMPONENTBUILDER_LINK_TO_THE_CONTRIBUTOR="Link to the contributor" COM_COMPONENTBUILDER_LIST_FIELD="List Field" COM_COMPONENTBUILDER_LIST_VIEW="List View" +COM_COMPONENTBUILDER_LIST_VIEW_NAME="List View Name" COM_COMPONENTBUILDER_LOADING="loading" COM_COMPONENTBUILDER_LOCAL="Local" COM_COMPONENTBUILDER_LOCAL_GET="Local (get)" +COM_COMPONENTBUILDER_LOCAL_PLAN="Local plan" COM_COMPONENTBUILDER_LOCAL_SNIPPET="Local snippet" COM_COMPONENTBUILDER_MAIN_MENU="Main Menu" COM_COMPONENTBUILDER_MATCH_BEHAVIOUR="Match Behaviour" @@ -7703,6 +7738,7 @@ COM_COMPONENTBUILDER_MINIFY_JAVASCRIPT="Minify JavaScript" COM_COMPONENTBUILDER_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD="Min Length (only 4 text_field)" COM_COMPONENTBUILDER_MODEL_AFTER_MODELLING="Model (after modelling)" COM_COMPONENTBUILDER_MODEL_BEFORE_MODELLING="Model (before modelling)" +COM_COMPONENTBUILDER_MOVE="Move" COM_COMPONENTBUILDER_NAME="Name" COM_COMPONENTBUILDER_NAME_ASC="Name (Asc)" COM_COMPONENTBUILDER_NAME_DESC="Name (Desc)" @@ -7710,6 +7746,7 @@ COM_COMPONENTBUILDER_NAME_OF_DYNAMICGET="Name of dynamicGet" COM_COMPONENTBUILDER_NEED_HELP="Need help?" COM_COMPONENTBUILDER_NEW="New" COM_COMPONENTBUILDER_NEW_ISSUE="New Issue" +COM_COMPONENTBUILDER_NEW_MEANS_THAT_WE_COULD_NOT_FIND_A_LOCAL_PLAN_WITH_THE_SAME_NAME_CATEGORY_AND_TYPE_AND_SO_HAVE_MARKED_THIS_PLAN_AS_NEW="New means that we could not find a local plan with the same name, category and type, and so have marked this plan as new." COM_COMPONENTBUILDER_NEW_MEANS_THAT_WE_COULD_NOT_FIND_A_LOCAL_SNIPPET_WITH_THE_SAME_NAME_LIBRARY_AND_TYPE_AND_SO_HAVE_MARKED_THIS_SNIPPET_AS_NEW="New means that we could not find a local snippet with the same name, library and type, and so have marked this snippet as new." COM_COMPONENTBUILDER_NEW_NOTICE="New Notice" COM_COMPONENTBUILDER_NO="No" @@ -7750,6 +7787,7 @@ COM_COMPONENTBUILDER_ON_GITHUB="on Github" COM_COMPONENTBUILDER_OPEN="Open" COM_COMPONENTBUILDER_OPENED="opened" COM_COMPONENTBUILDER_OPENED_THIS="opened this" +COM_COMPONENTBUILDER_OPEN_CATEGORY_PLANS="Open Category Plans" COM_COMPONENTBUILDER_OPEN_LIBRARY_SNIPPETS="Open Library Snippets" COM_COMPONENTBUILDER_OPEN_ON_GITHUB="Open on Github" COM_COMPONENTBUILDER_OPTIONS="Options" @@ -7757,6 +7795,7 @@ COM_COMPONENTBUILDER_ORDER_BEFORE="Order Before" COM_COMPONENTBUILDER_ORDER_IN_EDIT="Order in Edit" COM_COMPONENTBUILDER_ORDER_IN_LIST_VIEWS="Order in list views" COM_COMPONENTBUILDER_OUT_OF_DATE="Out of Date" +COM_COMPONENTBUILDER_OVERVIEW="Overview" COM_COMPONENTBUILDER_OWNER_DETAILS_WAS_SET="Owner details was set" COM_COMPONENTBUILDER_OWNER_S="Owner: %s" COM_COMPONENTBUILDER_PACKAGE="Package" @@ -7877,6 +7916,10 @@ COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_MESSAGE="Error! Please add some set targe COM_COMPONENTBUILDER_PLACEHOLDER_VERSION_DESC="A count of the number of times this Placeholder has been revised." COM_COMPONENTBUILDER_PLACEHOLDER_VERSION_LABEL="Version" COM_COMPONENTBUILDER_PLACES_ACROSS_JCB_WHERE_THIS_S_IS_LINKED="Places across JCB where this %s is linked." +COM_COMPONENTBUILDER_PLAN="Plan" +COM_COMPONENTBUILDER_PLANS="Plans" +COM_COMPONENTBUILDER_PLANS_COULD_NOT_BE_UPDATEDSAVED="Plans could not be updated/saved" +COM_COMPONENTBUILDER_PLAN_COULD_NOT_BE_UPDATEDSAVED="Plan could not be updated/saved" COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S="Please add files to (%s)" COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S="Please add folders to (%s)" COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER="Please check again latter." @@ -7897,12 +7940,14 @@ COM_COMPONENTBUILDER_PUBLISHING="Publishing" COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT="Ready to compile a component" COM_COMPONENTBUILDER_REFRESH="Refresh" COM_COMPONENTBUILDER_RELEASED_THIS="released this" +COM_COMPONENTBUILDER_REMOVE="Remove" COM_COMPONENTBUILDER_RENAME="Rename" COM_COMPONENTBUILDER_REPORT_AN_ISSUE_BSB="Report an issue: %s" COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_ENTERED_BE_ONE_OF_THE_OPTIONS_IN_AN_ELEMENT_OF_TYPEQUOTLISTQUOT_THAT_IS_THAT_THE_ELEMENT_IS_A_SELECT_LIST="Requires the value entered be one of the options in an element of type="list": that is, that the element is a select list." COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_A_TELEPHONE_NUMBER_COMPLYING_WITH_THE_STANDARDS_OF_NANPA_ITUT_TRECEONE_HUNDRED_AND_SIXTY_FOUR_OR_IETF_RFCFOUR_THOUSAND_NINE_HUNDRED_AND_THIRTY_THREE="Requires the value to be a Telephone number complying with the standards of nanpa, ITU-T T-REC-E.164 or ietf rfc4933." COM_COMPONENTBUILDER_REQUIRES_THE_VALUE_TO_BE_THE_SAME_AS_THAT_HELD_IN_THE_FIELD_NAMED_QUOTFIELDQUOT_EGS="Requires the value to be the same as that held in the field named "field", eg:%s" COM_COMPONENTBUILDER_RESPOND_TO_THIS_ISSUE_ON_GITHUB="Respond to this issue on Github" +COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_PLANS="Revert All Ahead Plans" COM_COMPONENTBUILDER_REVERT_ALL_AHEAD_SNIPPETS="Revert All Ahead Snippets" COM_COMPONENTBUILDER_REVIEW_THIS_ISSUE_ON_GITHUB="Review this issue on Github" COM_COMPONENTBUILDER_RIGHT_IN_TAB="Right in Tab" @@ -8744,6 +8789,7 @@ COM_COMPONENTBUILDER_SNIPPET_VERSION_DESC="A count of the number of times this S COM_COMPONENTBUILDER_SNIPPET_VERSION_LABEL="Version" COM_COMPONENTBUILDER_SOME_BCUSTOM_FILESB_WERE_MOVED_TO_BSB="Some Custom files were moved to %s" COM_COMPONENTBUILDER_SOME_BIMAGESB_WERE_MOVED_TO_BSB="Some Images were moved to %s" +COM_COMPONENTBUILDER_SOON_AS_YOU_HAVE_SITE_VIEWS_SET_THIS_AREA_WILL_UPDATE_TO_SHOW_AN_OVERVIEW="Soon as you have site views set, this area will update to show an overview." COM_COMPONENTBUILDER_SORRY_THIS_FUNCTION_NAME_IS_ALREADY_IN_USE="Sorry this function name is already in use!" COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE="Sorry this placeholder is already in use!" COM_COMPONENTBUILDER_SORRY_THIS_PLACEHOLDER_IS_ALREADY_IN_USE_IN_THE_COMPILER="Sorry this placeholder is already in use in the compiler!" @@ -8752,6 +8798,7 @@ COM_COMPONENTBUILDER_SORRY_THIS_VALIDATION_RULE_NAME_S_ALREADY_EXIST_IN_YOUR_SYS COM_COMPONENTBUILDER_SORTABLE="Sortable" COM_COMPONENTBUILDER_SUBMENU="Submenu" COM_COMPONENTBUILDER_SUBMENU_ADMIN_VIEWS="Admin Views" +COM_COMPONENTBUILDER_SUBMENU_ASSISTANT="Assistant" COM_COMPONENTBUILDER_SUBMENU_COMPILER="Compiler" COM_COMPONENTBUILDER_SUBMENU_CUSTOM_ADMIN_VIEWS="Custom Admin Views" COM_COMPONENTBUILDER_SUBMENU_CUSTOM_CODES="Custom Codes" @@ -8906,10 +8953,15 @@ COM_COMPONENTBUILDER_TEMPLATE_VERSION_LABEL="Version" COM_COMPONENTBUILDER_TEMPLATE_YES="Yes" COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_BSETTINGSB_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_BEXPORT_KEYB="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." COM_COMPONENTBUILDER_THAT_MEANS_ANYONE_WHO_HAS_THIS_PACKAGE_CAN_INSTALL_IT_INTO_JCB_TO_ADD_AN_EXPORT_KEY_SIMPLY_OPEN_THE_COMPONENT_GO_TO_THE_TAB_CALLED_SETTINGS_BOTTOM_RIGHT_THERE_IS_A_FIELD_CALLED_EXPORT_KEY="That means anyone who has this package can install it into JCB. To add an export key simply open the component, go to the tab called settings, bottom right there is a field called Export Key." +COM_COMPONENTBUILDER_THERE_ARE_NO_AHEAD_PLANS_AT_THIS_TIME="There are no ahead plans at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_AHEAD_SNIPPETS_AT_THIS_TIME="There are no ahead snippets at this time" +COM_COMPONENTBUILDER_THERE_ARE_NO_DIVERGED_PLANS_AT_THIS_TIME="There are no diverged plans at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_DIVERGED_SNIPPETS_AT_THIS_TIME="There are no diverged snippets at this time" +COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_PLANS_AT_THIS_TIME="There are no new plans at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_SNIPPETS_AT_THIS_TIME="There are no new snippets at this time" +COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_PLANS_AT_THIS_TIME="There are no out of date plans at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_SNIPPETS_AT_THIS_TIME="There are no out of date snippets at this time" +COM_COMPONENTBUILDER_THERE_ARE_NO_PLANS_TO_UPDATE_AT_THIS_TIME="There are no plans to update at this time" COM_COMPONENTBUILDER_THERE_ARE_NO_SNIPPETS_TO_UPDATE_AT_THIS_TIME="There are no snippets to update at this time" COM_COMPONENTBUILDER_THERE_HAS_BEEN_AN_ERROR_IF_THIS_CONTINUES_PLEASE_INFORM_YOUR_SYSTEM_ADMINISTRATOR_OF_A_TYPE_ERROR_IN_THE_FIELDS_DISPLAY_REQUEST="There has been an error, if this continues please inform your system administrator of a type error in the fields display request!" COM_COMPONENTBUILDER_THERE_WAS_AN_ERROR_GETTING_THE_PACKAGE_INFO="There was an error getting the package info." @@ -8963,6 +9015,7 @@ COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FIELD_COULD_NOT_BE_LOADED_FOR_BSB_SERVER="T COM_COMPONENTBUILDER_THE_PRIVATE_KEY_FILE_COULD_NOT_BE_LOADEDFOUND_FOR_BSB_SERVER="The private key file could not be loaded/found for %s server!" COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING="The pro board is loading" COM_COMPONENTBUILDER_THE_README_IS_LOADING="The readme is loading" +COM_COMPONENTBUILDER_THE_SEARCH_FOR_THE_PLANS_ARE_CASE_SENSITIVE_SO_IF_YOU_CHANGED_THE_LOCAL_BNAMESB_OF_EITHER_OR_THE_BPLAN_CATEGORY_OR_PLAN_TYPESB_IN_ANY_SMALL_WAY_THE_SYSTEM_WILL_NOT_BE_ABLE_TO_CONNECT_YOUR_LOCAL_PLANS_WITH_THOSE_IN_THE_COMMUNITY_REPOSITORY_SO_WE_STRONGLY_ADVICE_TO_BKEEP_TO_THE_COMMUNITY_NAMINGB_TO_AVOID_MISMATCHING_THAT_WILL_IN_TURN_CAUSE_DUPLICATION_SO_IF_YOU_CHANGED_ANY_NAMES_JUST_CHANGE_THEM_BACK_AND_ALL_WILL_AGAIN_WORK_AS_EXPECTED="The search for the plans are case sensitive so if you changed the local names of either or the plan, category or plan types in any small way, the system will not be able to connect your local plans with those in the community repository. So we strongly advice to keep to the community naming to avoid mismatching, that will in turn cause duplication. So if you changed any names, just change them back and all will again work as expected." COM_COMPONENTBUILDER_THE_SEARCH_FOR_THE_SNIPPETS_ARE_CASE_SENSITIVE_SO_IF_YOU_CHANGED_THE_LOCAL_BNAMESB_OF_EITHER_OR_THE_BSNIPPET_LIBRARY_OR_SNIPPET_TYPESB_IN_ANY_SMALL_WAY_THE_SYSTEM_WILL_NOT_BE_ABLE_TO_CONNECT_YOUR_LOCAL_SNIPPETS_WITH_THOSE_IN_THE_COMMUNITY_REPOSITORY_SO_WE_STRONGLY_ADVICE_TO_BKEEP_TO_THE_COMMUNITY_NAMINGB_TO_AVOID_MISMATCHING_THAT_WILL_IN_TURN_CAUSE_DUPLICATION_SO_IF_YOU_CHANGED_ANY_NAMES_JUST_CHANGE_THEM_BACK_AND_ALL_WILL_AGAIN_WORK_AS_EXPECTED="The search for the snippets are case sensitive so if you changed the local names of either or the snippet, library or snippet types in any small way, the system will not be able to connect your local snippets with those in the community repository. So we strongly advice to keep to the community naming to avoid mismatching, that will in turn cause duplication. So if you changed any names, just change them back and all will again work as expected." COM_COMPONENTBUILDER_THE_SERVER_DETAILS_FOR_BID_SB_COULD_NOT_BE_RETRIEVED="The server details for (ID: %s) could not be retrieved!" COM_COMPONENTBUILDER_THE_SNIPPETS_WERE_SUCCESSFULLY_EXPORTED="The Snippets Were Successfully Exported!" @@ -9043,8 +9096,11 @@ COM_COMPONENTBUILDER_TYPE_TEMPLATE="Template" COM_COMPONENTBUILDER_TYPE_VALIDATION_RULE="Validation Rule" COM_COMPONENTBUILDER_UNACTIVE_ONLY_FOUR_TEXT_FIELD="Unactive (only 4 text_field)" COM_COMPONENTBUILDER_UNDERNEATH_TABS="Underneath Tabs" +COM_COMPONENTBUILDER_UNDER_DEVELOPMENT_TO_PROVIDE_PLAN_SHARING_OPTIONS_SIMILAR_TO_THE_JCB_SNIPPETS="Under development, to provide plan sharing options similar to the JCB snippets." COM_COMPONENTBUILDER_UPDATE="Update" +COM_COMPONENTBUILDER_UPDATE_ALL_DIVERGED_PLANS="Update All Diverged Plans" COM_COMPONENTBUILDER_UPDATE_ALL_DIVERGED_SNIPPETS="Update All Diverged Snippets" +COM_COMPONENTBUILDER_UPDATE_ALL_OUT_DATED_PLANS="Update All Out Dated Plans" COM_COMPONENTBUILDER_UPDATE_ALL_OUT_DATED_SNIPPETS="Update All Out Dated Snippets" COM_COMPONENTBUILDER_UP_TO_DATE="Up to date" COM_COMPONENTBUILDER_USAGE="Usage" @@ -9146,19 +9202,26 @@ COM_COMPONENTBUILDER_VERSION="Version" COM_COMPONENTBUILDER_VIEW="View" COM_COMPONENTBUILDER_VIEWS="Views" COM_COMPONENTBUILDER_VIEW_BLAME="View Blame" +COM_COMPONENTBUILDER_VIEW_BUILDER="View Builder" COM_COMPONENTBUILDER_VIEW_DESCRIPTION_OF_COMMUNITY_VERSION="View Description of community version" COM_COMPONENTBUILDER_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github" COM_COMPONENTBUILDER_VIEW_MORE_RELEASES_ON_GITHUB="View more releases on Github" +COM_COMPONENTBUILDER_VIEW_NAME="View Name" +COM_COMPONENTBUILDER_VIEW_PLAN_OF_COMMUNITY_VERSION="View Plan of community version" +COM_COMPONENTBUILDER_VIEW_PLAN_REFERENCE_URL="View Plan Reference URL" COM_COMPONENTBUILDER_VIEW_SNIPPET_OF_COMMUNITY_VERSION="View Snippet of community version" COM_COMPONENTBUILDER_VIEW_SNIPPET_REFERENCE_URL="View Snippet Reference URL" COM_COMPONENTBUILDER_VIEW_THE_CONTRIBUTOR_DETAILS="View the contributor details" COM_COMPONENTBUILDER_VIEW_USAGE_OF_COMMUNITY_VERSION="View Usage of community version" +COM_COMPONENTBUILDER_VIEW_WHO_CONTRIBUTED_TO_THIS_PLAN="View who contributed to this plan" COM_COMPONENTBUILDER_VIEW_WHO_CONTRIBUTED_TO_THIS_SNIPPET="View who contributed to this snippet" COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAENINEKQFLVVXJTMTHREEJTWOIXM="VjRzdE%ssMHBtRW50TWV0aE9kQFlvVXJTM3J2IXM=" COM_COMPONENTBUILDER_VJRZDESSMHBTRWFIFTYTWVZEROAESFLVVXJTMTHREEJTWOIXM="VjRzdE%ssMHBtRW50TWV0aE%sFlvVXJTM3J2IXM=" +COM_COMPONENTBUILDER_WATCH_THIS_SPACE="Watch this space!!!!" COM_COMPONENTBUILDER_WEBSITE="Website" COM_COMPONENTBUILDER_WEBSITE_OF_S="Website of %s" COM_COMPONENTBUILDER_WEBSITE_S="Website: %s" +COM_COMPONENTBUILDER_WE_DID_NOT_CHECK_THE_PLAN_IT_SELF_TO_SEE_IF_IT_CHANGED_WE_ONLY_WORK_ON_DATES="We did not check the plan it self, to see if it changed. We only work on dates." COM_COMPONENTBUILDER_WE_DID_NOT_CHECK_THE_SNIPPET_IT_SELF_TO_SEE_IF_IT_CHANGED_WE_ONLY_WORK_ON_DATES="We did not check the snippet it self, to see if it changed. We only work on dates." COM_COMPONENTBUILDER_WE_FAILED_TO_MOVE_BSB="We failed to move %s!" COM_COMPONENTBUILDER_WE_SUCCESSFULLY_MOVED_BSB="We successfully moved %s!" 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 e978432da..ce3e0a0d2 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.sys.ini @@ -111,6 +111,12 @@ COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU="Admin Views Submenu" COM_COMPONENTBUILDER_ADMIN_VIEWS_SUBMENU_DESC="Allows the users in this group to submenu of admin view" COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS="Admin View Run Expansion Button Access" COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." +COM_COMPONENTBUILDER_ASSISTANT_ACCESS="Assistant Access" +COM_COMPONENTBUILDER_ASSISTANT_ACCESS_DESC="Allows the users in this group to access assistant." +COM_COMPONENTBUILDER_ASSISTANT_DASHBOARD_LIST="Assistant Dashboard List" +COM_COMPONENTBUILDER_ASSISTANT_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of Assistant" +COM_COMPONENTBUILDER_ASSISTANT_SUBMENU="Assistant Submenu" +COM_COMPONENTBUILDER_ASSISTANT_SUBMENU_DESC="Allows the users in this group to submenu of Assistant" COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS="Class Extendings Access" COM_COMPONENTBUILDER_CLASS_EXTENDINGS_ACCESS_DESC="Allows the users in this group to access access class extendings" COM_COMPONENTBUILDER_CLASS_EXTENDINGS_BATCH_USE="Class Extendings Batch Use" @@ -942,6 +948,7 @@ COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS="Library Get Snippets Bu COM_COMPONENTBUILDER_LIBRARY_GET_SNIPPETS_BUTTON_ACCESS_DESC="Allows the users in this group to access the get snippets button." COM_COMPONENTBUILDER_MENU="✓ Component Builder" COM_COMPONENTBUILDER_MENU_ADMIN_VIEWS="Admin Views" +COM_COMPONENTBUILDER_MENU_ASSISTANT="Assistant" COM_COMPONENTBUILDER_MENU_COMPILER="Compiler" COM_COMPONENTBUILDER_MENU_CUSTOM_ADMIN_VIEWS="Custom Admin Views" COM_COMPONENTBUILDER_MENU_CUSTOM_CODES="Custom Codes" diff --git a/admin/layouts/assistantsubformrepeatable.php b/admin/layouts/assistantsubformrepeatable.php new file mode 100644 index 000000000..7012ac43e --- /dev/null +++ b/admin/layouts/assistantsubformrepeatable.php @@ -0,0 +1,98 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + +/** + * Make thing clear + * + * @var JForm $tmpl The Empty form for template + * @var array $forms Array of JForm instances for render the rows + * @var bool $multiple The multiple state for the form field + * @var int $min Count of minimum repeating in multiple mode + * @var int $max Count of maximum repeating in multiple mode + * @var string $fieldname The field name + * @var string $control The forms control + * @var string $label The field label + * @var string $description The field description + * @var array $buttons Array of the buttons that will be rendered + * @var bool $groupByFieldset Whether group the subform fields by it`s fieldset + */ +extract($displayData); + +// Add script +if ($multiple) +{ + JHtml::_('jquery.ui', array('core', 'sortable')); + JHtml::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true)); +} + +// the subform field layout +$subform_fields = array( + 'left' => array('name'), + 'right' => array('list_name'), + 'bottom' => array('builder') +); + +?> +
+
+
+ + +
+
+ + + +
+
+ + $form) : ?> + $form, + 'fields' => $subform_fields, + 'basegroup' => $fieldname, + 'group' => $fieldname . $k, + 'buttons' => $buttons, + 'unique_subform_id' => $unique_subform_id, + )); + ?> + + + + +
+
+
diff --git a/admin/layouts/assistantsubformsection.php b/admin/layouts/assistantsubformsection.php new file mode 100644 index 000000000..f68167c1f --- /dev/null +++ b/admin/layouts/assistantsubformsection.php @@ -0,0 +1,93 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + +/** + * Make thing clear + * + * @var JForm $form The form instance for render the section + * @var JForm $fields The fields in layout + * @var string $basegroup The base group name + * @var string $group Current group name + * @var array $buttons Array of the buttons that will be rendered + */ +extract($displayData); + +?> +
+ +
+
+ + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ + renderField($field); ?> + +
+
+
+ + + +
+ $_fields): ?> + +
+
+ + renderField($field); ?> + +
+
+ + +
+ + + +
+
+
+ + renderField($field); ?> + +
+
+
+ +
diff --git a/admin/layouts/jcbplansgui.php b/admin/layouts/jcbplansgui.php new file mode 100644 index 000000000..8706c79c1 --- /dev/null +++ b/admin/layouts/jcbplansgui.php @@ -0,0 +1,196 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('JPATH_BASE') or die('Restricted access'); + + + +?> + +
+


+


..

+
+ +
+

+
+ +
+



+

+

+

+
+
+
+



+

+

+

+
+
+
+



+

+

+

+
+
+
+



+

+

+

+
+
+
+



+

+

+

+
+
+ diff --git a/admin/models/assistant.php b/admin/models/assistant.php new file mode 100644 index 000000000..f2668540e --- /dev/null +++ b/admin/models/assistant.php @@ -0,0 +1,162 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Componentbuilder Assistant Model + */ +class ComponentbuilderModelAssistant extends JModelItem +{ + /** + * Model context string. + * + * @var string + */ + protected $_context = 'com_componentbuilder.assistant'; + + /** + * Model user data. + * + * @var strings + */ + protected $user; + protected $userId; + protected $guest; + protected $groups; + protected $levels; + protected $app; + protected $input; + protected $uikitComp; + + /** + * @var object item + */ + protected $item; + + /** + * Method to auto-populate the model state. + * + * Note. Calling getState in this method will result in recursion. + * + * @since 1.6 + * + * @return void + */ + protected function populateState() + { + $this->app = JFactory::getApplication(); + $this->input = $this->app->input; + // Get the item main id + $id = $this->input->getInt('id', null); + $this->setState('assistant.id', $id); + + // Load the parameters. + parent::populateState(); + } + + /** + * Method to get article data. + * + * @param integer $pk The id of the article. + * + * @return mixed Menu item data object on success, false on failure. + */ + public function getItem($pk = null) + { + $this->user = JFactory::getUser(); + // check if this user has permission to access item + if (!$this->user->authorise('assistant.access', 'com_componentbuilder')) + { + $app = JFactory::getApplication(); + $app->enqueueMessage(JText::_('Not authorised!'), 'error'); + // redirect away if not a correct to cPanel/default view + $app->redirect('index.php?option=com_componentbuilder'); + return false; + } + $this->userId = $this->user->get('id'); + $this->guest = $this->user->get('guest'); + $this->groups = $this->user->get('groups'); + $this->authorisedGroups = $this->user->getAuthorisedGroups(); + $this->levels = $this->user->getAuthorisedViewLevels(); + $this->initSet = true; + + $pk = (!empty($pk)) ? $pk : (int) $this->getState('assistant.id'); + + if ($this->_item === null) + { + $this->_item = array(); + } + + if (!isset($this->_item[$pk])) + { + try + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Get data +return true; + + // Reset the query using our newly populated query object. + $db->setQuery($query); + // Load the results as a stdClass object. + $data = $db->loadObject(); + + if (empty($data)) + { + $app = JFactory::getApplication(); + // If no data is found redirect to default page and show warning. + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED'), 'warning'); + $app->redirect('index.php?option=com_componentbuilder'); + return false; + } + + // set data object to item. + $this->_item[$pk] = $data; + } + catch (Exception $e) + { + if ($e->getCode() == 404) + { + // Need to go thru the error handler to allow Redirect to work. + JError::raiseWaring(404, $e->getMessage()); + } + else + { + $this->setError($e); + $this->_item[$pk] = false; + } + } + } + + return $this->_item[$pk]; + } + + /** + * Get the uikit needed components + * + * @return mixed An array of objects on success. + * + */ + public function getUikitComp() + { + if (isset($this->uikitComp) && ComponentbuilderHelper::checkArray($this->uikitComp)) + { + return $this->uikitComp; + } + return false; + } +} diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index ebb896add..3bb8e981b 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -25,10 +25,12 @@ class ComponentbuilderModelComponentbuilder extends JModelList $icons = array(); // view groups array $viewGroups = array( - 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_documents') + 'main' => array('png.assistant', 'png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_view.add', 'png.admin_views', 'png.custom_admin_view.add', 'png.custom_admin_views', 'png.site_view.add', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid', 'png.fieldtypes', 'png.fieldtypes.catid', 'png.language_translations', 'png.servers', 'png.help_documents') ); // view access array $viewAccess = array( + 'assistant.submenu' => 'assistant.submenu', + 'assistant.dashboard_list' => 'assistant.dashboard_list', 'compiler.submenu' => 'compiler.submenu', 'compiler.dashboard_list' => 'compiler.dashboard_list', 'get_snippets.submenu' => 'get_snippets.submenu', diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index dd1c43052..64ff03bbf 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -293,12 +293,13 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin */ public $assistantForm = array( 'left' => array( - 'guid', 'name', 'short_description', + 'guid', 'copyright' ), 'right' => array( + 'name_code', 'license', 'bom', 'image' diff --git a/admin/views/assistant/index.html b/admin/views/assistant/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/assistant/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/assistant/tmpl/default.php b/admin/views/assistant/tmpl/default.php new file mode 100644 index 000000000..819b13cfc --- /dev/null +++ b/admin/views/assistant/tmpl/default.php @@ -0,0 +1,133 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +$this->app->input->set('hidemainmenu', false); + +JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); +JHtml::_('behavior.tooltip'); +JHtml::_('behavior.formvalidation'); +JHtml::_('formbehavior.chosen', 'select'); +JHtml::_('behavior.keepalive'); +?> +canDo->get('assistant.access')): ?> + +item->id)) ? '&id='. (int) $this->item->id : ''; ?> +
+ + +
+ +sidebar)): ?> +
+ sidebar; ?> +
+
+ +
+ +
+ 'jcb-assistant')); ?> + +
+
    +
  • loadTemplate('jcbcomponentplan'); ?>
  • +
  • loadTemplate('jcbviewsplan'); ?>
  • +
  • loadTemplate('jcbplanoverview'); ?>
  • +
+
    +
  • +
  • +
  • +
+
+
+
+ +
+ + +

+

+ + + +
+
+ + +

+ + diff --git a/admin/views/assistant/tmpl/default_jcbcomponentplan.php b/admin/views/assistant/tmpl/default_jcbcomponentplan.php new file mode 100644 index 000000000..a2fc8bce0 --- /dev/null +++ b/admin/views/assistant/tmpl/default_jcbcomponentplan.php @@ -0,0 +1,34 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +// get the model +$model = ComponentbuilderHelper::getModel('joomla_component', JPATH_ADMINISTRATOR . '/components/com_componentbuilder'); +// get the form +$form = $model->getForm(array(), true, array('control' => 'jcbform')); +// get the form +$fields = $model->assistantForm; + +?> +

+
+ $fields): ?> +
+
+ + renderField($field); ?> + +
+
+ +
diff --git a/admin/views/assistant/tmpl/default_jcbplanoverview.php b/admin/views/assistant/tmpl/default_jcbplanoverview.php new file mode 100644 index 000000000..8ab55e417 --- /dev/null +++ b/admin/views/assistant/tmpl/default_jcbplanoverview.php @@ -0,0 +1,21 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +?> +

+
+ +
diff --git a/admin/views/assistant/tmpl/default_jcbviewsplan.php b/admin/views/assistant/tmpl/default_jcbviewsplan.php new file mode 100644 index 000000000..02f008e03 --- /dev/null +++ b/admin/views/assistant/tmpl/default_jcbviewsplan.php @@ -0,0 +1,131 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +function buildSubform() +{ + // get the subform + $subform = JFormHelper::loadFieldType('subform', true); + // make sure the layout is created + // JLayoutHelper::render('assistantsubformrepeatable', null); + // start building the subform field XML + $subformXML = new SimpleXMLElement(''); + // subform attributes + $subformAttribute = array( + 'type' => 'subform', + 'name' => 'views', + 'label' => 'COM_COMPONENTBUILDER_VIEW_BUILDER', + 'layout' => 'assistantsubformrepeatable', + 'multiple' => 'true', + 'icon' => 'list', + 'max' => 5, + 'min' => 1 + ); + // load the subform attributes + ComponentbuilderHelper::xmlAddAttributes($subformXML, $subformAttribute); + // now add the subform child form + $childForm = $subformXML->addChild('form'); + // child form attributes + $childFormAttribute = array( + 'hidden' => 'true', + 'name' => 'list_properties', + 'repeat' => 'true'); + // load the child form attributes + ComponentbuilderHelper::xmlAddAttributes($childForm, $childFormAttribute); + + // view building the name field XML + $nameXML = new SimpleXMLElement(''); + // subform attributes + $nameAttribute = array( + 'type' => 'text', + 'name' => 'name', + 'label' => 'COM_COMPONENTBUILDER_VIEW_NAME', + 'size' => '40', + 'maxlength' => '150', + 'class' => 'text_area', + 'hint' => 'COM_COMPONENTBUILDER_VIEW_NAME', + 'filter' => 'STRING' + ); + // load the subform attributes + ComponentbuilderHelper::xmlAddAttributes($nameXML, $nameAttribute); + // now add the fields to the child form + ComponentbuilderHelper::xmlAppend($childForm, $nameXML); + + // view building the list name field XML + $listnameXML = new SimpleXMLElement(''); + // subform attributes + $listnameAttribute = array( + 'type' => 'text', + 'name' => 'list_name', + 'label' => 'COM_COMPONENTBUILDER_LIST_VIEW_NAME', + 'size' => '40', + 'maxlength' => '150', + 'class' => 'text_area', + 'hint' => 'COM_COMPONENTBUILDER_LIST_VIEW_NAME', + 'filter' => 'STRING' + ); + // load the subform attributes + ComponentbuilderHelper::xmlAddAttributes($listnameXML, $listnameAttribute); + // now add the fields to the child form + ComponentbuilderHelper::xmlAppend($childForm, $listnameXML); + + // start building the builder area XML + $noteXML = new SimpleXMLElement(''); + // subform attributes + $noteAttribute = array( + 'type' => 'note', + 'name' => 'builder', + 'label' => 'COM_COMPONENTBUILDER_BUILDER', + 'description' => ' +

', + 'heading' => 'h5' + ); + // load the subform attributes + ComponentbuilderHelper::xmlAddAttributes($noteXML, $noteAttribute); + // now add the fields to the child form + ComponentbuilderHelper::xmlAppend($childForm, $noteXML); + + // setup subform with values + $subform->setup($subformXML, null, 'jcbform'); + + // return subfrom object + return $subform; +} +// get the subform +$subform = buildSubform(); + +?> +
+ label; ?> +
+
+ input; ?> +
+
+
+ +
loading..
+
+
+
+
+ diff --git a/admin/views/assistant/tmpl/index.html b/admin/views/assistant/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/assistant/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/assistant/view.html.php b/admin/views/assistant/view.html.php new file mode 100644 index 000000000..39dad28c3 --- /dev/null +++ b/admin/views/assistant/view.html.php @@ -0,0 +1,283 @@ + + * @github Joomla Component Builder + * @copyright Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + * @license GNU General Public License version 2 or later; see LICENSE.txt + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +/** + * Componentbuilder View class for the Assistant + */ +class ComponentbuilderViewAssistant extends JViewLegacy +{ + // Overwriting JView display method + function display($tpl = null) + { + // get component params + $this->params = JComponentHelper::getParams('com_componentbuilder'); + // get the application + $this->app = JFactory::getApplication(); + // get the user object + $this->user = JFactory::getUser(); + // get global action permissions + $this->canDo = ComponentbuilderHelper::getActions('assistant'); + // Initialise variables. + $this->item = $this->get('Item'); + if ($this->getLayout() !== 'modal') + { + // Include helper submenu + ComponentbuilderHelper::addSubmenu('builder'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=assistant'); + $this->sidebar = JHtmlSidebar::render(); + } + // get the forms + $this->forms = $this->setForms(); + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + // add the tool bar + $this->addToolBar(); + } + + // set the document + $this->setDocument(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode(PHP_EOL, $errors), 500); + } + + parent::display($tpl); + } + + protected function setForms() + { + // get component form (just required fields) + + // get admin form (just required fields) + + // get field form (just required fields) + + } + + /** + * Prepares the document + */ + protected function setDocument() + { + + // always make sure jquery is loaded. + JHtml::_('jquery.framework'); + // Load the header checker class. + require_once( JPATH_COMPONENT_ADMINISTRATOR.'/helpers/headercheck.php' ); + // Initialize the header checker. + $HeaderCheck = new componentbuilderHeaderCheck; + + // Add View JavaScript File + $this->document->addScript(JURI::root(true) . "/administrator/components/com_componentbuilder/assets/js/assistant.js", (ComponentbuilderHelper::jVersion()->isCompatible("3.8.0")) ? array("version" => "auto") : "text/javascript"); + + // Load uikit options. + $uikit = $this->params->get('uikit_load'); + // Set script size. + $size = $this->params->get('uikit_min'); + // Set css style. + $style = $this->params->get('uikit_style'); + + // The uikit css. + if ((!$HeaderCheck->css_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) + { + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit'.$style.$size.'.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + } + // The uikit js. + if ((!$HeaderCheck->js_loaded('uikit.min') || $uikit == 1) && $uikit != 2 && $uikit != 3) + { + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit'.$size.'.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript'); + } + + // Load the script to find all uikit components needed. + if ($uikit != 2) + { + // Set the default uikit components in this view. + $uikitComp = array(); + $uikitComp[] = 'UIkit.notify'; + $uikitComp[] = 'data-uk-grid'; + } + + // Load the needed uikit components in this view. + if ($uikit != 2 && isset($uikitComp) && ComponentbuilderHelper::checkArray($uikitComp)) + { + // load just in case. + jimport('joomla.filesystem.file'); + // loading... + foreach ($uikitComp as $class) + { + foreach (ComponentbuilderHelper::$uk_components[$class] as $name) + { + // check if the CSS file exists. + if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) + { + // load the css. + $this->document->addStyleSheet(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + } + // check if the JavaScript file exists. + if (JFile::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) + { + // load the js. + $this->document->addScript(JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true); + } + } + } + } + // add marked library + $this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/custom/marked.js"); + + // Add the JavaScript for JStore + $this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jquery.json.min.js'); + $this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jstorage.min.js'); + $this->document->addScript(JURI::root() .'media/com_componentbuilder/js/strtotime.js'); + // check if we should use browser storage + $setBrowserStorage = $this->params->get('set_browser_storage', null); + if ($setBrowserStorage) + { + // check what (Time To Live) show we use + $storageTimeToLive = $this->params->get('storage_time_to_live', 'global'); + if ('global' == $storageTimeToLive) + { + // use the global session time + $session = JFactory::getSession(); + // must have itin milliseconds + $expire = ($session->getExpire()*60)* 1000; + } + else + { + // use the Componentbuilder Global setting + if (0 != $storageTimeToLive) + { + // this will convert the time into milliseconds + $storageTimeToLive = $storageTimeToLive * 1000; + } + $expire = $storageTimeToLive; + } + } + else + { + // set to use no storage + $expire = 30000; // only 30 seconds + } + // Set the Time To Live To JavaScript + $this->document->addScriptDeclaration("var expire = ". (int) $expire.";"); + // set snippet path + $this->document->addScriptDeclaration("var planPath = '';"); + $this->document->addScriptDeclaration("var plansPath = '';"); + // $this->document->addScriptDeclaration("var planPath = '". ComponentbuilderHelper::$planPath ."';"); + // $this->document->addScriptDeclaration("var plansPath = '". ComponentbuilderHelper::$plansPath ."';"); + // token + $this->document->addScriptDeclaration("var token = '". JSession::getFormToken() ."';"); + // add some global items buckets for bulk updating + $this->document->addScriptDeclaration("var bulkItems = {};"); + $this->document->addScriptDeclaration("bulkItems.new = [];"); + $this->document->addScriptDeclaration("bulkItems.diverged = [];"); + $this->document->addScriptDeclaration("bulkItems.ahead = [];"); + $this->document->addScriptDeclaration("bulkItems.behind = [];"); + // set an error message if needed + $this->document->addScriptDeclaration("var returnError = '

".JText::_('COM_COMPONENTBUILDER_AN_ERROR_HAS_OCCURRED')."!

".JText::_('COM_COMPONENTBUILDER_PLEASE_TRY_AGAIN_LATER').".

';"); + // need to add some language strings + JText::script('COM_COMPONENTBUILDER_JCB_COMMUNITY_PLANS'); + JText::script('COM_COMPONENTBUILDER_PLANS'); + JText::script('COM_COMPONENTBUILDER_PLAN'); + JText::script('COM_COMPONENTBUILDER_VIEW_PLAN_OF_COMMUNITY_VERSION'); + JText::script('COM_COMPONENTBUILDER_GET_PLAN'); + JText::script('COM_COMPONENTBUILDER_LOCAL_PLAN'); + JText::script('COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_UPDATE_THE_LOCAL_VERSION'); + JText::script('COM_COMPONENTBUILDER_GET_THE_PLAN_FROM_GITHUB_AND_INSTALL_IT_LOCALLY'); + JText::script('COM_COMPONENTBUILDER_NO_NEED_TO_GET_IT_SINCE_IT_IS_ALREADY_IN_SYNC_WITH_YOUR_LOCAL_VERSION'); + JText::script('COM_COMPONENTBUILDER_USAGE'); + JText::script('COM_COMPONENTBUILDER_VIEW_USAGE_OF_COMMUNITY_VERSION'); + JText::script('COM_COMPONENTBUILDER_DESCRIPTION'); + JText::script('COM_COMPONENTBUILDER_VIEW_DESCRIPTION_OF_COMMUNITY_VERSION'); + JText::script('COM_COMPONENTBUILDER_VIEW_BLAME'); + JText::script('COM_COMPONENTBUILDER_VIEW_WHO_CONTRIBUTED_TO_THIS_PLAN'); + JText::script('COM_COMPONENTBUILDER_VIEW_PLAN_REFERENCE_URL'); + JText::script('COM_COMPONENTBUILDER_PLAN_COULD_NOT_BE_UPDATEDSAVED'); + JText::script('COM_COMPONENTBUILDER_PLANS_COULD_NOT_BE_UPDATEDSAVED'); + JText::script('COM_COMPONENTBUILDER_LINK_TO_THE_CONTRIBUTOR'); + JText::script('COM_COMPONENTBUILDER_VIEW_THE_CONTRIBUTOR_DETAILS'); + JText::script('COM_COMPONENTBUILDER_JCB_COMMUNITY'); + JText::script('COM_COMPONENTBUILDER_COMPANY_NAME'); + JText::script('COM_COMPONENTBUILDER_AUTHOR_NAME'); + JText::script('COM_COMPONENTBUILDER_AUTHOR_EMAIL'); + JText::script('COM_COMPONENTBUILDER_AUTHOR_WEBSITE'); + JText::script('COM_COMPONENTBUILDER_THERE_ARE_NO_NEW_PLANS_AT_THIS_TIME'); + JText::script('COM_COMPONENTBUILDER_THERE_ARE_NO_DIVERGED_PLANS_AT_THIS_TIME'); + JText::script('COM_COMPONENTBUILDER_THERE_ARE_NO_AHEAD_PLANS_AT_THIS_TIME'); + JText::script('COM_COMPONENTBUILDER_THERE_ARE_NO_OUT_OF_DATE_PLANS_AT_THIS_TIME'); + JText::script('COM_COMPONENTBUILDER_THERE_ARE_NO_PLANS_TO_UPDATE_AT_THIS_TIME'); + JText::script('COM_COMPONENTBUILDER_AVAILABLE_CATEGORIES'); + JText::script('COM_COMPONENTBUILDER_OPEN_CATEGORY_PLANS'); + // Set the local plans array + $this->document->addScriptDeclaration("var local_plans = '';"); + // add the document default css file + $this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/assistant.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css'); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + // hide the main menu + $this->app->input->set('hidemainmenu', true); + // set the title + if (isset($this->item->name) && $this->item->name) + { + $title = $this->item->name; + } + // Check for empty title and add view name if param is set + if (empty($title)) + { + $title = JText::_('COM_COMPONENTBUILDER_ASSISTANT'); + } + // add title to the page + JToolbarHelper::title($title,'heart'); + // add the back button + // JToolBarHelper::custom('assistant.back', 'undo-2', '', 'COM_COMPONENTBUILDER_BACK', false); + // add cpanel button + JToolBarHelper::custom('assistant.dashboard', 'grid-2', '', 'COM_COMPONENTBUILDER_DASH', false); + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('assistant'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + + // add the options comp button + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_componentbuilder'); + } + } + + /** + * Escapes a value for output in a view script. + * + * @param mixed $var The output to escape. + * + * @return mixed The escaped value. + */ + public function escape($var) + { + // use the helper htmlEscape method instead. + return ComponentbuilderHelper::htmlEscape($var, $this->_charset); + } +} +?> diff --git a/componentbuilder.xml b/componentbuilder.xml index 7d168c7d2..0c441a36d 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -73,6 +73,7 @@ Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/compo COM_COMPONENTBUILDER_MENU + COM_COMPONENTBUILDER_MENU_ASSISTANT COM_COMPONENTBUILDER_MENU_COMPILER COM_COMPONENTBUILDER_MENU_JOOMLA_COMPONENTS COM_COMPONENTBUILDER_MENU_JOOMLA_MODULES