Skip to content

Commit

Permalink
Shorten content toolbar calls
Browse files Browse the repository at this point in the history
  • Loading branch information
bembelimen committed Dec 28, 2018
1 parent 49442fd commit 2b625d1
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions administrator/components/com_content/View/Articles/HtmlView.php
Expand Up @@ -221,14 +221,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 @@ -237,27 +232,20 @@ protected function addToolbar()
->text('JFEATURE')
->task('articles.featured')
->listCheck(true);

$childBar->standardButton('unfeatured')
->text('JUNFEATURE')
->task('articles.unfeatured')
->listCheck(true);

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

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);
$childBar->trash('articles.trash')->listCheck(true);
}
}

Expand Down

0 comments on commit 2b625d1

Please sign in to comment.