This commit is contained in:
Florian Strohmaier 2017-08-09 10:10:13 +02:00
parent c554ebb473
commit c4661d4ef0
6 changed files with 27 additions and 15 deletions

View File

@ -35,14 +35,12 @@ if (empty($object->comments) && ! $addLink) {
<tr> <tr>
<th><?php <th><?php
echo $this->translate('Comments'); echo $this->translate('Comments');
if (! empty($object->comments) && $addLink) {
echo '<br>' . $addLink;
}
?></th> ?></th>
<td data-base-target="_self"> <td data-base-target="_self">
<?php if (empty($object->comments)): <?php if ($addLink):
echo $addLink; echo $addLink;
else: ?> endif ?>
<?php if (!empty($object->comments)): ?>
<dl class="comment-list"> <dl class="comment-list">
<?php foreach ($object->comments as $comment): ?> <?php foreach ($object->comments as $comment): ?>
<dt> <dt>
@ -72,6 +70,10 @@ if (empty($object->comments) && ! $addLink) {
</dd> </dd>
<?php endforeach ?> <?php endforeach ?>
</dl> </dl>
<?php else:
$msg = $this->translate('No comments have been sent for this issue.');
echo '<p class="empty">' . $msg . '</p>';
?>
<?php endif ?> <?php endif ?>
</td> </td>
</tr> </tr>

View File

@ -39,14 +39,10 @@ if (empty($object->comments) && ! $addLink) {
<tr> <tr>
<th><?php <th><?php
echo $this->translate('Downtimes'); echo $this->translate('Downtimes');
if (! empty($object->downtimes) && $addLink) {
echo '<br>' . $addLink;
}
?></th> ?></th>
<td data-base-target="_self"> <td data-base-target="_self">
<?php if (empty($object->downtimes)): <?php if ($addLink) { echo $addLink; } ?>
echo $addLink; <?php if (!empty($object->downtimes)): ?>
else: ?>
<dl class="comment-list"> <dl class="comment-list">
<?php foreach ($object->downtimes as $downtime): <?php foreach ($object->downtimes as $downtime):
if ((bool) $downtime->is_in_effect) { if ((bool) $downtime->is_in_effect) {
@ -112,6 +108,10 @@ if (empty($object->comments) && ! $addLink) {
</dd> </dd>
<?php endforeach ?> <?php endforeach ?>
</dl> </dl>
<?php endif ?> <?php else:
$msg = $this->translate('No downtimes have been scheduled for this issue.');
echo '<p class="empty">' . $msg . '</p>';
endif;
?>
</td> </td>
</tr> </tr>

View File

@ -61,7 +61,7 @@
} else { } else {
$msg = $this->translate('No notification has been sent for this issue.'); $msg = $this->translate('No notification has been sent for this issue.');
} }
echo $msg; echo '<p class="empty">' . $msg . '</p>';
} }
?> ?>
</td> </td>

View File

@ -518,7 +518,7 @@ form.instance-features span.description, form.object-features span.description {
.object-features { .object-features {
.control-label-group { .control-label-group {
text-align: left; text-align: right;
padding: @table-column-padding; padding: @table-column-padding;
padding-left: 0; padding-left: 0;
width: @name-value-table-name-width; width: @name-value-table-name-width;

View File

@ -111,6 +111,7 @@ label {
padding-right: @horizontal-padding; padding-right: @horizontal-padding;
text-align: right; text-align: right;
width: 10em; width: 10em;
vertical-align: top;
} }
.control-group { .control-group {

View File

@ -49,6 +49,10 @@
} }
} }
.empty {
color: @gray-light;
}
.section { .section {
margin-bottom: 2em; margin-bottom: 2em;
} }
@ -172,6 +176,10 @@ a:hover > .icon-cancel {
.name-value-table { .name-value-table {
width: 100%; width: 100%;
p.empty {
margin-bottom: 0;
}
} }
.name-value-table > tbody > tr > th { .name-value-table > tbody > tr > th {
@ -179,7 +187,8 @@ a:hover > .icon-cancel {
// Reset default font-weight // Reset default font-weight
font-weight: normal; font-weight: normal;
padding-left: 0; padding-left: 0;
text-align: left; padding-right: 1em;
text-align: right;
vertical-align: top; vertical-align: top;
width: @name-value-table-name-width; width: @name-value-table-name-width;
} }