Skip to content

Commit

Permalink
[4.0] Change Status dropdown consistency (#24078)
Browse files Browse the repository at this point in the history
Having a consistent UI is essential. All off the new change status dropdown items are ordrered Published->Unpublished->Archive->Checkin->Trashed except for com_content where Archive and Checkin are reversed.

This PR changes the order of the articles change status dropdown items to be consistent with all the others
  • Loading branch information
brianteeman authored and wilsonge committed Mar 4, 2019
1 parent 4bb85fb commit 05622f2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
10 changes: 8 additions & 2 deletions administrator/components/com_content/View/Articles/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,20 @@ protected function addToolbar()
->text('JUNFEATURE')
->task('articles.unfeatured')
->listCheck(true);

$childBar->checkin('articles.checkin')->listCheck(true);
}

if ($canDo->get('core.execute.transition'))
{
$childBar->archive('articles.archive')->listCheck(true);
}

if ($canDo->get('core.edit.state'))
{
$childBar->checkin('articles.checkin')->listCheck(true);
}

if ($canDo->get('core.execute.transition'))
{
$childBar->trash('articles.trash')->listCheck(true);
}
}
Expand Down
25 changes: 9 additions & 16 deletions administrator/components/com_content/View/Featured/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,9 @@ protected function addToolbar()

if ($canDo->get('core.execute.transition'))
{
$childBar->standardButton('publish')
->text('JTOOLBAR_PUBLISH')
->task('articles.publish')
->listCheck(true);
$childBar->standardButton('unpublish')
->text('JTOOLBAR_UNPUBLISH')
->task('articles.unpublish')
->listCheck(true);
$childBar->publish('articles.publish')->listCheck(true);

$childBar->unpublish('articles.unpublish')->listCheck(true);
}

if ($canDo->get('core.edit.state'))
Expand All @@ -221,20 +216,18 @@ protected function addToolbar()

if ($canDo->get('core.execute.transition'))
{
$childBar->standardButton('archive')
->text('JTOOLBAR_ARCHIVE')
->task('articles.archive')
->listCheck(true);
$childBar->standardButton('trash')
->text('JTOOLBAR_TRASH')
->task('articles.trash')
->listCheck(true);
$childBar->archive('articles.archive')->listCheck(true);
}

if ($canDo->get('core.edit.state'))
{
$childBar->checkin('articles.checkin')->listCheck(true);
}

if ($canDo->get('core.execute.transition'))
{
$childBar->trash('articles.trash')->listCheck(true);
}
}

if ($this->state->get('filter.condition') == ContentComponent::CONDITION_TRASHED && $canDo->get('core.delete'))
Expand Down

0 comments on commit 05622f2

Please sign in to comment.