Merge remote-tracking branch 'origin/master'
Conflicts: SRC/resources/views/home.blade.php
This commit is contained in:
commit
e87cf67a71
@ -3,6 +3,7 @@
|
||||
use App\Models\User;
|
||||
use Response;
|
||||
use App\Models\Oeuvre;
|
||||
use App\Models\ListeOeuvre;
|
||||
|
||||
class GameController extends Controller {
|
||||
|
||||
@ -35,7 +36,13 @@ class GameController extends Controller {
|
||||
*/
|
||||
public function showReferentGames($id)
|
||||
{
|
||||
return view('referent_games', ['referent' => $id]);
|
||||
$listeOeuvre = $ListeOeuvre = ListeOeuvre::ofUser($id)->activeListOeuvre()->first();
|
||||
if($listeOeuvre == '')
|
||||
$games = [];
|
||||
else
|
||||
$games = $listeOeuvre->jeux()->get();
|
||||
|
||||
return view('referent_games', ['games' => $games]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -24,4 +24,14 @@ class ListeOeuvre extends Model {
|
||||
$idUser = Auth::user()->id;
|
||||
return $query->where('iduser', $idUser);
|
||||
}
|
||||
|
||||
public function scopeOfUser($query, $idUser)
|
||||
{
|
||||
return $query->where('iduser', $idUser);
|
||||
}
|
||||
|
||||
public function scopeActiveListOeuvre($query)
|
||||
{
|
||||
return $query->where('etat', 1);
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ img {
|
||||
*/
|
||||
.mg__start-screen {
|
||||
text-align: center;
|
||||
padding: 80px 20px;
|
||||
padding: 5% 20px;
|
||||
}
|
||||
|
||||
.mg__start-screen--heading {
|
||||
@ -167,14 +167,17 @@ img {
|
||||
*/
|
||||
.mg__wrapper {
|
||||
margin: 0 auto;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mg__contents {
|
||||
position: relative;
|
||||
padding-bottom: 47%;
|
||||
margin-left: -5px;
|
||||
margin-right: -5px;
|
||||
padding-bottom: 50%;
|
||||
margin-left: 0%;
|
||||
margin-right: 0%;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -239,43 +242,45 @@ img {
|
||||
|
||||
.mg__level-2 .mg__tile-1 {
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
left: 23%;
|
||||
}
|
||||
.mg__level-2 .mg__tile-2 {
|
||||
top: 0%;
|
||||
left: 16.66667%;
|
||||
left: 39.66667%;
|
||||
}
|
||||
.mg__level-2 .mg__tile-3 {
|
||||
top: 0%;
|
||||
left: 33.33333%;
|
||||
left: 56.33333%;
|
||||
}
|
||||
/*
|
||||
.mg__level-2 .mg__tile-4 {
|
||||
top: 0%;
|
||||
left: 50%;
|
||||
left: 73%;
|
||||
}
|
||||
.mg__level-2 .mg__tile-5 {
|
||||
top: 0%;
|
||||
left: 66.66667%;
|
||||
left: 89.66667%;
|
||||
}
|
||||
.mg__level-2 .mg__tile-6 {
|
||||
top: 0%;
|
||||
left: 83.33333%;
|
||||
}
|
||||
}*/
|
||||
.mg__level-2 .mg__tile-7 {
|
||||
top: 33.33333%;
|
||||
left: 0%;
|
||||
left: 23%;
|
||||
}
|
||||
.mg__level-2 .mg__tile-8 {
|
||||
top: 33.33333%;
|
||||
left: 16.66667%;
|
||||
left: 39.66667%;
|
||||
}
|
||||
.mg__level-2 .mg__tile-9 {
|
||||
top: 33.33333%;
|
||||
left: 33.33333%;
|
||||
left: 56.33333%;
|
||||
}
|
||||
/*
|
||||
.mg__level-2 .mg__tile-10 {
|
||||
top: 33.33333%;
|
||||
left: 50%;
|
||||
left: 73%;
|
||||
}
|
||||
.mg__level-2 .mg__tile-11 {
|
||||
top: 33.33333%;
|
||||
@ -309,7 +314,7 @@ img {
|
||||
top: 66.66667%;
|
||||
left: 83.33333%;
|
||||
}
|
||||
|
||||
*/
|
||||
/* game__level-3 styles */
|
||||
.mg__level-3 .mg__tile {
|
||||
width: 12.5%;
|
||||
@ -318,20 +323,21 @@ img {
|
||||
|
||||
.mg__level-3 .mg__tile-1 {
|
||||
top: 0%;
|
||||
left: 0%;
|
||||
left: 23%;
|
||||
}
|
||||
.mg__level-3 .mg__tile-2 {
|
||||
top: 0%;
|
||||
left: 12.5%;
|
||||
left: 35.5%;
|
||||
}
|
||||
.mg__level-3 .mg__tile-3 {
|
||||
top: 0%;
|
||||
left: 25%;
|
||||
left: 48%;
|
||||
}
|
||||
.mg__level-3 .mg__tile-4 {
|
||||
top: 0%;
|
||||
left: 37.5%;
|
||||
left: 60.5%;
|
||||
}
|
||||
/*
|
||||
.mg__level-3 .mg__tile-5 {
|
||||
top: 0%;
|
||||
left: 50%;
|
||||
@ -347,26 +353,26 @@ img {
|
||||
.mg__level-3 .mg__tile-8 {
|
||||
top: 0%;
|
||||
left: 87.5%;
|
||||
}
|
||||
}*/
|
||||
.mg__level-3 .mg__tile-9 {
|
||||
top: 25%;
|
||||
left: 0%;
|
||||
left: 23%;
|
||||
}
|
||||
.mg__level-3 .mg__tile-10 {
|
||||
top: 25%;
|
||||
left: 12.5%;
|
||||
left: 35.5%;
|
||||
}
|
||||
.mg__level-3 .mg__tile-11 {
|
||||
top: 25%;
|
||||
left: 25%;
|
||||
left: 48%;
|
||||
}
|
||||
.mg__level-3 .mg__tile-12 {
|
||||
top: 25%;
|
||||
left: 37.5%;
|
||||
left: 60.5%;
|
||||
}
|
||||
.mg__level-3 .mg__tile-13 {
|
||||
top: 25%;
|
||||
left: 50%;
|
||||
left: 73%;
|
||||
}
|
||||
.mg__level-3 .mg__tile-14 {
|
||||
top: 25%;
|
||||
|
@ -198,7 +198,7 @@
|
||||
</span>\
|
||||
</div>\
|
||||
<div class="mg__meta--right">\
|
||||
<button id="mg__button--restart" class="mg__button btn-lg"><i class="fa fa-repeat fa-3x fa-spin"></i></button>\
|
||||
<button id="mg__button--restart" class="mg__button btn-lg"><i class="fa fa-repeat fa-1x fa-spin"></i></button>\
|
||||
</div>';
|
||||
this.gameMeta.innerHTML = this.gameMetaHTML;
|
||||
this.game.appendChild(this.gameMeta);
|
||||
@ -207,8 +207,8 @@
|
||||
|
||||
// <button type="button" class="btn btn-default"> <span class="glyphicon glyphicon-star-empty"></span> </button>
|
||||
|
||||
this.gameStartScreenHTML = '<h2 class="mg__start-screen--heading">Welcome to the Memory Game!</h2>\
|
||||
<h3 class="mg__start-screen--sub-heading">Choisir niveau</h3>\
|
||||
this.gameStartScreenHTML = '<h2 class="mg__start-screen--heading">JEU MEMORY</h2>\
|
||||
<h3 class="mg__start-screen--sub-heading">Choisir un niveau : </h3>\
|
||||
<ul class="mg__start-screen--level-select">\
|
||||
<span data-level="1"><button class="btn btn-success btn-lg"><i class="fa fa-2x fa-star-o"></i></button></span>\
|
||||
<span data-level="2"><button class="btn btn-warning btn-lg "><i class="fa fa-2x fa-star-half-o"></i><i class="fa fa-2x fa-star-half-o"></i></button></span>\
|
||||
@ -304,18 +304,19 @@
|
||||
this.newCards.push(this.cards[i], this.cards[i]);
|
||||
}
|
||||
this.newCards = shuffle(this.newCards);
|
||||
/* this.newCards.push(0, 0);
|
||||
this.newCards.push(0, 0);*/
|
||||
|
||||
this.tilesHTML = '';
|
||||
var n = 0;
|
||||
for ( var i = 0; i < this.numTiles; i++ ) {
|
||||
var n = i + 1;
|
||||
//this.tilesHTML += '<div class="col-xs-6 col-sm-4">';
|
||||
n = n + 1;
|
||||
if(this.level == 3 && n == 5 ){n = 9}
|
||||
if(this.level == 2 && n == 4 ){n = 7}
|
||||
this.tilesHTML += '<div class="mg__tile mg__tile-' + n + '">\
|
||||
<div class="mg__tile--inner" data-id="' + this.newCards[i]["id"] + '">\
|
||||
<span class="mg__tile--outside"></span>\
|
||||
<span class="mg__tile--inside"><img src="' + this.newCards[i]["img"] + '"></span>';
|
||||
this.tilesHTML +='</div>';
|
||||
// this.tilesHTML +='</div>';
|
||||
|
||||
|
||||
/* if(this.level == 1 && n == 2){
|
||||
this.tilesHTML +="</tr><tr>";
|
||||
|
@ -102,9 +102,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="city" class="col-sm-2 control-label">Ville</label>
|
||||
<label for="city" class="col-sm-2 control-label">Etablissement</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="city" name="city" required placeholder="Ville">
|
||||
<input type="text" class="form-control" id="city" name="city" required placeholder="Etablissement">
|
||||
</div>
|
||||
</div>
|
||||
@if ($me->droits == 2)
|
||||
|
@ -6,34 +6,16 @@
|
||||
</center>
|
||||
|
||||
<div class="container">
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img data-src="holder.js/100%x200" alt="100%x200" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDI0MiAyMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxkZWZzLz48cmVjdCB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgZmlsbD0iI0VFRUVFRSIvPjxnPjx0ZXh0IHg9IjkxLjc5Njg3NSIgeT0iMTAwIiBzdHlsZT0iZmlsbDojQUFBQUFBO2ZvbnQtd2VpZ2h0OmJvbGQ7Zm9udC1mYW1pbHk6QXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7Zm9udC1zaXplOjExcHQ7ZG9taW5hbnQtYmFzZWxpbmU6Y2VudHJhbCI+MjQyeDIwMDwvdGV4dD48L2c+PC9zdmc+" data-holder-rendered="true" style="height: 200px; width: 100%; display: block;">
|
||||
<div class="caption">
|
||||
<h3>Jeu du pendu</h3>
|
||||
<p>sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea vo</p>
|
||||
<p><a href="games/pendu" class="btn btn-default" role="button">Button</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img data-src="holder.js/100%x200" alt="100%x200" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDI0MiAyMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxkZWZzLz48cmVjdCB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgZmlsbD0iI0VFRUVFRSIvPjxnPjx0ZXh0IHg9IjkxLjc5Njg3NSIgeT0iMTAwIiBzdHlsZT0iZmlsbDojQUFBQUFBO2ZvbnQtd2VpZ2h0OmJvbGQ7Zm9udC1mYW1pbHk6QXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7Zm9udC1zaXplOjExcHQ7ZG9taW5hbnQtYmFzZWxpbmU6Y2VudHJhbCI+MjQyeDIwMDwvdGV4dD48L2c+PC9zdmc+" data-holder-rendered="true" style="height: 200px; width: 100%; display: block;">
|
||||
<div class="caption">
|
||||
<h3>Puzzle</h3>
|
||||
<p>sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea vo</p>
|
||||
<p><a href="games/puzzle" class="btn btn-default" role="button">Button</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@foreach ($games as $game)
|
||||
<div class="col-sm-6 col-md-4">
|
||||
<div class="thumbnail">
|
||||
<img data-src="holder.js/100%x200" alt="100%x200" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDI0MiAyMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxkZWZzLz48cmVjdCB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgZmlsbD0iI0VFRUVFRSIvPjxnPjx0ZXh0IHg9IjkxLjc5Njg3NSIgeT0iMTAwIiBzdHlsZT0iZmlsbDojQUFBQUFBO2ZvbnQtd2VpZ2h0OmJvbGQ7Zm9udC1mYW1pbHk6QXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7Zm9udC1zaXplOjExcHQ7ZG9taW5hbnQtYmFzZWxpbmU6Y2VudHJhbCI+MjQyeDIwMDwvdGV4dD48L2c+PC9zdmc+" data-holder-rendered="true" style="height: 200px; width: 100%; display: block;">
|
||||
<div class="caption">
|
||||
<h3>Assassin's creed IV</h3>
|
||||
<p>sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea vo</p>
|
||||
<p><a href="games/assassins-creed" class="btn btn-default" role="button">Button</a></p>
|
||||
<div class="thumbnail">
|
||||
<img data-src="holder.js/100%x200" alt="100%x200" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDI0MiAyMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxkZWZzLz48cmVjdCB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgZmlsbD0iI0VFRUVFRSIvPjxnPjx0ZXh0IHg9IjkxLjc5Njg3NSIgeT0iMTAwIiBzdHlsZT0iZmlsbDojQUFBQUFBO2ZvbnQtd2VpZ2h0OmJvbGQ7Zm9udC1mYW1pbHk6QXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7Zm9udC1zaXplOjExcHQ7ZG9taW5hbnQtYmFzZWxpbmU6Y2VudHJhbCI+MjQyeDIwMDwvdGV4dD48L2c+PC9zdmc+" data-holder-rendered="true" style="height: 200px; width: 100%; display: block;">
|
||||
<div class="caption">
|
||||
<h3>{{$game->nom}}</h3>
|
||||
<p>{{$game->description}}</p>
|
||||
<p><a href="games/{{$game->nom}}" class="btn btn-default" role="button">Button</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
Reference in New Issue
Block a user