29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-07-15 08:23:37 +00:00

Merge branch '4.0-dev' of github.com:joomla/joomla-cms into 4.0-dev-spinner-nth-attempt

This commit is contained in:
dgrammatiko 2019-08-15 11:53:39 +02:00
commit 2e3880a589
477 changed files with 14259 additions and 7076 deletions

View File

@ -31,6 +31,9 @@ services:
## Install PHP and composer, and run the appropriate composer command
install:
- IF EXIST C:\tools\php (SET PHP=0)
# TODO: This is a workaround for https://github.com/chocolatey/choco/issues/1843. Once this is fixed we
# should go back to latest version in appveyor saving ourselves test time
- ps: choco install chocolatey -y --version 0.10.13 --allow-downgrade
- ps: >-
If ($env:PHP -eq "1") {
appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')

View File

@ -10,8 +10,7 @@
<field
name="extension"
type="extension"
label="COM_ACTIONLOGS_EXTENSION"
description="COM_ACTIONLOGS_EXTENSION_FILTER_DESC"
label="COM_ACTIONLOGS_SELECT_EXTENSION"
onchange="this.form.submit()"
>
<option value="">COM_ACTIONLOGS_SELECT_EXTENSION</option>
@ -20,7 +19,6 @@
name="dateRange"
type="logsdaterange"
label="COM_ACTIONLOGS_OPTION_FILTER_DATE"
description="COM_ACTIONLOGS_OPTION_FILTER_DATE"
onchange="this.form.submit();"
>
<option value="">COM_ACTIONLOGS_OPTION_FILTER_DATE</option>
@ -28,6 +26,7 @@
<field
name="user"
type="logcreator"
label="COM_ACTIONLOGS_SELECT_USER"
onchange="this.form.submit();"
>
<option value="">COM_ACTIONLOGS_SELECT_USER</option>

View File

@ -108,10 +108,8 @@ Factory::getDocument()->addScriptDeclaration('
<?php echo $this->escape(Text::_($extension)); ?>
</td>
<td>
<span title="<?php echo HTMLHelper::_('date', $item->log_date, Text::_('DATE_FORMAT_LC6')); ?>">
<?php echo HTMLHelper::_('date.relative', $item->log_date); ?>
</span>
<div role="tooltip" id="<?php echo $item->id; ?>">
<?php echo HTMLHelper::_('date.relative', $item->log_date); ?>
<div class="small">
<?php echo HTMLHelper::_('date', $item->log_date, Text::_('DATE_FORMAT_LC6')); ?>
</div>
</td>

View File

@ -1502,8 +1502,6 @@ class JoomlaInstallerScript
'/administrator/language/en-GB/en-GB.com_search.sys.ini',
'/administrator/language/en-GB/en-GB.com_weblinks.ini',
'/administrator/language/en-GB/en-GB.com_weblinks.sys.ini',
'/administrator/language/en-GB/en-GB.mod_submenu.ini',
'/administrator/language/en-GB/en-GB.mod_submenu.sys.ini',
'/administrator/language/en-GB/en-GB.plg_authentication_gmail.ini',
'/administrator/language/en-GB/en-GB.plg_authentication_gmail.sys.ini',
'/administrator/language/en-GB/en-GB.plg_finder_weblinks.ini',
@ -1540,9 +1538,9 @@ class JoomlaInstallerScript
'/administrator/modules/mod_quickicon/mod_quickicon.php',
'/administrator/modules/mod_sampledata/helper.php',
'/administrator/modules/mod_stats_admin/helper.php',
'/administrator/modules/mod_submenu/mod_submenu.php',
'/administrator/modules/mod_submenu/mod_submenu.xml',
'/administrator/modules/mod_submenu/tmpl/default.php',
'/administrator/modules/mod_status/mod_status.php',
'/administrator/modules/mod_status/mod_status.xml',
'/administrator/modules/mod_status/tmpl/default.php',
'/administrator/modules/mod_version/helper.php',
'/administrator/modules/mod_version/language/en-GB/en-GB.mod_version.ini',
'/administrator/modules/mod_version/language/en-GB/en-GB.mod_version.sys.ini',
@ -4952,8 +4950,8 @@ class JoomlaInstallerScript
'/administrator/components/com_users/views/user/tmpl',
'/administrator/components/com_users/views/users',
'/administrator/components/com_users/views/users/tmpl',
'/administrator/modules/mod_submenu',
'/administrator/modules/mod_submenu/tmpl',
'/administrator/modules/mod_status',
'/administrator/modules/mod_status/tmpl',
'/administrator/modules/mod_version/language',
'/administrator/modules/mod_version/language/en-GB',
'/administrator/templates/hathor',

View File

@ -1,5 +1,6 @@
UPDATE `#__menu` SET `link`='index.php?option=com_banners&view=banners' WHERE `id`=3;
UPDATE `#__menu` SET `link`='index.php?option=com_categories&view=categories&extension=com_banners' WHERE `id`=4;
UPDATE `#__menu` SET `link`='index.php?option=com_contact&view=contacts' WHERE `id`=8;
UPDATE `#__menu` SET `link`='index.php?option=com_categories&view=categories&extension=com_contact' WHERE `id`=9;
UPDATE `#__menu` SET `link`='index.php?option=com_newsfeeds&view=newsfeeds' WHERE `id`=14;
UPDATE `#__menu` SET `link`='index.php?option=com_categories&view=categories&extension=com_newsfeeds' WHERE `id`=15;
@ -7,4 +8,4 @@ UPDATE `#__menu` SET `link`='index.php?option=com_redirect&view=links' WHERE `id
UPDATE `#__menu` SET `link`='index.php?option=com_search&view=searches' WHERE `id`=17;
UPDATE `#__menu` SET `link`='index.php?option=com_finder&view=index' WHERE `id`=18;
UPDATE `#__menu` SET `link`='index.php?option=com_tags&view=tags' WHERE `id`=20;
UPDATE `#__menu` SET `link`='index.php?option=com_associations&view=associations' WHERE `id`=22;
UPDATE `#__menu` SET `link`='index.php?option=com_associations&view=associations' WHERE `id`=22;

View File

@ -0,0 +1,91 @@
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(0, 'mod_loginsupport', 'module', 'mod_loginsupport', '', 1, 1, 1, 1, '', '', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'mod_frontend', 'module', 'mod_frontend', '', 1, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'mod_messages', 'module', 'mod_messages', '', 1, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'mod_post_installation_messages', 'module', 'mod_post_installation_messages', '', 1, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'mod_user', 'module', 'mod_user', '', 1, 1, 1, 0, '', '', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'mod_submenu', 'module', 'mod_submenu', '', 1, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0),
(0, 'mod_privacy_status', 'module', 'mod_privacy_status', '', 1, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0);
DELETE FROM `#__extensions` WHERE `element` = 'mod_status' AND `client_id` = 1;
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Login Support', '', '', 1, 'sidebar', 0, NULL, NULL, NULL, 1, 'mod_loginsupport', 1, 1, '{"forum_url":"https://forum.joomla.org/","documentation_url":"https://docs.joomla.org/","news_url":"https://www.joomla.org/","automatic_title":1,"prepare_content":1,"layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":"","style":"0"}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('System Submenu', '', '', 1, 'cpanel-system', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"system","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Content Submenu', '', '', 1, 'cpanel-content', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"content","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"3","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Menus Submenu', '', '', 1, 'cpanel-menus', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"menus","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Components Submenu', '', '', 1, 'cpanel-components', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"components","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Users Submenu', '', '', 1, 'cpanel-users', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"users","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Popular Articles', '', '', 3, 'cpanel-content', 0, NULL, NULL, NULL, 1, 'mod_popular', 3, 1, '{"count":"5","catid":"","user_id":"0","layout":"_:default","moduleclass_sfx":"","cache":"0", "bootstrap_size": "6"}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Recently Added Articles', '', '', 4, 'cpanel-content', 0, NULL, NULL, NULL, 1, 'mod_latest', 3, 1, '{"count":"5","ordering":"c_dsc","catid":"","user_id":"0","layout":"_:default","moduleclass_sfx":"","cache":"0", "bootstrap_size": "6"}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Logged-in Users', '', '', 2, 'cpanel-users', 0, NULL, NULL, NULL, 1, 'mod_logged', 3, 1, '{"count":"5","name":"1","layout":"_:default","moduleclass_sfx":"","cache":"0", "bootstrap_size": "6"}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Frontend Link', '', '', 5, 'status', 0, NULL, NULL, NULL, 1, 'mod_frontend', 1, 1, '', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Messages', '', '', 4, 'status', 0, NULL, NULL, NULL, 1, 'mod_messages', 3, 1, '', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Post Install Messages', '', '', 3, 'status', 0, NULL, NULL, NULL, 1, 'mod_post_installation_messages', 3, 1, '', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('User Status', '', '', 6, 'status', 0, NULL, NULL, NULL, 1, 'mod_user', 3, 1, '', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Site', '', '', 1, 'icon', 0, NULL, NULL, NULL, 1, 'mod_quickicon', 1, 1, '{"context":"site_quickicon","header_icon":"fa fa-desktop","show_users":"1","show_articles":"1","show_categories":"1","show_media":"1","show_menuItems":"1","show_modules":"1","show_plugins":"1","show_templates":"1","layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"style":"0","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('System', '', '', 2, 'icon', 0, NULL, NULL, NULL, 1, 'mod_quickicon', 1, 1, '{"context":"system_quickicon","header_icon":"fa fa-wrench","show_global":"1","show_checkin":"1","show_cache":"1","layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"style":"0","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('3rd Party', '', '', 4, 'icon', 0, NULL, NULL, NULL, 1, 'mod_quickicon', 1, 1, '{"context":"mod_quickicon","header_icon":"fa fa-boxes","load_plugins":"1","layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"style":"0","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
UPDATE `#__modules` SET `title` = 'Update Checks',`ordering` = 3,`position` = 'icon',`showtitle` = 1,`params` = '{"context":"update_quickicon","header_icon":"fa fa-sync","show_global":"0","show_checkin":"0","show_cache":"0","show_users":"0","show_articles":"0","show_categories":"0","show_media":"0","show_menuItems":"0","show_modules":"0","show_plugins":"0","show_templates":"0","layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"style":"0","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":""}' WHERE `#__modules`.`id` = 9;
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Help Submenu', '', '', 1, 'cpanel-help', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"help","layout":"_:default","moduleclass_sfx":"","style":"System-none","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
UPDATE `#__modules` SET `ordering` = 2,`position` = 'status' WHERE `#__modules`.`id` = 79;
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Privacy Requests', '', '', 1, 'cpanel-privacy', 0, NULL, NULL, NULL, 1, 'mod_privacy_dashboard', 1, 1, '{"layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"cachemode":"static","style":"0","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);
INSERT INTO `#__modules` (`title`, `note`, `content`, `ordering`, `position`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `published`, `module`, `access`, `showtitle`, `params`, `client_id`, `language`) VALUES
('Privacy Status', '', '', 1, 'cpanel-privacy', 0, NULL, NULL, NULL, 1, 'mod_privacy_status', 1, 1, '{"layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"cachemode":"static","style":"0","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO `#__modules_menu` (`moduleid`, `menuid`) VALUES (LAST_INSERT_ID(), 0);

View File

@ -1,5 +1,6 @@
UPDATE "#__menu" SET "link"='index.php?option=com_banners&view=banners' WHERE "id"=3;
UPDATE "#__menu" SET "link"='index.php?option=com_categories&view=categories&extension=com_banners' WHERE "id"=4;
UPDATE "#__menu" SET "link"='index.php?option=com_contact&view=contacts' WHERE "id"=8;
UPDATE "#__menu" SET "link"='index.php?option=com_categories&view=categories&extension=com_contact' WHERE "id"=9;
UPDATE "#__menu" SET "link"='index.php?option=com_newsfeeds&view=newsfeeds' WHERE "id"=14;
UPDATE "#__menu" SET "link"='index.php?option=com_categories&view=categories&extension=com_newsfeeds' WHERE "id"=15;
@ -7,4 +8,4 @@ UPDATE "#__menu" SET "link"='index.php?option=com_redirect&view=links' WHERE "id
UPDATE "#__menu" SET "link"='index.php?option=com_search&view=searches' WHERE "id"=17;
UPDATE "#__menu" SET "link"='index.php?option=com_finder&view=index' WHERE "id"=18;
UPDATE "#__menu" SET "link"='index.php?option=com_tags&view=tags' WHERE "id"=20;
UPDATE "#__menu" SET "link"='index.php?option=com_associations&view=associations' WHERE "id"=22;
UPDATE "#__menu" SET "link"='index.php?option=com_associations&view=associations' WHERE "id"=22;

View File

@ -0,0 +1,90 @@
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "checked_out", "checked_out_time", "ordering", "state") VALUES
(0, 'mod_loginsupport', 'module', 'mod_loginsupport', '', 1, 1, 1, 1, '', '', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'mod_frontend', 'module', 'mod_frontend', '', 1, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'mod_messages', 'module', 'mod_messages', '', 1, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'mod_post_installation_messages', 'module', 'mod_post_installation_messages', '', 1, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'mod_user', 'module', 'mod_user', '', 1, 1, 1, 0, '', '', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'mod_submenu', 'module', 'mod_submenu', '', 1, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0),
(0, 'mod_privacy_status', 'module', 'mod_privacy_status', '', 1, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0);
DELETE FROM "#__extensions" WHERE "element" = 'mod_status' AND "client_id" = 1;
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Login Support', '', '', 1, 'sidebar', 0, NULL, NULL, NULL, 1, 'mod_loginsupport', 1, 1, '{"forum_url":"https://forum.joomla.org/","documentation_url":"https://docs.joomla.org/","news_url":"https://www.joomla.org/","automatic_title":1,"prepare_content":1,"layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":"","style":"0"}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('System Submenu', '', '', 1, 'cpanel-system', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"system","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Content Submenu', '', '', 1, 'cpanel-content', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"content","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"3","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Menus Submenu', '', '', 1, 'cpanel-menus', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"menus","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Components Submenu', '', '', 1, 'cpanel-components', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"components","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Users Submenu', '', '', 1, 'cpanel-users', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"users","layout":"_:default","moduleclass_sfx":"","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":"","style":"System-none"}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Popular Articles', '', '', 3, 'cpanel-content', 0, NULL, NULL, NULL, 1, 'mod_popular', 3, 1, '{"count":"5","catid":"","user_id":"0","layout":"_:default","moduleclass_sfx":"","cache":"0", "bootstrap_size": "6"}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Recently Added Articles', '', '', 4, 'cpanel-content', 0, NULL, NULL, NULL, 1, 'mod_latest', 3, 1, '{"count":"5","ordering":"c_dsc","catid":"","user_id":"0","layout":"_:default","moduleclass_sfx":"","cache":"0", "bootstrap_size": "6"}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Logged-in Users', '', '', 2, 'cpanel-users', 0, NULL, NULL, NULL, 1, 'mod_logged', 3, 1, '{"count":"5","name":"1","layout":"_:default","moduleclass_sfx":"","cache":"0", "bootstrap_size": "6"}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Frontend Link', '', '', 5, 'status', 0, NULL, NULL, NULL, 1, 'mod_frontend', 1, 1, '', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Messages', '', '', 4, 'status', 0, NULL, NULL, NULL, 1, 'mod_messages', 3, 1, '', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Post Install Messages', '', '', 3, 'status', 0, NULL, NULL, NULL, 1, 'mod_post_installation_messages', 3, 1, '', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('User Status', '', '', 6, 'status', 0, NULL, NULL, NULL, 1, 'mod_user', 3, 1, '', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Site', '', '', 1, 'icon', 0, NULL, NULL, NULL, 1, 'mod_quickicon', 1, 1, '{"context":"site_quickicon","header_icon":"fa fa-desktop","show_users":"1","show_articles":"1","show_categories":"1","show_media":"1","show_menuItems":"1","show_modules":"1","show_plugins":"1","show_templates":"1","layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"style":"0","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('System', '', '', 2, 'icon', 0, NULL, NULL, NULL, 1, 'mod_quickicon', 1, 1, '{"context":"system_quickicon","header_icon":"fa fa-wrench","show_global":"1","show_checkin":"1","show_cache":"1","layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"style":"0","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('3rd Party', '', '', 4, 'icon', 0, NULL, NULL, NULL, 1, 'mod_quickicon', 1, 1, '{"context":"mod_quickicon","header_icon":"fa fa-boxes","load_plugins":"1","layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"style":"0","module_tag":"div","bootstrap_size":"6","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
UPDATE "#__modules" SET "title" = 'Update Checks',"ordering" = 3,"position" = 'icon',"showtitle" = 1,"params" = '{"context":"update_quickicon","header_icon":"fa fa-sync","layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"style":"0","module_tag":"div","bootstrap_size":"12","header_tag":"h3","header_class":""}' WHERE "#__modules"."id" = 9;
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Help Submenu', '', '', 1, 'cpanel-help', 0, NULL, NULL, NULL, 1, 'mod_submenu', 1, 0, '{"menutype":"*","preset":"help","layout":"_:default","moduleclass_sfx":"","style":"System-none","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
UPDATE "#__modules" SET "ordering" = 2,"position" = 'status' WHERE "#__modules"."id" = 79;
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Privacy Requests', '', '', 1, 'cpanel-privacy', 0, NULL, NULL, NULL, 1, 'mod_privacy_dashboard', 1, 1, '{"layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"cachemode":"static","style":"0","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);
INSERT INTO "#__modules" ("title", "note", "content", "ordering", "position", "checked_out", "checked_out_time", "publish_up", "publish_down", "published", "module", "access", "showtitle", "params", "client_id", "language") VALUES
('Privacy Status', '', '', 1, 'cpanel-privacy', 0, NULL, NULL, NULL, 1, 'mod_privacy_status', 1, 1, '{"layout":"_:default","moduleclass_sfx":"","cache":1,"cache_time":900,"cachemode":"static","style":"0","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":""}', 1, '*');
INSERT INTO "#__modules_menu" ("moduleid", "menuid") VALUES (currval(pg_get_serial_sequence('#__modules','id')), 0);

View File

@ -205,7 +205,7 @@ class HtmlView extends BaseHtmlView
$languageKey = strtoupper($this->extensionName) . '_CATEGORIES';
}
ToolbarHelper::title(Text::sprintf('COM_ASSOCIATIONS_TITLE_EDIT', Text::_($this->extensionName), Text::_($languageKey)), 'contract assoc');
ToolbarHelper::title(Text::sprintf('COM_ASSOCIATIONS_TITLE_EDIT', Text::_($this->extensionName), Text::_($languageKey)), 'language assoc');
$bar = Toolbar::getInstance('toolbar');

View File

@ -229,12 +229,12 @@ class HtmlView extends BaseHtmlView
ToolbarHelper::title(
Text::sprintf(
'COM_ASSOCIATIONS_TITLE_LIST', Text::_($this->extensionName), Text::_($languageKey)
), 'contract assoc'
), 'language assoc'
);
}
else
{
ToolbarHelper::title(Text::_('COM_ASSOCIATIONS_TITLE_LIST_SELECT'), 'contract assoc');
ToolbarHelper::title(Text::_('COM_ASSOCIATIONS_TITLE_LIST_SELECT'), 'language assoc');
}
if ($user->authorise('core.admin', 'com_associations') || $user->authorise('core.options', 'com_associations'))

View File

@ -11,40 +11,80 @@ defined('JPATH_BASE') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
/** @var array $displayData */
$data = $displayData;
// Receive overridable options
$data['options'] = !empty($data['options']) ? $data['options'] : array();
$showSelector = false;
if ($data['view'] instanceof \Joomla\Component\Associations\Administrator\View\Associations\HtmlView)
$noResultsText = '';
$hideActiveFilters = false;
$showFilterButton = false;
$showSelector = false;
$selectorFieldName = $data['options']['selectorFieldName'] ?? 'client_id';
// If a filter form exists.
if (isset($data['view']->filterForm) && !empty($data['view']->filterForm))
{
// Client selector doesn't have to activate the filter bar.
unset($data['view']->activeFilters['itemtype']);
// Checks if a selector (e.g. client_id) exists.
if ($selectorField = $data['view']->filterForm->getField($selectorFieldName))
{
$showSelector = $selectorField->getAttribute('filtermode', '') === 'selector' ? true : $showSelector;
// Menutype filter doesn't have to activate the filter bar
unset($data['view']->activeFilters['language']);
// Checks if a selector should be shown in the current layout.
if (isset($data['view']->layout))
{
$showSelector = $selectorField->getAttribute('layout', 'default') != $data['view']->layout ? false : $showSelector;
}
// Unset the selector field from active filters group.
unset($data['view']->activeFilters[$selectorFieldName]);
}
// Checks if the filters button should exist.
$filters = $data['view']->filterForm->getGroup('filter');
$showFilterButton = isset($filters['filter_search']) && count($filters) === 1 ? false : true;
// Checks if it should show the be hidden.
$hideActiveFilters = empty($data['view']->activeFilters);
// Check if the no results message should appear.
if (isset($data['view']->total) && (int) $data['view']->total === 0)
{
$noResults = $data['view']->filterForm->getFieldAttribute('search', 'noresults', '', 'filter');
if (!empty($noResults))
{
$noResultsText = Text::_($noResults);
}
}
}
// Set some basic options
// Set some basic options.
$customOptions = array(
'filtersHidden' => $data['options']['filtersHidden'] ?? empty($data['view']->activeFilters),
'filtersHidden' => isset($data['options']['filtersHidden']) && $data['options']['filtersHidden'] ? $data['options']['filtersHidden'] : $hideActiveFilters,
'filterButton' => isset($data['options']['filterButton']) && $data['options']['filterButton'] ? $data['options']['filterButton'] : $showFilterButton,
'defaultLimit' => $data['options']['defaultLimit'] ?? Factory::getApplication()->get('list_limit', 20),
'searchFieldSelector' => '#filter_search',
'selectorFieldName' => $selectorFieldName,
'showSelector' => $showSelector,
'orderFieldSelector' => '#list_fullordering',
'showNoResults' => !empty($noResultsText) ? true : false,
'noResultsText' => !empty($noResultsText) ? $noResultsText : '',
'formSelector' => !empty($data['options']['formSelector']) ? $data['options']['formSelector'] : '#adminForm',
);
// Merge custom options in the options array.
$data['options'] = array_merge($customOptions, $data['options']);
// Add class to hide the active filters if needed.
$filtersActiveClass = $hideActiveFilters ? '' : ' js-stools-container-filters-visible';
// Load search tools
HTMLHelper::_('searchtools.form', $data['options']['formSelector'], $data['options']);
$filtersClass = isset($data['view']->activeFilters) && $data['view']->activeFilters ? ' js-stools-container-filters-visible' : '';
?>
<div class="js-stools" role="search">
<div class="js-stools d-flex flex-wrap" role="search">
<?php // Add the itemtype and language selectors before the form filters. Do not display in modal. ?>
<?php $app = Factory::getApplication(); ?>
<?php if ($app->input->get('forcedItemType', '', 'string') == '') : ?>
@ -65,14 +105,24 @@ $filtersClass = isset($data['view']->activeFilters) && $data['view']->activeFilt
</div>
</div>
<?php endif; ?>
<div class="js-stools-container-bar">
<?php echo $this->sublayout('bar', $data); ?>
<?php if ($data['options']['showSelector']) : ?>
<div class="js-stools-container-selector">
<?php echo LayoutHelper::render('joomla.searchtools.default.selector', $data); ?>
</div>
<?php endif; ?>
<div class="js-stools-container-bar ml-auto">
<div class="btn-toolbar">
<?php echo $this->sublayout('bar', $data); ?>
<?php echo $this->sublayout('list', $data); ?>
</div>
</div>
<!-- Filters div -->
<div class="js-stools-container-filters clearfix<?php echo $filtersClass; ?>">
<?php echo $this->sublayout('list', $data); ?>
<div class="js-stools-container-filters clearfix<?php echo $filtersActiveClass; ?>">
<?php if ($data['options']['filterButton']) : ?>
<?php echo $this->sublayout('filters', $data); ?>
<?php endif; ?>
</div>
</div>
<?php if ($data['options']['showNoResults']) : ?>
<?php echo $this->sublayout('noitems', $data); ?>
<?php endif; ?>

View File

@ -103,9 +103,8 @@ HTMLHelper::_('script', 'com_associations/admin-associations-default.min.js', ['
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'associations.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit) : ?>
<?php $editIcon = $isCheckout ? '' : '<span class="fa fa-pen-square mr-2" aria-hidden="true"></span>'; ?>
<a class="hasTooltip" href="<?php echo Route::_($this->editUri . '&id=' . (int) $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes($item->title)); ?>">
<?php echo $editIcon; ?><?php echo $this->escape($item->title); ?></a>
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<span title="<?php echo Text::sprintf('JFIELD_ALIAS_LABEL', $this->escape($item->alias)); ?>"><?php echo $this->escape($item->title); ?></span>
<?php endif; ?>

View File

@ -146,8 +146,8 @@ class HtmlView extends BaseHtmlView
$dropdown = $toolbar->dropdownButton('status-group')
->text('JTOOLBAR_CHANGE_STATUS')
->toggleSplit(false)
->icon('fa fa-globe')
->buttonClass('btn btn-info')
->icon('fa fa-ellipsis-h')
->buttonClass('btn btn-action')
->listCheck(true);
$childBar = $dropdown->getChildToolbar();
@ -188,17 +188,17 @@ class HtmlView extends BaseHtmlView
->message('JGLOBAL_CONFIRM_DELETE')
->listCheck(true);
}
}
// Add a batch button
if ($user->authorise('core.create', 'com_banners')
&& $user->authorise('core.edit', 'com_banners')
&& $user->authorise('core.edit.state', 'com_banners'))
{
$toolbar->popupButton('batch')
->text('JTOOLBAR_BATCH')
->selector('collapseModal')
->listCheck(true);
// Add a batch button
if ($user->authorise('core.create', 'com_banners')
&& $user->authorise('core.edit', 'com_banners')
&& $user->authorise('core.edit.state', 'com_banners'))
{
$childBar->popupButton('batch')
->text('JTOOLBAR_BATCH')
->selector('collapseModal')
->listCheck(true);
}
}
if ($user->authorise('core.admin', 'com_banners') || $user->authorise('core.options', 'com_banners'))

View File

@ -127,8 +127,8 @@ class HtmlView extends BaseHtmlView
$dropdown = $toolbar->dropdownButton('status-group')
->text('JTOOLBAR_CHANGE_STATUS')
->toggleSplit(false)
->icon('fa fa-globe')
->buttonClass('btn btn-info')
->icon('fa fa-ellipsis-h')
->buttonClass('btn btn-action')
->listCheck(true);
$childBar = $dropdown->getChildToolbar();

View File

@ -32,21 +32,25 @@ HTMLHelper::_('script', 'com_contenthistory/admin-history-versions.js', ['versio
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'details', Text::_('COM_BANNERS_BANNER_DETAILS')); ?>
<div class="row">
<div class="col-md-9">
<?php echo $this->form->renderField('type'); ?>
<div id="image">
<?php echo $this->form->renderFieldset('image'); ?>
<div class="col-lg-9">
<div class="card">
<div class="card-body">
<?php echo $this->form->renderField('type'); ?>
<div id="image">
<?php echo $this->form->renderFieldset('image'); ?>
</div>
<div id="custom">
<?php echo $this->form->renderField('custombannercode'); ?>
</div>
<?php
echo $this->form->renderField('clickurl');
echo $this->form->renderField('description');
?>
</div>
</div>
<div id="custom">
<?php echo $this->form->renderField('custombannercode'); ?>
</div>
<?php
echo $this->form->renderField('clickurl');
echo $this->form->renderField('description');
?>
</div>
<div class="col-md-3">
<div class="card card-light">
<div class="col-lg-3">
<div class="card">
<div class="card-body">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
</div>
@ -56,16 +60,29 @@ HTMLHelper::_('script', 'com_contenthistory/admin-history-versions.js', ['versio
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'otherparams', Text::_('COM_BANNERS_GROUP_LABEL_BANNER_DETAILS')); ?>
<?php echo $this->form->renderFieldset('otherparams'); ?>
<fieldset id="fieldset-otherparams" class="form-no-margin options-grid-form">
<legend><?php echo Text::_('COM_BANNERS_GROUP_LABEL_BANNER_DETAILS'); ?></legend>
<div>
<?php echo $this->form->renderFieldset('otherparams'); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_PUBLISHING')); ?>
<div class="row">
<div class="col-md-6">
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
<fieldset id="fieldset-publishingdata" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</fieldset>
</div>
<div class="col-md-6">
<?php echo $this->form->renderFieldset('metadata'); ?>
<fieldset id="fieldset-metadata" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'); ?></legend>
<div>
<?php echo $this->form->renderFieldset('metadata'); ?>
</div>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>

View File

@ -54,12 +54,12 @@ if ($saveOrder && !empty($this->items))
</caption>
<thead>
<tr>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<td style="width:1%" class="text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th scope="col" style="width:1%" class="text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
</th>
@ -98,6 +98,9 @@ if ($saveOrder && !empty($this->items))
$canChange = $user->authorise('core.edit.state', 'com_banners.category.' . $item->catid) && $canCheckin;
?>
<tr class="row<?php echo $i % 2; ?>" data-dragable-group="<?php echo $item->catid; ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="order text-center d-none d-md-table-cell">
<?php
$iconClass = '';
@ -112,16 +115,13 @@ if ($saveOrder && !empty($this->items))
}
?>
<span class="sortable-handler <?php echo $iconClass ?>">
<span class="icon-menu" aria-hidden="true"></span>
<span class="fa fa-ellipsis-v" aria-hidden="true"></span>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5"
value="<?php echo $item->ordering; ?>" class="width-20 text-area-order">
<?php endif; ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'banners.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
</td>
@ -131,9 +131,8 @@ if ($saveOrder && !empty($this->items))
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'banners.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit) : ?>
<?php $editIcon = $item->checked_out ? '' : '<span class="fa fa-pen-square mr-2" aria-hidden="true"></span>'; ?>
<a href="<?php echo Route::_('index.php?option=com_banners&task=banner.edit&id=' . (int) $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes($item->name)); ?>">
<?php echo $editIcon; ?><?php echo $this->escape($item->name); ?></a>
<?php echo $this->escape($item->name); ?></a>
<?php else : ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>

View File

@ -31,18 +31,22 @@ HTMLHelper::_('script', 'com_contenthistory/admin-history-versions.js', ['versio
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'general', empty($this->item->id) ? Text::_('COM_BANNERS_NEW_CLIENT') : Text::_('COM_BANNERS_EDIT_CLIENT')); ?>
<div class="row">
<div class="col-md-9">
<?php
echo $this->form->renderField('contact');
echo $this->form->renderField('email');
echo $this->form->renderField('purchase_type');
echo $this->form->renderField('track_impressions');
echo $this->form->renderField('track_clicks');
echo $this->form->renderFieldset('extra');
?>
<div class="col-lg-9">
<div class="card">
<div class="card-body">
<?php
echo $this->form->renderField('contact');
echo $this->form->renderField('email');
echo $this->form->renderField('purchase_type');
echo $this->form->renderField('track_impressions');
echo $this->form->renderField('track_clicks');
echo $this->form->renderFieldset('extra');
?>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card card-light">
<div class="col-lg-3">
<div class="card">
<div class="card-body">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
</div>
@ -52,7 +56,16 @@ HTMLHelper::_('script', 'com_contenthistory/admin-history-versions.js', ['versio
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'metadata', Text::_('JGLOBAL_FIELDSET_METADATA_OPTIONS')); ?>
<?php echo $this->form->renderFieldset('metadata'); ?>
<div class="row">
<div class="col-12 col-lg-6">
<fieldset id="fieldset-metadata" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'); ?></legend>
<div>
<?php echo $this->form->renderFieldset('metadata'); ?>
</div>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>

View File

@ -110,9 +110,8 @@ $params = $this->state->params ?? new CMSObject;
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'clients.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit) : ?>
<?php $editIcon = $item->checked_out ? '' : '<span class="fa fa-pen-square mr-2" aria-hidden="true"></span>'; ?>
<a href="<?php echo Route::_('index.php?option=com_banners&task=client.edit&id=' . (int) $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes($item->name)); ?>">
<?php echo $editIcon; ?><?php echo $this->escape($item->name); ?></a>
<?php echo $this->escape($item->name); ?></a>
<?php else : ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>

View File

@ -11,8 +11,10 @@ namespace Joomla\Component\Cache\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
/**
* Cache Controller
@ -29,6 +31,44 @@ class DisplayController extends BaseController
*/
protected $default_view = 'cache';
/**
* Method to get The Cache Size
*
* @since 4.0
*/
public function getQuickiconContent()
{
$model = $this->getModel('Cache');
$data = $model->getData();
$size = 0;
if (!empty($data))
{
foreach ($data as $d)
{
$size += $d->size;
}
}
// Number bytes are returned in format xxx.xx MB
$bytes = HTMLHelper::_('number.bytes', $size, 'MB', 1);
if (!empty($bytes))
{
$result['amount'] = $bytes;
$result['sronly'] = Text::sprintf('COM_CACHE_QUICKICON_SRONLY', $bytes);
}
else
{
$result['amount'] = 0;
$result['sronly'] = Text::sprintf('COM_CACHE_QUICKICON_SRONLY_NOCACHE');
}
echo new JsonResponse($result);
}
/**
* Method to delete a list of cache groups.
*

View File

@ -13,6 +13,7 @@ defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
use Joomla\Utilities\ArrayHelper;
@ -39,6 +40,30 @@ class CategoriesController extends AdminController
return parent::getModel($name, $prefix, $config);
}
/**
* Method to get the number of content categories
*
* @return string The JSON-encoded amount of published content categories
*
* @since 4.0
*/
public function getQuickiconContent()
{
$model = $this->getModel('Categories');
$model->setState('filter.published', 1);
$model->setState('filter.extension', 'com_content');
$amount = (int) $model->getTotal();
$result = [];
$result['amount'] = $amount;
$result['sronly'] = Text::plural('COM_CATEGORIES_N_QUICKICON_SRONLY', $amount);
$result['name'] = Text::plural('COM_CATEGORIES_N_QUICKICON', $amount);
echo new JsonResponse($result);
}
/**
* Rebuild the nested set tree.
*

View File

@ -190,8 +190,8 @@ class HtmlView extends BaseHtmlView
$dropdown = $toolbar->dropdownButton('status-group')
->text('JTOOLBAR_CHANGE_STATUS')
->toggleSplit(false)
->icon('fa fa-globe')
->buttonClass('btn btn-info')
->icon('fa fa-ellipsis-h')
->buttonClass('btn btn-action')
->listCheck(true);
$childBar = $dropdown->getChildToolbar();
@ -214,17 +214,17 @@ class HtmlView extends BaseHtmlView
{
$childBar->trash('categories.trash')->listCheck(true);
}
}
// Add a batch button
if ($canDo->get('core.create')
&& $canDo->get('core.edit')
&& $canDo->get('core.edit.state'))
{
$toolbar->popupButton('batch')
->text('JTOOLBAR_BATCH')
->selector('collapseModal')
->listCheck(true);
// Add a batch button
if ($canDo->get('core.create')
&& $canDo->get('core.edit')
&& $canDo->get('core.edit.state'))
{
$childBar->popupButton('batch')
->text('JTOOLBAR_BATCH')
->selector('collapseModal')
->listCheck(true);
}
}
if ($canDo->get('core.admin'))

View File

@ -217,31 +217,34 @@
section="category"
/>
<fields name="params" label="COM_CATEGORIES_FIELD_BASIC_LABEL">
<fields name="params">
<fieldset name="basic">
<fieldset name="options">
<field
name="category_layout"
type="componentlayout"
label="JFIELD_ALT_LAYOUT_LABEL"
class="custom-select"
view="category"
useglobal="true"
/>
<fieldset name="basic" label="COM_CATEGORIES_FIELD_BASIC_LABEL">
<field
name="image"
type="media"
label="COM_CATEGORIES_FIELD_IMAGE_LABEL"
/>
<field
name="category_layout"
type="componentlayout"
label="JFIELD_ALT_LAYOUT_LABEL"
class="custom-select"
view="category"
useglobal="true"
/>
<field
name="image_alt"
type="text"
label="COM_CATEGORIES_FIELD_IMAGE_ALT_LABEL"
size="20"
/>
<field
name="image"
type="media"
label="COM_CATEGORIES_FIELD_IMAGE_LABEL"
/>
<field
name="image_alt"
type="text"
label="COM_CATEGORIES_FIELD_IMAGE_ALT_LABEL"
size="20"
/>
</fieldset>
</fieldset>
</fields>

View File

@ -43,12 +43,12 @@
name="tag"
type="tag"
label="JOPTION_SELECT_TAG"
hint="JOPTION_SELECT_TAG"
multiple="true"
mode="nested"
custom="false"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_TAG</option>
</field>
/>
<field
name="level"

View File

@ -68,12 +68,12 @@ if ($saveOrder && !empty($this->items))
</caption>
<thead>
<tr>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.lft', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<td style="width:1%" class="text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.lft', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th scope="col" style="width:1%" class="text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
</th>
@ -157,6 +157,9 @@ if ($saveOrder && !empty($this->items))
}
?>
<tr class="row<?php echo $i % 2; ?>" data-dragable-group="<?php echo $item->parent_id; ?>" item-id="<?php echo $item->id ?>" parents="<?php echo $parentsStr ?>" level="<?php echo $item->level ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="order text-center d-none d-md-table-cell">
<?php
$iconClass = '';
@ -170,15 +173,12 @@ if ($saveOrder && !empty($this->items))
}
?>
<span class="sortable-handler<?php echo $iconClass ?>">
<span class="icon-menu"></span>
<span class="fa fa-ellipsis-v"></span>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->lft; ?>">
<?php endif; ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('jgrid.published', $item->published, $i, 'categories.', $canChange); ?>
</td>
@ -188,9 +188,8 @@ if ($saveOrder && !empty($this->items))
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'categories.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit || $canEditOwn) : ?>
<?php $editIcon = $item->checked_out ? '' : '<span class="fa fa-pen-square mr-2" aria-hidden="true"></span>'; ?>
<a href="<?php echo Route::_('index.php?option=com_categories&task=category.edit&id=' . $item->id . '&extension=' . $extension); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes($item->title)); ?>">
<?php echo $editIcon; ?><?php echo $this->escape($item->title); ?></a>
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>
@ -203,26 +202,26 @@ if ($saveOrder && !empty($this->items))
</span>
</th>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_published')) : ?>
<td class="text-center btns d-none d-md-table-cell">
<a class="badge <?php echo ($item->count_published > 0) ? 'badge-success' : 'badge-secondary'; ?>" title="<?php echo Text::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=1'); ?>">
<td class="text-center btns d-none d-md-table-cell itemnumber">
<a class="btn <?php echo ($item->count_published > 0) ? 'btn-success' : 'btn-secondary'; ?>" title="<?php echo Text::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=1'); ?>">
<?php echo $item->count_published; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_unpublished')) : ?>
<td class="text-center btns d-none d-md-table-cell">
<a class="badge <?php echo ($item->count_unpublished > 0) ? 'badge-danger' : 'badge-secondary'; ?>" title="<?php echo Text::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=1'); ?>">
<td class="text-center btns d-none d-md-table-cell itemnumber">
<a class="btn <?php echo ($item->count_unpublished > 0) ? 'btn-danger' : 'btn-secondary'; ?>" title="<?php echo Text::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=1'); ?>">
<?php echo $item->count_unpublished; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_archived')) : ?>
<td class="text-center btns d-none d-md-table-cell">
<a class="badge <?php echo ($item->count_archived > 0) ? 'badge-info' : 'badge-secondary'; ?>" title="<?php echo Text::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=1'); ?>">
<td class="text-center btns d-none d-md-table-cell itemnumber">
<a class="btn <?php echo ($item->count_archived > 0) ? 'btn-info' : 'btn-secondary'; ?>" title="<?php echo Text::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=1'); ?>">
<?php echo $item->count_archived; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_trashed')) : ?>
<td class="text-center btns d-none d-md-table-cell">
<a class="badge <?php echo ($item->count_trashed > 0) ? 'badge-inverse' : 'badge-secondary'; ?>" title="<?php echo Text::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=1'); ?>">
<td class="text-center btns d-none d-md-table-cell itemnumber">
<a class="btn <?php echo ($item->count_trashed > 0) ? 'btn-inverse' : 'btn-secondary'; ?>" title="<?php echo Text::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=1'); ?>">
<?php echo $item->count_trashed; ?></a>
</td>
<?php endif; ?>

View File

@ -17,4 +17,11 @@
</field>
</fields>
</fieldset>
<field name="params">
<field
name="menu-quicktask"
type="hidden"
value="index.php?option=com_categories&amp;extension=com_content&amp;task=category.add"
/>
</field>
</metadata>

View File

@ -27,9 +27,10 @@ $input = $app->input;
$assoc = Associations::isEnabled();
// Are associations implemented for this extension?
$extensionassoc = array_key_exists('item_associations', $this->form->getFieldsets());
$hasAssoc = ($this->form->getValue('language', null, '*') !== '*');
// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('jmetadata', 'item_associations');
$this->ignore_fieldsets = ['jmetadata', 'item_associations'];
$this->useCoreUI = true;
// In case of modal
@ -46,14 +47,18 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'general')); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'general', Text::_('JCATEGORY')); ?>
<div class="row">
<div class="col-md-9">
<?php echo $this->form->getLabel('description'); ?>
<?php echo $this->form->getInput('description'); ?>
</div>
<div class="col-md-3">
<div class="card card-light">
<div class="col-lg-9">
<div class="card">
<div class="card-body">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
<?php echo $this->form->getLabel('description'); ?>
<?php echo $this->form->getInput('description'); ?>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="card card-block">
<div class="card-body">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
</div>
@ -63,30 +68,52 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('COM_CATEGORIES_FIELDSET_PUBLISHING')); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_PUBLISHING')); ?>
<div class="row">
<div class="col-md-6">
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
<div class="col-12 col-lg-6">
<fieldset id="fieldset-publishingdata" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
</fieldset>
</div>
<div class="col-md-6">
<?php echo LayoutHelper::render('joomla.edit.metadata', $this); ?>
<div class="col-12 col-lg-6">
<fieldset id="fieldset-metadata" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.metadata', $this); ?>
</div>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php if ( ! $isModal && $assoc && $extensionassoc) : ?>
<?php if (!$isModal && $assoc && $extensionassoc) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'associations', Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
<?php echo $this->loadTemplate('associations'); ?>
<?php if ($hasAssoc) : ?>
<fieldset id="fieldset-associations" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.associations', $this); ?>
</div>
</fieldset>
<?php endif; ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php elseif ($isModal && $assoc && $extensionassoc) : ?>
<div class="hidden"><?php echo $this->loadTemplate('associations'); ?></div>
<div class="hidden"><?php echo LayoutHelper::render('joomla.edit.associations', $this); ?></div>
<?php endif; ?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'rules', Text::_('COM_CATEGORIES_FIELDSET_RULES')); ?>
<?php echo $this->form->getInput('rules'); ?>
<fieldset id="fieldset-rules" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('COM_CATEGORIES_FIELDSET_RULES'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

View File

@ -11,8 +11,10 @@ namespace Joomla\Component\Checkin\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
/**
* Checkin Controller
@ -70,4 +72,51 @@ class DisplayController extends BaseController
$this->setRedirect('index.php?option=com_checkin');
}
/**
* Provide the data for a badge in a menu item via JSON
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function getMenuBadgeData()
{
if (!Factory::getUser()->authorise('core.manage', 'com_checkin'))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
$model = $this->getModel('Checkin');
$amount = (int) count($model->getItems());
echo new JsonResponse($amount);
}
/**
* Method to get the number of locked icons
*
* @return void
*
* @since 4.0
*/
public function getQuickiconContent()
{
if (!Factory::getUser()->authorise('core.manage', 'com_checkin'))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
$model = $this->getModel('Checkin');
$amount = (int) count($model->getItems());
$result = [];
$result['amount'] = $amount;
$result['sronly'] = Text::plural('COM_CHECKIN_N_QUICKICON_SRONLY', $amount);
echo new JsonResponse($result);
}
}

View File

@ -5,4 +5,18 @@
<![CDATA[COM_CHECKIN_CHECKIN_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="params">
<fieldset name="basic" label="JOPTIONS">
<field
name="ajax-badge"
type="radio"
label="COM_CHECKIN_CHECKIN_VIEW_DISPLAY_BADGE"
class="switcher"
default=""
>
<option value="">JHIDE</option>
<option value="index.php?option=com_checkin&amp;task=getMenuBadgeData&amp;format=json">JSHOW</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -30,8 +30,12 @@ Text::script('MESSAGE');
<form action="<?php echo Route::_('index.php?option=com_config'); ?>" id="application-form" method="post" name="adminForm" class="form-validate" data-cancel-task="config.cancel.component">
<div class="row">
<!-- Begin Sidebar -->
<div id="sidebar" class="col-md-2">
<div class="sidebar-nav">
<div id="sidebar" class="col-md-3">
<button class="btn btn-sm btn-secondary my-2 options-menu d-md-none" type="button" data-toggle="collapse" data-target=".sidebar-nav" aria-controls="sidebar-nav" aria-expanded="false" aria-label="<?php echo Text::_('TPL_ATUM_TOGGLE_SIDEBAR'); ?>">
<span class="fas fa-align-justify" aria-hidden="true"></span>
<?php echo Text::_('TPL_ATUM_TOGGLE_SIDEBAR'); ?>
</button>
<div class="sidebar-nav bg-light p-2 my-2">
<?php echo $this->loadTemplate('navigation'); ?>
<?php
// Display the submenu position modules
@ -47,9 +51,8 @@ Text::script('MESSAGE');
</div>
<!-- End Sidebar -->
<!-- Begin Content -->
<div class="col-md-10">
<div class="col-lg-9 mt-2">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" href="#page-site" data-toggle="tab"><?php echo Text::_('JSITE'); ?></a></li>
<li class="nav-item"><a class="nav-link" href="#page-system" data-toggle="tab"><?php echo Text::_('COM_CONFIG_SYSTEM'); ?></a></li>
<li class="nav-item"><a class="nav-link" href="#page-server" data-toggle="tab"><?php echo Text::_('COM_CONFIG_SERVER'); ?></a></li>
@ -59,61 +62,37 @@ Text::script('MESSAGE');
<?php endif; ?>
<li class="nav-item"><a class="nav-link" href="#page-permissions" data-toggle="tab"><?php echo Text::_('COM_CONFIG_PERMISSIONS'); ?></a></li>
</ul>
<div id="config-document" class="tab-content">
<div id="config-document" class="tab-content form-no-margin">
<div id="page-site" class="tab-pane active">
<div class="row">
<div class="col-lg-12 col-xl-6">
<?php echo $this->loadTemplate('site'); ?>
<?php echo $this->loadTemplate('metadata'); ?>
</div>
<div class="col-lg-12 col-xl-6">
<?php echo $this->loadTemplate('seo'); ?>
<?php echo $this->loadTemplate('cookie'); ?>
</div>
</div>
<?php echo $this->loadTemplate('site'); ?>
<?php echo $this->loadTemplate('metadata'); ?>
<?php echo $this->loadTemplate('seo'); ?>
<?php echo $this->loadTemplate('cookie'); ?>
</div>
<div id="page-system" class="tab-pane">
<div class="row">
<div class="col-md-12">
<?php echo $this->loadTemplate('system'); ?>
<?php echo $this->loadTemplate('debug'); ?>
<?php echo $this->loadTemplate('cache'); ?>
<?php echo $this->loadTemplate('session'); ?>
</div>
</div>
<?php echo $this->loadTemplate('system'); ?>
<?php echo $this->loadTemplate('debug'); ?>
<?php echo $this->loadTemplate('cache'); ?>
<?php echo $this->loadTemplate('session'); ?>
</div>
<div id="page-server" class="tab-pane">
<div class="row">
<div class="col-lg-12 col-xl-6">
<?php echo $this->loadTemplate('server'); ?>
<?php echo $this->loadTemplate('locale'); ?>
<?php echo $this->loadTemplate('ftp'); ?>
<?php echo $this->loadTemplate('proxy'); ?>
</div>
<div class="col-lg-12 col-xl-6">
<?php echo $this->loadTemplate('database'); ?>
<?php echo $this->loadTemplate('mail'); ?>
</div>
</div>
<?php echo $this->loadTemplate('server'); ?>
<?php echo $this->loadTemplate('locale'); ?>
<?php echo $this->loadTemplate('ftp'); ?>
<?php echo $this->loadTemplate('proxy'); ?>
<?php echo $this->loadTemplate('database'); ?>
<?php echo $this->loadTemplate('mail'); ?>
</div>
<div id="page-filters" class="tab-pane">
<div class="row">
<div class="col-md-12">
<?php echo $this->loadTemplate('filters'); ?>
</div>
</div>
<?php echo $this->loadTemplate('filters'); ?>
</div>
<?php if ($this->ftp) : ?>
<div id="page-ftp" class="tab-pane">
<div class="col-md-12">
<?php echo $this->loadTemplate('ftplogin'); ?>
</div>
<?php echo $this->loadTemplate('ftplogin'); ?>
</div>
<?php endif; ?>
<div id="page-permissions" class="tab-pane">
<div class="row">
<?php echo $this->loadTemplate('permissions'); ?>
</div>
<?php echo $this->loadTemplate('permissions'); ?>
</div>
<input type="hidden" name="task" value="">
<?php echo HTMLHelper::_('form.token'); ?>

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_CACHE_SETTINGS');
$this->fieldsname = 'cache';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_COOKIE_SETTINGS');
$this->fieldsname = 'cookie';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_DATABASE_SETTINGS');
$this->fieldsname = 'database';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_DEBUG_SETTINGS');
$this->fieldsname = 'debug';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_TEXT_FILTER_SETTINGS');
$this->fieldsname = 'filters';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.text_filters', $this);

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_FTP_SETTINGS');
$this->fieldsname = 'ftp';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -12,27 +12,29 @@ defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
?>
<fieldset>
<fieldset class="options-grid-form options-grid-form-half">
<legend><?php echo Text::_('COM_CONFIG_FTP_DETAILS'); ?></legend>
<?php echo Text::_('COM_CONFIG_FTP_DETAILS_TIP'); ?>
<p><?php echo Text::_('COM_CONFIG_FTP_DETAILS_TIP'); ?></p>
<?php if ($this->ftp instanceof Exception) : ?>
<?php /** @var Exception $this */ ?>
<p><?php echo Text::_($this->ftp->message); ?></p>
<?php endif; ?>
<div class="control-group">
<div class="control-label">
<label for="username"><?php echo Text::_('JGLOBAL_USERNAME'); ?></label>
<div>
<div class="control-group">
<div class="control-label">
<label for="username"><?php echo Text::_('JGLOBAL_USERNAME'); ?></label>
</div>
<div class="controls">
<input type="text" id="username" name="username" class="form-control" size="70" value="">
</div>
</div>
<div class="control-group">
<div class="control-label">
<label for="password"><?php echo Text::_('JGLOBAL_PASSWORD'); ?></label>
</div>
<div class="controls">
<input type="password" id="password" name="password" class="form-control" size="70" value="">
</div>
</div>
</div>
<div class="controls">
<input type="text" id="username" name="username" class="form-control" size="70" value="">
</div>
</div>
<div class="control-group">
<div class="control-label">
<label for="password"><?php echo Text::_('JGLOBAL_PASSWORD'); ?></label>
</div>
<div class="controls">
<input type="password" id="password" name="password" class="form-control" size="70" value="">
</div>
</div>
</fieldset>

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_LOCATION_SETTINGS');
$this->fieldsname = 'locale';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -36,6 +36,8 @@ $ajaxUri = Route::_('index.php?option=com_config&task=application.sendtestmail&f
$this->name = Text::_('COM_CONFIG_MAIL_SETTINGS');
$this->fieldsname = 'mail';
$this->formclass = 'options-grid-form options-grid-form-half';
?>
<joomla-field-send-test-mail uri="<?php echo $ajaxUri; ?>">

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_METADATA_SETTINGS');
$this->fieldsname = 'metadata';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -15,6 +15,7 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_PERMISSION_SETTINGS');
$this->description = '';
$this->fieldsname = 'permissions';
$this->formclass = 'form-no-margin';
$this->formclass = 'form-no-margin options-grid-form options-grid-form-half';
$this->showlabel = false;
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_PROXY_SETTINGS');
$this->fieldsname = 'proxy';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_SEO_SETTINGS');
$this->fieldsname = 'seo';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_SERVER_SETTINGS');
$this->fieldsname = 'server';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_SESSION_SETTINGS');
$this->fieldsname = 'session';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_SITE_SETTINGS');
$this->fieldsname = 'site';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -14,4 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_SYSTEM_SETTINGS');
$this->fieldsname = 'system';
$this->formclass = 'options-grid-form options-grid-form-half';
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -35,24 +35,37 @@ if ($this->fieldsets)
// @TODO delete this when custom elements modal is merged
HTMLHelper::_('script', 'com_config/admin-application-default.min.js', ['version' => 'auto', 'relative' => true]);
$xml = $this->form->getXml();
?>
<form action="<?php echo Route::_('index.php?option=com_config'); ?>" id="component-form" method="post" class="form-validate" name="adminForm" autocomplete="off" data-cancel-task="config.cancel.component">
<div class="row">
<?php // Begin Sidebar ?>
<div class="col-md-2" id="sidebar">
<div class="sidebar-nav">
<div class="col-md-3" id="sidebar">
<button class="btn btn-sm btn-secondary my-2 options-menu d-md-none" type="button" data-toggle="collapse" data-target=".sidebar-nav" aria-controls="sidebar-nav" aria-expanded="false" aria-label="<?php echo Text::_('TPL_ATUM_TOGGLE_SIDEBAR'); ?>">
<span class="fas fa-align-justify" aria-hidden="true"></span>
<?php echo Text::_('TPL_ATUM_TOGGLE_SIDEBAR'); ?>
</button>
<div class="sidebar-nav bg-light p-2 my-2">
<?php echo $this->loadTemplate('navigation'); ?>
</div>
</div>
<?php // End Sidebar ?>
<div class="col-md-10" id="config">
<div class="col-md-9" id="config">
<?php if ($this->fieldsets): ?>
<ul class="nav nav-tabs" id="configTabs">
<?php $opentab = 0; ?>
<ul class="nav nav-tabs mt-2" id="configTabs">
<?php foreach ($this->fieldsets as $name => $fieldSet) : ?>
<?php
// Only show first level fieldsets as tabs
if ($xml->xpath('//fieldset/fieldset[@name="' . $name . '"]')) :
continue;
endif;
?>
<?php $dataShowOn = ''; ?>
<?php if (!empty($fieldSet->showon)) : ?>
<?php HTMLHelper::_('script', 'system/showon.min.js', array('version' => 'auto', 'relative' => true)); ?>
@ -63,18 +76,68 @@ HTMLHelper::_('script', 'com_config/admin-application-default.min.js', ['version
<?php endforeach; ?>
</ul>
<div class="tab-content" id="configContent">
<div class="tab-content form-no-margin" id="configContent">
<?php foreach ($this->fieldsets as $name => $fieldSet) : ?>
<div class="tab-pane" id="<?php echo $name; ?>">
<?php if (!empty($fieldSet->description)) : ?>
<div class="tab-description alert alert-info">
<span class="fa fa-info-circle" aria-hidden="true"></span><span class="sr-only"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_($fieldSet->description); ?>
<?php
$hasChildren = $xml->xpath('//fieldset[@name="' . $name . '"]/fieldset');
$hasParent = $xml->xpath('//fieldset/fieldset[@name="' . $name . '"]');
$isGrandchild = $xml->xpath('//fieldset/fieldset/fieldset[@name="' . $name . '"]');
?>
<?php if (!$isGrandchild && $hasParent) : ?>
<fieldset id="fieldset-<?php echo $this->escape($name); ?>" class="options-grid-form options-grid-form-half">
<legend><?php echo Text::_($fieldSet->label); ?></legend>
<div>
<?php elseif (!$hasParent) : ?>
<?php if ($opentab) : ?>
<?php if ($opentab > 1) : ?>
</div>
</fieldset>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="tab-pane" id="<?php echo $name; ?>">
<?php $opentab = 1; ?>
<?php if (!$hasChildren) : ?>
<fieldset id="fieldset-<?php echo $this->escape($name); ?>" class="options-grid-form options-grid-form-half">
<legend><?php echo Text::_($fieldSet->label); ?></legend>
<div>
<?php $opentab = 2; ?>
<?php endif; ?>
<?php endif; ?>
<?php if (!empty($fieldSet->description)) : ?>
<div class="tab-description alert alert-info">
<span class="fa fa-info-circle" aria-hidden="true"></span><span class="sr-only"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_($fieldSet->description); ?>
</div>
<?php endif; ?>
<?php if (!$hasChildren) : ?>
<?php echo $this->form->renderFieldset($name, $name === 'permissions' ? ['hiddenLabel' => true, 'class' => 'revert-controls'] : []); ?>
</div>
<?php endif; ?>
<?php if (!$isGrandchild && $hasParent) : ?>
</div>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($opentab) : ?>
<?php if ($opentab > 1) : ?>
</div>
</fieldset>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<?php else: ?>
<div class="alert alert-info">

View File

@ -106,7 +106,7 @@ class HtmlView extends BaseHtmlView
// Since we don't track these assets at the item level, use the category id.
$canDo = ContentHelper::getActions('com_contact', 'category', $this->item->catid);
ToolbarHelper::title($isNew ? Text::_('COM_CONTACT_MANAGER_CONTACT_NEW') : Text::_('COM_CONTACT_MANAGER_CONTACT_EDIT'), 'address contact');
ToolbarHelper::title($isNew ? Text::_('COM_CONTACT_MANAGER_CONTACT_NEW') : Text::_('COM_CONTACT_MANAGER_CONTACT_EDIT'), 'address-book contact');
// Build the actions for new and existing records.
if ($isNew)

View File

@ -140,7 +140,7 @@ class HtmlView extends BaseHtmlView
// Get the toolbar object instance
$toolbar = Toolbar::getInstance('toolbar');
ToolbarHelper::title(Text::_('COM_CONTACT_MANAGER_CONTACTS'), 'address contact');
ToolbarHelper::title(Text::_('COM_CONTACT_MANAGER_CONTACTS'), 'address-book contact');
if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0)
{
@ -152,8 +152,8 @@ class HtmlView extends BaseHtmlView
$dropdown = $toolbar->dropdownButton('status-group')
->text('JTOOLBAR_CHANGE_STATUS')
->toggleSplit(false)
->icon('fa fa-globe')
->buttonClass('btn btn-info')
->icon('fa fa-ellipsis-h')
->buttonClass('btn btn-action')
->listCheck(true);
$childBar = $dropdown->getChildToolbar();
@ -182,25 +182,25 @@ class HtmlView extends BaseHtmlView
{
$childBar->trash('contacts.trash')->listCheck(true);
}
}
// Add a batch button
if ($user->authorise('core.create', 'com_contact')
&& $user->authorise('core.edit', 'com_contact')
&& $user->authorise('core.edit.state', 'com_contact'))
{
$toolbar->popupButton('batch')
->text('JTOOLBAR_BATCH')
->selector('collapseModal')
->listCheck(true);
}
// Add a batch button
if ($user->authorise('core.create', 'com_contact')
&& $user->authorise('core.edit', 'com_contact')
&& $user->authorise('core.edit.state', 'com_contact'))
{
$childBar->popupButton('batch')
->text('JTOOLBAR_BATCH')
->selector('collapseModal')
->listCheck(true);
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete'))
{
$toolbar->delete('contacts.delete')
->text('JTOOLBAR_EMPTY_TRASH')
->message('JGLOBAL_CONFIRM_DELETE')
->listCheck(true);
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete'))
{
$childBar->delete('contacts.delete')
->text('JTOOLBAR_EMPTY_TRASH')
->message('JGLOBAL_CONFIRM_DELETE')
->listCheck(true);
}
}
if ($user->authorise('core.admin', 'com_contact') || $user->authorise('core.options', 'com_contact'))

View File

@ -961,11 +961,10 @@
description="COM_CONTACT_CONFIG_INTEGRATION_SETTINGS_DESC"
>
<field
<fieldset
name="integration_newsfeeds"
type="note"
label="JGLOBAL_FEED_TITLE"
/>
>
<field
name="show_feed_link"
@ -978,11 +977,12 @@
<option value="1">JSHOW</option>
</field>
<field
</fieldset>
<fieldset
name="integration_sef"
type="note"
label="JGLOBAL_SEF_TITLE"
/>
>
<field
name="sef_ids"
@ -995,11 +995,12 @@
<option value="1">JYES</option>
</field>
<field
</fieldset>
<fieldset
name="integration_customfields"
type="note"
label="JGLOBAL_FIELDS_TITLE"
/>
>
<field
name="custom_fields_enable"
@ -1012,6 +1013,8 @@
<option value="1">JYES</option>
</field>
</fieldset>
</fieldset>
<fieldset

View File

@ -383,340 +383,324 @@
/>
</fieldset>
<fields name="params" label="JGLOBAL_FIELDSET_DISPLAY_OPTIONS">
<fields name="params">
<fieldset name="display" label="JGLOBAL_FIELDSET_DISPLAY_OPTIONS">
<field
name="show_contact_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
>
<option value="hide">JHIDE</option>
<option value="show_no_link">COM_CONTACT_FIELD_VALUE_NO_LINK</option>
<option value="show_with_link">COM_CONTACT_FIELD_VALUE_WITH_LINK</option>
</field>
<fieldset name="basic" label="JGLOBAL_FIELDSET_DISPLAY_OPTIONS">
<field
name="show_contact_list"
type="list"
label="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_contact_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
>
<option value="hide">JHIDE</option>
<option value="show_no_link">COM_CONTACT_FIELD_VALUE_NO_LINK</option>
<option value="show_with_link">COM_CONTACT_FIELD_VALUE_WITH_LINK</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTACT_FIELD_SHOW_TAGS_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_contact_list"
type="list"
label="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_info"
type="list"
label="COM_CONTACT_FIELD_SHOW_INFO_LABEL"
<field
name="show_tags"
type="list"
label="COM_CONTACT_FIELD_SHOW_TAGS_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_info"
type="list"
label="COM_CONTACT_FIELD_SHOW_INFO_LABEL"
class="custom-select-color"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_name"
type="list"
label="COM_CONTACT_FIELD_PARAMS_NAME_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_position"
type="list"
label="COM_CONTACT_FIELD_PARAMS_CONTACT_POSITION_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_email"
type="list"
label="JGLOBAL_EMAIL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="add_mailto_link"
type="list"
label="COM_CONTACT_FIELD_PARAMS_ADD_MAILTO_LINK_LABEL"
class="custom-select-color"
useglobal="true"
showon="show_info:1"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="show_street_address"
type="list"
label="COM_CONTACT_FIELD_PARAMS_STREET_ADDRESS_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_suburb"
type="list"
label="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_state"
type="list"
label="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_postcode"
type="list"
label="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_country"
type="list"
label="COM_CONTACT_FIELD_PARAMS_COUNTRY_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_telephone"
type="list"
label="COM_CONTACT_FIELD_PARAMS_TELEPHONE_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_mobile"
type="list"
label="COM_CONTACT_FIELD_PARAMS_MOBILE_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_fax"
type="list"
label="COM_CONTACT_FIELD_PARAMS_FAX_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_webpage"
type="list"
label="COM_CONTACT_FIELD_PARAMS_WEBPAGE_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_image"
type="list"
label="COM_CONTACT_FIELD_PARAMS_SHOW_IMAGE_LABEL"
class="custom-select-color"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_misc"
type="list"
label="COM_CONTACT_FIELD_PARAMS_MISC_INFO_LABEL"
class="custom-select-color"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_name"
type="list"
label="COM_CONTACT_FIELD_PARAMS_NAME_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="allow_vcard"
type="list"
label="COM_CONTACT_FIELD_PARAMS_VCARD_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_position"
type="list"
label="COM_CONTACT_FIELD_PARAMS_CONTACT_POSITION_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_articles"
type="list"
label="COM_CONTACT_FIELD_ARTICLES_SHOW_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_email"
type="list"
label="JGLOBAL_EMAIL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="articles_display_num"
type="list"
label="COM_CONTACT_FIELD_ARTICLES_DISPLAY_NUM_LABEL"
default=""
useglobal="true"
>
<option value="5">J5</option>
<option value="10">J10</option>
<option value="15">J15</option>
<option value="20">J20</option>
<option value="25">J25</option>
<option value="30">J30</option>
<option value="50">J50</option>
<option value="75">J75</option>
<option value="100">J100</option>
<option value="150">J150</option>
<option value="200">J200</option>
<option value="250">J250</option>
<option value="300">J300</option>
<option value="0">JALL</option>
</field>
<field
name="add_mailto_link"
type="list"
label="COM_CONTACT_FIELD_PARAMS_ADD_MAILTO_LINK_LABEL"
class="custom-select-color"
useglobal="true"
showon="show_info:1"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="show_profile"
type="list"
label="COM_CONTACT_FIELD_PROFILE_SHOW_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_street_address"
type="list"
label="COM_CONTACT_FIELD_PARAMS_STREET_ADDRESS_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_user_custom_fields"
type="fieldgroups"
label="COM_CONTACT_FIELD_USER_CUSTOM_FIELDS_SHOW_LABEL"
multiple="true"
context="com_users.user"
addfieldprefix="Joomla\Component\Fields\Administrator\Field"
>
<option value="-1">JALL</option>
</field>
<field
name="show_suburb"
type="list"
label="COM_CONTACT_FIELD_PARAMS_TOWN-SUBURB_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="contact_layout"
type="componentlayout"
label="JFIELD_ALT_LAYOUT_LABEL"
class="custom-select"
extension="com_contact"
view="contact"
useglobal="true"
/>
<field
name="show_state"
type="list"
label="COM_CONTACT_FIELD_PARAMS_STATE-COUNTY_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<field
name="show_postcode"
type="list"
label="COM_CONTACT_FIELD_PARAMS_POST-ZIP_CODE_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<fieldset name="link" label="JGLOBAL_FIELDSET_DISPLAY_LINK_OPTIONS">
<field
name="show_country"
type="list"
label="COM_CONTACT_FIELD_PARAMS_COUNTRY_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_links"
type="list"
label="COM_CONTACT_FIELD_SHOW_LINKS_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_telephone"
type="list"
label="COM_CONTACT_FIELD_PARAMS_TELEPHONE_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="linka_name"
type="text"
label="COM_CONTACT_FIELD_LINKA_NAME_LABEL"
size="30"
/>
<field
name="show_mobile"
type="list"
label="COM_CONTACT_FIELD_PARAMS_MOBILE_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_fax"
type="list"
label="COM_CONTACT_FIELD_PARAMS_FAX_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_webpage"
type="list"
label="COM_CONTACT_FIELD_PARAMS_WEBPAGE_LABEL"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_image"
type="list"
label="COM_CONTACT_FIELD_PARAMS_SHOW_IMAGE_LABEL"
class="custom-select-color"
useglobal="true"
showon="show_info:1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_misc"
type="list"
label="COM_CONTACT_FIELD_PARAMS_MISC_INFO_LABEL"
class="custom-select-color"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="allow_vcard"
type="list"
label="COM_CONTACT_FIELD_PARAMS_VCARD_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_articles"
type="list"
label="COM_CONTACT_FIELD_ARTICLES_SHOW_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="articles_display_num"
type="list"
label="COM_CONTACT_FIELD_ARTICLES_DISPLAY_NUM_LABEL"
default=""
useglobal="true"
>
<option value="5">J5</option>
<option value="10">J10</option>
<option value="15">J15</option>
<option value="20">J20</option>
<option value="25">J25</option>
<option value="30">J30</option>
<option value="50">J50</option>
<option value="75">J75</option>
<option value="100">J100</option>
<option value="150">J150</option>
<option value="200">J200</option>
<option value="250">J250</option>
<option value="300">J300</option>
<option value="0">JALL</option>
</field>
<field
name="show_profile"
type="list"
label="COM_CONTACT_FIELD_PROFILE_SHOW_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_user_custom_fields"
type="fieldgroups"
label="COM_CONTACT_FIELD_USER_CUSTOM_FIELDS_SHOW_LABEL"
multiple="true"
context="com_users.user"
addfieldprefix="Joomla\Component\Fields\Administrator\Field"
>
<option value="-1">JALL</option>
</field>
<field
name="show_links"
type="list"
label="COM_CONTACT_FIELD_SHOW_LINKS_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="linka_name"
type="text"
label="COM_CONTACT_FIELD_LINKA_NAME_LABEL"
size="30"
/>
<field
name="linka"
type="url"
label="COM_CONTACT_FIELD_LINKA_LABEL"
size="30"
filter="url"
validate="url"
/>
<field
name="linkb_name"
type="text"
label="COM_CONTACT_FIELD_LINKB_NAME_LABEL"
size="30"
/>
<field
name="linkb"
type="url"
label="COM_CONTACT_FIELD_LINKB_LABEL"
size="30"
filter="url"
validate="url"
/>
<field
name="linkc_name"
type="text"
label="COM_CONTACT_FIELD_LINKC_NAME_LABEL"
size="30"
/>
<field
name="linkc"
type="url"
label="COM_CONTACT_FIELD_LINKC_LABEL"
size="30"
filter="url"
validate="url"
/>
<field
name="linka"
type="url"
label="COM_CONTACT_FIELD_LINKA_LABEL"
size="30"
filter="url"
validate="url"
/>
<field
name="linkd_name"
@ -725,90 +709,115 @@
size="30"
/>
<field
name="linkd"
type="url"
label="COM_CONTACT_FIELD_LINKD_LABEL"
size="30"
filter="url"
validate="url"
/>
<field
name="linkb"
type="url"
label="COM_CONTACT_FIELD_LINKB_LABEL"
size="30"
filter="url"
validate="url"
/>
<field
name="linke_name"
type="text"
label="COM_CONTACT_FIELD_LINKE_NAME_LABEL"
size="30"
/>
<field
name="linkc_name"
type="text"
label="COM_CONTACT_FIELD_LINKC_NAME_LABEL"
size="30"
/>
<field
name="linke"
type="url"
label="COM_CONTACT_FIELD_LINKE_LABEL"
size="30"
filter="url"
validate="url"
/>
<field
name="linkc"
type="url"
label="COM_CONTACT_FIELD_LINKC_LABEL"
size="30"
filter="url"
validate="url"
/>
<field
name="contact_layout"
type="componentlayout"
label="JFIELD_ALT_LAYOUT_LABEL"
class="custom-select"
extension="com_contact"
view="contact"
useglobal="true"
/>
<field
name="linkd_name"
type="text"
label="COM_CONTACT_FIELD_LINKD_NAME_LABEL"
size="30"
/>
<field
name="linkd"
type="url"
label="COM_CONTACT_FIELD_LINKD_LABEL"
size="30"
filter="url"
validate="url"
/>
<field
name="linke_name"
type="text"
label="COM_CONTACT_FIELD_LINKE_NAME_LABEL"
size="30"
/>
<field
name="linke"
type="url"
label="COM_CONTACT_FIELD_LINKE_LABEL"
size="30"
filter="url"
validate="url"
/>
</fieldset>
</fieldset>
<fieldset name="email" label="COM_CONTACT_FIELDSET_CONTACT_LABEL">
<fieldset name="form" label="COM_CONTACT_FIELDSET_FORM_LABEL">
<field
name="show_email_form"
type="list"
label="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_email_form"
type="list"
label="COM_CONTACT_FIELD_EMAIL_SHOW_FORM_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_email_copy"
type="list"
label="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_email_copy"
type="list"
label="COM_CONTACT_FIELD_EMAIL_EMAIL_COPY_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="validate_session"
type="list"
label="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="validate_session"
type="list"
label="COM_CONTACT_FIELD_CONFIG_SESSION_CHECK_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="custom_reply"
type="list"
label="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="custom_reply"
type="list"
label="COM_CONTACT_FIELD_CONFIG_CUSTOM_REPLY_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="redirect"
type="text"
label="COM_CONTACT_FIELD_CONFIG_REDIRECT_LABEL"
size="30"
/>
<field
name="redirect"
type="text"
label="COM_CONTACT_FIELD_CONFIG_REDIRECT_LABEL"
size="30"
/>
</fieldset>
</fieldset>
</fields>

View File

@ -54,11 +54,12 @@
name="tag"
type="tag"
label="JOPTION_SELECT_TAG"
multiple="true"
mode="nested"
custom="false"
hint="JOPTION_SELECT_TAG"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_TAG</option>
</field>
/>
<field
name="level"

View File

@ -25,9 +25,10 @@ $app = Factory::getApplication();
$input = $app->input;
$assoc = Associations::isEnabled();
$hasAssoc = ($this->form->getValue('language', null, '*') !== '*');
// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('details', 'item_associations', 'jmetadata');
$this->ignore_fieldsets = ['details', 'item_associations', 'jmetadata'];
$this->useCoreUI = true;
// In case of modal
@ -45,32 +46,36 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'details', empty($this->item->id) ? Text::_('COM_CONTACT_NEW_CONTACT') : Text::_('COM_CONTACT_EDIT_CONTACT')); ?>
<div class="row">
<div class="col-md-9">
<div class="row">
<div class="col-md-6">
<?php echo $this->form->renderField('user_id'); ?>
<?php echo $this->form->renderField('image'); ?>
<?php echo $this->form->renderField('con_position'); ?>
<?php echo $this->form->renderField('email_to'); ?>
<?php echo $this->form->renderField('address'); ?>
<?php echo $this->form->renderField('suburb'); ?>
<?php echo $this->form->renderField('state'); ?>
<?php echo $this->form->renderField('postcode'); ?>
<?php echo $this->form->renderField('country'); ?>
</div>
<div class="col-md-6">
<?php echo $this->form->renderField('telephone'); ?>
<?php echo $this->form->renderField('mobile'); ?>
<?php echo $this->form->renderField('fax'); ?>
<?php echo $this->form->renderField('webpage'); ?>
<?php echo $this->form->renderField('sortname1'); ?>
<?php echo $this->form->renderField('sortname2'); ?>
<?php echo $this->form->renderField('sortname3'); ?>
<div class="col-lg-9">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-6">
<?php echo $this->form->renderField('user_id'); ?>
<?php echo $this->form->renderField('image'); ?>
<?php echo $this->form->renderField('con_position'); ?>
<?php echo $this->form->renderField('email_to'); ?>
<?php echo $this->form->renderField('address'); ?>
<?php echo $this->form->renderField('suburb'); ?>
<?php echo $this->form->renderField('state'); ?>
<?php echo $this->form->renderField('postcode'); ?>
<?php echo $this->form->renderField('country'); ?>
</div>
<div class="col-md-6">
<?php echo $this->form->renderField('telephone'); ?>
<?php echo $this->form->renderField('mobile'); ?>
<?php echo $this->form->renderField('fax'); ?>
<?php echo $this->form->renderField('webpage'); ?>
<?php echo $this->form->renderField('sortname1'); ?>
<?php echo $this->form->renderField('sortname2'); ?>
<?php echo $this->form->renderField('sortname3'); ?>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card card-light">
<div class="col-lg-3">
<div class="card">
<div class="card-body">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
</div>
@ -82,8 +87,12 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'misc', Text::_('JGLOBAL_FIELDSET_MISCELLANEOUS')); ?>
<div class="row">
<div class="col-md-12">
<?php echo $this->form->getLabel('misc'); ?>
<?php echo $this->form->getInput('misc'); ?>
<fieldset id="fieldset-misc" class="options-grid-form options-grid-form-full">
<legend><?php echo $this->form->getField('misc')->title; ?></legend>
<div>
<?php echo $this->form->getInput('misc'); ?>
</div>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
@ -93,17 +102,34 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_PUBLISHING')); ?>
<div class="row">
<div class="col-md-6">
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
<fieldset id="fieldset-publishingdata" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
</fieldset>
</div>
<div class="col-md-6">
<?php echo LayoutHelper::render('joomla.edit.metadata', $this); ?>
<fieldset id="fieldset-metadata" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.metadata', $this); ?>
</div>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php if ( ! $isModal && $assoc) : ?>
<?php if (!$isModal && $assoc) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'associations', Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
<?php echo LayoutHelper::render('joomla.edit.associations', $this); ?>
<?php if ($hasAssoc) : ?>
<fieldset id="fieldset-associations" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.associations', $this); ?>>
</div>
</fieldset>
<?php endif; ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php elseif ($isModal && $assoc) : ?>
<div class="hidden"><?php echo LayoutHelper::render('joomla.edit.associations', $this); ?></div>

View File

@ -51,12 +51,12 @@ if ($saveOrder && !empty($this->items))
</caption>
<thead>
<tr>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<td style="width:1%" class="text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th scope="col" style="width:1%" class="text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JFEATURED', 'a.featured', $listDirn, $listOrder); ?>
</th>
@ -100,6 +100,9 @@ if ($saveOrder && !empty($this->items))
$item->cat_link = Route::_('index.php?option=com_categories&extension=com_contact&task=edit&type=other&id=' . $item->catid);
?>
<tr class="row<?php echo $i % 2; ?>" data-dragable-group="<?php echo $item->catid; ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="order text-center d-none d-md-table-cell">
<?php
$iconClass = '';
@ -113,16 +116,13 @@ if ($saveOrder && !empty($this->items))
}
?>
<span class="sortable-handler<?php echo $iconClass; ?>">
<span class="icon-menu" aria-hidden="true"></span>
<span class="fa fa-ellipsis-v" aria-hidden="true"></span>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5"
value="<?php echo $item->ordering; ?>" class="width-20 text-area-order">
<?php endif; ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('contactadministrator.featured', $item->featured, $i, $canChange); ?>
</td>
@ -136,9 +136,8 @@ if ($saveOrder && !empty($this->items))
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'contacts.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit || $canEditOwn) : ?>
<?php $editIcon = $item->checked_out ? '' : '<span class="fa fa-pen-square mr-2" aria-hidden="true"></span>'; ?>
<a href="<?php echo Route::_('index.php?option=com_contact&task=contact.edit&id=' . (int) $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes($item->name)); ?>">
<?php echo $editIcon; ?><?php echo $this->escape($item->name); ?></a>
<?php echo $this->escape($item->name); ?></a>
<?php else : ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>

View File

@ -15,6 +15,7 @@ use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
use Joomla\Input\Input;
use Joomla\Utilities\ArrayHelper;
@ -134,4 +135,28 @@ class ArticlesController extends AdminController
{
return parent::getModel($name, $prefix, $config);
}
/**
* Method to get the number of published articles for quickicons
*
* @return string The JSON-encoded amount of published articles
*
* @since 4.0
*/
public function getQuickiconContent()
{
$model = $this->getModel('articles');
$model->setState('filter.published', 1);
$amount = (int) $model->getTotal();
$result = [];
$result['amount'] = $amount;
$result['sronly'] = Text::plural('COM_CONTENT_N_QUICKICON_SRONLY', $amount);
$result['name'] = Text::plural('COM_CONTENT_N_QUICKICON', $amount);
echo new JsonResponse($result);
}
}

View File

@ -37,7 +37,7 @@ class HtmlView extends BaseHtmlView
/**
* The \JForm object
*
* @var \JForm
* @var \Joomla\CMS\Form\Form
*/
protected $form;

View File

@ -192,8 +192,8 @@ class HtmlView extends BaseHtmlView
$dropdown = $toolbar->dropdownButton('status-group')
->text('JTOOLBAR_CHANGE_STATUS')
->toggleSplit(false)
->icon('fa fa-globe')
->buttonClass('btn btn-info')
->icon('fa fa-ellipsis-h')
->buttonClass('btn btn-action')
->listCheck(true);
$childBar = $dropdown->getChildToolbar();
@ -232,17 +232,17 @@ class HtmlView extends BaseHtmlView
{
$childBar->trash('articles.trash')->listCheck(true);
}
}
// Add a batch button
if ($user->authorise('core.create', 'com_content')
&& $user->authorise('core.edit', 'com_content')
&& $user->authorise('core.execute.transition', 'com_content'))
{
$toolbar->popupButton('batch')
->text('JTOOLBAR_BATCH')
->selector('collapseModal')
->listCheck(true);
// Add a batch button
if ($user->authorise('core.create', 'com_content')
&& $user->authorise('core.edit', 'com_content')
&& $user->authorise('core.execute.transition', 'com_content'))
{
$childBar->popupButton('batch')
->text('JTOOLBAR_BATCH')
->selector('collapseModal')
->listCheck(true);
}
}
if ($this->state->get('filter.condition') == ContentComponent::CONDITION_TRASHED && $canDo->get('core.delete'))

View File

@ -171,8 +171,8 @@ class HtmlView extends BaseHtmlView
$dropdown = $toolbar->dropdownButton('status-group')
->text('JTOOLBAR_CHANGE_STATUS')
->toggleSplit(false)
->icon('fa fa-globe')
->buttonClass('btn btn-info')
->icon('fa fa-ellipsis-h')
->buttonClass('btn btn-action')
->listCheck(true);
$childBar = $dropdown->getChildToolbar();

View File

@ -4,7 +4,7 @@
name="articles"
label="JGLOBAL_ARTICLES"
description="COM_CONTENT_CONFIG_ARTICLE_SETTINGS_DESC"
>
>
<field
name="article_layout"
@ -331,7 +331,7 @@
name="editinglayout"
label="COM_CONTENT_EDITING_LAYOUT"
description="COM_CONTENT_CONFIG_EDITOR_LAYOUT"
>
>
<field
name="captcha"
@ -492,7 +492,7 @@
name="category"
label="JCATEGORY"
description="COM_CONTENT_CONFIG_CATEGORY_SETTINGS_DESC"
>
>
<field
name="category_layout"
@ -624,7 +624,7 @@
name="categories"
label="JCATEGORIES"
description="COM_CONTENT_CONFIG_CATEGORIES_SETTINGS_DESC"
>
>
<field
name="show_base_description"
type="radio"
@ -692,7 +692,7 @@
name="blog_default_parameters"
label="COM_CONTENT_CONFIG_BLOG_SETTINGS_LABEL"
description="COM_CONTENT_CONFIG_BLOG_SETTINGS_DESC"
>
>
<field
name="num_leading_articles"
@ -742,7 +742,7 @@
label="JGLOBAL_LIST_LAYOUT_OPTIONS"
description="COM_CONTENT_CONFIG_LIST_SETTINGS_DESC"
addfieldprefix="Joomla\Component\Content\Administrator\Field"
>
>
<field
name="show_pagination_limit"
@ -850,7 +850,7 @@
name="shared"
label="COM_CONTENT_SHARED_LABEL"
description="COM_CONTENT_SHARED_DESC"
>
>
<field
name="orderby_pri"
@ -938,93 +938,94 @@
name="integration"
label="JGLOBAL_INTEGRATION_LABEL"
description="COM_CONTENT_CONFIG_INTEGRATION_SETTINGS_DESC"
>
<field
name="integration_newsfeeds"
type="note"
label="JGLOBAL_FEED_TITLE"
/>
<field
name="show_feed_link"
type="radio"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
class="switcher"
default="1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="feed_summary"
type="list"
label="JGLOBAL_FEED_SUMMARY_LABEL"
default="0"
showon="show_feed_link:1"
>
<option value="0">JGLOBAL_INTRO_TEXT</option>
<option value="1">JGLOBAL_FULL_TEXT</option>
</field>
<field
name="feed_show_readmore"
type="radio"
label="JGLOBAL_FEED_SHOW_READMORE_LABEL"
description="JGLOBAL_FEED_SHOW_READMORE_DESC"
class="switcher"
default="0"
showon="show_feed_link:1[AND]feed_summary:0"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="integration_sef"
type="note"
label="JGLOBAL_SEF_TITLE"
/>
<field
name="sef_ids"
type="radio"
class="switcher"
default="0"
label="JGLOBAL_SEF_NOIDS_LABEL"
filter="integer"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<fieldset
name="integration_newsfeed"
label="JGLOBAL_FEED_TITLE"
>
<field
<field
name="show_feed_link"
type="radio"
label="JGLOBAL_SHOW_FEED_LINK_LABEL"
class="switcher"
default="1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="feed_summary"
type="list"
label="JGLOBAL_FEED_SUMMARY_LABEL"
default="0"
showon="show_feed_link:1"
>
<option value="0">JGLOBAL_INTRO_TEXT</option>
<option value="1">JGLOBAL_FULL_TEXT</option>
</field>
<field
name="feed_show_readmore"
type="radio"
label="JGLOBAL_FEED_SHOW_READMORE_LABEL"
description="JGLOBAL_FEED_SHOW_READMORE_DESC"
class="switcher"
default="0"
showon="show_feed_link:1[AND]feed_summary:0"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<fieldset
name="integration_sef"
label="JGLOBAL_SEF_TITLE"
>
<field
name="sef_ids"
type="radio"
class="switcher"
default="0"
label="JGLOBAL_SEF_NOIDS_LABEL"
filter="integer"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
<fieldset
name="integration_customfields"
type="note"
label="JGLOBAL_FIELDS_TITLE"
/>
<field
name="custom_fields_enable"
type="radio"
label="JGLOBAL_CUSTOM_FIELDS_ENABLE_LABEL"
class="switcher"
default="1"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="workflows_enable"
type="radio"
label="JGLOBAL_WORKFLOWS_ENABLE_LABEL"
class="switcher"
default="1"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="custom_fields_enable"
type="radio"
label="JGLOBAL_CUSTOM_FIELDS_ENABLE_LABEL"
class="switcher"
default="1"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="workflows_enable"
type="radio"
label="JGLOBAL_WORKFLOWS_ENABLE_LABEL"
class="switcher"
default="1"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
</fieldset>
@ -1032,7 +1033,7 @@
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"
>
>
<field
name="rules"
type="rules"

View File

@ -21,7 +21,8 @@
type="text"
label="JGLOBAL_TITLE"
size="40"
required="true" />
required="true"
/>
<field
name="alias"
@ -68,10 +69,9 @@
<field
name="transition"
type="transition"
extension="com_content"
label="COM_CONTENT_TRANSITION"
>
</field>
extension="com_content"
/>
<field
name="tags"
@ -239,252 +239,259 @@
</fieldset>
<fields name="attribs" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">
<fieldset name="basic" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">
<fieldset name="attribs" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL">
<fieldset name="basic" label="JFIELD_ALT_LAYOUT_LABEL">
<field
name="article_layout"
type="componentlayout"
label="JFIELD_ALT_LAYOUT_LABEL"
class="custom-select"
useglobal="true"
extension="com_content"
view="article"
/>
<field
name="article_layout"
type="componentlayout"
label="JFIELD_ALT_LAYOUT_LABEL"
class="custom-select"
useglobal="true"
extension="com_content"
view="article"
/>
<field
name="show_title"
type="list"
label="JGLOBAL_SHOW_TITLE_LABEL"
useglobal="true"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="show_title"
type="list"
label="JGLOBAL_SHOW_TITLE_LABEL"
useglobal="true"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="link_titles"
type="list"
label="JGLOBAL_LINKED_TITLES_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="link_titles"
type="list"
label="JGLOBAL_LINKED_TITLES_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
class="custom-select-color"
useglobal="true"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="show_tags"
type="list"
label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL"
class="custom-select-color"
useglobal="true"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="show_intro"
type="list"
label="JGLOBAL_SHOW_INTRO_LABEL"
class="custom-select-color"
useglobal="true"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="show_intro"
type="list"
label="JGLOBAL_SHOW_INTRO_LABEL"
class="custom-select-color"
useglobal="true"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="info_block_position"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
useglobal="true"
>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
</field>
<field
name="info_block_position"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL"
useglobal="true"
>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option>
</field>
<field
name="info_block_show_title"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="info_block_show_title"
type="list"
label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<field
name="show_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<fieldset name="category" label="JCATEGORY">
<field
name="show_category"
type="list"
label="JGLOBAL_SHOW_CATEGORY_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_category"
type="list"
label="JGLOBAL_LINK_CATEGORY_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="link_category"
type="list"
label="JGLOBAL_LINK_CATEGORY_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_parent_category"
type="list"
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_parent_category"
type="list"
label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_parent_category"
type="list"
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="link_parent_category"
type="list"
label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_associations"
type="assoc"
label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
useglobal="true"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="show_associations"
type="assoc"
label="JGLOBAL_SHOW_ASSOCIATIONS_LABEL"
useglobal="true"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
</fieldset>
<field
name="show_author"
type="list"
label="JGLOBAL_SHOW_AUTHOR_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<fieldset name="author" label="JGLOBAL_SHOW_AUTHOR_LABEL">
<field
name="show_author"
type="list"
label="JGLOBAL_SHOW_AUTHOR_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="link_author"
type="list"
label="JGLOBAL_LINK_AUTHOR_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="link_author"
type="list"
label="JGLOBAL_LINK_AUTHOR_LABEL"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
<field
name="show_create_date"
type="list"
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<fieldset name="date" label="JDATE">
<field
name="show_create_date"
type="list"
label="JGLOBAL_SHOW_CREATE_DATE_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_modify_date"
type="list"
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_modify_date"
type="list"
label="JGLOBAL_SHOW_MODIFY_DATE_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_publish_date"
type="list"
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_publish_date"
type="list"
label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
</fieldset>
<field
name="show_item_navigation"
type="list"
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<fieldset name="other" label="COM_CONTENT_OTHER_OPTIONS">
<field
name="show_item_navigation"
type="list"
label="JGLOBAL_SHOW_NAVIGATION_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_vote"
type="list"
label="JGLOBAL_SHOW_VOTE_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_vote"
type="list"
label="JGLOBAL_SHOW_VOTE_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_hits"
type="list"
label="JGLOBAL_SHOW_HITS_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_hits"
type="list"
label="JGLOBAL_SHOW_HITS_LABEL"
useglobal="true"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_noauth"
type="list"
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="show_noauth"
type="list"
label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL"
description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"
useglobal="true"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="urls_position"
type="list"
label="COM_CONTENT_FIELD_URLSPOSITION_LABEL"
useglobal="true"
>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
</field>
<field
name="urls_position"
type="list"
label="COM_CONTENT_FIELD_URLSPOSITION_LABEL"
useglobal="true"
>
<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option>
<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option>
</field>
</fieldset>
<field
name="spacer2"
type="spacer"
hr="true"
/>
<fieldset name="global" label="COM_CONTENT_GLOBAL_OPTIONS">
<field
name="alternative_readmore"
type="text"
label="JFIELD_READMORE_LABEL"
description="JFIELD_READMORE_DESC"
size="25"
/>
<field
name="alternative_readmore"
type="text"
label="JFIELD_READMORE_LABEL"
description="JFIELD_READMORE_DESC"
size="25"
/>
<field
name="article_page_title"
type="text"
label="COM_CONTENT_FIELD_BROWSER_PAGE_TITLE_LABEL"
size="25"
/>
</fieldset>
<field
name="article_page_title"
type="text"
label="COM_CONTENT_FIELD_BROWSER_PAGE_TITLE_LABEL"
size="25"
/>
</fieldset>
<fieldset name="editorConfig" label="COM_CONTENT_EDITORCONFIG_FIELDSET_LABEL">
@ -650,182 +657,175 @@
</fields>
<fields name="images" label="COM_CONTENT_FIELD_IMAGE_OPTIONS">
<field
name="image_intro"
type="media"
label="COM_CONTENT_FIELD_INTRO_LABEL"
/>
<fieldset name="image-intro" label="COM_CONTENT_FIELD_INTRO_LABEL">
<field
name="image_intro"
type="media"
label="COM_CONTENT_FIELD_INTRO_LABEL"
/>
<field
name="float_intro"
type="list"
label="COM_CONTENT_FLOAT_LABEL"
useglobal="true"
>
<option value="right">COM_CONTENT_RIGHT</option>
<option value="left">COM_CONTENT_LEFT</option>
<option value="none">COM_CONTENT_NONE</option>
</field>
<field
name="float_intro"
type="list"
label="COM_CONTENT_FLOAT_LABEL"
useglobal="true"
>
<option value="right">COM_CONTENT_RIGHT</option>
<option value="left">COM_CONTENT_LEFT</option>
<option value="none">COM_CONTENT_NONE</option>
</field>
<field
name="image_intro_alt"
type="text"
label="COM_CONTENT_FIELD_IMAGE_ALT_LABEL"
size="20"
/>
<field
name="image_intro_alt"
type="text"
label="COM_CONTENT_FIELD_IMAGE_ALT_LABEL"
size="20"
/>
<field
name="image_intro_caption"
type="text"
label="COM_CONTENT_FIELD_IMAGE_CAPTION_LABEL"
size="20"
/>
<field
name="image_intro_caption"
type="text"
label="COM_CONTENT_FIELD_IMAGE_CAPTION_LABEL"
size="20"
/>
<field
name="spacer1"
type="spacer"
hr="true"
/>
</fieldset>
<field
name="image_fulltext"
type="media"
label="COM_CONTENT_FIELD_FULL_LABEL"
/>
<fieldset name="image-full" label="COM_CONTENT_FIELD_FULL_LABEL">
<field
name="image_fulltext"
type="media"
label="COM_CONTENT_FIELD_FULL_LABEL"
/>
<field
name="float_fulltext"
type="list"
label="COM_CONTENT_FLOAT_LABEL"
useglobal="true"
>
<option value="right">COM_CONTENT_RIGHT</option>
<option value="left">COM_CONTENT_LEFT</option>
<option value="none">COM_CONTENT_NONE</option>
</field>
<field
name="float_fulltext"
type="list"
label="COM_CONTENT_FLOAT_LABEL"
useglobal="true"
>
<option value="right">COM_CONTENT_RIGHT</option>
<option value="left">COM_CONTENT_LEFT</option>
<option value="none">COM_CONTENT_NONE</option>
</field>
<field
name="image_fulltext_alt"
type="text"
label="COM_CONTENT_FIELD_IMAGE_ALT_LABEL"
size="20"
/>
<field
name="image_fulltext_alt"
type="text"
label="COM_CONTENT_FIELD_IMAGE_ALT_LABEL"
size="20"
/>
<field
name="image_fulltext_caption"
type="text"
label="COM_CONTENT_FIELD_IMAGE_CAPTION_LABEL"
size="20"
/>
<field
name="image_fulltext_caption"
type="text"
label="COM_CONTENT_FIELD_IMAGE_CAPTION_LABEL"
size="20"
/>
</fieldset>
</fields>
<fields name="urls" label="COM_CONTENT_FIELD_URLS_OPTIONS">
<field
name="urla"
type="url"
label="COM_CONTENT_FIELD_URLA_LABEL"
validate="url"
filter="url"
relative="true"
/>
<fieldset name="linka" label="COM_CONTENT_FIELD_URLA_LABEL">
<field
name="urla"
type="url"
label="COM_CONTENT_FIELD_URLA_LABEL"
validate="url"
filter="url"
relative="true"
/>
<field
name="urlatext"
type="text"
label="COM_CONTENT_FIELD_URLA_LINK_TEXT_LABEL"
size="20"
/>
<field
name="urlatext"
type="text"
label="COM_CONTENT_FIELD_URLA_LINK_TEXT_LABEL"
size="20"
/>
<field
name="targeta"
type="list"
label="COM_CONTENT_URL_FIELD_BROWSERNAV_LABEL"
default=""
filter="options"
useglobal="true"
>
<option value="0">JBROWSERTARGET_PARENT</option>
<option value="1">JBROWSERTARGET_NEW</option>
<option value="2">JBROWSERTARGET_POPUP</option>
<option value="3">JBROWSERTARGET_MODAL</option>
</field>
<field
name="targeta"
type="list"
label="COM_CONTENT_URL_FIELD_BROWSERNAV_LABEL"
default=""
filter="options"
useglobal="true"
>
<option value="0">JBROWSERTARGET_PARENT</option>
<option value="1">JBROWSERTARGET_NEW</option>
<option value="2">JBROWSERTARGET_POPUP</option>
<option value="3">JBROWSERTARGET_MODAL</option>
</field>
</fieldset>
<field
name="spacer3"
type="spacer"
hr="true"
/>
<fieldset name="linkb" label="COM_CONTENT_FIELD_URLB_LABEL">
<field
name="urlb"
type="url"
label="COM_CONTENT_FIELD_URLB_LABEL"
validate="url"
filter="url"
relative="true"
/>
<field
name="urlb"
type="url"
label="COM_CONTENT_FIELD_URLB_LABEL"
validate="url"
filter="url"
relative="true"
/>
<field
name="urlbtext"
type="text"
label="COM_CONTENT_FIELD_URLB_LINK_TEXT_LABEL"
size="20"
/>
<field
name="urlbtext"
type="text"
label="COM_CONTENT_FIELD_URLB_LINK_TEXT_LABEL"
size="20"
/>
<field
name="targetb"
type="list"
label="COM_CONTENT_URL_FIELD_BROWSERNAV_LABEL"
default=""
filter="options"
useglobal="true"
>
<option value="0">JBROWSERTARGET_PARENT</option>
<option value="1">JBROWSERTARGET_NEW</option>
<option value="2">JBROWSERTARGET_POPUP</option>
<option value="3">JBROWSERTARGET_MODAL</option>
</field>
</fieldset>
<field
name="targetb"
type="list"
label="COM_CONTENT_URL_FIELD_BROWSERNAV_LABEL"
default=""
filter="options"
useglobal="true"
>
<option value="0">JBROWSERTARGET_PARENT</option>
<option value="1">JBROWSERTARGET_NEW</option>
<option value="2">JBROWSERTARGET_POPUP</option>
<option value="3">JBROWSERTARGET_MODAL</option>
</field>
<fieldset name="linkc" label="COM_CONTENT_FIELD_URLC_LABEL">
<field
name="urlc"
type="url"
label="COM_CONTENT_FIELD_URLC_LABEL"
validate="url"
filter="url"
relative="true"
/>
<field
name="spacer4"
type="spacer"
hr="true"
/>
<field
name="urlc"
type="url"
label="COM_CONTENT_FIELD_URLC_LABEL"
validate="url"
filter="url"
relative="true"
/>
<field
name="urlctext"
type="text"
label="COM_CONTENT_FIELD_URLC_LINK_TEXT_LABEL"
size="20"
/>
<field
name="targetc"
type="list"
label="COM_CONTENT_URL_FIELD_BROWSERNAV_LABEL"
default=""
filter="options"
useglobal="true"
>
<option value="0">JBROWSERTARGET_PARENT</option>
<option value="1">JBROWSERTARGET_NEW</option>
<option value="2">JBROWSERTARGET_POPUP</option>
<option value="3">JBROWSERTARGET_MODAL</option>
</field>
<field
name="urlctext"
type="text"
label="COM_CONTENT_FIELD_URLC_LINK_TEXT_LABEL"
size="20"
/>
<field
name="targetc"
type="list"
label="COM_CONTENT_URL_FIELD_BROWSERNAV_LABEL"
default=""
filter="options"
useglobal="true"
>
<option value="0">JBROWSERTARGET_PARENT</option>
<option value="1">JBROWSERTARGET_NEW</option>
<option value="2">JBROWSERTARGET_POPUP</option>
<option value="3">JBROWSERTARGET_MODAL</option>
</field>
</fieldset>
</fields>
<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="jmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<field
name="robots"

View File

@ -86,6 +86,7 @@
name="tag"
type="tag"
multiple="true"
label="JOPTION_SELECT_TAG"
hint="JOPTION_SELECT_TAG"
mode="nested"
custom="false"

View File

@ -76,7 +76,7 @@
<field
name="tag"
type="tag"
labl="JOPTION_SELECT_TAG"
label="JOPTION_SELECT_TAG"
multiple="true"
mode="nested"
custom="false"

View File

@ -7,6 +7,8 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/** @var \Joomla\Component\Content\Administrator\View\Article\HtmlView $this */
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
@ -24,7 +26,9 @@ HTMLHelper::_('script', 'com_contenthistory/admin-history-versions.js', ['versio
$this->configFieldsets = array('editorConfig');
$this->hiddenFieldsets = array('basic-limited');
$this->ignore_fieldsets = array('jmetadata', 'item_associations');
$fieldsetsInImages = ['image-intro', 'image-full'];
$fieldsetsInLinks = ['linka', 'linkb', 'linkc'];
$this->ignore_fieldsets = array_merge(array('jmetadata', 'item_associations'), $fieldsetsInImages, $fieldsetsInLinks);
$this->useCoreUI = true;
// Create shortcut to parameters.
@ -35,6 +39,7 @@ $app = Factory::getApplication();
$input = $app->input;
$assoc = Associations::isEnabled();
$hasAssoc = ($this->form->getValue('language', null, '*') !== '*');
// In case of modal
$isModal = $input->get('layout') == 'modal' ? true : false;
@ -51,19 +56,21 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'general', Text::_('COM_CONTENT_ARTICLE_CONTENT')); ?>
<div class="row">
<div class="col-md-9">
<fieldset class="adminform">
<?php echo $this->form->getLabel('articletext'); ?>
<?php echo $this->form->getInput('articletext'); ?>
</fieldset>
</div>
<div class="col-md-3">
<div class="card card-light">
<div class="col-lg-9">
<div class="card">
<div class="card-body">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
<fieldset class="adminform">
<?php echo $this->form->getLabel('articletext'); ?>
<?php echo $this->form->getInput('articletext'); ?>
</fieldset>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="bg-white px-3">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
@ -72,15 +79,25 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
<?php if ($params->get('show_urls_images_backend') == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'images', Text::_('COM_CONTENT_FIELDSET_URLS_AND_IMAGES')); ?>
<div class="row">
<div class="col-md-6">
<?php foreach ($this->form->getGroup('images') as $field) : ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
<div class="col-12 col-lg-6">
<?php foreach ($fieldsetsInImages as $fieldset) : ?>
<fieldset id="fieldset-<?php echo $fieldset; ?>" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_($this->form->getFieldsets()[$fieldset]->label); ?></legend>
<div>
<?php echo $this->form->renderFieldset($fieldset); ?>
</div>
</fieldset>
<?php endforeach; ?>
</div>
<div class="col-md-6">
<?php foreach ($this->form->getGroup('urls') as $field) : ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
<div class="col-12 col-lg-6">
<?php foreach ($fieldsetsInLinks as $fieldset) : ?>
<fieldset id="fieldset-<?php echo $fieldset; ?>" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_($this->form->getFieldsets()[$fieldset]->label); ?></legend>
<div>
<?php echo $this->form->renderFieldset($fieldset); ?>
</div>
</fieldset>
<?php endforeach; ?>
</div>
</div>
@ -94,19 +111,36 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
<?php if ($params->get('show_publishing_options', 1) == 1) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('COM_CONTENT_FIELDSET_PUBLISHING')); ?>
<div class="row">
<div class="col-md-6">
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
<div class="col-12 col-lg-6">
<fieldset id="fieldset-publishingdata" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
</fieldset>
</div>
<div class="col-md-6">
<?php echo LayoutHelper::render('joomla.edit.metadata', $this); ?>
<div class="col-12 col-lg-6">
<fieldset id="fieldset-metadata" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.metadata', $this); ?>
</div>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php if ( ! $isModal && $assoc) : ?>
<?php if (!$isModal && $assoc) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'associations', Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS')); ?>
<?php echo LayoutHelper::render('joomla.edit.associations', $this); ?>
<?php if ($hasAssoc) : ?>
<fieldset id="fieldset-associations" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_ASSOCIATIONS'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.associations', $this); ?>
</div>
</fieldset>
<?php endif; ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php elseif ($isModal && $assoc) : ?>
<div class="hidden"><?php echo LayoutHelper::render('joomla.edit.associations', $this); ?></div>
@ -114,13 +148,23 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=c
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'editor', Text::_('COM_CONTENT_SLIDER_EDITOR_CONFIG')); ?>
<?php echo $this->form->renderFieldset('editorConfig'); ?>
<fieldset id="fieldset-editor" class="form-no-margin options-grid-form">
<legend><?php echo Text::_('COM_CONTENT_SLIDER_EDITOR_CONFIG'); ?></legend>
<div>
<?php echo $this->form->renderFieldset('editorConfig'); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'permissions', Text::_('COM_CONTENT_FIELDSET_RULES')); ?>
<fieldset id="fieldset-rules" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('COM_CONTENT_FIELDSET_RULES'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>

View File

@ -108,13 +108,13 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
</caption>
<thead>
<tr>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<td style="width:1%" class="text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" style="width:1%" class="text-center">
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JFEATURED', 'a.featured', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:1%" class="text-center">
@ -142,7 +142,7 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
<th scope="col" style="width:10%" class="d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_CONTENT_HEADING_DATE_' . strtoupper($orderingColumn), 'a.' . $orderingColumn, $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:3%" class="d-none d-md-table-cell text-center">
<th scope="col" style="width:3%" class="d-none d-lg-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
</th>
<?php if ($this->vote) : ?>
@ -153,7 +153,7 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_RATINGS', 'rating', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" style="width:3%" class="d-none d-md-table-cell">
<th scope="col" style="width:3%" class="d-none d-lg-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
@ -205,6 +205,9 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
data-workflow_id="<?php echo (int) $item->workflow_id; ?>"
data-stage_id="<?php echo (int) $item->stage_id; ?>"
>
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->title); ?>
</td>
<td class="order text-center d-none d-md-table-cell">
<?php
$iconClass = '';
@ -218,16 +221,13 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
}
?>
<span class="sortable-handler<?php echo $iconClass ?>">
<span class="icon-menu" aria-hidden="true"></span>
<span class="fa fa-ellipsis-v" aria-hidden="true"></span>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->ordering; ?>" class="width-20 text-area-order">
<?php endif; ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->title); ?>
</td>
<td class="text-center">
<td class="text-center d-none d-md-table-cell">
<?php echo $featuredButton->render($item->featured, $i, ['disabled' => !$canChange]); ?>
</td>
<td class="article-status">
@ -262,9 +262,8 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'articles.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit || $canEditOwn) : ?>
<?php $editIcon = $item->checked_out ? '' : '<span class="fa fa-pen-square mr-2" aria-hidden="true"></span>'; ?>
<a href="<?php echo Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes($item->title)); ?>">
<?php echo $editIcon; ?><?php echo $this->escape($item->title); ?></a>
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<span title="<?php echo Text::sprintf('JFIELD_ALIAS_LABEL', $this->escape($item->alias)); ?>"><?php echo $this->escape($item->title); ?></span>
<?php endif; ?>
@ -363,7 +362,7 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
echo $date > 0 ? HTMLHelper::_('date', $date, Text::_('DATE_FORMAT_LC4')) : '-';
?>
</td>
<td class="d-none d-md-table-cell text-center">
<td class="d-none d-lg-table-cell text-center">
<span class="badge badge-info">
<?php echo (int) $item->hits; ?>
</span>
@ -380,7 +379,7 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
</span>
</td>
<?php endif; ?>
<td class="d-none d-md-table-cell">
<td class="d-none d-lg-table-cell">
<?php echo (int) $item->id; ?>
</td>
</tr>

