If there is no build number, don't display the build scoreboard item

This commit is contained in:
Sam Georges 2014-11-01 11:38:41 +11:00
parent 7d0a210fac
commit 665d78e7d6
2 changed files with 13 additions and 11 deletions

View File

@ -48,10 +48,10 @@ class Updates extends Controller
*/
public function index()
{
$this->vars['core_build'] = Parameters::get('system::core.build', '???');
$this->vars['project_id'] = Parameters::get('system::project.id');
$this->vars['project_name'] = Parameters::get('system::project.name');
$this->vars['project_owner'] = Parameters::get('system::project.owner');
$this->vars['coreBuild'] = Parameters::get('system::core.build');
$this->vars['projectId'] = Parameters::get('system::project.id');
$this->vars['projectName'] = Parameters::get('system::project.name');
$this->vars['projectOwner'] = Parameters::get('system::project.owner');
return $this->asExtension('ListController')->index();
}

View File

@ -2,10 +2,10 @@
<div data-control="toolbar">
<div class="scoreboard-item title-value">
<h4><?= e(trans('system::lang.project.name')) ?></h4>
<?php if ($project_id): ?>
<p class="oc-icon-chain"><?= $project_name ?></p>
<?php if ($projectId): ?>
<p class="oc-icon-chain"><?= $projectName ?></p>
<p class="description">
<?= e(trans('system::lang.project.owner_label')) ?>: <?= $project_owner ?>
<?= e(trans('system::lang.project.owner_label')) ?>: <?= $projectOwner ?>
(<a
href="javascript:;"
data-request-confirm="<?= e(trans('system::lang.project.detach_confirm')) ?>"
@ -24,10 +24,12 @@
</p>
<?php endif ?>
</div>
<div class="scoreboard-item title-value">
<h4><?= e(trans('system::lang.updates.core_build')) ?></h4>
<p><?= $core_build ?></p>
</div>
<?php if ($coreBuild): ?>
<div class="scoreboard-item title-value">
<h4><?= e(trans('system::lang.updates.core_build')) ?></h4>
<p><?= $coreBuild ?></p>
</div>
<?php endif ?>
</div>
</div>