Commit 16cef9b4 authored by Dominik Hebeler's avatar Dominik Hebeler

Fixed layout for settings button

parent 6095ec77
......@@ -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()
......
......@@ -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;
}
}
}
}
......
@if(sizeof($metager->getAvailableParameterFilter()) > 0)
<div id="options">
<div id="toggle-box">
@if(sizeof($metager->getAvailableParameterFilter()) > 0)
<div class="option-toggle">
<label class="navigation-element" for="options-toggle">
<i class="fas fa-filter"></i> Filter&hellip;
</label>
<div id="filter-toggle">
@if(sizeof($metager->getAvailableParameterFilter()) > 0)
<div class="option-toggle">
<label class="navigation-element" for="options-toggle">
<i class="fas fa-filter"></i> Filter&hellip;
</label>
</div>
@endif
@if($metager->getManualParameterFilterSet())
<div id="options-reset">
<a href="{{$metager->generateSearchLink($metager->getFokus())}}"><nobr>{{ trans('metaGer.filter.reset') }}</nobr></a>
</div>
@endif
</div>
@endif
@if(sizeof($metager->getParameterFilter()) > 0)
<div id="options-reset">
<a href="{{$metager->generateSearchLink($metager->getFokus())}}"><nobr>{{ trans('metaGer.filter.reset') }}</nobr></a>
<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>
@endif
@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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment