php-censor/src/PHPCensor/View/Build/header-row.phtml
Dmitry Khomutov 4ec6d854c2 Added 'user_id' column to 'build' table (created by)
+ Renamed columns 'created' -> 'create_date', 'started' -> 'start_date' and 'finished' -> 'finish_date'
+ Code style fixes.
2017-10-16 20:40:00 +07:00

30 lines
1 KiB
PHTML

<?php
use PHPCensor\Helper\Lang;
use PHPCensor\Model\Build;
/**
* @var Build $build
*/
?>
<li>
<a href="<?php print APP_URL; ?>build/view/<?php print $build->getId(); ?>">
<?php if ($build->getCommitterEmail()): ?>
<div class="pull-left">
<img src="https://www.gravatar.com/avatar/<?php print md5($build->getCommitterEmail()); ?>?d=mm&s=40" class="img-circle" alt="">
</div>
<?php endif; ?>
<h4>
<?php print $build->getProject()->getTitle(); ?>
<?php if ($build->getStatus() == \PHPCensor\Model\Build::STATUS_PENDING): ?>
<small class="pull-right"><?php Lang::out('created_x', $build->getCreateDate()->format('H:i')); ?></small>
<?php elseif ($build->getStatus() == \PHPCensor\Model\Build::STATUS_RUNNING): ?>
<small class="pull-right"><?php Lang::out('started_x', $build->getStartDate()->format('H:i')); ?></small>
<?php endif; ?>
</h4>
<p><?php Lang::out('branch_x', $build->getBranch()); ?></p>
</a>
</li>