diff --git a/administrator/components/com_content/src/Service/HTML/Icon.php b/administrator/components/com_content/src/Service/HTML/Icon.php
index e7606a5d3f0c..aec5346d97b5 100644
--- a/administrator/components/com_content/src/Service/HTML/Icon.php
+++ b/administrator/components/com_content/src/Service/HTML/Icon.php
@@ -119,9 +119,6 @@ public function edit($article, $params, $attribs = array(), $legacy = false)
return;
}
- // Set the link class
- $attribs['class'] = 'dropdown-item';
-
// Show checked_out icon if the article is checked out by a different user
if (property_exists($article, 'checked_out')
&& property_exists($article, 'checked_out_time')
@@ -130,11 +127,13 @@ public function edit($article, $params, $attribs = array(), $legacy = false)
{
$checkoutUser = Factory::getUser($article->checked_out);
$date = HTMLHelper::_('date', $article->checked_out_time);
- $tooltip = Text::_('JLIB_HTML_CHECKED_OUT') . ' :: ' . Text::sprintf('COM_CONTENT_CHECKED_OUT_BY', $checkoutUser->name)
+ $tooltip = Text::sprintf('COM_CONTENT_CHECKED_OUT_BY', $checkoutUser->name)
. '
' . $date;
- $text = LayoutHelper::render('joomla.content.icons.edit_lock', array('tooltip' => $tooltip, 'legacy' => $legacy));
+ $text = LayoutHelper::render('joomla.content.icons.edit_lock', array('article' => $article, 'tooltip' => $tooltip, 'legacy' => $legacy));
+ $attribs['role'] = 'button';
+ $attribs['aria-describedby'] = 'editarticle-' . (int) $article->id;
$output = HTMLHelper::_('link', '#', $text, $attribs);
return $output;
@@ -145,58 +144,21 @@ public function edit($article, $params, $attribs = array(), $legacy = false)
if ($article->state == Workflow::CONDITION_UNPUBLISHED)
{
- $overlib = Text::_('JUNPUBLISHED');
+ $tooltip = Text::_('COM_CONTENT_EDIT_UNPUBLISHED_ARTICLE');
}
else
{
- $overlib = Text::_('JPUBLISHED');
+ $tooltip = Text::_('COM_CONTENT_EDIT_PUBLISHED_ARTICLE');
}
- $date = HTMLHelper::_('date', $article->created);
- $author = $article->created_by_alias ?: $article->author;
-
- $overlib .= '<br>';
- $overlib .= $date;
- $overlib .= '<br>';
- $overlib .= Text::sprintf('COM_CONTENT_WRITTEN_BY', htmlspecialchars($author, ENT_COMPAT, 'UTF-8'));
-
- $text = LayoutHelper::render('joomla.content.icons.edit', array('article' => $article, 'overlib' => $overlib, 'legacy' => $legacy));
+ $text = LayoutHelper::render('joomla.content.icons.edit', array('article' => $article, 'tooltip' => $tooltip, 'legacy' => $legacy));
- $attribs['title'] = Text::_('JGLOBAL_EDIT_TITLE');
+ $attribs['aria-describedby'] = 'editarticle-' . (int) $article->id;
$output = HTMLHelper::_('link', Route::_($url), $text, $attribs);
return $output;
}
- /**
- * Method to generate a popup link to print an article
- *
- * @param object $article The article information
- * @param Registry $params The item parameters
- * @param array $attribs Optional attributes for the link
- * @param boolean $legacy True to use legacy images, false to use icomoon based graphic
- *
- * @return string The HTML markup for the popup link
- *
- * @since 4.0.0
- */
- public function print_popup($article, $params, $attribs = array(), $legacy = false)
- {
- $url = RouteHelper::getArticleRoute($article->slug, $article->catid, $article->language);
- $url .= '&tmpl=component&print=1&layout=default';
-
- $status = 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no';
-
- $text = LayoutHelper::render('joomla.content.icons.print_popup', array('params' => $params, 'legacy' => $legacy));
-
- $attribs['title'] = Text::sprintf('JGLOBAL_PRINT_TITLE', htmlspecialchars($article->title, ENT_QUOTES, 'UTF-8'));
- $attribs['onclick'] = "window.open(this.href,'win2','" . $status . "'); return false;";
- $attribs['rel'] = 'nofollow';
- $attribs['class'] = 'dropdown-item';
-
- return HTMLHelper::_('link', Route::_($url), $text, $attribs);
- }
-
/**
* Method to generate a link to print an article
*
diff --git a/language/en-GB/com_content.ini b/language/en-GB/com_content.ini
index 7ebf7c8d4727..a966a692694b 100644
--- a/language/en-GB/com_content.ini
+++ b/language/en-GB/com_content.ini
@@ -19,7 +19,8 @@ COM_CONTENT_CONTENT_TYPE_CATEGORY="Article Category"
COM_CONTENT_CREATE_ARTICLE="Submit new article"
COM_CONTENT_CREATED_DATE="Created Date"
COM_CONTENT_CREATED_DATE_ON="Created: %s"
-COM_CONTENT_EDIT_ITEM="Edit Article"
+COM_CONTENT_EDIT_PUBLISHED_ARTICLE="Published Article"
+COM_CONTENT_EDIT_UNPUBLISHED_ARTICLE="Unpublished Article"
COM_CONTENT_ERROR_ARTICLE_NOT_FOUND="Article not found"
COM_CONTENT_ERROR_LOGIN_TO_VIEW_ARTICLE="Please login to view the article"
COM_CONTENT_ERROR_PARENT_CATEGORY_NOT_FOUND="Parent category not found"
diff --git a/layouts/joomla/content/icons.php b/layouts/joomla/content/icons.php
index ec5e088568ed..c08afb433ef3 100644
--- a/layouts/joomla/content/icons.php
+++ b/layouts/joomla/content/icons.php
@@ -9,9 +9,7 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
-use Joomla\CMS\Language\Text;
$canEdit = $displayData['params']->get('access-edit');
$articleId = $displayData['item']->id;
@@ -19,13 +17,8 @@