Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tooltip on meeting documents to prevent the board from uploading files after the deadline has passed #1703

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Loading