Commit 195ef1d0 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '35-settings-seite-bereitstellen' into 'master'

Resolve "Settings Seite bereitstellen"

Closes #35

See merge request !57
parents 18a61e3b 7f77ce20
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class StartpageController extends Controller class StartpageController extends Controller
{ {
...@@ -12,12 +13,35 @@ class StartpageController extends Controller ...@@ -12,12 +13,35 @@ class StartpageController extends Controller
* @param int $id * @param int $id
* @return Response * @return Response
*/ */
public function loadStartPage($locale = "de") /* public function loadStartPage($locale = "de")
{ {
\App::setLocale($locale); \App::setLocale($locale);
return view('index', [ return view('index', [
'title' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen', 'title' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen',
'homeIcon']); 'homeIcon']);
} */
public function loadStartPage(Request $request)
{
$focusPages = [];
foreach($request->all() as $key => $value)
{
if($value === 'on' && $key != 'param_sprueche' && $key != 'param_tab')
{
$focusPages[] = str_replace('param_', '', $key);
}
}
return view('index')
->with('title', trans('titles.index'))
->with('homeIcon')
->with('focus', $request->input('focus', 'web'))
->with('lang', $request->input('param_lang', 'all'))
->with('resultCount', $request->input('param_resultCount', '20'))
->with('time', $request->input('param_time', '1000'))
->with('sprueche', $request->input('param_sprueche', 'off'))
->with('tab', $request->input('param_sprueche', 'off'))
->with('focusPages', $focusPages);
} }
public function loadPage($subpage) public function loadPage($subpage)
......
...@@ -14,12 +14,14 @@ ...@@ -14,12 +14,14 @@
Route::group(['prefix' => LaravelLocalization::setLocale()], function() Route::group(['prefix' => LaravelLocalization::setLocale()], function()
{ {
/** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/ /** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/
Route::get('/', function() /* Route::get('/', function()
{ {
return view('index', [ return view('index', [
'title' => trans('titles.index'), 'title' => trans('titles.index'),
'homeIcon']); 'homeIcon']);
}); }); */
Route::get('/', 'StartpageController@loadStartPage');
Route::get('impressum', function() Route::get('impressum', function()
{ {
...@@ -84,7 +86,16 @@ ...@@ -84,7 +86,16 @@
->with('title', trans('titles.widget')) ->with('title', trans('titles.widget'))
->with('css', 'widget.css'); ->with('css', 'widget.css');
}); });
Route::get('settings', function()
{
return view('settings')
->with('title', 'Einstellungen') // TODO Titel übersetzen
->with('css', 'settings.css')
->with('js', ['settings.js']);
});
Route::get('meta/meta.ger3', 'MetaGerSearch@search'); Route::get('meta/meta.ger3', 'MetaGerSearch@search');
Route::get('qt', 'MetaGerSearch@quicktips'); Route::get('qt', 'MetaGerSearch@quicktips');
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
This diff is collapsed.
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment