Skip to content

Commit e2be2d5

Browse files
Frontend Editing Bug fixes for Template Zero
1 parent 275283a commit e2be2d5

40 files changed

+115
-3622
lines changed

astroid/astroid-template-zero/html/com_content/article/default.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
use Joomla\CMS\Router\Route;
2020
use Joomla\CMS\Uri\Uri;
2121

22+
HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers');
23+
2224
if (ASTROID_JOOMLA_VERSION > 3) {
2325
\JLoader::registerAlias('ContentHelperRoute', 'Joomla\Component\Content\Site\Helper\RouteHelper');
2426
} else {

astroid/astroid-template-zero/html/com_content/form/edit.php

Lines changed: 0 additions & 252 deletions
This file was deleted.
Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,27 @@
11
<?php
22

33
/**
4-
* @package Astroid Framework
5-
* @author JoomDev https://www.joomdev.com
6-
* @copyright Copyright (C) 2009 - 2020 JoomDev.
7-
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
4+
* @package Joomla.Site
5+
* @subpackage Layout
6+
*
7+
* @copyright (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
8+
* @license GNU General Public License version 2 or later; see LICENSE.txt
89
*/
910

10-
defined('JPATH_BASE') or die;
11+
defined('_JEXEC') or die;
1112

1213
use Joomla\CMS\HTML\HTMLHelper;
13-
use Joomla\CMS\Language\Text;
1414

15-
HTMLHelper::_('bootstrap.framework');
16-
17-
$canEdit = $displayData['params']->get('access-edit');
15+
$canEdit = $displayData['params']->get('access-edit');
1816
$articleId = $displayData['item']->id;
19-
2017
?>
2118

22-
<div class="icons">
23-
<?php if (empty($displayData['print'])) : ?>
24-
25-
<?php if ($canEdit || $displayData['params']->get('show_print_icon') || $displayData['params']->get('show_email_icon')) : ?>
26-
<div class="btn-group content-edit-dropdown float-right">
27-
<button class="btn dropdown-toggle py-1 px-2" type="button" id="dropdownMenuButton-<?php echo $articleId; ?>" aria-label="<?php echo Text::_('JUSER_TOOLS'); ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
28-
<span class="fas fa-cog fa-sm" aria-hidden="true"></span>
29-
<span class="caret" aria-hidden="true"></span>
30-
</button>
31-
<?php // Note the actions class is deprecated. Use dropdown-menu instead.
32-
?>
33-
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton-<?php echo $articleId; ?>">
34-
<?php if ($displayData['params']->get('show_print_icon')) : ?>
35-
<li class="dropdown-item print-icon"> <?php echo HTMLHelper::_('icon.print_popup', $displayData['item'], $displayData['params']); ?> </li>
36-
<?php endif; ?>
37-
<?php if ($displayData['params']->get('show_email_icon')) : ?>
38-
<li class="dropdown-item email-icon"> <?php echo HTMLHelper::_('icon.email', $displayData['item'], $displayData['params']); ?> </li>
39-
<?php endif; ?>
40-
<?php if ($canEdit) : ?>
41-
<li class="dropdown-item edit-icon"> <?php echo HTMLHelper::_('icon.edit', $displayData['item'], $displayData['params']); ?> </li>
42-
<?php endif; ?>
43-
</div>
44-
</div>
45-
<?php endif; ?>
46-
47-
<?php else : ?>
48-
19+
<?php if ($canEdit) : ?>
20+
<div class="icons">
4921
<div class="float-right">
50-
<?php echo HTMLHelper::_('icon.print_screen', $displayData['item'], $displayData['params']); ?>
22+
<div>
23+
<?php echo HTMLHelper::_('icon.edit', $displayData['item'], $displayData['params']); ?>
24+
</div>
5125
</div>
52-
53-
<?php endif; ?>
54-
</div>
26+
</div>
27+
<?php endif; ?>

astroid/astroid-template-zero/html/layouts/joomla/content/icons/create.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,20 @@
44
* @package Joomla.Site
55
* @subpackage Layout
66
*
7-
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
7+
* @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
88
* @license GNU General Public License version 2 or later; see LICENSE.txt
99
*/
1010

11-
defined('JPATH_BASE') or die;
11+
defined('_JEXEC') or die;
1212

13-
use Joomla\CMS\HTML\HTMLHelper;
1413
use Joomla\CMS\Language\Text;
1514

16-
HTMLHelper::_('bootstrap.tooltip');
17-
1815
$params = $displayData['params'];
19-
$legacy = $displayData['legacy'];
2016

2117
?>
2218
<?php if ($params->get('show_icons')) : ?>
23-
<?php if ($legacy) : ?>
24-
<?php echo HTMLHelper::_('image', 'system/new.png', Text::_('JNEW'), null, true); ?>
25-
<?php else : ?>
26-
<span class="icon-plus" aria-hidden="true"></span>
27-
<?php echo Text::_('JNEW'); ?>
28-
<?php endif; ?>
19+
<span class="fas fa-plus" aria-hidden="true"></span>
20+
<?php echo Text::_('JNEW'); ?>
2921
<?php else : ?>
3022
<?php echo Text::_('JNEW') . '&#160;'; ?>
3123
<?php endif; ?>

0 commit comments

Comments
 (0)