Merge branch '3.2.2' into '3.2.3'

Bug Fix

See merge request TheGamecraft/c-cms!63
This commit is contained in:
Mathieu Lagace
2019-09-12 11:58:27 +00:00
4 changed files with 205 additions and 224 deletions

View File

@@ -2,83 +2,64 @@
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
Du <strong>{{$event->date_begin}}</strong> au <strong>{{$event->date_end}}</strong><br>
<small>{{$event->location}} </small>
@if ($event->is_mandatory)
Obligatoire -
@else
Optionnel -
@endif
@if (is_int($event->type))
{{$event->type}}
@else
{{\App\ComplementaryActivity::find($event->type)->name}}
@endif
{!!$event->desc!!}
Du <strong>{{$event->date_begin}}</strong> au <strong>{{$event->date_end}}</strong>
<div>
{{$event->location}}
@if ($event->is_mandatory)
(Activité Obligatoire)
@else
(Activité Optionnel)
@endif
</div>
<div>
@if (is_int($event->type))
{{$event->type}}
@else
{{\App\ComplementaryActivity::find($event->type)->name}}
@endif
</div>
<div>
{!!$event->desc!!}
</div>
@if (!$event->courses->isEmpty())
<h4 class="title text-center">Horaire</h4>
<table>
<thead>
<th>Niveau</th>
@for ($p = 1; $p <= \App\Config::getData('admin_periode_nb'); $p++)
<th>
Période {{$p}} <small>{{\App\Config::all()->where('name','admin_periode_begin')->first()->data[$p]}} à {{\App\Config::all()->where('name','admin_periode_end')->first()->data[$p]}} </small>
</th>
@endfor
</thead>
<tbody>
@for ($l = 1; $l <= \App\Config::getData('admin_level_in_schedule_nb'); $l++)
<div class="w-100 mt-2">
<h4>Horaire</h4>
<table style="width:100%" class="table">
<tr>
<td class="col-md-2 m-3">
Niveau {{$l}}
</td>
<th>Niveau</th>
@for ($p = 1; $p <= \App\Config::getData('admin_periode_nb'); $p++)
<th>
Période {{$p}} <small>{{\App\Config::all()->where('name','admin_periode_begin')->first()->data[$p]}} à {{\App\Config::all()->where('name','admin_periode_end')->first()->data[$p]}}</small>
</th>
@endfor
</tr>
@for ($l = 1; $l <= \App\Config::getData('admin_level_in_schedule_nb'); $l++)
<tr>
<td>
@foreach ($event->courses as $course)
@if ($course->periode == $p && $course->level == $l)
{{$course->name}}
@if(\App\User::find($course->user_id))
{{\App\User::find($course->user_id)->fullname()}}
@else
Utilisateur Inconnu
Niveau {{$l}}
</td>
@for ($p = 1; $p <= \App\Config::getData('admin_periode_nb'); $p++)
<td>
@foreach($event->courses as $course)
@if($course->periode == $p && $course->level == $l)
<table class="w-100 mx-5 table-borderless bg-white">
<tr>
<td>{{$course->name}}</td>
<td class="text-right">{{$course->user->fullname()}}</td>
</tr>
<tr>
<td>{{$course->ocom}}</td>
<td class="text-right">{{$course->location}}</td>
</tr>
</table>
@endif
{{$course->ocom}}
{{$course->location}}
<a>Réservation de materiel</a>
<table>
@if (!$course->bookings->isEmpty())
<thead class="row">
<th class="col-sm-8 p-2">
<strong>Item</strong>
</th>
<th class="col-sm-4 text-right p-2">
<strong>Quantité</strong>
</th>
</thead>
<tbody>
@foreach ($course->bookings as $booking)
<tr>
<td class="col-sm-8 p-2">
<a href="/admin/item/{{$booking->item->id}}">{{$booking->item->name}}</a>
</td>
<td class="col-sm-4 text-right p-2">
{{$booking->amount}}
</td>
</tr>
@endforeach
</tbody>
@else
<p class="text-center">
<strong>Aucune réservation</strong>
</p>
@endif
</table>
@endif
@endforeach
@endfor
@endfor
</table>
@endforeach
</td>
@endfor
</tr>
@endfor
</table>
</div>
@endif
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>

View File

@@ -13,7 +13,7 @@
<div class="col-md-6">
<div class="btn-group">
<a class="btn btn-primary" href="/admin/schedule/edit/{{$event->id}}" data-toggle="tooltip" data-placement="bottom" title="Modifier"><i class="material-icons">edit</i></a>
<button disabled class="btn btn-primary" href="/admin/schedule/pdf/event/{{$event->id}}" target="_blank" data-toggle="tooltip" data-placement="bottom" title="Imprimer"><i class="material-icons">print</i></button>
<a class="btn btn-primary" href="/admin/schedule/pdf/event/{{$event->id}}" target="_blank" data-toggle="tooltip" data-placement="bottom" title="Imprimer"><i class="material-icons">print</i></a>
<button class="btn btn-danger" data-toggle="tooltip" data-placement="bottom" title="Supprimer" onclick="deleteEvent({{$event->id}})"><i class="material-icons">close</i></button>
</div>
</div>