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
16cef9b4
Commit
16cef9b4
authored
Apr 11, 2019
by
Dominik Hebeler
Browse files
Fixed layout for settings button
parent
6095ec77
Changes
3
Show whitespace changes
Inline
Side-by-side
app/MetaGer.php
View file @
16cef9b4
...
...
@@ -1457,6 +1457,30 @@ class MetaGer
return
$this
->
searchUid
;
}
public
function
getManualParameterFilterSet
()
{
$filters
=
$this
->
sumaFile
->
filter
->
{
"parameter-filter"
};
foreach
(
$filters
as
$filterName
=>
$filter
)
{
if
(
\
Request
::
filled
(
$filter
->
{
"get-parameter"
}))
{
return
true
;
}
}
return
false
;
}
public
function
getSavedSettingCount
()
{
$cookies
=
\
Cookie
::
get
();
$count
=
0
;
foreach
(
$cookies
as
$key
=>
$value
)
{
if
(
starts_with
(
$key
,
[
$this
->
getFokus
()
.
"_setting_"
,
$this
->
getFokus
()
.
"_engine_"
]))
{
$count
++
;
}
}
return
$count
;
}
# Einfache Getter
public
function
getVerificationId
()
...
...
resources/less/metager/pages/resultpage/result-page.less
View file @
16cef9b4
...
...
@@ -508,19 +508,48 @@ a {
transform: scaleY(0);
transition: transform .5s, max-height .5s;
}
input[type=checkbox]:checked + div.scrollbox
, input[type=checkbox]:checked + div.scrollbox + div#settings
{
input[type=checkbox]:checked + div.scrollbox{
max-height:200px;
transform: scaleY(1);
}
#toggle-box {
display: flex;
align-items: center;
margin-left: -8px;
@media(max-width: 350px){
flex-direction: row-reverse;
flex-wrap: wrap-reverse;
justify-content: space-around;
> div {
margin-top: 8px;
margin-bottom: 8px;
}
#filter-toggle {
flex-direction: column;
}
#settings {
}
#result-count{
}
}
> div {
margin-left: 8px;
}
#filter-toggle {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
flex-grow: 0;
margin-left: 0px;
>div {
margin-left: 8px;
}
}
#result-count {
flex-grow: 1;
text-align: right;
}
#options-reset {
margin-left: 10px;
width: 100%;
}
.option-toggle {
text-align: center;
...
...
@@ -536,8 +565,6 @@ a {
justify-content: left;
overflow: hidden;
overflow-x: auto;
border-bottom: 1px solid #ccc;
padding-bottom: 8px;
padding-top: 8px;
#options-items {
display: -ms-flexbox;
...
...
@@ -567,18 +594,18 @@ a {
}
}
#settings {
max-height: 0;
transform-origin: top;
transform: scaleY(0);
transition: transform .5s, max-height .5s;
margin-top: 4px;
text-align: center;
>form>button {
color: #777;
a {
color: black;
&:hover {
color: red;
}
span.badge {
margin-top: -12px;
font-size: .7em;
font-weight: normal;
}
}
}
}
...
...
resources/views/parts/filter.blade.php
View file @
16cef9b4
@
if
(
sizeof
(
$metager
->
getAvailableParameterFilter
())
>
0
)
<
div
id
=
"options"
>
<
div
id
=
"toggle-box"
>
<
div
id
=
"filter-toggle"
>
@
if
(
sizeof
(
$metager
->
getAvailableParameterFilter
())
>
0
)
<
div
class
=
"option-toggle"
>
<
label
class
=
"navigation-element"
for
=
"options-toggle"
>
...
...
@@ -8,14 +9,22 @@
</
label
>
</
div
>
@
endif
@
if
(
sizeof
(
$metager
->
getParameterFilter
())
>
0
)
@
if
(
$metager
->
get
Manual
ParameterFilter
Set
()
)
<
div
id
=
"options-reset"
>
<
a
href
=
"
{
{$metager->generateSearchLink($metager->getFokus())}
}
"
><
nobr
>
{{
trans
(
'metaGer.filter.reset'
)
}}
</
nobr
></
a
>
</
div
>
@
endif
</
div
>
<
div
id
=
"settings"
>
<
a
href
=
"{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('settings', ["
fokus
" =>
$metager->getFokus
(), "
url
" => url()->full()])) }}"
>
<
i
class
=
"fas fa-cogs"
></
i
>
@
if
(
$metager
->
getSavedSettingCount
()
>
0
)
<
span
class
=
"badge badge-primary"
>
{{
$metager
->
getSavedSettingCount
()
}}
@
endif
</
span
>
Einstellungen
&
hellip
;
</
a
>
</
div
>
@
if
(
$metager
->
getTotalResultCount
()
>
0
)
<
div
id
=
"result-count"
>
~
{{
$metager
->
getTotalResultCount
()}}
{{
trans
(
'metaGer.results'
)
}}
<
nobr
>
~
{{
$metager
->
getTotalResultCount
()}}
</
nobr
>
{{
trans
(
'metaGer.results'
)
}}
</
div
>
@
endif
</
div
>
...
...
@@ -42,12 +51,6 @@
</
div
>
<
div
class
=
"scrollfade-right"
></
div
>
</
div
>
<
div
id
=
"settings"
>
<
form
action
=
"{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route('settings')) }}"
method
=
"get"
>
<
input
type
=
"hidden"
name
=
"fokus"
value
=
"{{
$metager->getFokus
() }}"
>
<
input
type
=
"hidden"
name
=
"url"
value
=
"{{ url()->full() }}"
>
<
button
type
=
"submit"
>
Sucheinstellungen
</
button
>
</
form
>
</
div
>
</
div
>
@
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