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
b9a39249
Commit
b9a39249
authored
Feb 19, 2018
by
Aria Givi
Browse files
falls keine sumas ausgewaehlt sind wird nun eine websuche durchgefuehrt
parent
e94510ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/MetaGer.php
View file @
b9a39249
...
...
@@ -496,6 +496,11 @@ class MetaGer
$sumaCount
=
0
;
$isCustomSearch
=
$this
->
startsWith
(
$this
->
fokus
,
'focus_'
);
# Im Falle einer Custom-Suche ohne mindestens einer selektierter Suchmaschine wird eine Web-Suche durchgeführt
if
(
$isCustomSearch
&&
!
$this
->
atLeastOneSearchengineSelected
(
$request
))
{
$isCustomSearch
=
false
;
$this
->
fokus
=
'web'
;
}
/* Erstellt die Liste der eingestellten Sumas
* Der einzige Unterschied bei angepasstem Suchfokus ist,
...
...
@@ -1214,6 +1219,15 @@ class MetaGer
}
}
public
function
atLeastOneSearchengineSelected
(
Request
$request
)
{
foreach
(
$request
->
all
()
as
$key
=>
$value
)
{
if
(
$this
->
startsWith
(
$key
,
'engine'
))
{
return
true
;
}
}
return
false
;
}
public
function
showQuicktips
()
{
return
$this
->
quicktips
;
...
...
resources/views/modals/create-focus-modal.blade.php
View file @
b9a39249
...
...
@@ -12,11 +12,11 @@
</
div
>
<
div
class
=
"modal-body"
>
<
form
id
=
"customSearchForm"
method
=
"GET"
action
=
"{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "
/
meta
/
meta
.
ger3
") }}"
accept
-
charset
=
"UTF-8"
>
<
input
type
=
"hidden"
name
=
"
focus
"
value
=
"
focus_custom"
id
=
"custom-focus-flag
"
>
<
input
type
=
"hidden"
name
=
"
eingabe
"
value
=
"
@if(isset(
$eingabe
))
{
{$eingabe}
}
@endif
"
>
<
input
type
=
"hidden"
name
=
"
eingabe
"
value
=
"
@if(isset(
$eingabe
))
{
{$eingabe}
}
@endif
"
>
<
input
type
=
"hidden"
name
=
"
focus
"
value
=
"
focus_custom"
id
=
"custom-focus-flag
"
>
@
foreach
(
App\Http\Controllers\FokiLoader
::
loadFoki
()
as
$fokus
=>
$sumas
)
<
div
class
=
"headingGroup {{
$fokus
}}"
>
<
input
type
=
"checkbox"
id
=
"toggle-{{
$fokus
}}-dropdown"
class
=
"focus-dropdown-toggle"
>
<
input
type
=
"checkbox"
id
=
"toggle-{{
$fokus
}}-dropdown"
class
=
"focus-dropdown-toggle"
checked
>
<
label
for
=
"toggle-{{
$fokus
}}-dropdown"
class
=
"focus-category focus-dropdown-label h3"
>
@
lang
(
"settings.foki."
.
$fokus
)
</
label
>
...
...
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