View File

@ -94,12 +94,12 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
</caption>
<thead>
<tr>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'fp.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<td style="width:1%" class="text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'fp.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th scope="col" style="width:1%" class="text-center">
<?php echo Text::_('JFEATURED'); ?>
</th>
@ -123,7 +123,7 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
<th scope="col" style="width:10%" class="d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_CONTENT_HEADING_DATE_' . strtoupper($orderingColumn), 'a.' . $orderingColumn, $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:3%" class="d-none d-md-table-cell text-center">
<th scope="col" style="width:3%" class="d-none d-lg-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
</th>
<?php if ($this->vote) : ?>
@ -134,7 +134,7 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_RATINGS', 'rating', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" style="width:3%" class="d-none d-md-table-cell">
<th scope="col" style="width:3%" class="d-none d-lg-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
@ -187,9 +187,13 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
data-workflow_id="<?php echo (int) $item->workflow_id; ?>"
data-stage_id="<?php echo (int) $item->stage_id; ?>"
>
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="order text-center d-none d-md-table-cell">
<?php
$iconClass = '';
if (!$canChange)
{
$iconClass = ' inactive';
@ -200,15 +204,12 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
}
?>
<span class="sortable-handler<?php echo $iconClass ?>">
<span class="icon-menu" aria-hidden="true"></span>
<span class="fa fa-ellipsis-v" aria-hidden="true"></span>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->ordering; ?>" class="width-20 text-area-order">
<?php endif; ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="text-center">
<?php echo $featuredButton->render($item->featured, $i, ['disabled' => !$canChange]); ?>
</td>
@ -244,9 +245,8 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'articles.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit) : ?>
<?php $editIcon = $item->checked_out ? '' : '<span class="fa fa-pen-square mr-2" aria-hidden="true"></span>'; ?>
<a href="<?php echo Route::_('index.php?option=com_content&task=article.edit&return=featured&id=' . $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes($item->title)); ?>">
<?php echo $editIcon; ?><?php echo $this->escape($item->title); ?></a>
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<span title="<?php echo Text::sprintf('JFIELD_ALIAS_LABEL', $this->escape($item->alias)); ?>"><?php echo $this->escape($item->title); ?></span>
<?php endif; ?>
@ -338,7 +338,7 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
echo $date > 0 ? HTMLHelper::_('date', $date, Text::_('DATE_FORMAT_LC4')) : '-';
?>
</td>
<td class="d-none d-md-table-cell text-center">
<td class="d-none d-lg-table-cell text-center">
<span class="badge badge-info">
<?php echo (int) $item->hits; ?>
</span>
@ -355,7 +355,7 @@ HTMLHelper::_('script', 'com_content/admin-articles-workflow-buttons.js', ['rela
</span>
</td>
<?php endif; ?>
<td class="d-none d-md-table-cell">
<td class="d-none d-lg-table-cell">
<?php echo (int) $item->id; ?>
</td>
</tr>

View File

@ -25,15 +25,18 @@ HTMLHelper::_('script', 'com_contenthistory/admin-compare-compare.min.js', array
?>
<fieldset>
<h2 class="mb-3"><?php echo Text::sprintf('COM_CONTENTHISTORY_COMPARE_TITLE'); ?></h2>
<h2 class="mb-3"><?php echo Text::_('COM_CONTENTHISTORY_COMPARE_TITLE'); ?></h2>
<table id="diff" class="table table-sm">
<table id="diff" class="table">
<caption id="captionTable" class="sr-only">
<?php echo Text::_('COM_CONTENTHISTORY_COMPARE_CAPTION'); ?>
</caption>
<thead>
<tr>
<th style="width:25%"><?php echo Text::_('COM_CONTENTHISTORY_PREVIEW_FIELD'); ?></th>
<th><?php echo Text::_('COM_CONTENTHISTORY_COMPARE_OLD'); ?></th>
<th><?php echo Text::_('COM_CONTENTHISTORY_COMPARE_NEW'); ?></th>
<th><?php echo Text::_('COM_CONTENTHISTORY_COMPARE_DIFF'); ?></th>
<th scope="col" style="width:25%"><?php echo Text::_('COM_CONTENTHISTORY_PREVIEW_FIELD'); ?></th>
<th scope="col"><?php echo Text::_('COM_CONTENTHISTORY_COMPARE_OLD'); ?></th>
<th scope="col"><?php echo Text::_('COM_CONTENTHISTORY_COMPARE_NEW'); ?></th>
<th scope="col"><?php echo Text::_('COM_CONTENTHISTORY_COMPARE_DIFF'); ?></th>
</tr>
</thead>
<tbody>
@ -61,9 +64,9 @@ HTMLHelper::_('script', 'com_contenthistory/admin-compare-compare.min.js', array
<?php endif; ?>
<?php endforeach; ?>
<?php else : ?>
<td>
<strong><?php echo $value->label; ?></strong>
</td>
<th scope="row">
<?php echo $value->label; ?>
</th>
<td class="original"><?php echo htmlspecialchars($value->value); ?></td>
<?php $object2->$name->value = is_object($object2->$name->value) ? json_encode($object2->$name->value) : $object2->$name->value; ?>
<td class="changed"><?php echo htmlspecialchars($object2->$name->value, ENT_COMPAT, 'UTF-8'); ?></td>

View File

@ -11,7 +11,9 @@ namespace Joomla\Component\Cpanel\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;
/**
* Cpanel Controller
@ -51,4 +53,34 @@ class DisplayController extends BaseController
return parent::display($cachable, $urlparams);
}
/**
* Method to add a module to a dashboard
*
* @since 4.0.0
*
* @return void
*/
public function addModule()
{
$position = $this->input->get('position', 'cpanel');
$function = $this->input->get('function');
$appendLink = '';
if ($function)
{
$appendLink .= '&function=' . $function;
}
if (substr($position, 0, 6) != 'cpanel')
{
$position = 'cpanel';
}
Factory::getApplication()->setUserState('com_modules.modules.filter.position', $position);
Factory::getApplication()->setUserState('com_modules.modules.client_id', '1');
$this->setRedirect(Route::_('index.php?option=com_modules&view=select&tmpl=component&layout=modal' . $appendLink, false));
}
}

View File

@ -1,220 +0,0 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Cpanel\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
/**
* Cpanel System Controller
*
* @since 4.0.0
*/
class SystemController extends BaseController
{
/**
* Ajax target point for reading the specific information
*
* @throws \Exception
*
* @return void
*
* @since 4.0.0
*/
public function loadSystemInfo()
{
$type = $this->input->get('type');
switch ($type)
{
case 'postinstall':
$count = $this->countItems('com_postinstall', 'Messages');
break;
case 'installationwarnings':
$count = $this->countItems('com_installer', 'Warnings');
break;
case 'checkins':
$count = $this->countItems('com_checkin', 'Checkin');
break;
case 'databaseupdate':
$count = $this->countDatabaseUpdates();
break;
case 'systemupdate':
$count = $this->countSystemUpdates();
break;
case 'extensionupdate':
$count = $this->countExtensionUpdates();
break;
case 'extensiondiscover':
$count = $this->countExtensionDiscover();
break;
default:
/**
* @TODO: Plugin event to allow custom sections to be added (see SystemModel)
*/
throw new \Exception(Text::_('COM_CPANEL_ERROR_DASHBOARD_TYPE_NOT_SUPPORTED'));
}
echo new JsonResponse($count);
}
/**
* Returns the existing database errors of the table structur
*
* @return integer Number of database table errors
*
* @throws \Exception
* @since 4.0.0
*/
protected function countDatabaseUpdates()
{
if (!$this->app->getIdentity()->authorise('core.manage', 'com_installer'))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
/** @var \Joomla\Component\Installer\Administrator\Extension\InstallerComponent $boot */
$boot = $this->app->bootComponent('com_installer');
/** @var \Joomla\Component\Installer\Administrator\Model\DatabaseModel $model */
$model = $boot->getMVCFactory()->createModel('Database', 'Administrator', ['ignore_request' => true]);
$changeSet = $model->getItems();
$changeSetCount = 0;
foreach ($changeSet as $item)
{
$changeSetCount += $item['errorsCount'];
}
return $changeSetCount;
}
/**
* Returns the version number of the latest update or empty string if system is uptodate
*
* @return string The version number or empty string
*
* @throws \Exception
* @since 4.0.0
*/
protected function countSystemUpdates()
{
if (!$this->app->getIdentity()->authorise('core.manage', 'com_joomlaupdate'))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
/** @var \Joomla\CMS\Extension\LegacyComponent $boot */
$boot = $this->app->bootComponent('com_joomlaupdate');
/** @var \Joomla\Component\Joomlaupdate\Administrator\Model\UpdateModel $model */
$model = $boot->getMVCFactory()->createModel('Update', 'Administrator', ['ignore_request' => true]);
$model->refreshUpdates(true);
$joomlaUpdate = $model->getUpdateInformation();
$hasUpdate = $joomlaUpdate['hasUpdate'] ? '&#x200E;' . $joomlaUpdate['latest'] : '';
return $hasUpdate;
}
/**
* Returns the number of outdates extensions installed in the system
*
* @return integer Number of available updates
*
* @throws \Exception
* @since 4.0.0
*/
protected function countExtensionUpdates()
{
if (!$this->app->getIdentity()->authorise('core.manage', 'com_installer'))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
/** @var \Joomla\Component\Installer\Administrator\Extension\InstallerComponent $boot */
$boot = $this->app->bootComponent('com_installer');
/** @var \Joomla\Component\Installer\Administrator\Model\UpdateModel $model */
$model = $boot->getMVCFactory()->createModel('Update', 'Administrator', ['ignore_request' => true]);
$model->findUpdates();
$items = count($model->getItems());
return $items;
}
/**
* Returns the number of available extensions for installation
*
* @return integer Number of available updates
*
* @throws \Exception
*/
protected function countExtensionDiscover()
{
if (!$this->app->getIdentity()->authorise('core.manage', 'com_installer'))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
/** @var \Joomla\Component\Installer\Administrator\Extension\InstallerComponent $boot */
$boot = $this->app->bootComponent('com_installer');
/** @var \Joomla\Component\Installer\Administrator\Model\DiscoverModel $model */
$model = $boot->getMVCFactory()->createModel('Discover', 'Administrator', ['ignore_request' => true]);
$model->discover();
$items = count($model->getItems());
return $items;
}
/**
* Generic getItems counter for different calls
*
* @param string $extension The extension to check and authorise for
* @param string $modelName The Model to load
*
* @return integer The number of items
*
* @throws \Exception
* @since 4.0.0
*/
protected function countItems($extension, $modelName)
{
if (!$this->app->getIdentity()->authorise('core.manage', $extension))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
$boot = $this->app->bootComponent($extension);
$model = $boot->getMVCFactory()->createModel($modelName, 'Administrator', ['ignore_request' => true]);
$items = count($model->getItems());
return $items;
}
}

View File

@ -1,123 +0,0 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Cpanel\Administrator\Entities;
defined('_JEXEC') or die;
/**
* Class representing a section in the system view.
*
* @since 4.0.0
*/
class SystemHeader
{
/**
* The class for an icon to display for the header
*
* @var string
*
* @since 4.0.0
*/
private $icon;
/**
* The title of the header
*
* @var string
*
* @since 4.0.0
*/
private $title;
/**
* The list of items in this section
*
* @var SystemItem[]
*
* @since 4.0.0
*/
private $items = [];
/**
* SystemHeader constructor.
*
* @param string $title The title of the header
* @param string $icon The class for an icon to display for the header
*
* @since 4.0.0
*/
public function __construct($title, $icon)
{
$this->title = $title;
$this->icon = $icon;
}
/**
* Method to add an item to the section
*
* @param SystemItem $item The item to add to this section
*
* @return void
*
* @since 4.0.0
*/
public function addItem(SystemItem $item)
{
$this->items[] = $item;
}
/**
* Get the icon associated with the section
*
* @return string
*
* @since 4.0.0
*/
public function getIcon()
{
return $this->icon;
}
/**
* Get the title associated with the section
*
* @return string
*
* @since 4.0.0
*/
public function getTitle()
{
return $this->title;
}
/**
* Get the items added into the section
*
* @return SystemItem[]
*
* @since 4.0.0
*/
public function getItems()
{
return $this->items;
}
/**
* Does the section contain any items
*
* @return boolean
*
* @since 4.0.0
*/
public function hasItems()
{
return count($this->items) !== 0;
}
}

View File

@ -1,97 +0,0 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Cpanel\Administrator\Entities;
defined('_JEXEC') or die;
/**
* Class representing a item in the system view.
*
* @since 4.0.0
*/
class SystemItem
{
/**
* The title of the item
*
* @var string
*/
private $title;
/**
* The link of the item
*
* @var string
*/
private $link;
/**
* An optional type for the ajax request
*
* @var string|null
*/
private $type;
/**
* Class constructor.
*
* @param string $title The title of the item
* @param string $link The link for the item
* @param string $type The type, requested by the ajax request
*
* @since 4.0.0
*/
public function __construct($title, $link, $type = '')
{
$this->title = $title;
$this->link = $link;
if (!empty($type))
{
$this->type = $type;
}
}
/**
* The item title
*
* @return string
*
* @since 4.0.0
*/
public function getTitle()
{
return $this->title;
}
/**
* The item link
*
* @return string
*
* @since 4.0.0
*/
public function getLink()
{
return $this->link;
}
/**
* The type to load in the notification badge if there is one. Else null.
*
* @return string|null
*
* @since 4.0.0
*/
public function getType()
{
return $this->type;
}
}

View File

@ -1,228 +0,0 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Cpanel\Administrator\Model;
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Component\Cpanel\Administrator\Entities\SystemHeader;
use Joomla\Component\Cpanel\Administrator\Entities\SystemItem;
/**
* Model to get a list of system icons.
*
* @since 4.0.0
*/
class SystemModel extends BaseDatabaseModel
{
/**
* Method to get a list of system icons with plugin hooks
*
* @return array
*
* @since 4.0.0
*/
public function getItems()
{
$user = Factory::getUser();
$systemSection = new SystemHeader('COM_CPANEL_SYSTEM_SETUP', 'cog');
$maintainSection = new SystemHeader('MOD_MENU_MAINTAIN', 'sync');
$infoSection = new SystemHeader('MOD_MENU_INFORMATION', 'sync');
$installSection = new SystemHeader('MOD_MENU_INSTALL', 'download');
$manageSection = new SystemHeader('MOD_MENU_MANAGE', 'sync');
$updateSection = new SystemHeader('MOD_MENU_UPDATE', 'upload');
$templateSection = new SystemHeader('MOD_MENU_TEMPLATES', 'image');
$accessSection = new SystemHeader('MOD_MENU_ACCESS', 'lock');
// System
if ($user->authorise('core.admin'))
{
$systemSection->addItem(
new SystemItem('MOD_MENU_CONFIGURATION', 'index.php?option=com_config')
);
}
// Maintain
if ($user->authorise('core.manage', 'com_cache'))
{
$maintainSection->addItem(
new SystemItem('MOD_MENU_CLEAR_CACHE', 'index.php?option=com_cache')
);
}
if ($user->authorise('core.manage', 'com_checkin'))
{
$maintainSection->addItem(
new SystemItem('MOD_MENU_GLOBAL_CHECKIN', 'index.php?option=com_checkin', 'checkins')
);
}
if ($user->authorise('core.manage', 'com_installer'))
{
$infoSection->addItem(
new SystemItem('MOD_MENU_INFORMATION_WARNINGS', 'index.php?option=com_installer&view=warnings', 'installationwarnings')
);
}
if ($user->authorise('core.manage', 'com_postinstall'))
{
$infoSection->addItem(
new SystemItem('MOD_MENU_INFORMATION_POST_INSTALL_MESSAGES', 'index.php?option=com_postinstall', 'postinstall')
);
}
if ($user->authorise('core.admin'))
{
$infoSection->addItem(
new SystemItem('MOD_MENU_SYSTEM_INFORMATION_SYSINFO', 'index.php?option=com_admin&view=sysinfo')
);
}
if ($user->authorise('core.manage', 'com_installer'))
{
$infoSection->addItem(
new SystemItem('MOD_MENU_SYSTEM_INFORMATION_DATABASE', 'index.php?option=com_installer&view=database', 'databaseupdate')
);
}
// Install
if ($user->authorise('core.manage', 'com_installer'))
{
$installSection->addItem(
new SystemItem('MOD_MENU_INSTALL_EXTENSIONS', 'index.php?option=com_installer&view=install')
);
$installSection->addItem(
new SystemItem('MOD_MENU_INSTALL_DISCOVER', 'index.php?option=com_installer&view=discover', 'extensiondiscover')
);
$installSection->addItem(
new SystemItem('MOD_MENU_INSTALL_LANGUAGES', 'index.php?option=com_installer&view=languages')
);
}
if ($user->authorise('core.manage', 'com_installer'))
{
$manageSection->addItem(
new SystemItem('MOD_MENU_MANAGE_EXTENSIONS', 'index.php?option=com_installer&view=manage')
);
}
if ($user->authorise('core.manage', 'com_languages'))
{
$manageSection->addItem(
new SystemItem('MOD_MENU_MANAGE_LANGUAGES', 'index.php?option=com_languages&view=installed')
);
$manageSection->addItem(
new SystemItem('MOD_MENU_MANAGE_LANGUAGES_CONTENT', 'index.php?option=com_languages&view=languages')
);
$manageSection->addItem(
new SystemItem('MOD_MENU_MANAGE_LANGUAGES_OVERRIDES', 'index.php?option=com_languages&view=overrides')
);
}
if ($user->authorise('core.manage', 'com_csp'))
{
$manageSection->addItem(
new SystemItem('MOD_MENU_MANAGE_CSP', 'index.php?option=com_csp')
);
}
if ($user->authorise('core.manage', 'com_plugins'))
{
$manageSection->addItem(
new SystemItem('MOD_MENU_MANAGE_PLUGINS', 'index.php?option=com_plugins')
);
}
if ($user->authorise('core.manage', 'com_redirect'))
{
$manageSection->addItem(
new SystemItem('MOD_MENU_MANAGE_REDIRECTS', 'index.php?option=com_redirect')
);
}
if ($user->authorise('core.manage', 'com_joomlaupdate'))
{
$updateSection->addItem(
new SystemItem('MOD_MENU_UPDATE_JOOMLA', 'index.php?option=com_joomlaupdate', 'systemupdate')
);
}
if ($user->authorise('core.manage', 'com_installer'))
{
$updateSection->addItem(
new SystemItem('MOD_MENU_UPDATE_EXTENSIONS', 'index.php?option=com_installer&view=update', 'extensionupdate')
);
$updateSection->addItem(
new SystemItem('MOD_MENU_UPDATE_SOURCES', 'index.php?option=com_installer&view=updatesites')
);
}
// Templates
if ($user->authorise('core.manage', 'com_templates'))
{
$templateSection->addItem(
new SystemItem('MOD_MENU_TEMPLATE_SITE_TEMPLATES', 'index.php?option=com_templates&view=templates&client_id=0')
);
$templateSection->addItem(
new SystemItem('MOD_MENU_TEMPLATE_SITE_STYLES', 'index.php?option=com_templates&view=styles&client_id=0')
);
$templateSection->addItem(
new SystemItem('MOD_MENU_TEMPLATE_ADMIN_TEMPLATES', 'index.php?option=com_templates&view=templates&client_id=1')
);
$templateSection->addItem(
new SystemItem('MOD_MENU_TEMPLATE_ADMIN_STYLES', 'index.php?option=com_templates&view=styles&client_id=1')
);
}
// Access
if ($user->authorise('core.manage', 'com_users'))
{
$accessSection->addItem(
new SystemItem('MOD_MENU_ACCESS_GROUPS', 'index.php?option=com_users&view=groups')
);
$accessSection->addItem(
new SystemItem('MOD_MENU_ACCESS_LEVELS', 'index.php?option=com_users&view=levels')
);
}
// Global Configuration - Permissions and Filters
if ($user->authorise('core.admin'))
{
$accessSection->addItem(
new SystemItem('MOD_MENU_ACCESS_SETTINGS', 'index.php?option=com_config#page-permissions')
);
$accessSection->addItem(
new SystemItem('MOD_MENU_ACCESS_TEXT_FILTERS', 'index.php?option=com_config#page-filters')
);
}
$links = [
$systemSection,
$maintainSection,
$infoSection,
$installSection,
$manageSection,
$updateSection,
$templateSection,
$accessSection
];
// TODO: Plugin event to allow custom sections to be added
return $links;
}
}

View File

@ -11,6 +11,8 @@ namespace Joomla\Component\Cpanel\Administrator\View\Cpanel;
defined('_JEXEC') or die;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
@ -30,6 +32,20 @@ class HtmlView extends BaseHtmlView
*/
protected $modules = null;
/**
* Array of cpanel modules
*
* @var array
*/
protected $quickicons = null;
/**
* Moduleposition to load
*
* @var string
*/
protected $position = null;
/**
* Execute and display a template script.
*
@ -39,12 +55,63 @@ class HtmlView extends BaseHtmlView
*/
public function display($tpl = null)
{
$app = Factory::getApplication();
$extension = ApplicationHelper::stringURLSafe($app->input->getCmd('dashboard'));
$title = Text::_('COM_CPANEL_DASHBOARD_BASE_TITLE');
$icon = Text::_('COM_CPANEL_DASHBOARD_BASE_ICON');
$position = ApplicationHelper::stringURLSafe($extension);
// Generate a title for the view cpanel
if (!empty($extension))
{
$parts = explode('.', $extension);
$prefix = 'COM_CPANEL_DASHBOARD_';
$lang = Factory::getLanguage();
if (strpos($parts[0], 'com_') === false)
{
$prefix .= strtoupper($parts[0]);
}
else
{
$prefix = strtoupper($parts[0]) . '_DASHBOARD';
// Need to load the language file
$lang->load($parts[0], JPATH_BASE, null, false, true)
|| $lang->load($parts[0], JPATH_ADMINISTRATOR . '/components/' . $parts[0], null, false, true);
$lang->load($parts[0]);
}
$sectionkey = !empty($parts[1]) ? '_' . strtoupper($parts[1]) : '';
$key = $prefix . $sectionkey . '_TITLE';
$keyIcon = $prefix . $sectionkey . '_ICON';
// Search for a component title
if ($lang->hasKey($key))
{
$title = Text::_($key);
}
// Search for Icon
if ($lang->hasKey($keyIcon))
{
$icon = Text::_($keyIcon);
}
}
// Set toolbar items for the page
ToolbarHelper::title(Text::_('COM_CPANEL'), 'home-2 cpanel');
ToolbarHelper::title($title, $icon . ' cpanel');
ToolbarHelper::help('screen.cpanel');
// Display the cpanel modules
$this->modules = ModuleHelper::getModules('cpanel');
$this->position = $position ? 'cpanel-' . $position : 'cpanel';
$this->modules = ModuleHelper::getModules($this->position);
$quickicons = $position ? 'icon-' . $position : 'icon';
$this->quickicons = ModuleHelper::getModules($quickicons);
parent::display($tpl);
}

View File

@ -1,177 +0,0 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Cpanel\Administrator\View\Help;
defined('_JEXEC') or die;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Registry\Registry;
/**
* HTML View class for the Cpanel component
*
* @since 1.0
*/
class HtmlView extends BaseHtmlView
{
/**
* @var boolean $notEmpty Check if there are links to be displayed
*
* @since 4.0.0
*/
private static $notEmpty;
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
// Set toolbar items for the page
ToolbarHelper::title(Text::_('Help'), 'info help_header');
ToolbarHelper::help('screen.cpanel');
$user = Factory::getUser();
// Load mod_menu language first as strings define some variables
Factory::getLanguage()->load(
'mod_menu',
JPATH_ADMINISTRATOR,
Factory::getLanguage()->getTag(),
null, false, true
);
// Get mod_menu params
$module = ModuleHelper::getModule('mod_menu');
$params = new Registry($module->params);
// Do we have a custom forum url?
$customForum = $params->get('forum_url') ? $params->get('forum_url') : '';
$links = [
// System configuration
'help' => [
'link' => 'index.php?option=com_admin&view=help',
'title' => 'MOD_MENU_HELP_JOOMLA',
'label' => 'MOD_MENU_HELP_JOOMLA',
'desc' => 'MOD_MENU_HELP_JOOMLA',
'icon' => 'info'
],
'help_official_forum' => [
'link' => 'https://forum.joomla.org',
'title' => 'MOD_MENU_HELP_SUPPORT_OFFICIAL_FORUM',
'label' => 'MOD_MENU_HELP_SUPPORT_OFFICIAL_FORUM',
'desc' => 'MOD_MENU_HELP_SUPPORT_OFFICIAL_FORUM',
'icon' => 'info'
],
'help_forum' => [
'link' => $customForum,
'title' => 'MOD_MENU_HELP_SUPPORT_CUSTOM_FORUM',
'label' => 'MOD_MENU_HELP_SUPPORT_CUSTOM_FORUM',
'desc' => 'MOD_MENU_HELP_SUPPORT_CUSTOM_FORUM',
'icon' => 'info'
],
'help_official_language' => [
'link' => 'index.php?option=com_admin&amp;view=help&amp;layout=langforum',
'title' => 'MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM',
'label' => 'MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM',
'desc' => 'MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM',
'icon' => 'info'
],
'help_official_documentation' => [
'link' => 'https://docs.joomla.org',
'title' => 'MOD_MENU_HELP_DOCUMENTATION',
'label' => 'MOD_MENU_HELP_DOCUMENTATION',
'desc' => 'MOD_MENU_HELP_DOCUMENTATION',
'icon' => 'info'
],
'help_official_extensions' => [
'link' => 'https://extensions.joomla.org',
'title' => 'MOD_MENU_HELP_EXTENSIONS',
'label' => 'MOD_MENU_HELP_EXTENSIONS',
'desc' => 'MOD_MENU_HELP_EXTENSIONS',
'icon' => 'info'
],
'help_official_translations' => [
'link' => 'https://community.joomla.org/translations.html',
'title' => 'MOD_MENU_HELP_TRANSLATIONS',
'label' => 'MOD_MENU_HELP_TRANSLATIONS',
'desc' => 'MOD_MENU_HELP_TRANSLATIONS',
'icon' => 'info'
],
'help_resources' => [
'link' => 'https://resources.joomla.org',
'title' => 'MOD_MENU_HELP_RESOURCES',
'label' => 'MOD_MENU_HELP_RESOURCES',
'desc' => 'MOD_MENU_HELP_RESOURCES',
'icon' => 'info'
],
'help_community' => [
'link' => 'https://community.joomla.org',
'title' => 'MOD_MENU_HELP_COMMUNITY',
'label' => 'MOD_MENU_HELP_COMMUNITY',
'desc' => 'MOD_MENU_HELP_COMMUNITY',
'icon' => 'info'
],
'help_security' => [
'link' => 'https://developer.joomla.org/security-centre.html',
'title' => 'MOD_MENU_HELP_SECURITY',
'label' => 'MOD_MENU_HELP_SECURITY',
'desc' => 'MOD_MENU_HELP_SECURITY',
'icon' => 'info'
],
'help_developer' => [
'link' => 'https://developer.joomla.org',
'title' => 'MOD_MENU_HELP_DEVELOPER',
'label' => 'MOD_MENU_HELP_DEVELOPER',
'desc' => 'MOD_MENU_HELP_DEVELOPER',
'icon' => 'info'
],
'help_exchange' => [
'link' => 'https://joomla.stackexchange.com',
'title' => 'MOD_MENU_HELP_XCHANGE',
'label' => 'MOD_MENU_HELP_XCHANGE',
'desc' => 'MOD_MENU_HELP_XCHANGE',
'icon' => 'info'
],
'help_shop' => [
'link' => 'https://community.joomla.org/the-joomla-shop.html',
'title' => 'MOD_MENU_HELP_SHOP',
'label' => 'MOD_MENU_HELP_SHOP',
'desc' => 'MOD_MENU_HELP_SHOP',
'icon' => 'info'
],
];
if ($user->authorise('core.login.admin'))
{
static::$notEmpty = true;
}
if (static::$notEmpty)
{
$this->links = $links;
}
else
{
throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
return parent::display($tpl);
}
}

View File

@ -1,77 +0,0 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Cpanel\Administrator\View\System;
defined('_JEXEC') or die;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
/**
* HTML View class for the Cpanel component
*
* @since 1.0
*/
class HtmlView extends BaseHtmlView
{
/**
* The list of links
*
* @var \Joomla\Component\Cpanel\Administrator\Entities\SystemHeader[]
*/
public $links = [];
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*
* @since 1.6
*/
public function display($tpl = null)
{
// Set toolbar items for the page
ToolbarHelper::title(Text::_('COM_CPANEL_TITLE_SYSTEM_PANEL'), 'cog help_header');
ToolbarHelper::help('screen.cpanel');
/** @var \Joomla\Component\Cpanel\Administrator\Model\SystemModel $model */
$model = $this->getModel();
$this->links = $model->getItems();
$hasItems = false;
foreach ($this->links as $section)
{
if ($section->hasItems())
{
$hasItems = true;
break;
}
}
if (!$hasItems)
{
throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
Factory::getLanguage()->load(
'mod_menu',
JPATH_ADMINISTRATOR,
Factory::getLanguage()->getTag(),
true
);
return parent::display($tpl);
}
}

View File

@ -13,6 +13,7 @@ use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
HTMLHelper::_('behavior.core');
Text::script('COM_CPANEL_UNPUBLISH_MODULE_SUCCESS');
@ -21,29 +22,61 @@ Text::script('COM_CPANEL_UNPUBLISH_MODULE_ERROR');
HTMLHelper::_('script', 'com_cpanel/admin-cpanel-default.min.js', array('version' => 'auto', 'relative' => true));
$user = Factory::getUser();
?>
HTMLHelper::_('script', 'com_cpanel/admin-add_module.js', ['version' => 'auto', 'relative' => true]);
<div class="row">
<?php $iconmodules = ModuleHelper::getModules('icon');
if ($iconmodules) : ?>
<?php HTMLHelper::_('bootstrap.framework'); ?>
<div class="col-md-12">
<?php
// Display the submenu position modules
foreach ($iconmodules as $iconmodule)
// Set up the bootstrap modal that will be used for all module editors
echo HTMLHelper::_(
'bootstrap.renderModal',
'moduleDashboardAddModal',
array(
'title' => Text::_('COM_CPANEL_ADD_MODULE_MODAL_TITLE'),
'backdrop' => 'static',
'url' => Route::_('index.php?option=com_cpanel&task=addModule&function=jSelectModuleType&position=' . $this->escape($this->position)),
'bodyHeight' => '70',
'modalWidth' => '80',
'footer' => '<button type="button" class="button-cancel btn btn-sm btn-danger" data-dismiss="modal" data-target="#closeBtn" aria-hidden="true"><span class="icon-cancel" aria-hidden="true"></span>'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
. '<button type="button" class="button-save btn btn-sm btn-success hidden" data-target="#saveBtn" aria-hidden="true"><span class="icon-save" aria-hidden="true"></span>'
. Text::_('JSAVE') . '</button>',
)
);
?>
<div id="cpanel-modules">
<?php if ($this->quickicons) : ?>
<div class="cpanel-modules <?php echo $this->position; ?>-quickicons">
<div class="card-columns">
<?php // Display the icon position modules
foreach ($this->quickicons as $iconmodule)
{
echo ModuleHelper::renderModule($iconmodule);
echo ModuleHelper::renderModule($iconmodule, array('style' => 'well'));
}
?>
?>
</div>
</div>
<?php endif; ?>
<div class="cpanel-modules <?php echo $this->position; ?>">
<div class="card-columns">
<?php
foreach ($this->modules as $module)
{
echo ModuleHelper::renderModule($module, array('style' => 'well'));
}
?>
<?php if ($user->authorise('core.create', 'com_modules')) : ?>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<a href="#moduleEditModal" data-toggle="modal" data-target="#moduleDashboardAddModal" role="button" class="cpanel-add-module text-center py-5 w-100 d-block">
<div class="cpanel-add-module-icon text-center">
<span class="fa fa-plus-square text-light mt-2"></span>
</div>
<span><?php echo Text::_('COM_CPANEL_ADD_DASHBOARD_MODULE'); ?></span>
</a>
</div>
<?php endif; ?>
</div>
<div id="cpanel-modules" class="row">
<?php
$cols = 0;
foreach ($this->modules as $module)
{
echo ModuleHelper::renderModule($module, array('style' => 'well'));
}
?>
</div>

View File

@ -1,30 +0,0 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
?>
<div class="com-cpanel-help">
<h2 class="com-cpanel-help__header">
<span class="fa fa-info-circle" aria-hidden="true"></span>
<?php echo Text::_('MOD_MENU_HELP'); ?>
</h2>
<ul class="list-group list-group-flush">
<?php foreach ($this->links as $link) : ?>
<?php if ($link['link']) : ?>
<li class="list-group-item">
<span class="item-title"><a href="<?php echo $link['link']; ?>"><?php echo Text::_($link['label']); ?></a></span>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</div>

View File

@ -1,44 +0,0 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
HTMLHelper::_('script', 'com_cpanel/admin-system-loader.js', ['version' => 'auto', 'relative' => true]);
/** @var \Joomla\Component\Cpanel\Administrator\View\System\HtmlView $this */
?>
<div class="com-cpanel-system">
<?php foreach ($this->links as $section) : ?>
<div class="com-cpanel-system__category">
<h2 class="com-cpanel-system__header">
<span class="fa fa-<?php echo $section->getIcon(); ?>" aria-hidden="true"></span>
<?php echo Text::_($section->getTitle()); ?>
</h2>
<ul class="list-group list-group-flush">
<?php foreach ($section->getItems() as $item) : ?>
<li class="list-group-item">
<a href="<?php echo $item->getLink(); ?>"><?php echo Text::_($item->getTitle()); ?>
<?php if (!empty($item->getType())) : ?>
<span class="fa fa-spin fa-spinner pull-right mt-1 system-counter" data-type="<?php echo $item->getType(); ?>">
</span>
<?php endif; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endforeach; ?>
</div>

View File

@ -126,7 +126,7 @@ class HtmlView extends BaseHtmlView
{
$canDo = ContentHelper::getActions('com_csp');
ToolbarHelper::title(Text::_('COM_CSP_REPORTS'), 'generic');
ToolbarHelper::title(Text::_('COM_CSP_REPORTS'), 'shield-alt');
if ($canDo->get('core.edit.state'))
{

View File

@ -156,8 +156,8 @@ class HtmlView extends BaseHtmlView
$dropdown = $toolbar->dropdownButton('status-group')
->text('JTOOLBAR_CHANGE_STATUS')
->toggleSplit(false)
->icon('fa fa-globe')
->buttonClass('btn btn-info')
->icon('fa fa-ellipsis-h')
->buttonClass('btn btn-action')
->listCheck(true);
$childBar = $dropdown->getChildToolbar();

View File

@ -158,8 +158,8 @@ class HtmlView extends BaseHtmlView
$dropdown = $toolbar->dropdownButton('status-group')
->text('JTOOLBAR_CHANGE_STATUS')
->toggleSplit(false)
->icon('fa fa-globe')
->buttonClass('btn btn-info')
->icon('fa fa-ellipsis-h')
->buttonClass('btn btn-action')
->listCheck(true);
$childBar = $dropdown->getChildToolbar();
@ -182,15 +182,15 @@ class HtmlView extends BaseHtmlView
{
$childBar->trash('groups.trash')->listCheck(true);
}
}
// Add a batch button
if ($canDo->get('core.create') && $canDo->get('core.edit') && $canDo->get('core.edit.state'))
{
$toolbar->popupButton('batch')
->text('JTOOLBAR_BATCH')
->selector('collapseModal')
->listCheck(true);
// Add a batch button
if ($canDo->get('core.create') && $canDo->get('core.edit') && $canDo->get('core.edit.state'))
{
$childBar->popupButton('batch')
->text('JTOOLBAR_BATCH')
->selector('collapseModal')
->listCheck(true);
}
}
if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete', $component))

View File

@ -204,121 +204,113 @@
<fields name="params" label="COM_FIELDS_FIELD_BASIC_LABEL">
<fieldset name="basic">
<fieldset name="formoptions" label="COM_FIELDS_FIELD_FORMOPTIONS_HEADING">
<field
name="hint"
type="text"
label="COM_FIELDS_FIELD_PLACEHOLDER_LABEL"
description="COM_FIELDS_FIELD_PLACEHOLDER_DESC"
size="40"
/>
<field
name="formoptions"
type="note"
label="COM_FIELDS_FIELD_FORMOPTIONS_HEADING"
/>
<field
name="class"
type="textarea"
label="COM_FIELDS_FIELD_CLASS_LABEL"
size="40"
/>
<field
name="hint"
type="text"
label="COM_FIELDS_FIELD_PLACEHOLDER_LABEL"
description="COM_FIELDS_FIELD_PLACEHOLDER_DESC"
size="40"
/>
<field
name="label_class"
type="textarea"
label="COM_FIELDS_FIELD_LABEL_FORM_CLASS_LABEL"
size="40"
/>
<field
name="class"
type="textarea"
label="COM_FIELDS_FIELD_CLASS_LABEL"
size="40"
/>
<field
name="show_on"
type="list"
label="COM_FIELDS_FIELD_SHOW_ON_LABEL"
default=""
>
<option value="1">COM_FIELDS_FIELD_SHOW_ON_SITE</option>
<option value="2">COM_FIELDS_FIELD_SHOW_ON_ADMIN</option>
<option value="">COM_FIELDS_FIELD_SHOW_ON_BOTH</option>
</field>
<field
name="label_class"
type="textarea"
label="COM_FIELDS_FIELD_LABEL_FORM_CLASS_LABEL"
size="40"
/>
</fieldset>
<fieldset name="renderoptions" label="COM_FIELDS_FIELD_RENDEROPTIONS_HEADING">
<field
name="show_on"
type="list"
label="COM_FIELDS_FIELD_SHOW_ON_LABEL"
default=""
>
<option value="1">COM_FIELDS_FIELD_SHOW_ON_SITE</option>
<option value="2">COM_FIELDS_FIELD_SHOW_ON_ADMIN</option>
<option value="">COM_FIELDS_FIELD_SHOW_ON_BOTH</option>
</field>
<field
name="render_class"
type="textarea"
label="COM_FIELDS_FIELD_RENDER_CLASS_LABEL"
size="40"
/>
<field
name="renderoptions"
type="note"
label="COM_FIELDS_FIELD_RENDEROPTIONS_HEADING"
/>
<field
name="showlabel"
type="radio"
label="COM_FIELDS_FIELD_SHOWLABEL_LABEL"
class="switcher"
default="1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="render_class"
type="textarea"
label="COM_FIELDS_FIELD_RENDER_CLASS_LABEL"
size="40"
/>
<field
name="label_render_class"
type="textarea"
label="COM_FIELDS_FIELD_LABEL_RENDER_CLASS_LABEL"
size="40"
showon="showlabel:1"
/>
<field
name="showlabel"
type="radio"
label="COM_FIELDS_FIELD_SHOWLABEL_LABEL"
class="switcher"
default="1"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="display"
type="list"
label="COM_FIELDS_FIELD_DISPLAY_LABEL"
default="2"
>
<option value="1">COM_FIELDS_FIELD_DISPLAY_AFTER_TITLE</option>
<option value="2">COM_FIELDS_FIELD_DISPLAY_BEFORE_DISPLAY</option>
<option value="3">COM_FIELDS_FIELD_DISPLAY_AFTER_DISPLAY</option>
<option value="0">COM_FIELDS_FIELD_DISPLAY_NO_DISPLAY</option>
</field>
<field
name="label_render_class"
type="textarea"
label="COM_FIELDS_FIELD_LABEL_RENDER_CLASS_LABEL"
size="40"
showon="showlabel:1"
/>
<field
name="prefix"
type="text"
label="COM_FIELDS_FIELD_PREFIX_LABEL"
size="40"
/>
<field
name="display"
type="list"
label="COM_FIELDS_FIELD_DISPLAY_LABEL"
default="2"
>
<option value="1">COM_FIELDS_FIELD_DISPLAY_AFTER_TITLE</option>
<option value="2">COM_FIELDS_FIELD_DISPLAY_BEFORE_DISPLAY</option>
<option value="3">COM_FIELDS_FIELD_DISPLAY_AFTER_DISPLAY</option>
<option value="0">COM_FIELDS_FIELD_DISPLAY_NO_DISPLAY</option>
</field>
<field
name="suffix"
type="text"
label="COM_FIELDS_FIELD_SUFFIX_LABEL"
size="40"
/>
<field
name="prefix"
type="text"
label="COM_FIELDS_FIELD_PREFIX_LABEL"
size="40"
/>
<field
name="layout"
type="fieldLayout"
label="COM_FIELDS_FIELD_LAYOUT_LABEL"
class="custom-select"
/>
<field
name="suffix"
type="text"
label="COM_FIELDS_FIELD_SUFFIX_LABEL"
size="40"
/>
<field
name="layout"
type="fieldLayout"
label="COM_FIELDS_FIELD_LAYOUT_LABEL"
class="custom-select"
/>
<field
name="display_readonly"
type="list"
label="JFIELD_DISPLAY_READONLY_LABEL"
default="2"
>
<option value="2">JGLOBAL_INHERIT</option>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="display_readonly"
type="list"
label="JFIELD_DISPLAY_READONLY_LABEL"
default="2"
>
<option value="2">JGLOBAL_INHERIT</option>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
</fieldset>
</fieldset>
</fields>
</form>

View File

@ -33,23 +33,26 @@ HTMLHelper::_('script', 'com_fields/admin-field-edit.js', ['version' => 'auto',
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'general')); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'general', Text::_('COM_FIELDS_VIEW_FIELD_FIELDSET_GENERAL', true)); ?>
<div class="row">
<div class="col-md-9">
<?php echo $this->form->renderField('type'); ?>
<?php echo $this->form->renderField('name'); ?>
<?php echo $this->form->renderField('label'); ?>
<?php echo $this->form->renderField('description'); ?>
<?php echo $this->form->renderField('required'); ?>
<?php echo $this->form->renderField('default_value'); ?>
<div class="col-lg-9">
<div class="card">
<div class="card-body">
<?php echo $this->form->renderField('type'); ?>
<?php echo $this->form->renderField('name'); ?>
<?php echo $this->form->renderField('label'); ?>
<?php echo $this->form->renderField('description'); ?>
<?php echo $this->form->renderField('required'); ?>
<?php echo $this->form->renderField('default_value'); ?>
<?php foreach ($this->form->getFieldsets('fieldparams') as $name => $fieldSet) : ?>
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
<?php echo $field->renderField(); ?>
<?php foreach ($this->form->getFieldsets('fieldparams') as $name => $fieldSet) : ?>
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card card-light">
<div class="col-lg-3">
<div class="card">
<div class="card-body">
<?php $this->set('fields',
array(
@ -77,7 +80,12 @@ HTMLHelper::_('script', 'com_fields/admin-field-edit.js', ['version' => 'auto',
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_PUBLISHING', true)); ?>
<div class="row">
<div class="col-md-6">
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
<fieldset id="fieldset-publishingdata" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
</fieldset>
</div>
<div class="col-md-6">
</div>
@ -85,7 +93,12 @@ HTMLHelper::_('script', 'com_fields/admin-field-edit.js', ['version' => 'auto',
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'rules', Text::_('JGLOBAL_ACTION_PERMISSIONS_LABEL', true)); ?>
<?php echo $this->form->getInput('rules'); ?>
<fieldset id="fieldset-rules" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_ACTION_PERMISSIONS_LABEL'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>

View File

@ -56,11 +56,11 @@ Factory::getDocument()->addScriptDeclaration("
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'general', Text::_('COM_FIELDS', true)); ?>
<div class="row">
<div class="col-md-9">
<div class="col-lg-9">
<?php echo $this->form->getLabel('description'); ?>
<?php echo $this->form->getInput('description'); ?>
</div>
<div class="col-md-3">
<div class="col-lg-3">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
</div>
</div>

View File

@ -64,12 +64,12 @@ if ($saveOrder && !empty($this->items))
</caption>
<thead>
<tr>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<td style="width:1%" class="text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th scope="col" style="width:1%" class="text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
</th>
@ -103,6 +103,9 @@ if ($saveOrder && !empty($this->items))
<?php $canEditOwn = $user->authorise('core.edit.own', $component . '.field.' . $item->id) && $item->created_user_id == $userId; ?>
<?php $canChange = $user->authorise('core.edit.state', $component . '.field.' . $item->id) && $canCheckin; ?>
<tr class="row<?php echo $i % 2; ?>" item-id="<?php echo $item->id ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="order text-center d-none d-md-table-cell">
<?php $iconClass = ''; ?>
<?php if (!$canChange) : ?>
@ -111,15 +114,12 @@ if ($saveOrder && !empty($this->items))
<?php $iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED'); ?>
<?php endif; ?>
<span class="sortable-handler<?php echo $iconClass; ?>">
<span class="icon-menu" aria-hidden="true"></span>
<span class="fa fa-ellipsis-v" aria-hidden="true"></span>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->ordering; ?>">
<?php endif; ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'fields.', $canChange, 'cb'); ?>
</td>
@ -129,9 +129,8 @@ if ($saveOrder && !empty($this->items))
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'fields.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit || $canEditOwn) : ?>
<?php $editIcon = $item->checked_out ? '' : '<span class="fa fa-pen-square mr-2" aria-hidden="true"></span>'; ?>
<a href="<?php echo Route::_('index.php?option=com_fields&task=field.edit&id=' . $item->id . '&context=' . $context); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes($item->title)); ?>">
<?php echo $editIcon; ?><?php echo $this->escape($item->title); ?></a>
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>

View File

@ -31,32 +31,45 @@ $this->useCoreUI = true;
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'general')); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'general', Text::_('COM_FIELDS_VIEW_FIELD_FIELDSET_GENERAL', true)); ?>
<div class="row">
<div class="col-md-9">
<?php echo $this->form->renderField('label'); ?>
<?php echo $this->form->renderField('description'); ?>
<div class="col-lg-9">
<div class="card">
<div class="card-body">
<?php echo $this->form->renderField('label'); ?>
<?php echo $this->form->renderField('description'); ?>
</div>
</div>
</div>
<div class="col-md-3">
<?php $this->set('fields',
array(
<div class="col-lg-3">
<div class="card">
<div class="card-body">
<?php $this->set('fields',
array(
'published',
'state',
'enabled',
),
'access',
'language',
'note',
)
); ?>
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
<?php $this->set('fields', null); ?>
array(
'published',
'state',
'enabled',
),
'access',
'language',
'note',
)
); ?>
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
<?php $this->set('fields', null); ?>
</div>
</div>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_PUBLISHING', true)); ?>
<div class="row form-horizontal-desktop">
<div class="col-md-6">
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
<fieldset id="fieldset-rules" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
</fieldset>
</div>
<div class="col-md-6">
</div>
@ -66,7 +79,12 @@ $this->useCoreUI = true;
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'rules', Text::_('JGLOBAL_ACTION_PERMISSIONS_LABEL', true)); ?>
<?php echo $this->form->getInput('rules'); ?>
<fieldset id="fieldset-rules" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_ACTION_PERMISSIONS_LABEL'); ?></legend>
<div>
<?php echo $this->form->getInput('rules'); ?>
</div>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>

View File

@ -62,12 +62,12 @@ $context = $this->escape($this->state->get('filter.context'));
</caption>
<thead>
<tr>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<td style="width:1%" class="text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th scope="col" style="width:1%" class="text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
</th>
@ -95,6 +95,9 @@ $context = $this->escape($this->state->get('filter.context'));
<?php $canEditOwn = $user->authorise('core.edit.own', $component . '.fieldgroup.' . $item->id) && $item->created_by == $userId; ?>
<?php $canChange = $user->authorise('core.edit.state', $component . '.fieldgroup.' . $item->id) && $canCheckin; ?>
<tr class="row<?php echo $i % 2; ?>" item-id="<?php echo $item->id ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="order text-center d-none d-md-table-cell">
<?php $iconClass = ''; ?>
<?php if (!$canChange) : ?>
@ -103,15 +106,12 @@ $context = $this->escape($this->state->get('filter.context'));
<?php $iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED'); ?>
<?php endif; ?>
<span class="sortable-handler<?php echo $iconClass; ?>">
<span class="icon-menu" aria-hidden="true"></span>
<span class="fa fa-ellipsis-v" aria-hidden="true"></span>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->ordering; ?>">
<?php endif; ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('jgrid.published', $item->state, $i, 'groups.', $canChange, 'cb'); ?>
</td>
@ -121,9 +121,8 @@ $context = $this->escape($this->state->get('filter.context'));
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'groups.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit || $canEditOwn) : ?>
<?php $editIcon = $item->checked_out ? '' : '<span class="fa fa-pen-square mr-2" aria-hidden="true"></span>'; ?>
<a href="<?php echo Route::_('index.php?option=com_fields&task=group.edit&id=' . $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape(addslashes($item->title)); ?>">
<?php echo $editIcon; ?><?php echo $this->escape($item->title); ?></a>
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>

View File

@ -23,6 +23,8 @@ HTMLHelper::_('behavior.tabstate');
Text::script('COM_FINDER_FILTER_SHOW_ALL', true);
Text::script('COM_FINDER_FILTER_HIDE_ALL', true);
$this->ignore_fieldsets = ['jbasic'];
$this->useCoreUI = true;
HTMLHelper::_('script', 'com_finder/finder-edit.min.js', array('version' => 'auto', 'relative' => true));
@ -36,22 +38,26 @@ HTMLHelper::_('script', 'com_finder/finder-edit.min.js', array('version' => 'aut
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'details', Text::_('COM_FINDER_EDIT_FILTER')); ?>
<div class="row">
<div class="col-md-9">
<?php if ($this->total > 0) : ?>
<div class="well">
<?php echo $this->form->renderField('map_count'); ?>
<div class="col-lg-9">
<div class="card">
<div class="card-body">
<?php if ($this->total > 0) : ?>
<div class="well">
<?php echo $this->form->renderField('map_count'); ?>
</div>
<button class="btn btn-secondary filter-toggle-all" type="button">
<span class="fa fa-square" aria-hidden="true"></span> <?php echo Text::_('JGLOBAL_SELECTION_INVERT'); ?></button>
<button class="btn btn-secondary float-right" type="button" id="expandAccordion"><?php echo Text::_('COM_FINDER_FILTER_SHOW_ALL'); ?></button>
<hr>
<?php endif; ?>
<?php echo HTMLHelper::_('filter.slider', array('selected_nodes' => $this->filter->data)); ?>
</div>
<button class="btn btn-secondary filter-toggle-all" type="button">
<span class="fa fa-square" aria-hidden="true"></span> <?php echo Text::_('JGLOBAL_SELECTION_INVERT'); ?></button>
<button class="btn btn-secondary float-right" type="button" id="expandAccordion"><?php echo Text::_('COM_FINDER_FILTER_SHOW_ALL'); ?></button>
<hr>
<?php endif; ?>
<?php echo HTMLHelper::_('filter.slider', array('selected_nodes' => $this->filter->data)); ?>
</div>
</div>
<div class="col-md-3">
<div class="card card-light">
<div class="col-lg-3">
<div class="card">
<div class="card-body">
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
</div>
@ -60,8 +66,25 @@ HTMLHelper::_('script', 'com_finder/finder-edit.min.js', array('version' => 'aut
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_PUBLISHING')); ?>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'publishing', Text::_('JGLOBAL_FIELDSET_OPTIONS')); ?>
<div class="row">
<div class="col-md-6">
<fieldset id="fieldset-publishingdata" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('JGLOBAL_FIELDSET_PUBLISHING'); ?></legend>
<div>
<?php echo LayoutHelper::render('joomla.edit.publishingdata', $this); ?>
</div>
</fieldset>
</div>
<div class="col-md-6">
<fieldset id="fieldset-filter" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_('COM_FINDER_FILTER_FIELDSET_PARAMS'); ?></legend>
<div>
<?php echo $this->form->renderFieldset('jbasic'); ?>
</div>
</fieldset>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>

View File

@ -33,70 +33,76 @@ HTMLHelper::_('script', 'com_finder/index.js', ['version' => 'auto', 'relative'
<div class="col-md-10">
<div id="j-main-container" class="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<table class="table">
<caption id="captionTable" class="sr-only">
<?php echo Text::_('COM_FINDER_INDEX_TABLE_CAPTION'); ?>, <?php echo Text::_('JGLOBAL_SORTED_BY'); ?>
</caption>
<thead>
<tr>
<td style="width:1%" class="text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" style="width:1%" class="text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'l.published', $listDirn, $listOrder); ?>
</th>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'l.title', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:10%" class="d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_INDEX_HEADING_INDEX_TYPE', 't.title', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:10%" class="d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_INDEX_HEADING_INDEX_DATE', 'l.indexdate', $listDirn, $listOrder); ?>
</th>
<?php if (Multilanguage::isEnabled()) : ?>
<th scope="col" style="width:10%" class="nowrap d-none d-md-table-cell">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'l.language', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" style="width:15%" class="text-center d-none d-md-table-cell text-center">
<?php echo Text::_('COM_FINDER_INDEX_HEADING_DETAILS'); ?>
</th>
<th scope="col" style="width:30%" class="d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_INDEX_HEADING_LINK_URL', 'l.url', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tbody>
<?php $canChange = Factory::getUser()->authorise('core.manage', 'com_finder'); ?>
<?php foreach ($this->items as $i => $item) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->link_id); ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('jgrid.published', $item->published, $i, 'index.', $canChange, 'cb'); ?>
</td>
<th scope="row">
<label for="cb<?php echo $i; ?>">
<?php echo $this->escape($item->title); ?>
</label>
</th>
<td class="small d-none d-md-table-cell">
<?php
$key = FinderHelperLanguage::branchSingular($item->t_title);
echo $lang->hasKey($key) ? Text::_($key) : $item->t_title;
?>
</td>
<td class="small d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('date', $item->indexdate, Text::_('DATE_FORMAT_LC4')); ?>
</td>
<?php if (Multilanguage::isEnabled()) : ?>
<td class="small d-none d-md-table-cell">
<?php echo LayoutHelper::render('joomla.content.language', $item); ?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-info">
<span class="fa fa-info-circle" aria-hidden="true"></span><span class="sr-only"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<table class="table">
<caption id="captionTable" class="sr-only">
<?php echo Text::_('COM_FINDER_INDEX_TABLE_CAPTION'); ?>, <?php echo Text::_('JGLOBAL_SORTED_BY'); ?>
</caption>
<thead>
<tr>
<td style="width:1%" class="text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<?php endif; ?>
<td class="text-center d-none d-md-table-cell text-center">
<th scope="col" style="width:1%">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'l.published', $listDirn, $listOrder); ?>
</th>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'l.title', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:10%" class="d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_INDEX_HEADING_INDEX_TYPE', 't.title', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:10%" class="d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_INDEX_HEADING_INDEX_DATE', 'l.indexdate', $listDirn, $listOrder); ?>
</th>
<?php if (Multilanguage::isEnabled()) : ?>
<th scope="col" style="width:10%" class="nowrap d-none d-md-table-cell">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'l.language', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" style="width:15%" class="text-center d-none d-md-table-cell text-center">
<?php echo Text::_('COM_FINDER_INDEX_HEADING_DETAILS'); ?>
</th>
<th scope="col" style="width:30%" class="d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_INDEX_HEADING_LINK_URL', 'l.url', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tbody>
<?php $canChange = Factory::getUser()->authorise('core.manage', 'com_finder'); ?>
<?php foreach ($this->items as $i => $item) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="text-center">
<?php echo HTMLHelper::_('grid.id', $i, $item->link_id); ?>
</td>
<td class="text-center">
<?php echo HTMLHelper::_('jgrid.published', $item->published, $i, 'index.', $canChange, 'cb'); ?>
</td>
<th scope="row">
<label for="cb<?php echo $i; ?>">
<?php echo $this->escape($item->title); ?>
</label>
</th>
<td class="small d-none d-md-table-cell">
<?php
$key = FinderHelperLanguage::branchSingular($item->t_title);
echo $lang->hasKey($key) ? Text::_($key) : $item->t_title;
?>
</td>
<td class="small d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('date', $item->indexdate, Text::_('DATE_FORMAT_LC4')); ?>
</td>
<?php if (Multilanguage::isEnabled()) : ?>
<td class="small d-none d-md-table-cell">
<?php echo LayoutHelper::render('joomla.content.language', $item); ?>
</td>
<?php endif; ?>
<td class="text-center d-none d-md-table-cell text-center">
<?php if ((int) $item->publish_start_date or (int) $item->publish_end_date or (int) $item->start_date or (int) $item->end_date) : ?>
<span tabindex="0">
<span class="icon-calendar" aria-hidden="true"></span>
@ -106,17 +112,18 @@ HTMLHelper::_('script', 'com_finder/index.js', ['version' => 'auto', 'relative'
<?php echo Text::sprintf('COM_FINDER_INDEX_DATE_INFO', $item->publish_start_date, $item->publish_end_date, $item->start_date, $item->end_date); ?>
</div>
<?php endif; ?>
</td>
<td class="small break-word d-none d-md-table-cell">
<?php echo (strlen($item->url) > 80) ? substr($item->url, 0, 70) . '...' : $item->url; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</td>
<td class="small break-word d-none d-md-table-cell">
<?php echo (strlen($item->url) > 80) ? substr($item->url, 0, 70) . '...' : $item->url; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>
<?php // load the pagination. ?>
<?php echo $this->pagination->getListFooter(); ?>
<?php endif; ?>
<input type="hidden" name="task" value="display">
<input type="hidden" name="boxchecked" value="0">

View File

@ -11,8 +11,10 @@ namespace Joomla\Component\Installer\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
use Joomla\Component\Installer\Administrator\Model\DatabaseModel;
@ -66,4 +68,32 @@ class DatabaseController extends BaseController
$this->setRedirect(Route::_('index.php?option=com_installer&view=database', false));
}
/**
* Provide the data for a badge in a menu item via JSON
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function getMenuBadgeData()
{
if (!Factory::getUser()->authorise('core.manage', 'com_installer'))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
$model = $this->getModel('Database');
$changeSet = $model->getItems();
$changeSetCount = 0;
foreach ($changeSet as $item)
{
$changeSetCount += $item['errorsCount'];
}
echo new JsonResponse($changeSetCount);
}
}

View File

@ -11,7 +11,9 @@ namespace Joomla\Component\Installer\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
/**
@ -71,4 +73,23 @@ class DiscoverController extends BaseController
$model->purge();
$this->setRedirect(Route::_('index.php?option=com_installer&view=discover', false), $model->_message);
}
/**
* Provide the data for a badge in a menu item via JSON
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function getMenuBadgeData()
{
if (!Factory::getUser()->authorise('core.manage', 'com_installer'))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
$model = $this->getModel('Discover');
echo new JsonResponse(count($model->getItems()));
}
}

View File

@ -12,7 +12,9 @@ namespace Joomla\Component\Installer\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\Client\ClientHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
/**
* Installer Controller
@ -62,4 +64,23 @@ class DisplayController extends BaseController
return $this;
}
/**
* Provide the data for a badge in a menu item via JSON
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function getMenuBadgeData()
{
if (!Factory::getUser()->authorise('core.manage', 'com_installer'))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
$model = $this->getModel('Warnings');
echo new JsonResponse(count($model->getItems()));
}
}

View File

@ -12,8 +12,10 @@ namespace Joomla\Component\Installer\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Updater\Updater;
@ -204,4 +206,23 @@ class UpdateController extends BaseController
$app->close();
}
/**
* Provide the data for a badge in a menu item via JSON
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function getMenuBadgeData()
{
if (!Factory::getUser()->authorise('core.manage', 'com_installer'))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
$model = $this->getModel('Update');
echo new JsonResponse(count($model->getItems()));
}
}

View File

@ -5,4 +5,18 @@
<![CDATA[COM_INSTALLER_DATABASE_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="params">
<fieldset name="basic" label="JOPTIONS">
<field
name="ajax-badge"
type="radio"
label="COM_INSTALLER_DATABASE_VIEW_DISPLAY_BADGE"
class="switcher"
default=""
>
<option value="">JHIDE</option>
<option value="index.php?option=com_installer&amp;task=database.getMenuBadgeData&amp;format=json">JSHOW</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -5,4 +5,18 @@
<![CDATA[COM_INSTALLER_DISCOVER_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="params">
<fieldset name="basic" label="JOPTIONS">
<field
name="ajax-badge"
type="radio"
label="COM_INSTALLER_DISCOVER_VIEW_DISPLAY_BADGE"
class="switcher"
default=""
>
<option value="">JHIDE</option>
<option value="index.php?option=com_installer&amp;task=discover.getMenuBadgeData&amp;format=json">JSHOW</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -42,7 +42,7 @@ $app = Factory::getApplication();
<?php // Show installation tabs ?>
<?php foreach ($tabs as $tab) : ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', $tab['name'], $tab['label']); ?>
<fieldset class="uploadform">
<fieldset class="uploadform option-fieldset options-grid-form-full">
<?php echo $tab['content']; ?>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>

View File

@ -12,7 +12,7 @@ defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
?>
<fieldset>
<fieldset class="option-fieldset options-grid-form-full">
<legend><?php echo Text::_('COM_INSTALLER_MSG_DESCFTPTITLE'); ?></legend>
<?php echo Text::_('COM_INSTALLER_MSG_DESCFTP'); ?>

View File

@ -5,4 +5,18 @@
<![CDATA[COM_INSTALLER_UPDATE_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="params">
<fieldset name="basic" label="JOPTIONS">
<field
name="ajax-badge"
type="radio"
label="COM_INSTALLER_UPDATE_VIEW_DISPLAY_BADGE"
class="switcher"
default=""
>
<option value="">JHIDE</option>
<option value="index.php?option=com_installer&amp;task=update.getMenuBadgeData&amp;format=json">JSHOW</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -5,4 +5,18 @@
<![CDATA[COM_INSTALLER_WARNINGS_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="params">
<fieldset name="basic" label="JOPTIONS">
<field
name="ajax-badge"
type="radio"
label="COM_INSTALLER_WARNINGS_VIEW_DISPLAY_BADGE"
class="switcher"
default=""
>
<option value="">JHIDE</option>
<option value="index.php?option=com_installer&amp;task=getMenuBadgeData&amp;format=json">JSHOW</option>
</field>
</fieldset>
</fields>
</metadata>

View File

@ -12,7 +12,9 @@ namespace Joomla\Component\Joomlaupdate\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\Client\ClientHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
/**
* Joomla! Update Controller
@ -74,4 +76,29 @@ class DisplayController extends BaseController
return $this;
}
/**
* Provide the data for a badge in a menu item via JSON
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function getMenuBadgeData()
{
if (!Factory::getUser()->authorise('core.manage', 'com_joomlaupdate'))
{
throw new \Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'));
}
$model = $this->getModel('Update');
$model->refreshUpdates();
$joomlaUpdate = $model->getUpdateInformation();
$hasUpdate = $joomlaUpdate['hasUpdate'] ? $joomlaUpdate['latest'] : '';
echo new JsonResponse($hasUpdate);
}
}

View File

@ -121,7 +121,7 @@ class HtmlView extends BaseHtmlView
$this->nonCoreExtensions = $model->getNonCoreExtensions();
// Set the toolbar information.
ToolbarHelper::title(Text::_('COM_JOOMLAUPDATE_OVERVIEW'), 'loop install');
ToolbarHelper::title(Text::_('COM_JOOMLAUPDATE_OVERVIEW'), 'joomla install');
ToolbarHelper::custom('update.purge', 'loop', 'loop', 'COM_JOOMLAUPDATE_TOOLBAR_CHECK', false);
// Add toolbar buttons.

Some files were not shown because too many files have changed in this diff Show More