Commit 5e211f48 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 3afcb30b
......@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class StartpageController extends Controller
{
......@@ -12,12 +13,35 @@ class StartpageController extends Controller
* @param int $id
* @return Response
*/
public function loadStartPage($locale = "de")
/* public function loadStartPage($locale = "de")
{
\App::setLocale($locale);
return view('index', [
'title' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen',
'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)
......
......@@ -14,12 +14,14 @@
Route::group(['prefix' => LaravelLocalization::setLocale()], function()
{
/** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/
Route::get('/', function()
/* Route::get('/', function()
{
return view('index', [
'title' => trans('titles.index'),
'homeIcon']);
});
}); */
Route::get('/', 'StartpageController@loadStartPage');
Route::get('impressum', function()
{
......@@ -84,7 +86,16 @@
->with('title', trans('titles.widget'))
->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('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