Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
0ed73d34
Commit
0ed73d34
authored
Sep 27, 2016
by
Phil Höfer
Browse files
neue Designauswahl intern implementiert(es fehlen noch themes und GUI)
parent
caf96256
Changes
4
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/StartpageController.php
View file @
0ed73d34
...
@@ -27,10 +27,14 @@ class StartpageController extends Controller
...
@@ -27,10 +27,14 @@ class StartpageController extends Controller
public
function
loadStartPage
(
Request
$request
)
public
function
loadStartPage
(
Request
$request
)
{
{
$focusPages
=
[];
$focusPages
=
[];
$theme
=
"none"
;
foreach
(
$request
->
all
()
as
$key
=>
$value
)
{
foreach
(
$request
->
all
()
as
$key
=>
$value
)
{
if
(
$value
===
'on'
&&
$key
!=
'param_sprueche'
&&
$key
!=
'param_tab'
)
{
if
(
$value
===
'on'
&&
$key
!=
'param_sprueche'
&&
$key
!=
'param_tab'
)
{
$focusPages
[]
=
str_replace
(
'param_'
,
''
,
$key
);
$focusPages
[]
=
str_replace
(
'param_'
,
''
,
$key
);
}
}
if
(
$key
===
'param_theme'
)
{
$theme
=
str_replace
(
'param_'
,
''
,
$key
);
}
}
}
$agent
=
new
Agent
();
$agent
=
new
Agent
();
...
@@ -48,6 +52,7 @@ class StartpageController extends Controller
...
@@ -48,6 +52,7 @@ class StartpageController extends Controller
->
with
(
'focusPages'
,
$focusPages
)
->
with
(
'focusPages'
,
$focusPages
)
->
with
(
'browser'
,
$browser
)
->
with
(
'browser'
,
$browser
)
->
with
(
'navbarFocus'
,
'suche'
)
->
with
(
'navbarFocus'
,
'suche'
)
->
with
(
'theme'
,
$theme
)
->
with
(
'css'
,
'index.css'
);
->
with
(
'css'
,
'index.css'
);
}
}
...
...
app/MetaGer.php
View file @
0ed73d34
...
@@ -750,6 +750,8 @@ class MetaGer
...
@@ -750,6 +750,8 @@ class MetaGer
}
else
{
}
else
{
$this
->
sprueche
=
false
;
$this
->
sprueche
=
false
;
}
}
# Theme
$this
->
theme
=
preg_replace
(
"/[^[:alnum:][:space:]]/u"
,
''
,
$request
->
input
(
'theme'
,
'none'
));
# Ergebnisse pro Seite:
# Ergebnisse pro Seite:
$this
->
resultCount
=
$request
->
input
(
'resultCount'
,
'20'
);
$this
->
resultCount
=
$request
->
input
(
'resultCount'
,
'20'
);
# Manchmal müssen wir Parameter anpassen um den Sucheinstellungen gerecht zu werden:
# Manchmal müssen wir Parameter anpassen um den Sucheinstellungen gerecht zu werden:
...
...
resources/views/index.blade.php
View file @
0ed73d34
...
@@ -191,6 +191,7 @@
...
@@ -191,6 +191,7 @@
@
foreach
(
$focusPages
as
$fp
)
@
foreach
(
$focusPages
as
$fp
)
<
input
type
=
"hidden"
name
=
{{
$fp
}}
value
=
"on"
>
<
input
type
=
"hidden"
name
=
{{
$fp
}}
value
=
"on"
>
@
endforeach
@
endforeach
<
input
type
=
"hidden"
name
=
"theme"
value
=
{{
$theme
}}
>
@
elseif
(
!
App
::
isLocale
(
'de'
)
)
@
elseif
(
!
App
::
isLocale
(
'de'
)
)
<
input
type
=
"hidden"
name
=
"lang"
value
=
"{{ App::getLocale() }}"
>
<
input
type
=
"hidden"
name
=
"lang"
value
=
"{{ App::getLocale() }}"
>
@
else
@
else
...
...
resources/views/layouts/resultPage.blade.php
View file @
0ed73d34
...
@@ -16,7 +16,9 @@
...
@@ -16,7 +16,9 @@
<meta
content=
"{{ $eingabe }}"
name=
"q"
/>
<meta
content=
"{{ $eingabe }}"
name=
"q"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<link
rel=
"search"
type=
"application/opensearchdescription+xml"
title=
"{!! trans('resultPage.opensearch') !!}"
href=
"{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin', ['params' => base64_encode(serialize(Request::all()))])) }}"
>
<link
rel=
"search"
type=
"application/opensearchdescription+xml"
title=
"{!! trans('resultPage.opensearch') !!}"
href=
"{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin', ['params' => base64_encode(serialize(Request::all()))])) }}"
>
@if( isset($metager->theme)
&&
$metager->theme != "none" )
<link
type=
"text/css"
rel=
"stylesheet"
href=
"/css/themes/{{ $metager->theme }}.css"
/>
@endif
<link
type=
"text/css"
rel=
"stylesheet"
href=
"/css/lightslider.css"
/>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"/css/lightslider.css"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment