Skip to content

Commit

Permalink
Show trash button only if the filter state is not on trashed (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
bembelimen authored and Janek committed Jul 21, 2017
1 parent d9761af commit ce4dee9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,14 @@ protected function addToolbar()
ToolbarHelper::editList('transition.edit');
ToolbarHelper::publishList('transitions.publish');
ToolbarHelper::unpublishList('transitions.unpublish');
ToolbarHelper::trash('transitions.trash');

if ($this->state->get("filter.published") === "-2")
{
ToolbarHelper::deleteList(\JText::_('COM_WORKFLOW_ARE_YOU_SURE'), 'transitions.delete');
}
else
{
ToolbarHelper::trash('transitions.trash');
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,18 @@ protected function addToolbar()
ToolbarHelper::publishList('workflows.publish');
ToolbarHelper::unpublishList('workflows.unpublish');
ToolbarHelper::archiveList('workflows.archive');
ToolbarHelper::trash('workflows.trash');
ToolbarHelper::checkin('workflows.checkin', 'JTOOLBAR_CHECKIN', true);
ToolbarHelper::makeDefault('workflows.setDefault', 'COM_WORKFLOW_TOOLBAR_SET_HOME');

if ($this->state->get("filter.published") === "-2")
{
ToolbarHelper::deleteList(\JText::_('COM_WORKFLOW_ARE_YOU_SURE'), 'workflows.delete');
}
else
{
ToolbarHelper::trash('workflows.trash');
}

ToolbarHelper::help('JHELP_WORKFLOWS_LIST');
}

Expand Down

0 comments on commit ce4dee9

Please sign in to comment.