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
6fe8b2f1
Commit
6fe8b2f1
authored
Feb 15, 2018
by
Aria Givi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
umschalten von custom focus auf andere funktioniert noch nicht richtig, auswahl wird nicht gemerkt
parent
7a319a7f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
45 deletions
+40
-45
app/Http/Controllers/StartpageController.php
app/Http/Controllers/StartpageController.php
+0
-11
app/MetaGer.php
app/MetaGer.php
+10
-0
resources/assets/less/metager/foki.less
resources/assets/less/metager/foki.less
+1
-1
resources/views/modals/create-focus-modal.blade.php
resources/views/modals/create-focus-modal.blade.php
+29
-28
resources/views/parts/searchbar.blade.php
resources/views/parts/searchbar.blade.php
+0
-5
No files found.
app/Http/Controllers/StartpageController.php
View file @
6fe8b2f1
...
...
@@ -37,15 +37,6 @@ class StartpageController extends Controller
$autocomplete
=
$option_values
[
'autocomplete'
];
}
foreach
(
$request
->
all
()
as
$key
=>
$value
)
{
if
(
$value
===
'on'
&&
!
in_array
(
$key
,
$optionParams
))
{
$focusPages
[]
=
str_replace
(
'param_'
,
''
,
$key
);
}
if
(
$key
===
'param_theme'
)
{
$theme
=
str_replace
(
'param_'
,
''
,
$key
);
}
}
$lang
=
LaravelLocalization
::
getCurrentLocale
();
if
(
$lang
===
'de'
)
{
$lang
=
'all'
;
...
...
@@ -54,10 +45,8 @@ class StartpageController extends Controller
return
view
(
'index'
)
->
with
(
'title'
,
trans
(
'titles.index'
))
->
with
(
'homeIcon'
)
->
with
(
'focusPages'
,
$focusPages
)
->
with
(
'browser'
,
(
new
Agent
())
->
browser
())
->
with
(
'navbarFocus'
,
'suche'
)
->
with
(
'theme'
,
$theme
)
->
with
(
'focus'
,
$request
->
input
(
'focus'
,
'web'
))
->
with
(
'time'
,
$request
->
input
(
'param_time'
,
'1500'
))
->
with
(
'request'
,
$request
->
input
(
'request'
,
'GET'
))
...
...
app/MetaGer.php
View file @
6fe8b2f1
...
...
@@ -90,6 +90,15 @@ class MetaGer
# Erstellt aus den gesammelten Ergebnissen den View
public
function
createView
()
{
# Hiermit werden die evtl. ausgewählten SuMas extrahiert, damit die Input-Boxen richtig gesetzt werden können
$focusPages
=
[];
foreach
(
$this
->
request
->
all
()
as
$key
=>
$value
)
{
if
(
$value
===
'on'
)
{
$focusPages
[]
=
str_replace
(
'param_'
,
''
,
$key
);
}
}
$viewResults
=
[];
# Wir extrahieren alle notwendigen Variablen und geben Sie an unseren View:
foreach
(
$this
->
results
as
$result
)
{
...
...
@@ -179,6 +188,7 @@ class MetaGer
default
:
return
view
(
'metager3'
)
->
with
(
'eingabe'
,
$this
->
eingabe
)
->
with
(
'focusPages'
,
$focusPages
)
->
with
(
'mobile'
,
$this
->
mobile
)
->
with
(
'warnings'
,
$this
->
warnings
)
->
with
(
'errors'
,
$this
->
errors
)
...
...
resources/assets/less/metager/foki.less
View file @
6fe8b2f1
/* Rund ums Fokus Modal */
#show-create-focus
{
.focus-input
{
display: none;
}
...
...
resources/views/modals/create-focus-modal.blade.php
View file @
6fe8b2f1
<input
type=
"checkbox"
id=
"show-create-focus"
>
<input
type=
"checkbox"
id=
"show-create-focus"
class=
"focus-input"
>
<div
id=
"create-focus-modal"
tab-index=
"-1"
role=
"dialog"
>
<div
id=
"foki-modal-dialog"
>
<div
id=
"foki-modal-content"
>
...
...
@@ -10,37 +10,38 @@
<p
class=
"text-muted"
>
@lang("index.focus-creator.description")
</p>
</div>
<div
class=
"modal-body"
>
<form
id=
"customize-search"
role=
"form"
method=
"POST"
>
@foreach( App\Http\Controllers\FokiLoader::loadFoki() as $fokus => $sumas )
<div
class=
"headingGroup {{ $fokus }}"
>
<input
type=
"checkbox"
id=
"toggle-{{ $fokus }}-dropdown"
class=
"focus-dropdown-toggle"
>
<label
for=
"toggle-{{ $fokus }}-dropdown"
class=
"focus-category focus-dropdown-label h3"
>
@lang("settings.foki." . $fokus)
</label>
<div
class=
"row"
>
@foreach( $sumas as $name => $data )
<div
class=
"col-sm-6 col-md-4 col-lg-3"
>
<div
class=
"checkbox settings-checkbox"
>
<label>
<input
type=
"checkbox"
name=
"engine_{{ strtolower($name) }}"
class=
"focusCheckbox"
@
if
($
fokus=
='web'
)
checked
@
endif
>
{{ $data['displayName'] }}
<a
class=
"settings-icon"
target=
"_blank"
rel=
"noopener"
href=
"{{ $data['url'] }}"
>
<i
class=
"fa fa-link"
aria-hidden=
"true"
></i>
</a>
</label>
</div>
<input
type=
"hidden"
form=
"searchForm"
name=
"focus"
@
if
(
isset
($
focusPages
)
&&
!
empty
($
focusPages
))
value=
"focus_custom"
@
else
value=
"web"
@
endif
id=
"custom-focus-flag"
class=
"focus-input"
>
@foreach( App\Http\Controllers\FokiLoader::loadFoki() as $fokus => $sumas )
<div
class=
"headingGroup {{ $fokus }}"
>
<input
type=
"checkbox"
id=
"toggle-{{ $fokus }}-dropdown"
class=
"focus-dropdown-toggle"
>
<label
for=
"toggle-{{ $fokus }}-dropdown"
class=
"focus-category focus-dropdown-label h3"
>
@lang("settings.foki." . $fokus)
</label>
<div
class=
"row"
>
@foreach( $sumas as $name => $data )
<div
class=
"col-sm-6 col-md-4 col-lg-3"
>
<div
class=
"checkbox settings-checkbox"
>
<label>
<input
type=
"checkbox"
form=
"searchForm"
name=
"engine_{{ strtolower($name) }}"
class=
"focusCheckbox"
@
if
(
isset
($
focusPages
)
&&
in_array
('
engine_
{{
strtolower
($
name
)
}}',
$
focusPages
))
checked
@
endif
>
{{ $data['displayName'] }}
<a
class=
"settings-icon"
target=
"_blank"
rel=
"noopener"
href=
"{{ $data['url'] }}"
>
<i
class=
"fa fa-link"
aria-hidden=
"true"
></i>
</a>
</label>
</div>
@endforeach
</div>
@endforeach
</div>
@endforeach
<div
class=
"clearfix"
>
<div
class=
"settings-modal-buttons pull-right"
>
<button
type=
"submit"
class=
"save-focus-btn btn btn-primary"
>
@lang('index.focus-creator.save')
</button>
</div>
</div>
</form>
@endforeach
<div
class=
"clearfix"
>
<div
class=
"settings-modal-buttons pull-right"
>
<button
type=
"submit"
form=
"searchForm"
class=
"save-focus-btn btn btn-primary"
>
@lang('index.focus-creator.save')
</button>
</div>
</div>
</div>
</div>
</div>
...
...
resources/views/parts/searchbar.blade.php
View file @
6fe8b2f1
...
...
@@ -23,11 +23,6 @@
@
if
(
isset
(
$option_values
))
<
input
type
=
"hidden"
name
=
"time"
value
=
{{
$time
}}
>
@
endif
@
if
(
isset
(
$focusPages
))
@
foreach
(
$focusPages
as
$fp
)
<
input
type
=
"hidden"
name
=
{{
$fp
}}
value
=
"on"
>
@
endforeach
@
endif
@
if
(
isset
(
$theme
))
<
input
type
=
"hidden"
name
=
"theme"
value
=
{{
$theme
}}
>
@
endif
...
...
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