Skip to content

Commit 784028d

Browse files
Frontediting fix
1 parent 56991ba commit 784028d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+104
-3662
lines changed

astroid/astroid-framework/plugins/astroid/astroid.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
JLoader::registerNamespace('Astroid', JPATH_LIBRARIES . '/astroid/framework/library/astroid', false, false, 'psr4');
1414

1515
use Astroid\Framework;
16+
use Astroid\Helper;
17+
use Astroid\Helper\Template;
1618

1719
/**
1820
* Astroid system plugin
@@ -30,23 +32,24 @@ public function onAfterRoute()
3032
$option = $this->app->input->get('option', '');
3133
$astroid = $this->app->input->get('astroid', '');
3234
if ($option == 'com_ajax' && !empty($astroid)) {
33-
Astroid\Framework::getClient()->execute($astroid);
35+
Framework::getClient()->execute($astroid);
3436
}
3537
}
3638

3739
public function onContentPrepareForm($form, $data)
3840
{
39-
Astroid\Framework::getClient()->onContentPrepareForm($form, $data);
41+
Framework::getClient()->onContentPrepareForm($form, $data);
4042
}
4143

4244
public function onAfterRender()
4345
{
44-
Astroid\Framework::getClient()->onAfterRender();
46+
if (Framework::isAdmin()) return;
47+
Framework::getClient()->onAfterRender();
4548
}
4649

4750
public function onAfterRespond()
4851
{
49-
if (!(Astroid\Helper::getPluginParams()->get('astroid_debug', 0)) || Framework::isAdmin()) {
52+
if (!(Helper::getPluginParams()->get('astroid_debug', 0)) || Framework::isAdmin()) {
5053
return;
5154
}
5255

@@ -61,15 +64,15 @@ public function onAfterRespond()
6164
if ($contents) {
6265
ob_end_clean();
6366
}
64-
echo Astroid\Helper::str_lreplace('</body>', Astroid\Helper::debug() . '</body>', $contents);
67+
echo Helper::str_lreplace('</body>', Helper::debug() . '</body>', $contents);
6568
}
6669

6770
public function onExtensionAfterSave($context, $table, $isNew)
6871
{
69-
if (Astroid\Framework::isAdmin() && $context == "com_templates.style" && $isNew && Astroid\Helper\Template::isAstroidTemplate($table->template)) {
72+
if (Framework::isAdmin() && $context == "com_templates.style" && $isNew && Template::isAstroidTemplate($table->template)) {
7073
$params = \json_decode($table->params, TRUE);
7174
$parent_id = $params['astroid'];
72-
Astroid\Helper\Template::setTemplateDefaults($table->template, $table->id, $parent_id);
75+
Template::setTemplateDefaults($table->template, $table->id, $parent_id);
7376
}
7477
}
7578

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

Lines changed: 5 additions & 16 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 {
@@ -67,12 +69,6 @@
6769
<?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date') || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam || $template->params->get('astroid_readtime', 1));
6870
?>
6971

70-
<?php if (!$useDefList && $this->print) : ?>
71-
<div id="pop-print" class="btn hidden-print">
72-
<?php echo HTMLHelper::_('icon.print_screen', $this->item, $params); ?>
73-
</div>
74-
<div class="clearfix"> </div>
75-
<?php endif; ?>
7672
<?php $astroidArticle->render('above-title'); ?>
7773
<?php if (($params->get('show_title') || $params->get('show_author'))) : ?>
7874
<div class="item-title">
@@ -95,16 +91,9 @@
9591
<?php endif; ?>
9692
</div>
9793
<?php endif; ?>
98-
<?php if (!$this->print) : ?>
99-
<?php if ($canEdit || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
100-
<?php echo LayoutHelper::render('joomla.content.icons', array('params' => $params, 'item' => $this->item, 'print' => false)); ?>
101-
<?php endif; ?>
102-
<?php else : ?>
103-
<?php if ($useDefList) : ?>
104-
<div id="pop-print" class="btn hidden-print">
105-
<?php echo HTMLHelper::_('icon.print_screen', $this->item, $params); ?>
106-
</div>
107-
<?php endif; ?>
94+
95+
<?php if ($canEdit) : ?>
96+
<?php echo LayoutHelper::render('joomla.content.icons', array('params' => $params, 'item' => $this->item)); ?>
10897
<?php endif; ?>
10998

11099
<?php // Content is generated by content plugin event "onContentAfterTitle"

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

Lines changed: 0 additions & 252 deletions
This file was deleted.

0 commit comments

Comments
 (0)