Skip to content

Commit

Permalink
🐛 fix empty trush button not appears issue, add a missing language st…
Browse files Browse the repository at this point in the history
…ring
  • Loading branch information
ahamed committed Mar 26, 2021
1 parent 61b0ef0 commit 2f81ae3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
16 changes: 8 additions & 8 deletions src/Assets/component/administrator/src/View/Notes/HtmlView.jext
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,18 @@ class HtmlView extends BaseHtmlView
$childBar->checkin('notes.checkin')->listCheck(true);
}

if ($this->state->get('filter.published') !== -2)
if ((int) $this->state->get('filter.published') !== -2)
{
$childBar->trash('notes.trash')->listCheck(true);
}
}

if ($this->state->get('filter.published') === -2 && $canDo->get('core.delete'))
{
$childBar->delete('notes.delete')
->text('JTOOLBAR_EMPTY_TRASH')
->message('JGLOBAL_CONFIRM_DELETE')
->listCheck(true);
}
if ((int) $this->state->get('filter.published') === -2 && $canDo->get('core.delete'))
{
$toolbar->delete('notes.delete')
->text('JTOOLBAR_EMPTY_TRASH')
->message('JGLOBAL_CONFIRM_DELETE')
->listCheck(true);
}

if ($user->authorise('core.admin', '{{prefix_component}}') || $user->authorise('core.options', '{{prefix_component}}'))
Expand Down
1 change: 1 addition & 0 deletions src/Assets/language/administrator/extension.jext
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
{{prefix_component_uppercase}}_N_ITEMS_CHECKED_IN="%d item(s) checked in"
{{prefix_component_uppercase}}_N_ITEMS_ARCHIVED="%d item(s) archived"
{{prefix_component_uppercase}}_N_ITEMS_TRASHED="%d item(s) trashed"
{{prefix_component_uppercase}}_N_ITEMS_DELETED="%d item(s) deleted"

;; Notes view
{{prefix_component_uppercase}}_NOTES_TOOLBAR_LABEL="Notes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,18 @@ class HtmlView extends BaseHtmlView
$childBar->checkin('{{plural}}.checkin')->listCheck(true);
}

if ($this->state->get('filter.published') !== -2)
if ((int) $this->state->get('filter.published') !== -2)
{
$childBar->trash('{{plural}}.trash')->listCheck(true);
}
}

if ($this->state->get('filter.published') === -2 && $canDo->get('core.delete'))
{
$childBar->delete('{{plural}}.delete')
->text('JTOOLBAR_EMPTY_TRASH')
->message('JGLOBAL_CONFIRM_DELETE')
->listCheck(true);
}
if ((int) $this->state->get('filter.published') === -2 && $canDo->get('core.delete'))
{
$toolbar->delete('{{plural}}.delete')
->text('JTOOLBAR_EMPTY_TRASH')
->message('JGLOBAL_CONFIRM_DELETE')
->listCheck(true);
}

if ($user->authorise('core.admin', '{{prefix_component}}') || $user->authorise('core.options', '{{prefix_component}}'))
Expand Down

0 comments on commit 2f81ae3

Please sign in to comment.