Added 'Build with debug' button for Admin on project page. Issue #22

This commit is contained in:
Dmitry Khomutov 2017-02-19 00:52:13 +07:00
commit ebb08d868b
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
9 changed files with 29 additions and 8 deletions

View file

@ -16,7 +16,13 @@
<div class="pull-right btn-group">
<?php if (!$project->getArchived()): ?>
<a class="btn btn-success" href="<?php print APP_URL . 'project/build/' . $project->getId(); ?><?php echo !empty($branch) ? '/' . urlencode($branch) : '' ?>">
<?php if($this->User()->getIsAdmin()): ?>
<a class="btn btn-danger" href="<?= APP_URL . 'project/build/' . $project->getId(); ?><?= !empty($branch) ? '/' . urlencode($branch) : '' ?>?debug=1">
<?php Lang::out('build_now_debug'); ?>
</a>
<?php endif; ?>
<a class="btn btn-success" href="<?= APP_URL . 'project/build/' . $project->getId(); ?><?= !empty($branch) ? '/' . urlencode($branch) : '' ?>">
<?php Lang::out('build_now'); ?>
</a>
<?php endif; ?>