Skip to content

Commit

Permalink
Added Google Calendar link to email
Browse files Browse the repository at this point in the history
  • Loading branch information
Kipjr committed Aug 10, 2020
1 parent ea1bbe0 commit 18dc019
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 6 additions & 1 deletion app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ function formatDate($date, $addEnter = false, $withTime = true, $withDay = true)
function formatTime($date){
$timestamp = strtotime($date);
return htmlspecialchars(date('H:i', $timestamp));
}
}

function formatDateISO8601($date,$time){
$timestamp = strtotime("$date" . " $time");
return htmlspecialchars(date_format($timestamp,DATE_ISO8601));
}
7 changes: 3 additions & 4 deletions resources/views/emails/signin/confirmed.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
Met vriendelijke groet,<br />
De mensacomputer

Vragen of problemen? Bel de bar: <a href="tel://{{ str_replace('-', '', config('mensa.contact.bar')) }}">{{ config('mensa.contact.bar') }}</a>
@endcomponent


Vragen of problemen? Bel de bar: <a href="tel://{{ str_replace('-', '', config('mensa.contact.bar')) }}">{{ config('mensa.contact.bar') }}</a><br>
Voeg toe aan je eigen agenda: https://calendar.google.com/calendar/r/eventedit?text=Mensa&dates={{formatDateISO8601($mensaUser->mensa->date,$mensaUser->mensa->closingTime()}}&details=Mijn+inschrijving:+{{ route('signin.edit', [$mensaUser->confirmation_code]) }}&Studentenvereniging+V.S.L.+Catena,+Kolfmakersteeg 8,+2311+VG+Leiden,+Netherlands
@endcomponent

0 comments on commit 18dc019

Please sign in to comment.