Skip to content
Snippets Groups Projects
Commit d5bbf305 authored by Claas Kazzer's avatar Claas Kazzer :speech_balloon: Committed by Dorian Merz
Browse files

refs #15231

* fixes position of shards checkboxes
parent 50cd30cf
No related merge requests found
...@@ -117,23 +117,50 @@ body { ...@@ -117,23 +117,50 @@ body {
.searchbox-home { .searchbox-home {
// truly justify content // truly justify content
.searchForm { .searchForm {
display: flex; display: inline-flex;
justify-content: center; justify-content: center;
min-width: 310px;
}
// Search button
.list-unstyled {
display: flex;
}
// Shard box
.checkbox {
transform: translate(-250%, 200%);
} }
} }
// Search Box on all other pages // Search Box on all other pages
.searchbox { .searchbox .searchbox-wrapper {
.searchForm {
display: inline-flex; display: inline-flex;
position: absolute; position: absolute;
right: 10px; right: 10px;
top: 45px; top: 45px;
}
input { .searchForm {
input:not(.shards-checkbox) {
min-width: 250px; min-width: 250px;
} }
} }
// Shards checkbox elements
.searchbox .searchForm .checkbox {
border: 1px solid $white;
color: $white;
padding: 7px 5px 5px;
position: absolute;
top: 45px;
}
.search.container .searchForm .checkbox {
@media only screen and (max-width: $screen-sm-max) {
margin-left: 1.5rem;
top: 100px;
}
} }
// Content // Content
......
...@@ -46,13 +46,14 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s ...@@ -46,13 +46,14 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s
</div> </div>
<?php else: ?> <?php else: ?>
<form id="searchForm" class="searchForm navbar-form flip" method="get" action="<?=$this->url($basicSearch)?>" name="searchForm" autocomplete="off"> <form id="searchForm" class="searchForm navbar-form flip" method="get" action="<?=$this->url($basicSearch)?>" name="searchForm" autocomplete="off">
<?= $this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $tabConfig['tabs']]); ?> <div class="searchbox-wrapper">
<?php $placeholder = $this->searchbox()->getPlaceholderText($tabConfig['selected']['id'] ?? null); ?> <?=$this->context($this)->renderInContext('search/searchTabs', ['searchTabs' => $tabConfig['tabs']]);?>
<?php /* finc: keep "required" */ ?> <?php $placeholder = $this->searchbox()->getPlaceholderText($tabConfig['selected']['id'] ?? null); ?>
<input id="searchForm_lookfor" class="searchForm_lookfor form-control search-query<?php if($this->searchbox()->autocompleteEnabled($this->searchClassId)):?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId) ?><?=$this->searchbox()->autocompleteAutoSubmit($this->searchClassId) ? ' ac-auto-submit' : '' ?><?php endif ?>" type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($this->lookfor)?>"<?php if ($placeholder): ?> placeholder="<?=$this->transEsc($placeholder) ?>"<?php endif ?> aria-label="<?=$this->transEsc("search_terms")?>" required="required" /> <?php /* finc: keep "required" */ ?>
<?php /* finc: We use a list here, CK */ ?> <input id="searchForm_lookfor" class="searchForm_lookfor form-control search-query<?php if ($this->searchbox()->autocompleteEnabled($this->searchClassId)): ?> autocomplete searcher:<?=$this->escapeHtmlAttr($this->searchClassId)?><?=$this->searchbox()->autocompleteAutoSubmit($this->searchClassId) ? ' ac-auto-submit' : ''?><?php endif ?>" type="text" name="lookfor" value="<?=$this->escapeHtmlAttr($this->lookfor)?>"<?php if ($placeholder): ?> placeholder="<?=$this->transEsc($placeholder)?>"<?php endif ?> aria-label="<?=$this->transEsc("search_terms")?>" required="required"/>
<ul class="list-unstyled"> <?php /* finc: We use a list here, CK */ ?>
<?php /* if ($handlerCount > 1): ?> <ul class="list-unstyled">
<?php /* if ($handlerCount > 1): ?>
<li class="hidden-xs"> <li class="hidden-xs">
<select id="searchForm_type" class="searchForm_type form-control" name="type" data-native-menu="false" aria-label="<?=$this->transEsc("Search type")?>"> <select id="searchForm_type" class="searchForm_type form-control" name="type" data-native-menu="false" aria-label="<?=$this->transEsc("Search type")?>">
<?php foreach ($handlers as $handler): ?> <?php foreach ($handlers as $handler): ?>
...@@ -64,21 +65,21 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s ...@@ -64,21 +65,21 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s
<?php elseif ($handlerCount == 1): ?> <?php elseif ($handlerCount == 1): ?>
<input type="hidden" name="type" value="<?=$this->escapeHtmlAttr($handlers[0]['value'])?>"/> <input type="hidden" name="type" value="<?=$this->escapeHtmlAttr($handlers[0]['value'])?>"/>
<?php endif; */ ?> <?php endif; */ ?>
<li> <li>
<button type="submit" class="btn btn-primary"><i class="fa fa-search" aria-hidden="true"></i> <span class="find-label sr-only"><?=$this->transEsc("Find")?></span></button> <button type="submit" class="btn btn-primary"><i class="fa fa-search" aria-hidden="true"></i> <span class="find-label sr-only"><?=$this->transEsc("Find")?></span></button>
</li> </li>
<?php /* if ($advSearch): ?> <?php /* if ($advSearch): ?>
<li class="hidden-xs"> <li class="hidden-xs">
<a href="<?=$this->url($advSearch) . ((isset($this->searchId) && $this->searchId) ? '?edit=' . $this->escapeHtmlAttr($this->searchId) : $hiddenFilterParams)?>" class="btn btn-transparent" role="button" rel="nofollow"><i class="fa fa-cog"></i> <span class="hidden-xs hidden-sm hidden-md"><?=$this->transEsc("Advanced")?></span></a> <a href="<?=$this->url($advSearch) . ((isset($this->searchId) && $this->searchId) ? '?edit=' . $this->escapeHtmlAttr($this->searchId) : $hiddenFilterParams)?>" class="btn btn-transparent" role="button" rel="nofollow"><i class="fa fa-cog"></i> <span class="hidden-xs hidden-sm hidden-md"><?=$this->transEsc("Advanced")?></span></a>
</li> </li>
<?php endif; */ ?> <?php endif; */ ?>
<li> <li>
<?php if ($geoUrl = $this->geocoords()->getSearchUrl($options)) : ?> <?php if ($geoUrl = $this->geocoords()->getSearchUrl($options)) : ?>
<a href="<?=$geoUrl?>" class="btn btn-link"><?=$this->transEsc('Geographic Search')?></a> <a href="<?=$geoUrl?>" class="btn btn-link"><?=$this->transEsc('Geographic Search')?></a>
<?php endif; ?> <?php endif; ?>
</li> </li>
</ul> </ul>
</div>
<?php /* finc: We hide this for small and keep the solution using labels, same below - CK */ ?> <?php /* finc: We hide this for small and keep the solution using labels, same below - CK */ ?>
<div class="checkbox hidden-xs"> <div class="checkbox hidden-xs">
<?php $shards = $options->getShards(); <?php $shards = $options->getShards();
...@@ -90,7 +91,8 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s ...@@ -90,7 +91,8 @@ $hiddenFilterParams = $this->searchTabs()->getCurrentHiddenFilterParams($this->s
<?php foreach ($shards as $shard => $val): ?> <?php foreach ($shards as $shard => $val): ?>
<?php $isSelected = empty($selectedShards) || in_array($shard, $selectedShards); ?> <?php $isSelected = empty($selectedShards) || in_array($shard, $selectedShards); ?>
<label for="checkbox_<?=$this->escapeHtmlAttr($shard)?>"><?=$this->transEsc($shard)?> <label for="checkbox_<?=$this->escapeHtmlAttr($shard)?>"><?=$this->transEsc($shard)?>
<input type="checkbox" <?=$isSelected ? 'checked="checked" ' : ''?>name="shard[]" value='<?=$this->escapeHtmlAttr($shard)?>' id='checkbox_<?=$this->escapeHtmlAttr($shard)?>'/> <input type="checkbox" <?=$isSelected ? 'checked="checked" ' : ''?>name="shard[]" value='<?=$this->escapeHtmlAttr($shard)?>' id='checkbox_<?=$this->escapeHtmlAttr($shard)?>'
class="shards-checkbox"/>
</label> </label>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>
......
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