Skip to content

Commit

Permalink
Merge pull request #1703 from tomudding/feature/meeting-documents-upl…
Browse files Browse the repository at this point in the history
…oaded-notice

Add tooltip on meeting documents to prevent the board from uploading files after the deadline has passed
  • Loading branch information
tomudding authored Sep 11, 2023
2 parents 3b94070 + c0d6ded commit 9c3d8ad
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions module/Decision/view/decision/decision/view.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,18 @@ $meetingName = sprintf(
);

$this->headTitle($meetingName);

$this->headScript()
->appendFile(
$this->basepath('js/bootstrap/tooltip.js'),
'text/javascript',
['nonce' => NONCE_REPLACEMENT_STRING],
);
?>
<section class="section">
<div class="container">
<h1><?= $meetingName ?></h1>
<h2><?= $this->dateFormat($meeting->getDate(), IntlDateFormatter::FULL, IntlDateFormatter::NONE) ?></h2>
<h2><?= $this->dateFormat($meeting->getDate(), IntlDateFormatter::FULL) ?></h2>
<div class="row">
<div class="col-md-6">
<h3><?= $this->translate('Documents') ?></h3>
Expand All @@ -35,8 +42,24 @@ $this->headTitle($meetingName);
<tr>
<td>
<a href="<?= $this->url('decision/document', ['id' => $document->getId()]) ?>"
class="d-block">
<?= $document->getName() ?>
class="d-block"
>
<?= $this->escapeHtml($document->getName()) ?>
<?php
$title = sprintf(
$this->translate('This document was uploaded on %s.'),
$this->dateFormat($document->getCreatedAt(), IntlDateFormatter::FULL),
);

if ($document->getCreatedAt() != $document->getUpdatedAt()) {
$title .= ' ' . sprintf(
$this->translate('It was last edited on %s.'),
$this->dateFormat($document->getUpdatedAt(), IntlDateFormatter::FULL),
);
}
?>
<span data-toggle="tooltip" data-placement="right" class="fas fa-info-circle"
title="<?= $title ?>" aria-hidden="true"></span>
</a>
</td>
</tr>
Expand Down Expand Up @@ -95,3 +118,6 @@ $this->headTitle($meetingName);
<?php endif; ?>
</div>
</section>
<script nonce="<?= NONCE_REPLACEMENT_STRING ?>">
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
</script>

0 comments on commit 9c3d8ad

Please sign in to comment.