Release of v5.1.0
Add [AllowDynamicProperties] in the base view class for J5. Move the _prepareDocument above the display call in the base view class. Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. Added new import powers for custom import of spreadsheets. Move the setDocument and _prepareDocument above the display in the site view and custom admin view. Update the trashhelper layout to work in Joomla 5. Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues. Fix Save failed issue in dynamicGet. #1148. Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]. Add the DateHelper class and improve the date methods. Add simple SessionHelper class. Add first classes for the new import engine. Improve the [VDM Registry] to be Joomla Registry Compatible. Move all registries to the [VDM Registry] class. Fix Checked Out to be null and not 0. (#1194). Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194). Update all core date fields in table class. (#1188). Update created_by, modified_by, checked_out fields in table class. Implementation of the decentralized Super-Power CORE repository network. (#1190). Fix the noticeboard to display Llewellyn's Joomla Social feed. Started compiling JCB5 on Joomla 5 with PHP 8.2. Add init_defaults option for dynamic form selection setup (to int new items with default values dynamically). Update all JCB 5 tables to utf8mb4_unicode_ci collation if misaligned. Move all internal ID linking to GUID inside of JCB 5. Updated the admin-tab-fields in add-fields view. #1205. Remove Custom Import Tab from admin view. Improved the customcode and placeholder search features.
This commit is contained in:
@ -1,53 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 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;
|
||||
|
||||
// get the form
|
||||
$form = $displayData->getForm();
|
||||
|
||||
// get the layout fields override method name (from layout path/ID)
|
||||
$layout_path_array = explode('.', $this->getLayoutId());
|
||||
// Since we cannot pass the layout and tab names as parameters to the model method
|
||||
// this name combination of tab and layout in the method name is the only work around
|
||||
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
|
||||
// example of layout name: details_left.php
|
||||
// example of method name: getFields_details_left()
|
||||
$fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'note_beginner_import',
|
||||
'note_advanced_import',
|
||||
'add_custom_import',
|
||||
'php_import_display',
|
||||
'html_import_view',
|
||||
'php_import',
|
||||
'php_import_headers',
|
||||
'php_import_setdata',
|
||||
'php_import_save',
|
||||
'php_import_ext'
|
||||
);
|
||||
|
||||
$hiddenFields = $displayData->get('hidden_fields') ?: [];
|
||||
|
||||
?>
|
||||
<?php if ($fields && count((array) $fields)) :?>
|
||||
<div class="form-vertical">
|
||||
<?php foreach($fields as $field): ?>
|
||||
<?php if (in_array($field, $hiddenFields)) : ?>
|
||||
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
@ -15,12 +15,13 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use Joomla\CMS\User\UserFactoryInterface;
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// set the defaults
|
||||
$items = $displayData->vxsfields;
|
||||
$items = $displayData->vxlfields;
|
||||
$user = Factory::getApplication()->getIdentity();
|
||||
$id = $displayData->item->id;
|
||||
// set the edit URL
|
||||
@ -96,8 +97,8 @@ $can = ComponentbuilderHelper::getActions('field');
|
||||
<?php
|
||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0;
|
||||
$userChkOut = Factory::getContainer()->
|
||||
get(\Joomla\CMS\User\UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out);
|
||||
get(UserFactoryInterface::class)->
|
||||
loadUserById($item->checked_out ?? 0);
|
||||
$canDo = ComponentbuilderHelper::getActions('field',$item,'fields');
|
||||
?>
|
||||
<tr>
|
||||
|
@ -23,8 +23,8 @@ defined('JPATH_BASE') or die;
|
||||
|
||||
|
||||
?>
|
||||
<div class="well well-small">
|
||||
<h2 class="module-title nav-header"><?= Text::_('COM_COMPONENTBUILDER_JCB_PRO_NOTICE_BOARD') ?></h2>
|
||||
<div class="proboard-md"><small><?= Text::_('COM_COMPONENTBUILDER_THE_PRO_BOARD_IS_LOADING') ?><span class="loading-dots">.</span></small></div>
|
||||
<div style="text-align:right;"><small><a href="https://vdm.bz/get-jcb-pro-membership" target="_blank" style="color:gray">JCB PRO</a></small></div>
|
||||
</div>
|
||||
<div id="noticeboard">
|
||||
<?php echo LayoutHelper::render('mastodon', $displayData ?? []); ?>
|
||||
</div>
|
||||
<?php echo LayoutHelper::render('socialnetworking', null); ?>
|
||||
<div class="p-md-3"><?php echo ComponentbuilderHelper::getDynamicContent('banner', '728-90'); ?></div>
|
@ -1,37 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div id="<?php echo $displayData['id']; ?>">
|
||||
<?php echo Html::_('bootstrap.startTabSet', $displayData['id'] . '_tab', array('active' => $displayData['active'] . '-noticeboard')); ?>
|
||||
<?php echo Html::_('bootstrap.addTab', $displayData['id'] . '_tab', 'vdm-noticeboard', Text::_('COM_COMPONENTBUILDER_VDM_BOARD', true)); ?>
|
||||
<?php echo LayoutHelper::render('jcbnoticeboardvdm', null); ?>
|
||||
<div class="p-md-3"><?php echo ComponentbuilderHelper::getDynamicContent('banner', '728-90'); ?></div>
|
||||
<?php echo Html::_('bootstrap.endTab'); ?>
|
||||
<?php echo Html::_('bootstrap.addTab', $displayData['id'] . '_tab', 'pro-noticeboard', Text::_('COM_COMPONENTBUILDER_JCB_PRO_BOARD', true)); ?>
|
||||
<?php echo LayoutHelper::render('jcbnoticeboardpro', null); ?>
|
||||
<div class="p-md-3"><?php echo ComponentbuilderHelper::getDynamicContent('banner', '728-90'); ?></div>
|
||||
<?php echo Html::_('bootstrap.endTab'); ?>
|
||||
<?php echo Html::_('bootstrap.endTabSet'); ?>
|
||||
</div>
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div class="well well-small">
|
||||
<h2 class="module-title nav-header"><?= Text::_('COM_COMPONENTBUILDER_VDM_NOTICE_BOARD') ?><span class="vdm-new-notice" style="display:none; color:red;"> (<?= Text::_('COM_COMPONENTBUILDER_NEW_NOTICE') ?>)</span></h2>
|
||||
<div class="noticeboard-md"><small><?= Text::_('COM_COMPONENTBUILDER_THE_NOTICE_BOARD_IS_LOADING') ?><span class="loading-dots">.</span></small></div>
|
||||
<div style="text-align:right;"><small><a href="https://github.com/Llewellynvdm" target="_blank" style="color:gray"><<ewe>>yn</a></small></div>
|
||||
</div>
|
@ -116,9 +116,25 @@ $support_button = $button_names[random_int(0, 32)];
|
||||
?>
|
||||
<?php echo $support_message; ?>
|
||||
<br /><br />
|
||||
<img src="https://opencollective.com/joomla-component-builder/tiers/badge.svg" />
|
||||
<div style="display: flex; flex-wrap: wrap; gap: 10px;">
|
||||
<a href="https://opencollective.com/joomla-component-builder/contribute/donation-15820/checkout?interval=month&amount=40&contributeAs=me" title="Support Joomla Component Builder">
|
||||
<img src="https://opencollective.com/joomla-component-builder/tiers/badge.svg" alt="Joomla Component Builder Badge" />
|
||||
</a>
|
||||
<a href="https://status.vdm.dev/status/jcb" title="JCB Powers Uptime">
|
||||
<img src="https://status.vdm.dev/api/badge/25/uptime?labelPrefix=JCB+Powers+" alt="JCB Powers Uptime">
|
||||
</a>
|
||||
<a href="https://git.vdm.dev/joomla/pkg-component-builder/src/branch/5.x" title="Joomla 5 Compatible">
|
||||
<img src="https://img.shields.io/badge/Joomla-5.x%20Compatible-green.svg" alt="Joomla 5 Compatible">
|
||||
</a>
|
||||
<a href="https://git.vdm.dev/joomla/Component-Builder/src/branch/5.x/LICENSE.txt" title="GPLv3 License">
|
||||
<img src="https://img.shields.io/badge/License-GPLv2-blue.svg" alt="GPLv3 License">
|
||||
</a>
|
||||
<a href="https://github.com/vdm-io/Joomla-Component-Builder/stargazers" title="GitHub Stars">
|
||||
<img src="https://img.shields.io/github/stars/vdm-io/Joomla-Component-Builder.svg?style=flat&label=Star" alt="GitHub Stars">
|
||||
</a>
|
||||
</div>
|
||||
<br /><br />
|
||||
<a class="btn btn-mini btn-success" href="https://opencollective.com/joomla-component-builder/donate?interval=month&amount=20" title="<?php echo $support_titles; ?>" trage="_blank">
|
||||
<a class="btn btn-mini btn-outline-dark" style="width: 100%;" href="https://opencollective.com/joomla-component-builder/contribute/donation-15820/checkout?interval=month&amount=40&contributeAs=me" title="<?php echo $support_titles; ?>" target="_blank">
|
||||
<?php echo $support_button; ?>
|
||||
</a>
|
||||
<br />
|
||||
|
@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
111
admin/layouts/mastodon.php
Normal file
111
admin/layouts/mastodon.php
Normal file
@ -0,0 +1,111 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
// Extract all keys from $displayData as individual variables.
|
||||
extract($displayData ?? []);
|
||||
|
||||
// Default fallback values
|
||||
$defaultValues = [
|
||||
[ // Llewellyn
|
||||
'account' => '112766899254600077',
|
||||
'instance' => 'https://joomla.social',
|
||||
'invite_url' => 'https://joomla.social/invite/gzAvC48K',
|
||||
'invite_heading' => Text::_("COM_COMPONENTBUILDER_LLEWELLYNS_JOOMLA_SOCIAL_FEED"),
|
||||
'invite_title' => Text::_("COM_COMPONENTBUILDER_JOIN_JCBS_LEAD_DEVELOPER_ON_JOOMLA_SOCIAL_A_MASTODON_INSTANCE")
|
||||
// ], // removed since the feed is inactive at this time. if active, we can add it back in.
|
||||
// [ // Joomla
|
||||
// 'account' => '112755435087541569',
|
||||
// 'instance' => 'https://joomla.social',
|
||||
// 'invite_url' => 'https://joomla.social/invite/PCXktw8g',
|
||||
// 'invite_heading' => Text::_("COM_COMPONENTBUILDER_JOOMLA_SOCIAL_FEED"),
|
||||
// 'invite_title' => Text::_("COM_COMPONENTBUILDER_JOIN_JOOMLA_SOCIAL_A_MASTODON_INSTANCE")
|
||||
]
|
||||
];
|
||||
|
||||
// List of default accounts
|
||||
$defaultAccounts ??= $defaultValues;
|
||||
|
||||
// function to retrieve active account
|
||||
$getActiveAccount = function ($accounts, array $defaults): object {
|
||||
if (!empty($accounts) && is_array($accounts)) {
|
||||
// Select a random account and return it as an object
|
||||
return (object) $accounts[array_rand($accounts)];
|
||||
}
|
||||
// Return defaults as an object if no accounts are available
|
||||
return (object) $defaults;
|
||||
};
|
||||
|
||||
// Get the active account
|
||||
$activeAccount = $getActiveAccount($defaultAccounts, $defaultValues[0]);
|
||||
|
||||
// Assign values
|
||||
|
||||
// The 'id' parameter, defaulting to mastodon-feed.
|
||||
$id ??= 'mastodon-feed';
|
||||
|
||||
// The button 'id' parameter, defaulting to refresh-feed.
|
||||
$button_id ??= 'refresh-feed';
|
||||
|
||||
// The number of post to load
|
||||
$posts ??= 5;
|
||||
|
||||
// The URL of the Mastodon instance to use; defaults to the instance of the selected account.
|
||||
$instance ??= $activeAccount->instance;
|
||||
|
||||
// The unique account ID for the selected Mastodon account; defaults to the ID of the selected account.
|
||||
$account ??= $activeAccount->account;
|
||||
|
||||
// The invitation URL for the Mastodon instance, used to invite others to join; defaults to the invite URL of the selected account.
|
||||
$invite_url ??= $activeAccount->invite_url;
|
||||
|
||||
// The heading displayed for the invitation; defaults to the invite heading of the selected account.
|
||||
$invite_heading ??= $activeAccount->invite_heading;
|
||||
|
||||
// The title displayed for the invitation; defaults to the invite title of the selected account.
|
||||
$invite_title ??= $activeAccount->invite_title;
|
||||
|
||||
|
||||
?>
|
||||
<div class="well well-small mastadon-display-block">
|
||||
<h2>
|
||||
<a
|
||||
href="<?php echo $invite_url; ?>"
|
||||
title="<?php echo $invite_title; ?>">
|
||||
<?php echo $invite_heading; ?>
|
||||
</a>
|
||||
<a
|
||||
type="button"
|
||||
id="<?php echo $button_id; ?>"
|
||||
href="#"
|
||||
title="<?php echo Text::_('COM_COMPONENTBUILDER_REFRESH_FEED'); ?>">
|
||||
<i class="icon-loop"></i>
|
||||
</a>
|
||||
</h2>
|
||||
<div id="<?php echo $id; ?>"
|
||||
data-instance="<?php echo $instance; ?>"
|
||||
data-account-id="<?php echo $account; ?>"
|
||||
data-post-count="<?php echo $posts; ?>">
|
||||
</div>
|
||||
<script>
|
||||
new MastodonFeed("<?php echo $id; ?>", "<?php echo $button_id; ?>");
|
||||
</script>
|
||||
</div>
|
@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
70
admin/layouts/socialnetworking.php
Normal file
70
admin/layouts/socialnetworking.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\HTML\HTMLHelper as Html;
|
||||
use Joomla\CMS\Layout\LayoutHelper;
|
||||
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
|
||||
|
||||
// No direct access to this file
|
||||
defined('JPATH_BASE') or die;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div id="llewellyns-social-icons" class="float-end social-icons">
|
||||
<a href="https://volunteers.joomla.org/joomlers/1396-llewellyn-van-der-merwe" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_JOIN_LLEWELLYN_ON_THE_JOOMLA_VOLUNTEER_PORTAL_SHAPING_THE_FUTURE_TOGETHER'); ?>">
|
||||
<i class="fa fa-joomla"></i>
|
||||
</a>
|
||||
<a href="https://git.vdm.dev/octoleo" class="text-decoration-none me-2" data-description="--quiet">
|
||||
<i class="fa fa-linux"></i>
|
||||
</a>
|
||||
<a href="https://git.vdm.dev/Llewellyn" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_COLLABORATE_AND_INNOVATE_WITH_LLEWELLYN_ON_GIT_BUILDING_A_BETTER_CODE_FUTURE'); ?>">
|
||||
<i class="fa fa-code"></i>
|
||||
</a>
|
||||
<a href="https://t.me/Joomla_component_builder" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_JOIN_LLEWELLYN_AND_THE_COMMUNITY_ON_TELEGRAM_BUILDING_JOOMLA_COMPONENTS_TOGETHER'); ?>">
|
||||
<i class="fa-brands fa-telegram"></i>
|
||||
</a>
|
||||
<a href="https://joomla.social/@llewellyn" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_CONNECT_AND_ENGAGE_WITH_LLEWELLYN_ON_JOOMLA_SOCIAL_EMPOWERING_COMMUNITIES_ONE_POST_AT_A_TIME'); ?>">
|
||||
<i class="fa-brands fa-mastodon"></i>
|
||||
</a>
|
||||
<a href="https://x.com/llewellynvdm" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_JOIN_THE_CONVERSATION_WITH_LLEWELLYN_ON_X_WHERE_IDEAS_TAKE_FLIGHT'); ?>">
|
||||
<i class="fa-brands fa-x-twitter"></i>
|
||||
</a>
|
||||
<a href="https://github.com/Llewellynvdm" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_BUILD_INNOVATE_AND_THRIVE_WITH_LLEWELLYN_ON_GITHUB_TURNING_IDEAS_INTO_IMPACT'); ?>">
|
||||
<i class="fa fa-github"></i>
|
||||
</a>
|
||||
<a href="https://www.youtube.com/@OctoYou" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_EXPLORE_LEARN_AND_CREATE_WITH_LLEWELLYN_ON_YOUTUBE_YOUR_GATEWAY_TO_INSPIRATION'); ?>">
|
||||
<i class="fa fa-youtube"></i>
|
||||
</a>
|
||||
<a href="https://n8n.io/creators/octoleo" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_EFFORTLESS_AUTOMATION_AND_IMPACTFUL_WORKFLOWS_WITH_LLEWELLYN_ON_NEIGHTN'); ?>">
|
||||
<i class="fa fa-code-fork"></i>
|
||||
</a>
|
||||
<a href="https://hub.docker.com/u/llewellyn" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_LLEWELLYN_ON_DOCKER_CONTAINERIZE_YOUR_CREATIVITY'); ?>">
|
||||
<i class="fa-brands fa-docker"></i>
|
||||
</a>
|
||||
<a href="https://opencollective.com/joomla-component-builder" class="text-decoration-none me-2" data-description="<?php echo Text::_('COM_COMPONENTBUILDER_DONATE_TOWARDS_JCB_HELP_LLEWELLYN_FINANCIALLY_SO_HE_CAN_CONTINUE_DEVELOPING_THIS_GREAT_TOOL'); ?>">
|
||||
<i class="fa-solid fa-circle-dollar-to-slot"></i>
|
||||
</a>
|
||||
<a href="https://git.vdm.dev/Llewellyn/gpg" class="text-decoration-none" data-description="<?php echo Text::_("COM_COMPONENTBUILDER_UNLOCK_TRUST_AND_SECURITY_WITH_LLEWELLYNS_GPG_KEY_YOUR_GATEWAY_TO_VERIFIED_CONNECTIONS"); ?>">
|
||||
<i class="fa-solid fa-fingerprint"></i>
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
<div id="llewellyns-social-icon-details" class="float-end social-icon-details"></div>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
new IconWaveAnimator("llewellyns-social-icons", "llewellyns-social-icon-details");
|
||||
});
|
||||
</script>
|
@ -35,6 +35,9 @@ $name ??= false;
|
||||
// The 'table_class' parameter, defaulting to 'uk-table' if not set or is null.
|
||||
$table_class ??= 'uk-table';
|
||||
|
||||
// The 'table_other_class' parameter, defaulting to '' if not set or is null.
|
||||
$table_other_class = !empty($table_other_class ?? '') ? ' ' . $table_other_class : '';
|
||||
|
||||
// The 'table_container_class' parameter, defaulting to 'uk-overflow-auto' if not set or is null.
|
||||
$table_container_class ??= 'uk-overflow-auto';
|
||||
|
||||
@ -42,11 +45,30 @@ $table_container_class ??= 'uk-overflow-auto';
|
||||
$headers ??= [Text::_('COM_COMPONENTBUILDER_NO'), Text::_('COM_COMPONENTBUILDER_HEADERS'), Text::_('COM_COMPONENTBUILDER_FOUND')];
|
||||
|
||||
// The 'items' parameter, defaulting to 6 if not set or is null.
|
||||
$items ??= 6;
|
||||
$items ??= 6;
|
||||
|
||||
// The 'default_items_number' parameter, defaulting to 0 if not set or is null.
|
||||
$default_items_number ??= 0;
|
||||
|
||||
// tweak to add empty rows
|
||||
$items_number = 0;
|
||||
if (is_array($items))
|
||||
{
|
||||
$items_number = count((array) $items);
|
||||
}
|
||||
elseif (is_numeric($items))
|
||||
{
|
||||
$items_number = (int) $items;
|
||||
}
|
||||
$add_items = 0;
|
||||
if ($default_items_number > $items_number)
|
||||
{
|
||||
$add_items = round($default_items_number - $items_number);
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="<?php echo $$table_container_class; ?>">
|
||||
<table id="<?php echo $table_id; ?>" class="<?php echo $table_class; ?>">
|
||||
<div class="<?php echo $table_container_class; ?>">
|
||||
<table id="<?php echo $table_id; ?>" class="<?php echo $table_class; ?><?php echo $table_other_class; ?>">
|
||||
<thead>
|
||||
<?php if (is_array($headers)): ?>
|
||||
<?php if ($name): ?>
|
||||
@ -80,6 +102,9 @@ $items ??= 6;
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php echo LayoutHelper::render('rows', ['headers' => $headers, 'items' => $items]); ?>
|
||||
<?php if ($add_items > 0): ?>
|
||||
<?php echo LayoutHelper::render('rows', ['headers' => $headers, 'items' => $add_items]); ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -26,6 +26,7 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
|
||||
|
||||
// get the fields
|
||||
$fields = $displayData->get($fields_tab_layout) ?: array(
|
||||
'guid',
|
||||
'title',
|
||||
'created',
|
||||
'created_by',
|
||||
|
@ -34,16 +34,16 @@ defined('JPATH_BASE') or die;
|
||||
document.adminForm.elements['checkall-toggle'].checked=1;
|
||||
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
|
||||
// check to confirm the deletion
|
||||
if(confirm('<?= Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
|
||||
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
|
||||
if(confirm('<?php echo Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
|
||||
Joomla.submitbutton('<?php echo $displayData->getName(); ?>.delete');
|
||||
} else {
|
||||
document.adminForm.elements['checkall-toggle'].checked=0;
|
||||
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
|
||||
}
|
||||
} else {
|
||||
// confirm deletion of those selected
|
||||
if (confirm('<?= Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
|
||||
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
|
||||
if (confirm('<?php echo Text::_("COM_COMPONENTBUILDER_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
|
||||
Joomla.submitbutton('<?php echo $displayData->getName(); ?>.delete');
|
||||
};
|
||||
}
|
||||
return false;
|
||||
@ -59,23 +59,23 @@ defined('JPATH_BASE') or die;
|
||||
<?php if (empty($displayData->items)): ?>
|
||||
<h4 class="alert-heading">
|
||||
<span class="icon-trash"></span>
|
||||
<?= Text::_("COM_COMPONENTBUILDER_TRASH_AREA") ?>
|
||||
<?php echo Text::_("COM_COMPONENTBUILDER_TRASH_AREA") ?>
|
||||
</h4>
|
||||
<p><?= Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
|
||||
<p><?php echo Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
|
||||
<?php else: ?>
|
||||
<h4 class="alert-heading">
|
||||
<span class="icon-trash"></span>
|
||||
<?= Text::_("COM_COMPONENTBUILDER_TRASHED_ITEMS") ?>
|
||||
<?php echo Text::_("COM_COMPONENTBUILDER_TRASHED_ITEMS") ?>
|
||||
</h4>
|
||||
<p><?= Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
|
||||
<p><?php echo Text::_("COM_COMPONENTBUILDER_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
|
||||
<button onclick="emptyTrash();" class="btn btn-small btn-danger">
|
||||
<span class="icon-delete" aria-hidden="true"></span>
|
||||
<?= Text::_("COM_COMPONENTBUILDER_EMPTY_TRASH") ?>
|
||||
<?php echo Text::_("COM_COMPONENTBUILDER_EMPTY_TRASH") ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<button onclick="exitTrash();" class="btn btn-small">
|
||||
<span class="icon-back" aria-hidden="true"></span>
|
||||
<?= Text::_("COM_COMPONENTBUILDER_EXIT_TRASH") ?>
|
||||
<?php echo Text::_("COM_COMPONENTBUILDER_EXIT_TRASH") ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
Reference in New Issue
Block a user