Merge branch '3.2.0' into 'dev'

3.2.0

See merge request TheGamecraft/c-cms!36
This commit is contained in:
Mathieu Lagace
2019-08-21 14:33:20 +00:00
28 changed files with 21001 additions and 267 deletions

View File

@@ -66,6 +66,8 @@
echo 'Migrate DB'
cd {{ $app_dir_697 }}/current/
php artisan migrate
php artisan db:seed --class=ConfigsTableSeeder
@endtask
@task('clone_repository_736')
@@ -99,6 +101,8 @@
echo 'Migrate DB'
cd {{ $app_dir_736 }}/current/
php artisan migrate
php artisan db:seed --class=ConfigsTableSeeder
@endtask
@task('clone_repository_dev')
@@ -132,4 +136,6 @@
echo 'Migrate DB'
cd {{ $app_dir_dev }}/current/
php artisan migrate
php artisan db:seed --class=ConfigsTableSeeder
@endtask

16754
_ide_helper.php Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -20,4 +20,19 @@ class Event extends Model
{
return $this->belongsTo('App\User');
}
public function course($p,$l)
{
$courses = $this->courses;
foreach ($courses as $c)
{
if ($c->periode == $p && $c->level == $l)
{
return $c;
}
}
return false;
}
}

View File

@@ -26,23 +26,23 @@ class AdminController extends Controller
{
Log::saveLog('Affichage du tableau de bord');
$futureEvent_to_filtered = \App\Schedule::all()->sortBy('date');
$futureEvent_to_filtered = \App\Event::all()->sortBy('date_begin');
$futureEvent_to_filtered_pass_1 = collect();
$futureEvent = collect();
foreach ($futureEvent_to_filtered as $day) {
if ($day->date >= date('Y-m-d')) {
if (date('U',strtotime($day->date_begin)) >= date('U')) {
$futureEvent_to_filtered_pass_1->push($day);
}
}
foreach ($futureEvent_to_filtered_pass_1 as $day) {
if ($day->date <= date('Y-m-d',strtotime("+2 week"))) {
if (date('U',strtotime($day->date_begin)) <= date('U',strtotime("+2 week"))) {
$futureEvent->push($day);
}
}
return view('admin.dashboard',['futureEvent' => $futureEvent,'userClasse' => \Auth::User()->getClasse()->forPage(1,6)]);
return view('admin.dashboard',['futureEvent' => $futureEvent->take(3),'userClasse' => \Auth::User()->getClasse()->forPage(1,6)]);
}
public function update()

View File

@@ -75,7 +75,7 @@ class ComplementaryActivityController extends Controller
*/
public function show(ComplementaryActivity $complementaryActivity)
{
//
return view('public.activity');
}
/**

View File

@@ -4,13 +4,14 @@ namespace App\Http\Controllers;
use App\Event;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class EventController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
* @return Response
*/
public function index()
{
@@ -20,7 +21,7 @@ class EventController extends Controller
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
* @return Response
*/
public function create()
{
@@ -31,7 +32,7 @@ class EventController extends Controller
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
* @return Response
*/
public function store()
{
@@ -43,7 +44,11 @@ class EventController extends Controller
$event->type = request('type');
$event->user_id = \Auth::user()->id;
$event->location = request('location');
$event->is_mandatory = request('is_mandatory');
if($event->is_mandatory){
$event->is_mandatory = request('is_mandatory');
} else {
$event->is_mandatory = 0;
}
$event->desc = request('desc');
$event->save();
@@ -55,7 +60,7 @@ class EventController extends Controller
$course = new \App\Course();
$users = \App\User::all();
$instructor = "";
$instructor = 1;
foreach ($users as $user) {
if($user->fullname() == request('instruc_n'.$l.'_p'.$p))
@@ -79,14 +84,14 @@ class EventController extends Controller
}
}
return redirect('/admin/calendar')->with('success','Evenement ajouter a l\'horaire');
return redirect('/admin/calendar')->with('success','Événement ajouter à l\'horaire');
}
/**
* Display the specified resource.
*
* @param \App\Event $event
* @return \Illuminate\Http\Response
* @return Response
*/
public function show(Event $event)
{
@@ -96,12 +101,12 @@ class EventController extends Controller
/**
* Show the form for editing the specified resource.
*
* @param \App\Event $event
* @return \Illuminate\Http\Response
* @param $id
* @return Response
*/
public function edit(Event $event)
public function edit($id)
{
//
return view('admin.schedule.event.edit',['activity' => \App\Event::find($id)]);
}
/**
@@ -109,18 +114,64 @@ class EventController extends Controller
*
* @param \Illuminate\Http\Request $request
* @param \App\Event $event
* @return \Illuminate\Http\Response
* @return Response
*/
public function update(Request $request, Event $event)
public function update($id)
{
//
$event = Event::find($id);
$event->name = request('name');
$event->date_begin = request('begin');
$event->date_end = request('end');
$event->location = request('location');
if($event->is_mandatory){
$event->is_mandatory = request('is_mandatory');
} else {
$event->is_mandatory = 0;
}
$event->desc = request('desc');
$event->save();
if ($event->type == 1) {
for ($l=1; $l <= \App\Config::getData('admin_level_in_schedule_nb'); $l++) {
for ($p=1; $p <= \App\Config::getData('admin_periode_nb'); $p++) {
$course = new \App\Course();
$users = \App\User::all();
$instructor = 1;
foreach ($users as $user) {
if($user->fullname() == request('instruc_n'.$l.'_p'.$p))
{
$instructor = $user->id;
}
}
$course->name = request('name_n'.$l.'_p'.$p);
$course->user_id = $instructor;
$course->ocom = request('ocom_n'.$l.'_p'.$p);
$course->location = request('loc_n'.$l.'_p'.$p);
$course->periode = $p;
$course->level = $l;
$course->comment = "";
$course->event_id = $event->id;
$course->save();
}
}
}
return redirect('/admin/calendar')->with('success','Modification à l\'événement sauvegarder à l\'horaire');
}
/**
* Remove the specified resource from storage.
*
* @param \App\Event $event
* @return \Illuminate\Http\Response
* @return Response
*/
public function destroy(Event $event)
{

View File

@@ -218,4 +218,11 @@ class ScheduleController extends Controller
'end_time' => $end_time
]);
}
public function delete($id)
{
$event = \App\Event::find($id);
$event->delete();
}
}

View File

@@ -7,6 +7,7 @@
"require": {
"php": "^7.1.3",
"barryvdh/laravel-dompdf": "^0.8.4",
"barryvdh/laravel-ide-helper": "v2.6.2",
"fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "5.6.*",

840
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -163,6 +163,7 @@ return [
* Package Service Providers...
*/
Barryvdh\DomPDF\ServiceProvider::class,
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
/*
* Application Service Providers...

View File

@@ -11,16 +11,16 @@ class ConfigsTableSeeder extends Seeder
*/
public function run()
{
DB::table('configs')->insert([
$configs = [
[
'name' => 'is_schedule_public',
'state' => 0,
'data' => 'null'
'data' => '["true"]'
],
[
'name' => 'is_schedule_build',
'state' => 0,
'data' => 'null'
'data' => '["false"]'
],
[
'name' => 'text_public_banner_cadet_desc',
@@ -67,6 +67,16 @@ class ConfigsTableSeeder extends Seeder
'state' => 0,
'data' => '["Voir toutes les nouvelles!"]'
],
[
'name' => 'text_public_schedule_desc',
'state' => 0,
'data' => '["Voici les activitées à venir !"]'
],
[
'name' => 'text_public_schedule_title',
'state' => 0,
'data' => '["Calendrier"]'
],
[
'name' => 'text_public_picture_nb',
'state' => 0,
@@ -98,42 +108,42 @@ class ConfigsTableSeeder extends Seeder
'data' => '["exemple@email.com"]'
],
[
'name' => 'escadron_address',
'name' => 'escadron_address',
'state' => 0,
'data' => '["000 Rue Exemple, Québec, Canada"]'
],
[
'name' => 'escadron_name_full',
'name' => 'escadron_name_full',
'state' => 0,
'data' => '["Escadron 000 Exemple"]'
],
[
'name' => 'escadron_name_short',
'name' => 'escadron_name_short',
'state' => 0,
'data' => '["Escadron 000"]'
],
[
'name' => 'escadron_number',
'name' => 'escadron_number',
'state' => 0,
'data' => '["000"]'
],
[
'name' => 'escadron_element',
'name' => 'escadron_element',
'state' => 0,
'data' => '["Aviation"]'
],
[
'name' => 'element_title',
'name' => 'element_title',
'state' => 0,
'data' => '["Cadet de l\'aviation royale du Canada"]'
],
[
'name' => 'escadron_direct_googlemap_link',
'name' => 'escadron_direct_googlemap_link',
'state' => 0,
'data' => '["https://goo.gl/maps/iLwGZLwWXujwoAg59"]'
],
[
'name' => 'escadron_phone',
'name' => 'escadron_phone',
'state' => 0,
'data' => '["(418) 722-7712"]'
],
@@ -207,6 +217,27 @@ class ConfigsTableSeeder extends Seeder
'state' => 0,
'data' => '["3"]'
]
]);
];
$actualConfigs = \App\Config::all();
$configToAdd = [];
foreach ($configs as $config) {
$found = false;
foreach ($actualConfigs as $actualConfig) {
if ($actualConfig->name == $config['name']) {
$found = true;
}
}
if (!$found) {
array_push($configToAdd, $config);
}
}
if ($configToAdd != []) {
DB::table('configs')->insert($configToAdd);
}
}
}

View File

@@ -12,16 +12,30 @@ class UsersTableSeeder extends Seeder
public function run()
{
DB::table('users')->insert([
'firstname' => 'Administrateur',
'lastname' => 'Administrateur',
'email' => 'admin@exvps.ca',
'password' => bcrypt('SuperAdmin'),
'rank' => '1',
'adress' => 'Inconnu',
'age' => '99',
'avatar' => '3',
'sexe' => 'm',
'job' => '1',
[
'firstname' => 'visiteur',
'lastname' => 'Autre',
'email' => 'visiteur@exvps.ca',
'password' => bcrypt('f329er8kl2jHJGHdEj12567'),
'rank' => '1',
'adress' => 'Inconnu',
'age' => '99',
'avatar' => '3',
'sexe' => 'm',
'job' => '1',
],
[
'firstname' => 'Administrateur',
'lastname' => 'Administrateur',
'email' => 'admin@exvps.ca',
'password' => bcrypt('SuperAdmin'),
'rank' => '1',
'adress' => 'Inconnu',
'age' => '99',
'avatar' => '3',
'sexe' => 'm',
'job' => '1',
]
]);
}
}

