Skip to content
Snippets Groups Projects
Commit 5b05cb3d authored by Claas Kazzer's avatar Claas Kazzer :speech_balloon: Committed by André Lahmann
Browse files

refs #18209 [finc: BARF] adds missing labels in finc

* adds missing labels in finc
parent 0f558ece
Branches
Tags
No related merge requests found
...@@ -128,7 +128,7 @@ if (isset($searchDetails) && is_object($searchDetails)) { ...@@ -128,7 +128,7 @@ if (isset($searchDetails) && is_object($searchDetails)) {
<?php endfor; ?> <?php endfor; ?>
</div> </div>
<div class="adv-group-match"> <div class="adv-group-match">
<label class="search_bool"><?=$this->transEsc("search_match")?>:&nbsp;</label> <label class="search_bool" for="search_bool<?=$group ?>"><?=$this->transEsc("search_match")?>:&nbsp;</label>
<select name="bool<?=$group ?>[]" id="search_bool<?=$group ?>" class="form-control"> <select name="bool<?=$group ?>[]" id="search_bool<?=$group ?>" class="form-control">
<option value="AND"<?php if(isset($setSearchGroups[$group]) && 'AND' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_AND")?></option> <option value="AND"<?php if(isset($setSearchGroups[$group]) && 'AND' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_AND")?></option>
<option value="OR"<?php if(isset($setSearchGroups[$group]) && 'OR' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_OR")?></option> <option value="OR"<?php if(isset($setSearchGroups[$group]) && 'OR' == $setSearchGroups[$group]):?> selected<?php endif;?>><?=$this->transEsc("search_OR")?></option>
......
<!-- finc: search - advanced - limit -->
<?php
// Set up convenience variables:
$limitList = $this->options->getLimitOptions();
// If a previous limit was used, make that the default; otherwise, use the "default default"
$lastLimit = $this->searchMemory()->getLastLimit($this->options->getSearchClassId());
$defaultLimit = empty($lastLimit) ? $this->options->getDefaultLimit() : $lastLimit;
?>
<?php if (count($limitList) > 1): ?>
<fieldset class="limits">
<legend><?=$this->transEsc('Results per page')?></legend>
<select id="limit" name="limit" class="form-control">
<?php foreach ($limitList as $limitVal): ?>
<option value="<?=$this->escapeHtmlAttr($limitVal)?>" <?=($limitVal == $defaultLimit) ? 'selected="selected"' : ''?>><?=$this->escapeHtml($limitVal)?></option>
<?php endforeach; ?>
</select>
<label for="limit"><?=$this->transEsc('Limit To')?></label>
</fieldset>
<?php endif; ?>
<!-- finc: search - advanced - limit - END -->
\ No newline at end of file
<!-- finc: search - advanced - ranges -->
<?php if (isset($this->ranges) && !empty($this->ranges)): ?>
<?php $params = $this->searchParams($this->searchClassId); $params->activateAllFacets(); ?>
<?php foreach ($this->ranges as $current): $escField = $this->escapeHtmlAttr($current['field']); ?>
<?php $extraInputAttribs = ($current['type'] == 'date') ? 'maxlength="4" ' : ''; ?>
<fieldset class="range">
<legend><?=$this->transEsc($params->getFacetLabel($current['field']))?></legend>
<input type="hidden" name="<?=$this->escapeHtmlAttr($current['type'])?>range[]" value="<?=$escField?>"/>
<div class="date-fields">
<div class="date-from">
<label for="<?=$escField?>from"><?=$this->transEsc('date_from')?>:</label>
<input type="text" name="<?=$escField?>from" id="<?=$escField?>from" value="<?=isset($current['values'][0])?$this->escapeHtmlAttr($current['values'][0]):''?>" class="form-control" <?=$extraInputAttribs?>/>
</div>
<div class="date-to">
<label for="<?=$escField?>to"><?=$this->transEsc('date_to')?>:</label>
<input type="text" name="<?=$escField?>to" id="<?=$escField?>to" value="<?=isset($current['values'][1])?$this->escapeHtmlAttr($current['values'][1]):''?>" class="form-control" <?=$extraInputAttribs?>/>
</div>
</div>
<?php if ($current['type'] == 'date'): ?>
<div class="slider-container">
<label for="<?=$escField?><?=$this->escapeHtmlAttr($current['type'])?>Slider"><?=$this->transEsc('Range-from-to')?>:</label>
<input type="text" id="<?=$escField?><?=$this->escapeHtmlAttr($current['type'])?>Slider">
</div>
<?php
$this->headScript()->appendFile('vendor/bootstrap-slider.min.js');
$this->headLink()->appendStylesheet('vendor/bootstrap-slider.min.css');
$min = !empty($current['values'][0]) ? min($current['values'][0], 1400) : 1400;
$future = date('Y', time() + 31536000);
$max = !empty($current['values'][1]) ? max($future, $current['values'][1]) : $future;
$low = !empty($current['values'][0]) ? $current['values'][0] : $min;
$high = !empty($current['values'][1]) ? $current['values'][1] : $max;
$min = intval($min);
$max = intval($max);
$low = intval($low);
$high = intval($high);
$init = !empty($current['values'][0]) ? 'fillTexts()' : '';
$script = <<<JS
$(document).ready(function() {
var fillTexts = function() {
var v = {$escField}dateSlider.getValue();
$('#${escField}from').val(v[0]);
$('#${escField}to').val(v[1]);
};
var {$escField}dateSlider = $('#{$escField}dateSlider')
.slider({
'min':{$min},
'max':{$max},
'handle':"square",
'tooltip':"hide",
'value':[{$low},{$high}]
})
.on('change', fillTexts)
.data('slider');
{$init}
});
$('#{$escField}from, #{$escField}to').change(function () {
var fromValue = Number($('#{$escField}from').val());
var toValue = Number($('#{$escField}to').val());
$('#{$escField}dateSlider').slider(
'setValue',
[
isNaN(fromValue) || fromValue <= 0 ? {$min} : fromValue,
isNaN(toValue) || toValue <= 0 ? {$max} : toValue
],
true
);
});
JS;
?>
<?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $script, 'SET'); ?>
<?php endif; ?>
</fieldset>
<?php endforeach; ?>
<?php endif; ?>
<!-- finc: search - advanced - ranges - END -->
\ No newline at end of file
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