@extends('base') @section('title') @if ($editing) Gestion du calendrier @else Calendrier {{{ $user->currentSection->de_la_section }}} @endif @stop @section('additional_javascript') @stop @section('back_links') @if ($editing)

Retour au calendrier

@endif @stop @section('forward_links') @if ($can_edit && !$editing)

Modifier le calendrier

@endif

Voir l'agenda sous forme de liste

@if ($google_calendar_link && !$editing)

Intégrer à Google Agenda

@endif @stop @section('content') @if ($editing) @include('subviews.contextualHelp', array('help' => 'edit-calendar')) @endif
@if ($editing)

Gestion du calendrier {{{ $user->currentSection->de_la_section }}}

@else

Calendrier {{{ $user->currentSection->de_la_section }}}

@endif @include('subviews.flashMessages')
@if (Parameter::get(Parameter::$LEGEND_IN_CALENDAR) && $user->currentSection->id == 1)
Légende : @foreach (Section::orderBy('position', 'asc')->get() as $section) @if ($section->calendar_shortname) {{{ $section->calendar_shortname }}} : @endif {{{ $section->name }}} @endforeach

@endif
@if ($editing) @endif
@if ($year != $today_year || $month != $today_month)

$user->currentSection->slug)) }}"> Retour à aujourd'hui

@endif
{{-- Large screens --}}
{{-- Month header --}}
{{-- Links to the previous 6 months --}} @for ($i = 6; $i >= 1; $i--) {{{ $months_short[($month - $i + 11) % 12] }}} ← @endfor {{{ $months[$month-1] }}} {{{ $year }}} {{-- Links to the next 6 months --}} @for ($i = 1; $i <= 6; $i++) → {{{ $months_short[($month + $i - 1) % 12] }}} @endfor
{{-- Names of the days --}} @for ($x = 0; $x <= 6; $x++)
{{{ $days[$x] }}}
@endfor
{{-- Blank days at the beginning of the month --}} @for ($x = 0; $x < $blank_days_before; $x++)
@endfor {{-- Days of the month --}} @for ($day = 1; $day <= $days_in_month; $day++) {{-- Next row at the end of the week --}} @if (($day + $blank_days_before - 1) % 7 == 0)
@endif {{-- Day --}}
{{-- Number of the day --}} @if ($editing) {{{ $day }}} @else

{{{ $day }}}

@endif {{-- Events of the day --}} @foreach ($events[$day] as $event) @if ($editing && ($event->section_id != 1 || $can_edit_unit)) @endif

@if ($user->currentSection->id == 1) {{{ $event->getSection()->calendar_shortname . ($event->getSection()->calendar_shortname ? " :" : "") }}} @endif {{{ $event->event }}}

@if (!$editing) @endif
@if ($editing)
@endif @endforeach
@endfor @for ($x = 0; $x < $blank_days_after; $x++)
@endfor
{{-- Small screens --}} @if (!$editing)
{{-- Month title --}}
{{-- Link to previous 2 months --}} @for ($i = 2; $i >= 1; $i--) {{{ $months_short[($month - $i + 11) % 12] }}} ← @endfor {{{ $months[$month-1] }}} {{{ $year }}} {{-- Links to the next 2 months --}} @for ($i = 1; $i <= 2; $i++) → {{{ $months_short[($month + $i - 1) % 12] }}} @endfor
{{-- Events of the month --}} @foreach ($calendar_items as $item)
@if ($item->start_date == $item->end_date) {{{ $days[(date('w', strtotime($item->start_date)) + 6) % 7] }}} {{{ Helper::dateToHuman($item->start_date) }}} : @else Du {{{ Helper::dateToHuman($item->start_date) }}} au {{{ Helper::dateToHuman($item->end_date) }}} : @endif {{{ $item->event }}} @if ($user->currentSection->id == 1) ({{{ $item->getSection()->name }}}) @endif
{{{ $item->description }}}
@endforeach
@endif @if (!$editing) @include('subviews.downloadCalendar') @endif @stop