Merge remote-tracking branch 'origin/master'

Conflicts:
	SRC/public/css/frontend.css
This commit is contained in:
alexandre-pereira 2015-03-17 12:07:59 +01:00
commit aba3ac1c22
15 changed files with 318 additions and 18 deletions

View File

@ -0,0 +1,56 @@
<?php namespace App\Http\Controllers;
use Illuminate\Http\Response;
use Cache;
use Image;
class ImageController extends Controller {
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
*
*
* @return Response
*/
public function getImage($size,$url)
{
$size = htmlspecialchars($size);
$url = htmlspecialchars($url);
$key = $size.$url;
if (Cache::has($key))
{
//On recupere notre image en cache
$r = Cache::get($key);
}
else
{
// recup image sur le serveur
$ch = curl_init();// set url
curl_setopt($ch, CURLOPT_URL, "http://www.augustins.org/documents/10180/156407/".$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec($ch);
curl_close($ch);
//redimensionnement
$img = Image::make($content)->resize($size, $size, function ($constraint) {
$constraint->aspectRatio();
});
$r = $img->response('jpg');
//Met en cache l'image avec son header pendant 2 semaine sur le serveur
Cache::add($key, $r, 10080*2 );
}
return $r;
}
}

View File

@ -18,6 +18,9 @@ Route::get('changerref/{id}', 'HomeController@changerRef');
Route::get('api/searchRef/{reg?}', 'APIController@refByName');
Route::get('api/searchOeuvres', 'APIController@searchOeuvres');
//API FOR IMAGE RESIZE
Route::get('/image/{size}/{url}', 'ImageController@getImage');
// LOGIN RESET
Route::get('password/reset/{token}', array(
@ -69,4 +72,4 @@ Route::group(['middleware' => 'ifAdmin'], function ()
Route::get('admin/updateUser/{id}', 'AdminController@updateUser');
Route::get('admin/logAs/{id}', 'AdminController@logAs');
Route::get('logout', 'LoginController@logout');
});
});

View File

