mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-02-02 20:08:25 +00:00
Do not show a link to the issue tracker if there is none. Fixes #298
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
This commit is contained in:
parent
6ac62486ea
commit
545b3806e7
@ -32,7 +32,7 @@ class PullsHtmlView extends DefaultHtmlView
|
|||||||
* @var array
|
* @var array
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
protected $branches = array();
|
protected $branches = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array containing environment errors
|
* Array containing environment errors
|
||||||
@ -40,7 +40,7 @@ class PullsHtmlView extends DefaultHtmlView
|
|||||||
* @var array
|
* @var array
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
protected $envErrors = array();
|
protected $envErrors = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of open pull requests
|
* Array of open pull requests
|
||||||
@ -167,7 +167,7 @@ class PullsHtmlView extends DefaultHtmlView
|
|||||||
*/
|
*/
|
||||||
protected function getLimitOptions()
|
protected function getLimitOptions()
|
||||||
{
|
{
|
||||||
return array(
|
return [
|
||||||
5 => Text::_('J5'),
|
5 => Text::_('J5'),
|
||||||
10 => Text::_('J10'),
|
10 => Text::_('J10'),
|
||||||
15 => Text::_('J15'),
|
15 => Text::_('J15'),
|
||||||
@ -179,7 +179,7 @@ class PullsHtmlView extends DefaultHtmlView
|
|||||||
200 => Text::_('J200'),
|
200 => Text::_('J200'),
|
||||||
500 => Text::_('J500'),
|
500 => Text::_('J500'),
|
||||||
0 => Text::_('JALL'),
|
0 => Text::_('JALL'),
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -191,11 +191,11 @@ class PullsHtmlView extends DefaultHtmlView
|
|||||||
*/
|
*/
|
||||||
protected function getSortFields()
|
protected function getSortFields()
|
||||||
{
|
{
|
||||||
return array(
|
return [
|
||||||
'a.title ASC' => Text::_('JGLOBAL_TITLE_ASC'),
|
'a.title ASC' => Text::_('JGLOBAL_TITLE_ASC'),
|
||||||
'a.title DESC' => Text::_('JGLOBAL_TITLE_DESC'),
|
'a.title DESC' => Text::_('JGLOBAL_TITLE_DESC'),
|
||||||
'a.pull_id ASC' => Text::_('COM_PATCHTESTER_PULL_ID_ASC'),
|
'a.pull_id ASC' => Text::_('COM_PATCHTESTER_PULL_ID_ASC'),
|
||||||
'a.pull_id DESC' => Text::_('COM_PATCHTESTER_PULL_ID_DESC'),
|
'a.pull_id DESC' => Text::_('COM_PATCHTESTER_PULL_ID_DESC'),
|
||||||
);
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
|
use PatchTester\View\Pulls\PullsHtmlView;
|
||||||
|
|
||||||
/** @var \PatchTester\View\DefaultHtmlView $this */
|
/** @var PullsHtmlView $this */
|
||||||
|
|
||||||
foreach ($this->items as $i => $item) :
|
foreach ($this->items as $i => $item) :
|
||||||
$status = '';
|
$status = '';
|
||||||
@ -32,6 +33,7 @@ foreach ($this->items as $i => $item) :
|
|||||||
<?php echo Text::_('COM_PATCHTESTER_VIEW_ON_GITHUB'); ?>
|
<?php echo Text::_('COM_PATCHTESTER_VIEW_ON_GITHUB'); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<?php if ($this->trackerAlias) : ?>
|
||||||
<div class="col-md-auto">
|
<div class="col-md-auto">
|
||||||
<a class="badge badge-info"
|
<a class="badge badge-info"
|
||||||
href="https://issues.joomla.org/tracker/<?php echo $this->trackerAlias; ?>/<?php echo $item->pull_id; ?>"
|
href="https://issues.joomla.org/tracker/<?php echo $this->trackerAlias; ?>/<?php echo $item->pull_id; ?>"
|
||||||
@ -39,6 +41,7 @@ foreach ($this->items as $i => $item) :
|
|||||||
<?php echo Text::_('COM_PATCHTESTER_VIEW_ON_JOOMLA_ISSUE_TRACKER'); ?>
|
<?php echo Text::_('COM_PATCHTESTER_VIEW_ON_JOOMLA_ISSUE_TRACKER'); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
<?php if ($item->applied) : ?>
|
<?php if ($item->applied) : ?>
|
||||||
<div class="col-md-auto">
|
<div class="col-md-auto">
|
||||||
<span class="badge badge-info"><?php echo Text::sprintf('COM_PATCHTESTER_APPLIED_COMMIT_SHA', substr($item->sha, 0, 10)); ?></span>
|
<span class="badge badge-info"><?php echo Text::sprintf('COM_PATCHTESTER_APPLIED_COMMIT_SHA', substr($item->sha, 0, 10)); ?></span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user