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
b9026298
Commit
b9026298
authored
Oct 06, 2020
by
Dominik Hebeler
Browse files
chrome plugin page gets redirected over result page
parent
6b93b5f8
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/MetaGerSearch.php
View file @
b9026298
...
...
@@ -15,6 +15,9 @@ class MetaGerSearch extends Controller
public
function
search
(
Request
$request
,
MetaGer
$metager
,
$timing
=
false
)
{
if
(
$request
->
filled
(
"chrome-plugin"
))
{
return
redirect
(
LaravelLocalization
::
getLocalizedURL
(
LaravelLocalization
::
getCurrentLocale
(),
"/plugin"
));
}
$timings
=
null
;
if
(
$timing
)
{
$timings
=
[
'starttime'
=>
microtime
(
true
)];
...
...
app/Http/Controllers/StartpageController.php
View file @
b9026298
...
...
@@ -45,7 +45,7 @@ class StartpageController extends Controller
return
view
(
'index'
)
->
with
(
'title'
,
trans
(
'titles.index'
))
->
with
(
'homeIcon'
)
->
with
(
'
browser
'
,
(
new
Agent
())
->
browser
())
->
with
(
'
agent
'
,
new
Agent
())
->
with
(
'navbarFocus'
,
'suche'
)
->
with
(
'focus'
,
$request
->
input
(
'focus'
,
'web'
))
->
with
(
'time'
,
$request
->
input
(
'param_time'
,
'1500'
))
...
...
resources/views/index.blade.php
View file @
b9026298
...
...
@@ -13,7 +13,12 @@
<
input
type
=
"hidden"
name
=
"key"
value
=
"{{ Request::input('key','') }}"
form
=
"searchForm"
>
@
endif
<
div
id
=
"plugin-btn-div"
>
@
if
(
$agent
->
isMobile
()
&&
$agent
->
browser
()
===
"Chrome"
)
<
input
type
=
"hidden"
name
=
"eingabe"
value
=
"chrome"
/>
<
button
type
=
"submit"
id
=
"plugin-btn"
form
=
"searchForm"
title
=
"{{ trans('index.plugin-title') }}"
name
=
"chrome-plugin"
value
=
"true"
><
i
class
=
"fa fa-plug"
aria
-
hidden
=
"true"
></
i
>
{{
trans
(
'index.plugin'
)
}}
</
a
>
@
else
<
a
id
=
"plugin-btn"
href
=
"{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "
/
plugin
") }}"
title
=
"{{ trans('index.plugin-title') }}"
><
i
class
=
"fa fa-plug"
aria
-
hidden
=
"true"
></
i
>
{{
trans
(
'index.plugin'
)
}}
</
a
>
@
endif
</
div
>
<
div
id
=
"about-us"
>
<
div
class
=
"m-row"
>
...
...
resources/views/parts/searchbar.blade.php
View file @
b9026298
...
...
@@ -8,7 +8,7 @@
</a>
</div>
<div
class=
"search-input"
>
<input
type=
"search"
name=
"eingabe"
value=
"@if(isset($eingabe)){{$eingabe}}@endif"
required=
""
@
if
(\
Request::is
('/')
&&
!\
Request::filled
('
mgapp
'))
autofocus
@
endif
autocomplete=
"off"
class=
"form-control"
placeholder=
"{{ trans('index.placeholder') }}"
tabindex=
"0"
>
<input
type=
"search"
name=
"eingabe"
value=
"@if(isset($eingabe)){{$eingabe}}@endif"
@
if
(\
Request::is
('/')
&&
!\
Request::filled
('
mgapp
'))
autofocus
@
endif
autocomplete=
"off"
class=
"form-control"
placeholder=
"{{ trans('index.placeholder') }}"
tabindex=
"0"
>
<button
id=
"search-delete-btn"
name=
"delete-search-input"
type=
"button"
tabindex=
"-1"
>
×
</button>
...
...
Write
Preview
Markdown
is supported
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