mirror of
https://github.com/standardebooks/web.git
synced 2025-07-21 06:45:14 -04:00
Add DateTimeFormat enum
This commit is contained in:
parent
be5574eaec
commit
c35c47b793
18 changed files with 38 additions and 26 deletions
|
@ -35,7 +35,7 @@ catch(Exceptions\AppException){
|
|||
<p><?= $poll->Description ?></p>
|
||||
<? if($poll->IsActive()){ ?>
|
||||
<? if($poll->End !== null){ ?>
|
||||
<p class="center-notice">This poll closes on <?= $poll->End->format('F j, Y g:i a') ?>.</p>
|
||||
<p class="center-notice">This poll closes on <?= $poll->End->format(Enums\DateTimeFormat::FullDateTime->value) ?>.</p>
|
||||
<? } ?>
|
||||
<? if(!$canVote){ ?>
|
||||
<p class="center-notice">You’ve already voted in this poll.</p>
|
||||
|
@ -48,9 +48,9 @@ catch(Exceptions\AppException){
|
|||
</p>
|
||||
<? }else{ ?>
|
||||
<? if($poll->Start !== null && $poll->Start > NOW){ ?>
|
||||
<p class="center-notice">This poll opens on <?= $poll->Start->format('F j, Y g:i a') ?>.</p>
|
||||
<p class="center-notice">This poll opens on <?= $poll->Start->format(Enums\DateTimeFormat::FullDateTime->value) ?>.</p>
|
||||
<? }else{ ?>
|
||||
<p class="center-notice">This poll closed on <?= $poll->End->format('F j, Y g:i a') ?>.</p>
|
||||
<p class="center-notice">This poll closed on <?= $poll->End->format(Enums\DateTimeFormat::FullDateTime->value) ?>.</p>
|
||||
<p class="button-row narrow"><a href="<?= $poll->Url ?>/votes" class="button">View results</a></p>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
|
|
|
@ -26,7 +26,7 @@ catch(Exceptions\AppException){
|
|||
<? if($created){ ?>
|
||||
<p class="center-notice">Thank you for voting in the <a href="<?= $vote->PollItem->Poll->Url ?>"><?= Formatter::EscapeHtml($vote->PollItem->Poll->Name) ?> poll</a>.</p>
|
||||
<? }else{ ?>
|
||||
<p class="center-notice">Your vote in the <a href="<?= $vote->PollItem->Poll->Url ?>"><?= Formatter::EscapeHtml($vote->PollItem->Poll->Name) ?> poll</a> was submitted on <?= $vote->Created->format('F j, Y g:i a') ?>.</p>
|
||||
<p class="center-notice">Your vote in the <a href="<?= $vote->PollItem->Poll->Url ?>"><?= Formatter::EscapeHtml($vote->PollItem->Poll->Name) ?> poll</a> was submitted on <?= $vote->Created->format(Enums\DateTimeFormat::FullDateTime->value) ?>.</p>
|
||||
<? } ?>
|
||||
<p class="button-row narrow"><a class="button" href="<?= $vote->PollItem->Poll->Url ?>/votes"> view results</a></p>
|
||||
</section>
|
||||
|
|
|
@ -15,10 +15,10 @@ catch(Exceptions\AppException){
|
|||
<p class="center-notice">Total votes: <?= number_format($poll->VoteCount) ?></p>
|
||||
<? if($poll->IsActive()){ ?>
|
||||
<? if($poll->End !== null){ ?>
|
||||
<p class="center-notice">This poll closes on <?= $poll->End->format('F j, Y g:i a') ?>.</p>
|
||||
<p class="center-notice">This poll closes on <?= $poll->End->format(Enums\DateTimeFormat::FullDateTime->value) ?>.</p>
|
||||
<? } ?>
|
||||
<? }elseif($poll->End !== null){ ?>
|
||||
<p class="center-notice">This poll closed on <?= $poll->End->format('F j, Y g:i a') ?>.</p>
|
||||
<p class="center-notice">This poll closed on <?= $poll->End->format(Enums\DateTimeFormat::FullDateTime->value) ?>.</p>
|
||||
<? } ?>
|
||||
<table class="votes">
|
||||
<tbody>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue