<?php
$limit = 1000;
$change = $event->getParam('change');
$review = $event->getParam('review');
$user = $activity->get('user');
$behalfOf = $activity->get('behalfOf');
$userLink = $user ? $this->qualifiedUrl('user', array('user' => $user)) : null;
$behalfOfLink = $behalfOf ? $this->qualifiedUrl('user', array('user' => $behalfOf)) : null;
$targetLink = $activity->getUrl($this->plugin('qualifiedUrl'));
$projects = $this->projectList(
$activity->get('projects'),
null,
array('baseUrl' => $this->qualifiedUrl(), 'style' => 'text-decoration: none;')
);
?>
<html>
<body style="font-family: sans-serif;">
<div style="padding-top: .25em; font-size: 115%;">
<div>
<?php if ($user): ?>
<a style="text-decoration: none;" href="<?php echo $userLink ?>">
<?php echo $this->escapeHtml($user) ?>
</a>
<?php endif; ?>
<?php if ($behalfOf): ?>
(<?php echo $this->te('on behalf of') ?>
<a style="text-decoration: none;" href="<?php echo $behalfOfLink ?>"><?php echo $this->escapeHtml($behalfOf) ?></a>)
<?php endif ?>
<?php echo $this->te($activity->get('action')) ?>
<a style="text-decoration: none;" href="<?php echo $targetLink ?>">
<?php echo $this->escapeHtml($activity->get('target'))?>
</a>
<?php if ($review): ?>
<?php echo $this->te('under') ?>
<a style="text-decoration: none;"
href="<?php echo $this->qualifiedUrl('review', array('review' => $review->getId())) ?>">
<?php echo $this->te('review') ?> <?php echo $review->getId() ?>
</a>
<?php endif; ?>
<?php if ($activity->get('preposition') && $projects): ?>
<?php echo $this->te($activity->get('preposition')) . ' ' . $projects ?>
<?php endif; ?>
</div>
<br/>
<?php if (trim($activity->get('description'))): ?>
<div style="font-family: monospace;"><?php
echo $this->preformat($activity->get('description'))
->setBaseUrl($this->qualifiedUrl())
->setEmojify(false)
->setWordWrap(900)
?></div>
<br/>
<?php endif; ?>
<?php if (count($change->getJobs())): ?>
<div style="font-size: 85%; color: #666666; padding: .25em 0;"><?php echo $this->te('JOBS') ?></div>
<div style="font-size: 85%;">
<?php
foreach ($change->getJobObjects() as $job) {
// prepare job description:
// - convert line breaks into spaces
// - trim to length of 60 chars
$description = str_replace("\n", " ", trim($job->getDescription()));
$description = (string) $this->truncate($description, 55);
$url = $this->qualifiedUrl('job', array('job' => $job->getId()));
echo '<a style="text-decoration: none;" href="' . $url . '">'
. $this->escapeHtml($job->getId())
. '</a>'
. ' <span style="color: #555555;">' . $this->escapeHtml($job->getStatus()) . '</span>: '
. $this->preformat($description)->setBaseUrl($this->qualifiedUrl())->setEmojify(false)
. "<br/>\n";
}
?>
</div>
<br/>
<?php endif; ?>
<div style="font-size: 85%; color: #666666; padding: .25em 0"><?php echo $this->te('FILES') ?></div>
<div style="font-size: 85%;">
<?php
// list files - limit to 1000
$files = $change->getFileData(true);
foreach (array_slice($files, 0, $limit) as $file) {
$url = $targetLink . '#' . md5($file['depotFile']);
echo '<a style="text-decoration: none;" href="' . $url . '">'
. $this->decodeFilespec($file['depotFile'])
. '</a><span style="color: #555555;">'
. '#' . $this->escapeHtml($file['rev'])
. ' ' . $this->escapeHtml($file['action']) . "</span><br/>\n";
}
echo count($files) > $limit
? '<a style="font-style: italic; text-decoration: none;" href="' . $targetLink . '">'
. $this->te('Snip') . ' '
. '(>' . $limit . ' ' . $this->te('files') . ')</a>'
: '';
?>
</div>
</div>
</body>
</html>
# |
Change |
User |
Description |
Committed |
|
#1
|
18334 |
Liz Lam |
initial add of jambox |
|
|