? ? No Code Attached Yet good first issue
avatar ChristineWk
ChristineWk
21 Feb 2022

This is not a bug report but a suggestion. Please refer to:
https://www.joomla.ch/forum/joomla4-programmierung/38870-tipp-wir-basteln-uns-einen-1-click-logout-button-fuer-das-back-end#50044
Could of course also be continued as a discussion.

Steps to reproduce the issue

Actual result

screen shot 2022-02-21 at 11 47 14

Wanted result

screen shot 2022-02-21 at 11 47 59

Additional comments

Suggested override from jEvents:

/**
* @package Joomla.Administrator
* @subpackage mod_user
*
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
* @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;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;

$hideLinks = $app->input->getBool('hidemainmenu');

if ($hideLinks)
{
return;
}

// Load the Bootstrap Dropdown
HTMLHelper::_('bootstrap.dropdown', '.dropdown-toggle');
?>
<div class="header-item-content dropdown header-profile">
<button class="dropdown-toggle d-flex align-items-center ps-0 py-0" data-bs-toggle="dropdown" type="button"
title="<?php echo Text::_('MOD_USER_MENU'); ?>">
<div class="header-item-icon">
<span class="icon-user-circle" aria-hidden="true"></span>
</div>
<div class="header-item-text">
<?php echo Text::_('MOD_USER_MENU'); ?>
</div>
<span class="icon-angle-down" aria-hidden="true"></span>
</button>
<div class="dropdown-menu dropdown-menu-end">
<div class="dropdown-header">
<span class="icon-user-circle icon-fw" aria-hidden="true"></span>
<?php echo Text::sprintf('MOD_USER_TITLE', $user->name); ?>
</div>
<?php $uri = Uri::getInstance(); ?>
<?php $route = 'index.php?option=com_users&task=user.edit&id=' . $user->id . '&return=' . base64_encode($uri) . '#attrib-user_details'; ?>
<a class="dropdown-item" href="<?php echo Route::_($route); ?>">
<span class="icon-user icon-fw" aria-hidden="true"></span>
<?php echo Text::_('MOD_USER_EDIT_ACCOUNT'); ?>
</a>
<?php $route = 'index.php?option=com_users&task=user.edit&id=' . $user->id . '&return=' . base64_encode($uri) . '#attrib-accessibility'; ?>
<a class="dropdown-item" href="<?php echo Route::_($route); ?>">
<span class="icon-universal-access icon-fw" aria-hidden="true"></span>
<?php echo Text::_('MOD_USER_ACCESSIBILITY_SETTINGS'); ?>
</a>
<?php $route = 'index.php?option=com_login&task=logout&' . Session::getFormToken() . '=1'; ?>
<a class="dropdown-item" href="<?php echo Route::_($route); ?>">
<span class="icon-power-off icon-fw" aria-hidden="true"></span>
<?php echo Text::_('JLOGOUT'); ?>
</a>
</div>
<div class="header-item-content dropdown header-profile">
<a href="<?php echo Route::_($route); ?>">
<span class="icon-power-off icon-fw" aria-hidden="true"></span>
</a>
</div>
</div>

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar ChristineWk ChristineWk - open - 21 Feb 2022
avatar ChristineWk ChristineWk - change - 21 Feb 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 21 Feb 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 21 Feb 2022
avatar brianteeman
brianteeman - comment - 21 Feb 2022

From an accessibility perspective you need to be very careful to ensure that there is significant space between the existing button and the logout button

avatar chmst
chmst - comment - 21 Feb 2022

Nice idea! But should be an extra button.

avatar chmst chmst - change - 22 Feb 2022
Labels Added: ? good first issue
avatar chmst chmst - labeled - 22 Feb 2022
avatar chmst chmst - labeled - 22 Feb 2022
avatar ChristineWk ChristineWk - change - 22 Feb 2022
Title
[Draft] Backend: Log Out Button
[RFC] Backend: Log Out Button
avatar ChristineWk ChristineWk - edited - 22 Feb 2022
avatar joomla-cms-bot joomla-cms-bot - change - 22 Feb 2022
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Feb 2022
avatar simbus82
simbus82 - comment - 22 Feb 2022

Nice idea for speedup a correct and "secure" action to do in admin backend: fast logout after the job done.
I see now that the "on/off" icon is not a "well recognized" icon for logout, better to use something like this https://www.svgrepo.com/svg/21304/logout
(It would apply to the whole Joomla environment, the on/off icon is not a logout icon).

avatar richard67 richard67 - change - 1 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-01 10:39:34
Closed_By richard67
avatar richard67 richard67 - close - 1 Mar 2022
avatar richard67
richard67 - comment - 1 Mar 2022

Closing as having a pull request. Please test #37161 . Thanks in advance.

avatar richard67 richard67 - change - 1 Mar 2022
Status Closed New
Closed_Date 2022-03-01 10:39:34
Closed_By richard67
avatar richard67 richard67 - reopen - 1 Mar 2022
avatar richard67
richard67 - comment - 1 Mar 2022

Re-opening since that pull request is not ok yet.

avatar PhilETaylor
PhilETaylor - comment - 2 Mar 2022

This saves a single click and a mouse move less than 3cm? but yet will consume approximately 100px in an already space cramped toolbar?

avatar ChristineWk
ChristineWk - comment - 3 Mar 2022

@richard67 There are 2 open PRs now. Should my issue be closed again?

avatar richard67
richard67 - comment - 3 Mar 2022

@ChristineWk Let's wait for the authors of the 2 PRs how they agree, i.e. which one will be closed in favour of the other one, so we can refer to the right PR when closing the issue.

avatar anmode
anmode - comment - 6 Mar 2022

Hey, I have checked both PRs one of the PR there is a problem with, and the other one they removed the logout button from the dropdown. I think we have to add an extra button as a feature update. I have done that but the unsure @joomla-cms-bot failed some check in my PR #37207

avatar anmode
anmode - comment - 6 Mar 2022

I had resolved the conflicts that caused PR #37207 to be failed and generated the new PR #37208 with this feature update.

avatar chmst chmst - close - 6 Mar 2022
avatar chmst
chmst - comment - 6 Mar 2022

Closing as we hava apull request please test #37183 (also for rtl languages)

avatar chmst chmst - change - 6 Mar 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-03-06 15:08:49
Closed_By chmst

Add a Comment

Login with GitHub to post a comment