From 545b3806e77e3af4667951ab42c4903ebcbdb14f Mon Sep 17 00:00:00 2001 From: Roland Dalmulder Date: Sat, 10 Oct 2020 11:57:55 +0200 Subject: [PATCH] Do not show a link to the issue tracker if there is none. Fixes #298 Signed-off-by: Roland Dalmulder --- .../PatchTester/View/Pulls/PullsHtmlView.php | 12 ++++++------ .../PatchTester/View/Pulls/tmpl/default_items.php | 5 ++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/administrator/components/com_patchtester/PatchTester/View/Pulls/PullsHtmlView.php b/administrator/components/com_patchtester/PatchTester/View/Pulls/PullsHtmlView.php index 29f5ba4..2433361 100644 --- a/administrator/components/com_patchtester/PatchTester/View/Pulls/PullsHtmlView.php +++ b/administrator/components/com_patchtester/PatchTester/View/Pulls/PullsHtmlView.php @@ -32,7 +32,7 @@ class PullsHtmlView extends DefaultHtmlView * @var array * @since 3.0.0 */ - protected $branches = array(); + protected $branches = []; /** * Array containing environment errors @@ -40,7 +40,7 @@ class PullsHtmlView extends DefaultHtmlView * @var array * @since 2.0 */ - protected $envErrors = array(); + protected $envErrors = []; /** * Array of open pull requests @@ -167,7 +167,7 @@ class PullsHtmlView extends DefaultHtmlView */ protected function getLimitOptions() { - return array( + return [ 5 => Text::_('J5'), 10 => Text::_('J10'), 15 => Text::_('J15'), @@ -179,7 +179,7 @@ class PullsHtmlView extends DefaultHtmlView 200 => Text::_('J200'), 500 => Text::_('J500'), 0 => Text::_('JALL'), - ); + ]; } /** @@ -191,11 +191,11 @@ class PullsHtmlView extends DefaultHtmlView */ protected function getSortFields() { - return array( + return [ 'a.title ASC' => Text::_('JGLOBAL_TITLE_ASC'), 'a.title DESC' => Text::_('JGLOBAL_TITLE_DESC'), 'a.pull_id ASC' => Text::_('COM_PATCHTESTER_PULL_ID_ASC'), 'a.pull_id DESC' => Text::_('COM_PATCHTESTER_PULL_ID_DESC'), - ); + ]; } } diff --git a/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default_items.php b/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default_items.php index 57dd6fb..f41baae 100644 --- a/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default_items.php +++ b/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default_items.php @@ -7,8 +7,9 @@ */ use Joomla\CMS\Language\Text; +use PatchTester\View\Pulls\PullsHtmlView; -/** @var \PatchTester\View\DefaultHtmlView $this */ +/** @var PullsHtmlView $this */ foreach ($this->items as $i => $item) : $status = ''; @@ -32,6 +33,7 @@ foreach ($this->items as $i => $item) : + trackerAlias) : ?> + applied) : ?>
sha, 0, 10)); ?>