1498
public/css/custom.css vendored

File diff suppressed because it is too large Load Diff

58
public/js/calendar.js vendored
View File

@@ -20,8 +20,8 @@ function initFullCalendar(authToken) {
dateClick: function (info) {
var date = moment(info.date).format("YYYY-MM-DD");
Swal.fire({
title: 'Ajouter un evenement?',
text: "Voulez vous ajouter un evenement le "+date,
title: 'Ajouter un événement?',
text: "Voulez vous ajouter un événement le "+date,
type: 'warning',
showCancelButton: true,
confirmButtonText: 'Oui',
@@ -47,4 +47,58 @@ function switchType(date) {
console.log( "Loading defaut value for activity type ("+selectInput.val()+")" );
});
}
function switchTypeEDIT(date) {
var selectInput = $('#type')
Swal.fire({
title: 'êtes vous sur de vouloir changer le type d\'évenement ?',
text: "Voulez vous ajouter un événement le "+date,
type: 'warning',
showCancelButton: true,
confirmButtonText: 'Oui',
cancelButtonText: 'Non',
}).then((result) => {
if (result.value) {
$.get( "/api/schedule/events/add/modal/"+selectInput.val()+"/"+date+"?api_token="+api_token, function( data ) {
$( "#container" ).html( data );
console.log( "Loading defaut value for activity type ("+selectInput.val()+")" );
});
}
})
}
function deleteEvent(pid){
swal({
title: 'Êtes vous certain de vouloir supprimer l\'évenement?',
text: "Vous ne pourrez pas annuler cette action",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Oui',
cancelButtonText: 'Non'
}).then((result) => {
if (result.value) {
(function($) {
$.post('/api/schedule/event/delete/'+pid+'?api_token='+api_token, function(data) {
console.log('Delete');
});
})(jQuery);
swal(
'Supprimé!',
"L'évenement a été supprimé",
'success'
).then((result) => {
if (result.value) {
location.reload();
}
})
}
})
}

1498
resources/custom.css vendored

File diff suppressed because it is too large Load Diff

View File

@@ -61,40 +61,6 @@
<div class="log"></div>
<script>
initFullCalendar(api_token)
function deleteEvent(pid){
swal({
title: 'Êtes vous certain ?',
text: "Vous ne pourrez annuler cette action",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Oui',
cancelButtonText: 'Non'
}).then((result) => {
if (result.value) {
(function($) {
$.post('/api/calendar/delete?api_token='+api_token, { id: pid } , function(data) {
console.log('Delete');
});
})(jQuery);
swal(
'Supprimé!',
"L'évenement a été supprimé",
'success'
).then((result) => {
if (result.value) {
location.reload();
}
})
}
})
}
</script>
<div class="modal fade" id="schedulemodal" tabindex="-1" role="dialog" aria-labelledby="schedulemodal" aria-hidden="true">
<div class="modal-dialog w-100 modal-lg mx-2 mx-lg-auto" role="document">

View File

@@ -5,14 +5,14 @@
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-primary">
<h4 class="card-title"> Cours a venir</h4>
<h4 class="card-title"> Cours à venir</h4>
</div>
<div class="card-body">
@if(count($userClasse) == 0)
<div class="col-sm-12">
<div class="alert alert-info alert-with-icon">
<span data-notify="icon" class="ti-alert"></span>
<span data-notify="message">Aucun cours a venir</span>
<span data-notify="message">Aucun cours à venir</span>
</div>
</div>
@endif
@@ -63,7 +63,7 @@
<div class="col-sm-6 col-lg-6">
<div class="card">
<div class="card-header card-header-primary">
<h4 class="card-title">Activité a venir</h4>
<h4 class="card-title">Activité à venir</h4>
</div>
<div class="card-body">
<div class="row">
@@ -71,12 +71,26 @@
<div class="col-sm-12">
<div class="alert alert-infi alert-with-icon">
<span data-notify="icon" class="ti-alert"></span>
<span data-notify="message">Aucune activité a venir</span>
<span data-notify="message">Aucune activité à venir</span>
</div>
</div>
@endif
@foreach ($futureEvent as $event)
<div class="col-md-6 col-sm-12"><i class="fa fa-star" aria-hidden="true" style="color:gold"></i> {{$event->data['event_name']}}<div class="float-right">{{$event->data['event_begin_time']}}</div></div>
<div class="col-md-12">
<div class="alert" style="background-color: {{\App\ComplementaryActivity::find($event->type)->calendar_color}}">
<div class="row text-white">
<div class="col-md-2 text-capitalize m-auto d-none d-md-flex">
<h3 class="m-0 p-0" style="margin-top: -0.5rem !important;">{!! \App\ComplementaryActivity::find($event->type)->calendar_icon !!}</h3>
</div>
<div class="col-md">
{{$event->name}}
</div>
<div class="col-md-4">
{{$event->date_begin}}
</div>
</div>
</div>
</div>
@endforeach
</div>
<br>

View File

@@ -4,7 +4,7 @@
<div class="row">
<div class="card ">
<div class="card-header card-header-primary">
<h4 class="card-title">Ajouter un evenement a l'horaire</h4>
<h4 class="card-title">Ajouter un événement à l'horaire</h4>
</div>
<div class="card-body ">
<form action="/admin/schedule/event/add" method="POST">
@@ -13,7 +13,7 @@
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label for="type">Type d'evenement</label>
<label for="type">Type d'événement</label>
<select class="form-control selectpicker" data-style="btn btn-link" name="type" id="type" onchange="switchType('{{$date}}')" required>
@foreach (\App\ComplementaryActivity::all() as $item)
<option value="{{$item->id}}">{{$item->name}}</option>

View File

@@ -0,0 +1,188 @@
@extends('layouts.admin.main')
@section('content')
<div class="row">
<div class="card ">
<div class="card-header card-header-primary">
<h4 class="card-title">Ajouter un événement à l'horaire</h4>
</div>
<div class="card-body ">
<form action="/admin/schedule/event/edit/{{$activity->id}}" method="POST">
@csrf
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label for="type">Type d'événement</label>
<select class="form-control selectpicker" data-style="btn btn-link" name="type" id="type" disabled required>
@foreach (\App\ComplementaryActivity::all() as $item)
<option value="{{$item->id}}">{{$item->name}}</option>
@endforeach
</select>
</div>
</div>
</div>
<div class="row" id="container">
<div class="col-md-12">
<div class="form-group">
<label for="name">Nom de l'événement</label>
<input type="text" name="name" id="name" class="form-control" placeholder="" aria-describedby="nameHelp" value="{{$activity->name}}" required>
<small id="nameHelp" class="text-muted">Veuillez entrer le nom de l'événement</small>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="label-control">Date et Heure de début</label>
<input name="begin" type="text" id="datetimepickerbegin" class="form-control datetimepicker" required/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="label-control">Date et Heure de fin</label>
<input name="end" type="text" id="datetimepickerend" class="form-control datetimepicker" required/>
</div>
</div>
<div class="col-md-5">
<div class="form-group">
<label for="name">Lieux</label>
<input type="text" name="location" id="location" class="form-control" placeholder="" aria-describedby="nameHelp" value="{{$activity->location}}" required>
<small id="nameHelp" class="text-muted">Veuillez entrer le lieu de l'événement</small>
</div>
</div>
<div class="col-md-3 m-auto">
<div class="form-group">
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" name="is_mandatory" type="checkbox" value="1"
@if ($activity->is_mandatory == 1)
checked
@endif>
L'événement est obligatoire
<span class="form-check-sign">
<span class="check"></span>
</span>
</label>
</div>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label for="desc">Commentaire</label>
<br>
<textarea class="form-control" name="desc" id="desc" rows="6" required>{!!$activity->desc!!}</textarea>
</div>
</div>
@if ($activity->type == 1)
<div class="col-md-12">
<div id="accordion" role="tablist">
@for ($i = 1; $i <= \App\Config::getData('admin_level_in_schedule_nb'); $i++)
<div class="card card-collapse">
<div class="card-header" role="tab" id="heading{{$i}}">
<h5 class="mb-0">
<a data-toggle="collapse" href="#collapse{{$i}}" aria-expanded="true" aria-controls="collapse{{$i}}">
Horaire Niveau {{$i}}
<i class="material-icons">keyboard_arrow_down</i>
</a>
</h5>
</div>
<div id="collapse{{$i}}" class="collapse" role="tabpanel" aria-labelledby="heading{{$i}}" data-parent="#accordion">
<div class="card-body">
@for ($p = 1; $p <= \App\Config::getData('admin_periode_nb'); $p++)
<h4 class="mt-3" >Période {{$p}}</h4>
<div class="row">
<div class="col-sm-6 my-2">
<div class="form-group">
<label for="name">Nom du cours</label>
<input type="text" name="name_n{{$i}}_p{{$p}}" id="name_n{{$i}}_p{{$p}}" class="form-control" aria-describedby="nameHelp" required value="{{$activity->course($p,$i)->name}}">
<small id="nameHelp" class="text-muted">Veuillez entrer le nom du cours</small>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<div class="form-group">
<label for="name">Instructeur</label>
<input type="text" name="instruc_n{{$i}}_p{{$p}}" id="instruc_n{{$i}}_p{{$p}}" class="form-control basicAutoComplete" aria-describedby="nameHelp" required value="{{\App\User::find($activity->course($p,$i)->user_id)->fullname()}}">
<small id="nameHelp" class="text-muted">Veuillez entrer le nom de l'instructeur</small>
</div>
</div>
</div>
<div class="col-sm-6 my-2">
<div class="form-group">
<label for="name">OCOM</label>
<input type="text" name="ocom_n{{$i}}_p{{$p}}" id="ocom_n{{$i}}_p{{$p}}" class="form-control" aria-describedby="nameHelp" required value="{{$activity->course($p,$i)->ocom}}">
<small id="nameHelp" class="text-muted">Veuillez entrer l'OCOM</small>
</div>
</div>
<div class="col-sm-6 my-2">
<div class="form-group">
<label for="name">Lieux</label>
<input type="text" name="loc_n{{$i}}_p{{$p}}" id="loc_n{{$i}}_p{{$p}}" class="form-control" placeholder="" aria-describedby="nameHelp" required value="{{$activity->course($p,$i)->location}}">
<small id="nameHelp" class="text-muted">Veuillez entrer le lieux</small>
</div>
</div>
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-block" disabled>Réservation de materiel (Disponible une fois l'événement sauvegarder)</button>
</div>
</div>
<hr>
@endfor
</div>
</div>
</div>
@endfor
</div>
</div>
@endif
</div>
<button type="submit" class="btn btn-primary mt-5">Sauvegarder</button>
</form>
</div>
</div>
</div>
@endsection
@section('custom_scripts')
<script src="/js/calendar.js"></script>
<script>
var begin = "<?php echo $activity->date_begin ?>";
var end = "<?php echo $activity->date_end ?>";
$('#datetimepickerbegin').datetimepicker({
icons: {
time: "fa fa-clock-o",
date: "fa fa-calendar",
up: "fa fa-chevron-up",
down: "fa fa-chevron-down",
previous: 'fa fa-chevron-left',
next: 'fa fa-chevron-right',
today: 'fa fa-screenshot',
clear: 'fa fa-trash',
close: 'fa fa-remove'
},
date: new Date(begin)
});
$('#datetimepickerend').datetimepicker({
icons: {
time: "fa fa-clock-o",
date: "fa fa-calendar",
up: "fa fa-chevron-up",
down: "fa fa-chevron-down",
previous: 'fa fa-chevron-left',
next: 'fa fa-chevron-right',
today: 'fa fa-screenshot',
clear: 'fa fa-trash',
close: 'fa fa-remove'
},
date: new Date(end)
});
$('#desc').trumbowyg({
lang: 'fr'
});
$( ".basicAutoComplete" ).autocomplete({
source: '/api/user/list?api_token='+api_token
});
</script>
@endsection

View File

@@ -1,13 +1,13 @@
<div class="col-md-12">
<div class="form-group">
<label for="name">Nom de l'evenement</label>
<label for="name">Nom de l'événement</label>
<input type="text" name="name" id="name" class="form-control" placeholder="" aria-describedby="nameHelp" value="{{$activity->name}}" required>
<small id="nameHelp" class="text-muted">Veuillez entrer le nom de l'evenement</small>
<small id="nameHelp" class="text-muted">Veuillez entrer le nom de l'événement</small>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label class="label-control">Date et Heure de debut</label>
<label class="label-control">Date et Heure de début</label>
<input name="begin" type="text" id="datetimepickerbegin" class="form-control datetimepicker" required/>
</div>
</div>
@@ -21,7 +21,7 @@
<div class="form-group">
<label for="name">Lieux</label>
<input type="text" name="location" id="location" class="form-control" placeholder="" aria-describedby="nameHelp" value="{{$activity->location}}" required>
<small id="nameHelp" class="text-muted">Veuillez entrer le nom de l'evenement</small>
<small id="nameHelp" class="text-muted">Veuillez entrer le nom de l'événement</small>
</div>
</div>
<div class="col-md-3 m-auto">
@@ -31,8 +31,8 @@
<input class="form-check-input" name="is_mandatory" type="checkbox" value="1"
@if ($activity->is_mandatory == 1)
checked
@endif required>
L'evenement est obligatoire
@endif>
L'événement est obligatoire
<span class="form-check-sign">
<span class="check"></span>
</span>
@@ -65,7 +65,7 @@
<div class="card-body">
@for ($p = 1; $p <= \App\Config::getData('admin_periode_nb'); $p++)
<h4 class="mt-3" >Periode {{$p}}</h4>
<h4 class="mt-3" >Période {{$p}}</h4>
<div class="row">
<div class="col-sm-6 my-2">
<div class="form-group">
@@ -98,7 +98,7 @@
</div>
</div>
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-block" disabled>Réservation de materiel (Disponible une fois l'evenement sauvegarder)</button>
<button type="button" class="btn btn-primary btn-block" disabled>Réservation de materiel (Disponible une fois l'événement sauvegarder)</button>
</div>
</div>
<hr>

View File

@@ -28,7 +28,7 @@
@endif
@endif
@if (\App\Config::getData('is_schedule_public') === "false")
@if (\App\Config::getData('is_schedule_public') == null)
@if (\Auth::User()->getPerm('schedule_edit'))
<div class="alert alert-danger" role="alert">
Attention ! L'horaire n'est présentement pas visible par le publique ! <a href="/admin/config#schedule_public">Cliquer ici pour accéder aux options</a>
@@ -36,7 +36,7 @@
@endif
@endif
@if (\App\Config::getData('is_schedule_public') === "false")
@if (\App\Config::getData('is_schedule_build') == null)
@if (\Auth::User()->getPerm('schedule_edit'))
<div class="alert alert-warning" role="alert">
Attention ! L'horaire n'est pas marqué comme complet, les utilisateurs ne receverons pas de notification concernant l'horaire <a href="/admin/config#schedule_build">Cliquer ici pour accéder aux options</a>

View File

@@ -14,7 +14,7 @@
<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>
<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>
<a class="btn btn-danger" data-toggle="tooltip" data-placement="bottom" title="Supprimer"><i class="material-icons">close</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>
<div class="col-md-6 text-right">

View File

@@ -1,7 +1,7 @@
<div class="inner">
<div class="title text-center">
<h1>{{ App\Config::getData('text_public_news_title')}}<a class="badge badge-primary edit-btn" href="/admin/public/edit/text_public_news_title" style="display: none;"><i class="fa fa-pencil" aria-hidden="true"></i></a></h1>
<p>{{ App\Config::getData('text_public_news_desc')}} <a class="badge badge-primary edit-btn" href="/admin/public/edit/text_public_news_desc" style="display: none;"><i class="fa fa-pencil" aria-hidden="true"></i></a></p>
<h1>{{ App\Config::getData('text_public_schedule_title')}}<a class="badge badge-primary edit-btn" href="/admin/public/edit/text_public_schedule_title" style="display: none;"><i class="fa fa-pencil" aria-hidden="true"></i></a></h1>
<p>{{ App\Config::getData('text_public_schedule_desc')}} <a class="badge badge-primary edit-btn" href="/admin/public/edit/text_public_schedule_desc" style="display: none;"><i class="fa fa-pencil" aria-hidden="true"></i></a></p>
</div>
<hr class="mx-5">
<div id="public_calendar"></div>

View File

@@ -1,7 +1,8 @@
<!-- Required meta tags -->
<title>{{ App\Config::getData('escadron_name_full')}}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<!-- Fonts and icons -->
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons" />
@@ -9,7 +10,7 @@
<!-- Material CSS -->
<link rel="stylesheet" href="/css/material-kit.css" />
<link rel="stylesheet" href="/css/material-dashboard.css" />
<link rel="stylesheet" href="/css/custom.css" />
<!-- Plugin CSS -->
<link href='/assets/fullcalendar/core/main.css' rel='stylesheet' />

View File

@@ -1,61 +1,60 @@
<!-- Navbar -->
<nav class="navbar navbar-transparent navbar-color-on-scroll fixed-top navbar-expand-lg" color-on-scroll="100" id="sectionsNav">
<nav class="navbar navbar-color-on-scroll fixed-top navbar-expand-lg navbar-transparent" color-on-scroll="100" id="sectionsNav">
<div class="container">
<div class="navbar-wrapper">
<a class="navbar-brand" href="#pablo">{{ App\Config::getData('escadron_name_full')}}</a>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
<span class="sr-only">Toggle navigation</span>
<span class="navbar-toggler-icon icon-bar"></span>
<span class="navbar-toggler-icon icon-bar"></span>
<span class="navbar-toggler-icon icon-bar"></span>
</button>
<div class="collapse navbar-collapse justify-content-end">
<ul class="navbar-nav">
<li class="nav-item">
<a href="/" class="nav-link">
<i class="material-icons">home</i> Accueil
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#0" role="button" aria-haspopup="true" aria-expanded="false">
<i class="material-icons">airplanemode_active</i>
@switch(\App\Config::getData('escadron_element'))
@case('Marine')
L'équipage
@break
@case('Terre')
Le corps de cadet
@break
@default
L'escadron
@endswitch
</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#news">
<i class="material-icons mr-2">new_releases</i>Nouvelles
</a>
<a class="dropdown-item" href="#activity">
<i class="material-icons mr-2">landscape</i>Nos Activitées
</a>
<a class="dropdown-item" href="#picture">
<i class="material-icons mr-2">photo_camera</i>Photos
</a>
<a class="dropdown-item" href="#calendar">
<i class="material-icons mr-2">calendar_today</i>Calendrier
</a>
<a class="dropdown-item" href="#cta">
<i class="material-icons">location_on</i> Nous rejoindre
</a>
</div>
</li>
<li class="nav-item ">
<a href="/login" class="nav-link">
<i class="material-icons">lock_open</i> Connexion
</a>
</li>
</ul>
</div>
<div class="navbar-translate">
<a class="navbar-brand" href="/">
{{ App\Config::getData('escadron_name_full')}} </a>
<button class="navbar-toggler" type="button" data-toggle="collapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="sr-only">Toggle navigation</span>
<span class="navbar-toggler-icon"></span>
<span class="navbar-toggler-icon"></span>
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="collapse navbar-collapse">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="/" class="nav-link">
<i class="material-icons">home</i> Accueil
</a>
</li>
<li class="dropdown nav-item">
<a href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
<i class="material-icons">airplanemode_active</i>
@switch(\App\Config::getData('escadron_element'))
@case('Marine')
L'équipage
@break
@case('Terre')
Le corps de cadet
@break
@default
L'escadron
@endswitch
</a>
<div class="dropdown-menu dropdown-with-icons">
<a href="/#news" class="dropdown-item">
<i class="material-icons mr-2">new_releases</i>Nouvelles
</a>
<a href="/#activity" class="dropdown-item">
<i class="material-icons mr-2">landscape</i>Nos Activitées
</a>
<a href="/#picture" class="dropdown-item">
<i class="material-icons mr-2">photo_camera</i>Photos
</a>
<a href="/#calendar" class="dropdown-item">
<i class="material-icons mr-2">calendar_today</i>Calendrier
</a>
<a href="/#cta" class="dropdown-item">
<i class="material-icons">location_on</i> Nous rejoindre
</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="/login">
<i class="material-icons">lock_open</i> Connexion
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- End Navbar -->
</nav>

View File

@@ -13,7 +13,7 @@
</head>
<body class="index-page sidebar-collapse">
<body>
<!-- Include Header -->
@include('layouts.public.header')

View File

@@ -28,6 +28,7 @@ Route::middleware('auth:api')->group(function () {
Route::get('/schedule/events/modal/full/{id}/{db_type}','ScheduleController@loadModalFull');
Route::get('/schedule/events/add/modal/{type}/{date}','ScheduleController@loadModalDefautType');
Route::post('/schedule/event/delete/{id}','ScheduleController@delete');
/** Message Route */
Route::post('/message/delete', 'MessageController@destroy');

View File

@@ -23,6 +23,7 @@ Route::get('/', 'PublicController@index');
Route::get('/news', 'NewsController@index');
Route::get('/news/{id}', 'NewsController@show');
Route::get('/activity', 'ComplementaryActivityController@index');
Route::get('/activity/{id}', 'ComplementaryActivityController@show');
Route::get('/picture/{id}', 'PictureController@show');
Route::get('/pictures', 'PictureController@index');
@@ -41,10 +42,14 @@ Route::middleware(['auth','admin'])->group(function () {
Route::post('/admin/calendar/add', 'CalendarController@store');
Route::patch('/admin/calendar/edit/{id}', ['uses' =>'CalendarController@patch']);
/** Schedule */
Route::get('/admin/schedule/pdf/event/{id}','ScheduleController@printtopdf');
Route::get('/admin/schedule/add/{date}','ScheduleController@create');
Route::get('/admin/schedule/edit/{id}','EventController@edit');
Route::post('/admin/schedule/event/add','EventController@Store');
Route::post('/admin/schedule/event/edit/{id}','EventController@update');
/** Statistique */
Route::get('/admin/stats/log' , 'LogController@index');