Skip to content

Commit

Permalink
Avoid empty dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
chmst committed Jan 2, 2019
1 parent 070245d commit 6e9f022
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions administrator/components/com_users/View/Users/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,17 @@ protected function addToolbar()
$toolbar->addNew('user.add');
}

$dropdown = $toolbar->dropdownButton('status')
->text('JTOOLBAR_CHANGE_STATUS')
->toggleSplit(false)
->icon('fa fa-globe')
->buttonClass('btn btn-info')
->listCheck(true);
if ($canDo->get('core.edit.state') || $canDo->get('core.admin'))
{
$dropdown = $toolbar->dropdownButton('status')
->text('JTOOLBAR_CHANGE_STATUS')
->toggleSplit(false)
->icon('fa fa-globe')
->buttonClass('btn btn-info')
->listCheck(true);

$childBar = $dropdown->getChildToolbar();
$childBar = $dropdown->getChildToolbar();

if ($canDo->get('core.edit.state'))
{
$childBar->publish('users.activate', 'COM_USERS_TOOLBAR_ACTIVATE', true);
$childBar->unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
$childBar->standardButton('unblock')
Expand Down

0 comments on commit 6e9f022

Please sign in to comment.