Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2023-12-15 17:14:02 +01:00
commit 07bfdca11e
3 changed files with 10 additions and 4 deletions

View File

@ -16,7 +16,7 @@
<propertyregex property="shortversion" subject="${version} kk" pattern="([56])\.([0-9]).*" replace="seeddms$1$2x" override="true"/>
<property name="majorversion" value="${version}" />
<propertyregex property="majorversion" subject="${version}" pattern="([56])\..*" replace="$1" override="true"/>
<property name="composer_version" value="2.1.14" />
<property name="composer_version" value="2.2.22" />
<property name="composer_extra_params" value="" />
<property name="composer_env" value="" />
<property name="mink_driver" value="chrome" />

View File

@ -356,10 +356,12 @@ if($fullsearch) {
$totalPages = 0;
$entries = array();
$facets = array();
$stats = array();
$searchTime = 0;
} else {
$entries = array();
$facets = $searchresult['facets'];
$stats = $searchresult['stats'] ?? null;
$dcount = 0;
$fcount = 0;
if($searchresult['hits']) {
@ -406,6 +408,7 @@ if($fullsearch) {
$totalPages = 0;
$entries = array();
$facets = array();
$stats = array();
$searchTime = 0;
}
}
@ -717,6 +720,7 @@ if($fullsearch) {
} else
$totalPages = 1;
$facets = array();
$stats = array();
// }}}
}
@ -737,6 +741,7 @@ if($settings->_showSingleSearchHit && count($entries) == 1) {
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
if($view) {
$view->setParam('facets', $facets);
$view->setParam('stats', $stats);
$view->setParam('accessobject', $accessop);
$view->setParam('query', $query);
$view->setParam('includecontent', $includecontent);

View File

@ -396,6 +396,7 @@ $(document).ready(function() {
$orderby = $this->params['orderby'];
$entries = $this->params['searchhits'];
$facets = $this->params['facets'];
$stats = $this->params['stats'];
$totalpages = $this->params['totalpages'];
$pageNumber = $this->params['pagenumber'];
$searchTime = $this->params['searchtime'];
@ -1240,14 +1241,14 @@ $(document).ready(function() {
case SeedDMS_Core_AttributeDefinition::type_date:
if($values && (count($values) > 1 || reset($values) < $total)) {
if(empty($allparams['attributes'][$facetname]['from']) && empty($allparams['attributes'][$facetname]['to'])) {
$tt = array_keys($values);
$tt = isset($stats[$facetname]) ? $stats[$facetname] : [];//array_keys($values);
$content = '';
$content .= '<p><a href="'.$newrequest->getRequestUri().'&attributes['.$facetname.']=__notset__">'.getMLText('objects_without_attribute').'</a></p>';
$content .= '<div class="input-group">';
$content .= '<span class="input-group-text" style="border-right: 0;"> from </span>';
$content .= $this->getDateChooser('', "attributes[".$facetname."][from]", $this->params['session']->getLanguage(), '', getReadableDate(min($tt)), getReadableDate(max($tt)), null, '', true);
$content .= $this->getDateChooser('', "attributes[".$facetname."][from]", $this->params['session']->getLanguage(), '', $tt ? getReadableDate($tt['min']) : null, $tt ? getReadableDate($tt['max']) : null, null, '', true);
$content .= '<span class="input-group-text" style="border-left: 0; border-right: 0;"> to </span>';
$content .= $this->getDateChooser('', "attributes[".$facetname."][to]", $this->params['session']->getLanguage(), '', getReadableDate(min($tt)), getReadableDate(max($tt)), null, '', true);
$content .= $this->getDateChooser('', "attributes[".$facetname."][to]", $this->params['session']->getLanguage(), '', $tt ? getReadableDate($tt['min']) : null, $tt ? getReadableDate($tt['max']) : null, null, '', true);
$content .= '<button class="btn btn-primary" type="submit">Set</button>';
$content .= '</div>';
$this->printAccordion($dispname, $content);