@ -5,7 +5,8 @@
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "5.0.*"
"laravel/framework": "5.0.*",
"intervention/image": "~2.1"
},
"require-dev": {
"phpunit/phpunit": "~4.0",

58
SRC/composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "24c3946acc997e3f3eca7fc5c99585b2",
"hash": "6c08ae99a1a7676a1c006b9be992507a",
"packages": [
{
"name": "classpreloader/classpreloader",
@ -222,6 +222,62 @@
],
"time": "2014-12-20 21:24:13"
},
{
"name": "intervention/image",
"version": "2.1.2",
"source": {
"type": "git",
"url": "https://github.com/Intervention/image.git",
"reference": "572806fd083b622dd430d76c34564459596fef2a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Intervention/image/zipball/572806fd083b622dd430d76c34564459596fef2a",
"reference": "572806fd083b622dd430d76c34564459596fef2a",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
"php": ">=5.3.0"
},
"require-dev": {
"mockery/mockery": "~0.9.2",
"phpunit/phpunit": "3.*"
},
"suggest": {
"ext-gd": "to use GD library based image processing.",
"ext-imagick": "to use Imagick based image processing.",
"intervention/imagecache": "Caching extension for the Intervention Image library"
},
"type": "library",
"autoload": {
"psr-4": {
"Intervention\\Image\\": "src/Intervention/Image"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Oliver Vogel",
"email": "oliver@olivervogel.net",
"homepage": "http://olivervogel.net/"
}
],
"description": "Image handling and manipulation library with support for Laravel integration",
"homepage": "http://image.intervention.io/",
"keywords": [
"gd",
"image",
"imagick",
"laravel",
"thumbnail",
"watermark"
],
"time": "2015-03-09 13:03:15"
},
{
"name": "ircmaxell/password-compat",
"version": "v1.0.4",

View File

@ -144,6 +144,8 @@ return [
'App\Providers\ConfigServiceProvider',
'App\Providers\EventServiceProvider',
'App\Providers\RouteServiceProvider',
'Intervention\Image\ImageServiceProvider'
],
@ -192,6 +194,7 @@ return [
'URL' => 'Illuminate\Support\Facades\URL',
'Validator' => 'Illuminate\Support\Facades\Validator',
'View' => 'Illuminate\Support\Facades\View',
'Image' => 'Intervention\Image\Facades\Image',
],

Binary file not shown.

View File

@ -9,4 +9,9 @@
<glyph unicode="&#x20;" d="" horiz-adv-x="512" />
<glyph unicode="&#xe600;" d="M1024 562.95l-353.78 51.408-158.22 320.582-158.216-320.582-353.784-51.408 256-249.538-60.432-352.352 316.432 166.358 316.432-166.358-60.434 352.352 256.002 249.538z" />
<glyph unicode="&#xe601;" d="M192 384l64-384h192v320h128v-320h192l64 384-320 320-320-320zM832 576v256h-128l0.312-128.312-192.312 192.312-512-512h128l384 384 384-384h128l-192 192z" />
<glyph unicode="&#xe602;" d="M784 960h-544c-132.576 0-240-107.424-240-240s107.424-240 240-240h43.648c51.072-52.032 119.68-86.72 196.352-94.336v-321.664h-96l-128-128h512l-128 128h-96v321.664c76.672 7.616 145.28 42.304 196.352 94.336h43.648c132.576 0 240 107.424 240 240s-107.424 240-240 240zM64 720c0 80.448 54.272 147.52 128 168.544v-184.544c0-58.112 15.744-112.512 42.848-159.456-94.752 2.784-170.848 80.032-170.848 175.456zM789.152 544.544c27.104 46.944 42.848 101.344 42.848 159.456v184.544c73.728-20.992 128-88.096 128-168.544 0-95.424-76.096-172.672-170.848-175.456z" />
<glyph unicode="&#xe603;" d="M585.143 164.571v91.429q0 8-5.143 13.143t-13.143 5.143h-54.857v292.571q0 8-5.143 13.143t-13.143 5.143h-182.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h54.857v-182.857h-54.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h256q8 0 13.143 5.143t5.143 13.143zM512 676.571v91.429q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM877.714 438.857q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="&#xe604;" d="M512 864c-229.76 0-416-186.24-416-416s186.24-416 416-416 416 186.24 416 416-186.24 416-416 416zM577.248 294.944c-31.392-47.136-63.328-83.456-117.056-83.456-36.672 5.984-51.744 32.256-43.808 59.040l69.12 228.928c1.696 5.6-1.12 11.584-6.24 13.408-5.088 1.792-15.072-4.832-23.712-14.304l-41.792-50.272c-1.12 8.448-0.128 22.4-0.128 28.032 31.392 47.136 82.976 84.32 117.952 84.32 33.248-3.392 48.992-29.984 43.2-59.2l-69.6-230.048c-0.928-5.184 1.824-10.464 6.528-12.128 5.12-1.792 15.872 4.832 24.544 14.304l41.76 50.24c1.12-8.448-0.768-23.232-0.768-28.864zM567.936 593.952c-26.432 0-47.872 19.264-47.872 47.616s21.44 47.584 47.872 47.584 47.872-19.264 47.872-47.584c0-28.384-21.44-47.616-47.872-47.616z" />
<glyph unicode="&#xe984;" d="M1024 576h-384l143.53 143.53c-72.53 72.526-168.96 112.47-271.53 112.47s-199-39.944-271.53-112.47c-72.526-72.53-112.47-168.96-112.47-271.53s39.944-199 112.47-271.53c72.53-72.526 168.96-112.47 271.53-112.47s199 39.944 271.528 112.472c6.056 6.054 11.86 12.292 17.456 18.668l96.32-84.282c-93.846-107.166-231.664-174.858-385.304-174.858-282.77 0-512 229.23-512 512s229.23 512 512 512c141.386 0 269.368-57.326 362.016-149.984l149.984 149.984v-384z" />
<glyph unicode="&#xe986;" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256z" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 816 B

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Binary file not shown.

View File

@ -1,10 +1,10 @@
@font-face {
font-family: 'icomoon';
src:url('./icomoon.eot?-e1jt8');
src:url('./icomoon.eot?#iefix-e1jt8') format('embedded-opentype'),
url('./icomoon.woff?-e1jt8') format('woff'),
url('./icomoon.ttf?-e1jt8') format('truetype'),
url('./icomoon.svg?-e1jt8#icomoon') format('svg');
src:url('icomoon.eot?-68zv75');
src:url('icomoon.eot?#iefix-68zv75') format('embedded-opentype'),
url('icomoon.woff?-68zv75') format('woff'),
url('icomoon.ttf?-68zv75') format('truetype'),
url('icomoon.svg?-68zv75#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
@ -23,6 +23,18 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-info:before {
content: "\e604";
}
.icon-info-circle:before {
content: "\e603";
}
.icon-trophy:before {
content: "\e602";
}
.icon-home:before {
content: "\e601";
}
@ -31,3 +43,11 @@
content: "\e600";
}
.icon-search:before {
content: "\e986";
}
.icon-spinner11:before {
content: "\e984";
}

5
SRC/public/css/frontend.css Executable file → Normal file
View File

@ -145,6 +145,7 @@ button:active {
list-style: none;
display: inline-block;
}
<<<<<<< HEAD
#breadcrumb li {
float: left;
line-height: 40px;
@ -227,4 +228,6 @@ button:active {
}
#breadcrumb li a:active:after {
border-left-color: #16a085;
}
}
=======
>>>>>>> origin/master

BIN
SRC/public/imgs/Search.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,10 +1,10 @@
<legend>Résultat de ma recherche</legend>
<select multiple="multiple" class="multiple" id="toadd" name="toadd[]">
@foreach($oeuvres as $oeuvre)
<option data-img-src='http://www.augustins.org/documents/10180/156407/{{$oeuvre->image}}' value='{{$oeuvre->id}}'></option>
<option data-img-src='/image/200/{{$oeuvre->image}}' value='{{$oeuvre->id}}'></option>
@endforeach
</select>
<div class="text-center">
{!! $oeuvres->render() !!}
</div>
<button type="submit" class="btn btn-primary">Ajouter à la liste courante</button>
<button type="submit" class="btn btn-primary">Ajouter à la liste courante</button>

View File

@ -1,4 +1,151 @@
Bonjour,<br>
Cliquez ici pour changer votre mot de passe : {{ url('password/reset/'.$token) }}<br>
Pour vous connecter : {{ url('login') }}<br>
Merci et à bientôt !<br>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Mail de confirmation d'inscription</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
/* Fonts and Content */
body, td { font-family: 'Helvetica Neue', Arial, Helvetica, Geneva, sans-serif; font-size:14px; }
body { background-color: #2A374E; margin: 0; padding: 0; -webkit-text-size-adjust:none; -ms-text-size-adjust:none; }
h2{ padding-top:12px; /* ne fonctionnera pas sous Outlook 2007+ */color:#0E7693; font-size:22px; }
code { font-family: monospace;}
@media only screen and (max-width: 480px) {
table[class=w275], td[class=w275], img[class=w275] { width:135px !important; }
table[class=w30], td[class=w30], img[class=w30] { width:10px !important; }
table[class=w580], td[class=w580], img[class=w580] { width:280px !important; }
table[class=w640], td[class=w640], img[class=w640] { width:300px !important; }
img{ height:auto;}
/*illisible, on passe donc sur 3 lignes */
table[class=w180], td[class=w180], img[class=w180] {
width:280px !important;
display:block;
}
td[class=w20]{ display:none; }
}
</style>
</head>
<body style="margin:0px; padding:0px; -webkit-text-size-adjust:none;">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color:rgb(42, 55, 78)" >
<tbody>
<tr>
<td align="center" bgcolor="#2A374E">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td class="w640" width="640" height="10"></td>
</tr>
<tr>
<td class="w640" width="640" height="10"></td>
</tr>
<!-- entete -->
<tr class="pagetoplogo">
<td class="w640" width="640">
<table class="w640" width="640" cellpadding="0" cellspacing="0" border="0" bgcolor="#F2F0F0">
<tbody>
<tr>
<td class="w30" width="30"></td>
<td class="w580" width="580" valign="middle" align="left">
<div class="pagetoplogo-content">
<!-- <img class="w580" style="text-decoration: none; display: block; color:#476688; font-size:30px;" src="logo.png" alt="Application musée des augustins" width="482" height="108"/> --><h1 style="color:#0E7693; font-size:30px; padding-top:12px;">Application: musée des augustins</h1>
</div>
</td>
<td class="w30" width="30"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<!-- separateur horizontal -->
<tr>
<td class="w640" width="640" height="1" bgcolor="#d7d6d6"></td>
</tr>
<!-- contenu -->
<tr class="content">
<td class="w640" class="w640" width="640" bgcolor="#ffffff">
<table class="w640" width="640" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td class="w30" width="30"></td>
<td class="w580" width="580">
<!-- une zone de contenu -->
<table class="w580" width="580" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td class="w580" width="580">
<h2 style="color:#0E7693; font-size:22px; padding-top:12px;">Bienvenue</h2>
<div align="left" class="article-content">
<p>Vous venez de vous inscrire à notre site web, nous vous proposons de cliquer sur le lien ci-dessous pour initialiser votre mot de passe:</p>
<p><a href="{{ url('password/reset/'.$token) }}">J'initialise mon mot de passe</a></p>
<p>Vous venez de vous créer un compte en tant que référent au sein de notre site web. Pour vous connecter en tant que référent vous pouvez vous connecter grâce au lien ci-dessous ou en ajoutant <code>"/login"</code> à votre barre d'adresse. </p>
<p><a href="{{ url('login') }}">Se connecter</a></p>
<p>Merci et à bientôt!</p>
</div>
</td>
</tr>
</tbody>
</table>
<!-- fin zone -->
</td>
<td class="w30" class="w30" width="30"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<!-- separateur horizontal de 15px de haut -->
<tr>
<td class="w640" width="640" height="15" bgcolor="#ffffff"></td>
</tr>
<!-- pied de page -->
<tr class="pagebottom">
<td class="w640" width="640">
<table class="w640" width="640" cellpadding="0" cellspacing="0" border="0" bgcolor="#c7c7c7">
<tbody>
<tr>
<td colspan="5" height="10"></td>
</tr>
<tr>
<td class="w30" width="30"></td>
<td class="w580" width="580" valign="top">
<p align="right" class="pagebottom-content-left">
<a style="color:#255D5C;" href="{{url('/')}}"><span style="color:#255D5C;">Application musée des augustins</span></a>
</p>
</td>
<td class="w30" width="30"></td>
</tr>
<tr>
<td colspan="5" height="10"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="w640" width="640" height="60"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -2,10 +2,10 @@
@section('content')
@if ($referents != [])
<h1 class="homeTitle"> Jeux Educatifs du musée Augustin </h1>
<nav>
<input name="searchterm" id="searchterm" placeholder="Rechercher un référent" type="text">
</nav>
<input name="searchterm" class="icon-search" id="searchterm" placeholder="&#xe986; Rechercher un référent" type="text">
</nav>
<div id="referents" class="referents">
@foreach ($referents as $referent)
@ -19,8 +19,14 @@
@else
<h1>Aucun référent trouvé</h1>
@endif
<div class="about">
<a href="#"><span class="icon-info" style="font-size: 55px; color:black;"></span></a>
</div>
@endsection
@section('page-css')
<link href="css/fonts/style.css" rel="stylesheet" type="text/css">
@endsection
@section('page-scripts')
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>