Merge remote-tracking branch 'origin/master'

Conflicts:
	SRC/public/css/referent.css
	SRC/resources/views/referent.blade.php
This commit is contained in:
Jerome Morjon 2015-02-19 23:02:35 +01:00
commit 6b88d2c9cd
14 changed files with 1525 additions and 189 deletions

View File

@ -95,4 +95,17 @@ class ReferentController extends Controller {
return redirect('/referent');
}
public function setListOeuvres ()
{
$idListeOeuvre = Input::get('idListeOeuvre');
$idconcats = Input::get('oeuvres');
$list_oeuvres_id = explode("-", $idconcats);
$ListeOeuvre = ListeOeuvre::find($idListeOeuvre);
$ListeOeuvre->oeuvres()->detach();
$ListeOeuvre->oeuvres()->attach($list_oeuvres_id);
return Response::json(array());
}
}

View File

@ -39,7 +39,7 @@ Route::group(['middleware' => 'auth'], function ()
Route::post('deleteListeOeuvre', 'ReferentController@deleteListeOeuvre');
Route::post('addListeOeuvre', 'ReferentController@addListeOeuvre');
Route::get('showListOeuvres/{id}', 'ReferentController@showListeOeuvres');
Route::get('setListOeuvres', 'ReferentController@setListOeuvres');
Route::post('setListOeuvres', 'ReferentController@setListOeuvres');
});
Route::group(['middleware' => 'admin'], function ()

Binary file not shown.

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

3
SRC/public/css/chosen.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -57,8 +57,12 @@ background: linear-gradient(to bottom, #a7cfdf 0%,#23538a 100%); /* W3C */
background: white;
border-radius: 7px;
border: 1px solid grey;
<<<<<<< HEAD
box-shadow: 0px 0px 2px dimgrey;
width : 40%;
=======
box-shadow: 1px 1px 2px dimgrey;
>>>>>>> origin/master
}
.jeux

View File

@ -0,0 +1,58 @@
//Selection d'une recherche d'oeuvre
$('.listeoeuvre').click(function() {
$('#oeuvrePic').empty();
url = "/showListOeuvres/" + $(this).children('.idListeOeuvre').val();
$.get(url, function( data ) {
if (data.length == 0 )
$("#oeuvrePic").append("Aucune Oeuvre");
data.forEach( function(el) {
$("#oeuvrePic").append('<div class="col-xs-4 col-md-3">'
+'<a href="#" class="thumbnail">'
+'<img src="http://www.augustins.org/documents/10180/156407/' + el.urlPhoto + '"/>'
+'</a></div>');
})
}, "json" )
.fail(function() {
$("#oeuvrePic").append('<div class="alert alert-danger">'
+'<strong>Oouups!</strong> Il y a un problème.<br><br>'
+'<ul>'
+'<li>Erreur lors de la récupération</li>'
+'</ul>'
+'</div>'
);
});
});
//Enregistrement d'une liste d'ouevre
$('#enregistrer').click(function() {
url = "setListOeuvres";
dataSend = {
_token : $('#_token').val(),
idListeOeuvre : "1",
oeuvres : "1-2-3-4"};
$.post(url,
dataSend,
function( data ) {
;
}, "json")
.done(function() {
$("#oeuvrePic").append('<div class="alert alert-success">'
+'<ul>'
+'<li>Sauvegarde validée</li>'
+'</ul>'
+'</div>');
})
.fail(function() {
$("#oeuvrePic").append('<div class="alert alert-danger">'
+'<strong>Oouups!</strong> Il y a un problème.<br><br>'
+'<ul>'
+'<li>Erreur lors de l\'envoie</li>'
+'</ul>'
+'</div>');
});
});

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +0,0 @@
$(document).ready( function() {
console.log( "document loaded" );
$('.listeoeuvre').click(function() {
url = "/showListOeuvres/" + $(this).children('.idListeOeuvre').val();
$.get(url, function( data ) {
if (data.length == 0 )
$("#oeuvrePic").append("Aucune Oeuvre");
data.forEach( function(el) {
$("#oeuvrePic").append('<div class="col-xs-4 col-md-3">'
+'<a href="#" class="thumbnail">'
+'<img src="http://www.augustins.org/documents/10180/156407/' + el.urlPhoto + '"/>'
+'</a></div>');
})
}, "json" )
.fail(function() {
console.log( "error" );
});
});
});

View File

@ -1,20 +0,0 @@
$(document).ready( function() {
$('#enregistrer').click(function() {
event.preventDefault();
send = {idListeOeuvre : " " ,
idOeuvres : [1,2,3,4,4] }
url = "/setListOeuvres";
$.post(url,
send,
function( data ) {
})
.done(function() {
console.log( "success" );
})
.fail(function() {
console.log( "error" );
});
});
});

View File

@ -7,6 +7,7 @@
<title>ModuleWeb</title>
<link href="/css/app.css" rel="stylesheet">
<link href="/css/chosen.min.css" rel="stylesheet">
<!-- Fonts -->
<link href='//fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
@ -31,7 +32,24 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>
<!-- Choosen -->
<script src="/js/chosen.jquery.js" type="text/javascript"></script>
<script type="text/javascript">
var config = {
'.chosen-select' : {},
'.chosen-select-deselect' : {allow_single_deselect:true},
'.chosen-select-no-single' : {disable_search_threshold:10},
'.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},
'.chosen-select-width' : {width:"95%"}
}
for (var selector in config) {
$(selector).chosen(config[selector]);
}
</script>
<!-- Scripts Jquery -->
<script type="text/javascript" src="js/getListeOeuvre.js"></script>
<script type="text/javascript" src="/js/ListeOeuvre.js"></script>
</body>
</html>

View File

@ -4,4 +4,18 @@
<center><h1>{{ $game }}</h1></center>
<br><br>
<center><img src="http://i.ytimg.com/vi/xiIO1zUXNVI/maxresdefault.jpg" width="60%"></center>
<center><img src="http://i.ytimg.com/vi/xiIO1zUXNVI/maxresdefault.jpg" width="60%"></center>
<!--
<select data-placeholder="Choose a Country..." class="chosen-select" multiple style="width:350px;" tabindex="4">
<option value=""></option>
<option value="United States">United States</option>
<option value="United Kingdom">United Kingdom</option>
<option value="Afghanistan">Afghanistan</option>
<option value="Aland Islands">Aland Islands</option>
<option value="Albania">Albania</option>
<option value="Zambia">Zambia</option>
<option value="Zimbabwe">Zimbabwe</option>
</select> -->

View File

@ -3,6 +3,7 @@
@section('content')
<link href="css/referent.css" rel="stylesheet" type="text/css"/>
<br>
<<<<<<< HEAD
<div class="col-md-3 listg">
<legend>Créer une liste oeuvre:</legend>
<form class="form-inline" method="POST" role="form" action="addListeOeuvre">
@ -128,6 +129,178 @@
<div class="col-md-3 listRecherche">
<p>Liste, résultat de recherche</p>
=======
<!-- Sidebar left - Gestion des listes d'oeuvre -->
<div class="col-md-3 ccmd3">
<legend>Créer une liste oeuvre:</legend>
<form class="form-inline" method="POST" role="form" action="addListeOeuvre">
<input type="hidden" name="idUser" value="{{ $me->id }}">
<input type="hidden" name="_token" value="{{{ csrf_token() }}}" />
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" required="required" name="name" placeholder="Ajouter une liste d'oeuvre">
</div>
</div>
<button type="submit" class="btn btn-primary">Ajouter</button>
</form>
<br><br>
<legend>Mes listes d'oeuvres:</legend>
<table class="table table-hover">
@foreach ($listeoeuvres as $listeoeuvre)
<tr class="active listeoeuvre">
<form method="POST" role="form" action="deleteListeOeuvre">
<input type="hidden" name="idUser" value="{{ $me->id }}">
<input type="hidden" class="idListeOeuvre" name="idListeOeuvre" value="{{ $listeoeuvre->id }}">
<input type="hidden" name="_token" id="_token" value="{{{ csrf_token() }}}" />
<td>{{$listeoeuvre->nom}}</td>
<td><button type="submit" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-trash"></span></a></td>
</form>
</tr>
@endforeach
</table>
</div>
<div class="col-md-8 ccmd9">
<legend>Falbala: </legend>
<div class="panel panel-default col-md-9"><br>
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#">Ma sélection</a></li>
<li role="presentation"><a href="#">Ajouter des images</a></li>
</ul>
<br><br><br><br><br><br><br><br><br><br><br><br>
</div>
<div class="col-md-3">
<legend>Mes jeux associés</legend>
<div class="checkbox">
<label>
<input type="checkbox" value="">
Puzzle Game
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" value="">
Assassin's Creed
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" value="">
Homer Simpson
</label>
</div>
</div>
<br><br><br>
</div>
<div class="col-md-9 ccmd9">
<div class="col-md-9">
<span style="float: right">Sélectionner tout -- Annuler sélection</span><br>
<div class="panel panel-default">
<div class="panel-body" id="oeuvrePic">
<!-- // TODO -->
</div>
</div>
<button style="float: right" class="btn btn-primary" id="enregistrer">Enregistrer</button>
</div>
</div>
<div class="col-md-9 ccmd9">
<div class="col-md-9">
<span style="float: right">Sélectionner tout -- Annuler sélection</span><br>
<div class="panel panel-default">
<div class="panel-body">
<div class="col-xs-4 col-md-3">
<a href="#" class="thumbnail">
<img src="http://www.augustins.org/documents/10180/156407/1"/>
</a>
</div>
<div class="col-xs-4 col-md-3">
<a href="#" class="thumbnail">
<img src="http://www.augustins.org/documents/10180/156407/1"/>
</a>
</div>
<div class="col-xs-4 col-md-3">
<a href="#" class="thumbnail">
<img src="http://www.augustins.org/documents/10180/156407/2"/>
</a>
</div>
</div>
<br>
</div>
<button style="float: right" class="btn btn-primary" id="enregistrer">Enregistrer</button>
</div>
</div>
<div class="col-md-3 ccmd3">
<legend>Ajouter un filtre:</legend>
<h4>Par critère:</h4>
<select class="form-control">
<option selected="selected">Selectionner catégorie</option>
<option>1</option>
<option>2</option>
</select>
<select class="form-control">
<option selected="selected">Tous les éléments</option>
<option>1</option>
<option>2</option>
</select>
<button style="margin-top: 5px" class="btn btn-primary">Ajouter</button>
<br><br>
<h4>Par mot clé:</h4>
<form class="form-inline">
<div class="col-sm-8 form-group">
<div class="input-group">
<input type="text" class="form-control" id="exampleInputAmount" placeholder="Par mot clé">
</div>
</div>
<button type="submit" class="btn btn-primary">Ajouter</button>
<br><br>
<legend>Mes filtres</legend>
<table class="table">
<tr>
<td>Montagne: noire</td>
<td>Supprimer</td>
</tr>
<tr>
<td>couleur: bleu</td>
<td>Supprimer</td>
</tr>
<tr>
<td>âge: 10 ans</td>
<td>Supprimer</td>
</tr>
</table>
>>>>>>> origin/master
</div>
@endsection

View File

@ -1,145 +0,0 @@
@extends('app')
@section('content')
<link href="css/referent.css" rel="stylesheet" type="text/css"/>
<br>
<div class="col-md-3">
<legend>Créer une listeoeuvre:</legend>
<form class="form-inline" method="POST" role="form" action="addListeOeuvre">
<input type="hidden" name="idUser" value="{{ $me->id }}">
<input type="hidden" name="_token" value="{{{ csrf_token() }}}" />
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" required="required" name="name" placeholder="Ajouter une liste d'oeuvre">
</div>
</div>
<button type="submit" class="btn btn-primary">Ajouter</button>
</form>
<br><br>
<legend>Mes listes d'oeuvres:</legend>
<table class="table table-hover">
@foreach ($listeoeuvres as $listeoeuvre)
<tr class="active listeoeuvre">
<form method="POST" role="form" action="deleteListeOeuvre">
<input type="hidden" name="idUser" value="{{ $me->id }}">
<input type="hidden" class="idListeOeuvre" name="idListeOeuvre" value="{{ $listeoeuvre->id }}">
<input type="hidden" name="_token" value="{{{ csrf_token() }}}" />
<td>{{$listeoeuvre->nom}}</td>
<td><button type="submit" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-trash"></span></a></td>
</tr>
</form>
@endforeach
</table>
</div>
<div class="col-md-9">
<div class="panel panel-default col-md-9"><br>
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#">Ma sélection</a></li>
<li role="presentation"><a href="#">Ajouter des images</a></li>
</ul>
<br><br><br><br>
</div>
<div class="col-md-3">
<legend>Mes jeux associés</legend>
<div class="col-md-8">
<select class="form-control">
<option selected="selected">Tous les éléments</option>
<option>1</option>
<option>2</option>
</select>
</div>
<button style="margin-top: 5px" class="btn btn-primary">Ajouter</button>
<br><br>
<table class="table">
<tr>
<td>Montagne: noire</td>
<td>Supprimer</td>
</tr>
<tr>
<td>couleur: bleu</td>
<td>Supprimer</td>
</tr>
</table>
</div>
<br><br><br>
<legend>Falbala: (Activer ou Désactiver la listeoeuvre)</legend>
<div class="col-md-9">
<span style="float: right">Sélectionner tout -- Annuler sélection</span><br>
<div class="panel panel-default">
<div class="panel-body" id="oeuvrePic">
<!-- // TODO -->
<button style="float: right" class="btn btn-primary">Enregistrer</button>
</div>
</div>
</div>
<div class="col-md-3">
<legend>Ajouter un filtre:</legend>
<h4>Par critère:</h4>
<select class="form-control">
<option selected="selected">Selectionner catégorie</option>
<option>1</option>
<option>2</option>
</select>
<select class="form-control">
<option selected="selected">Tous les éléments</option>
<option>1</option>
<option>2</option>
</select>
<button style="margin-top: 5px" class="btn btn-primary">Ajouter</button>
<br><br>
<h4>Par mot clé:</h4>
<form class="form-inline">
<div class="col-sm-8 form-group">
<div class="input-group">
<input type="text" class="form-control" id="exampleInputAmount" placeholder="Par mot clé">
</div>
</div>
<button type="submit" class="btn btn-primary">Ajouter</button>
<br><br>
<legend>Mes filtres</legend>
<table class="table">
<tr>
<td>Montagne: noire</td>
<td>Supprimer</td>
</tr>
<tr>
<td>couleur: bleu</td>
<td>Supprimer</td>
</tr>
<tr>
<td>âge: 10 ans</td>
<td>Supprimer</td>
</tr>
</table>
</div>
</div>
@endsection