Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
MetaGer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
56
Issues
56
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
open-source
MetaGer
Commits
b9a39249
Commit
b9a39249
authored
Feb 19, 2018
by
Aria Givi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
falls keine sumas ausgewaehlt sind wird nun eine websuche durchgefuehrt
parent
e94510ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
app/MetaGer.php
app/MetaGer.php
+14
-0
resources/views/modals/create-focus-modal.blade.php
resources/views/modals/create-focus-modal.blade.php
+3
-3
No files found.
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