Deltacms/module/search/view/index/index.php

56 lines
2.2 KiB
PHP

<?php echo template::formOpen('searchForm');
// Lexique
$text = [];
$val ='fr';
if( $this->getData(['config', 'i18n', 'langBase']) !== 'fr') $val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Un ou plusieurs mots clef séparés par un espace';
break;
case 'en' :
$text[0] = 'One or more keywords separated by a space';
break;
}
?>
<div class="row">
<div class="col10 offset1">
<div class="row">
<div class="col9 verticalAlignMiddle">
<?php echo template::text('searchMotphraseclef', [
'placeholder' => $this->getData(['module', $this->getUrl(0), 'config', 'placeHolder']) ? $this->getData(['module', $this->getUrl(0), 'config', 'placeHolder']):$text[0],
'value' => $module::$motclef
]); ?>
</div>
<?php $col = empty($this->getData(['module', $this->getUrl(0), 'config', 'submitText'])) ? 'col1' : 'col3';?>
<div class="<?php echo $col;?> verticalAlignMiddle">
<?php echo template::submit('pageEditSubmit', [
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'submitText']),
'ico' => 'search'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('searchMotentier', true, $this->getData(['module', $this->getUrl(0), 'config', 'nearWordText']), [
'checked' => $module::$motentier,
]); ?>
</div>
</div>
</div>
</div>
<?php if ( $module::$resultTitle ): ?>
<div class="col12">
<div class="block">
<?php echo '<h4>'.$module::$resultTitle . '</h4>'; ?>
<?php if ($module::$resultList )
echo '<p>'.$module::$resultList.'</p>';
?>
<?php if ($module::$resultError )
echo '<p>'.$module::$resultError.'</p>';
?>
</div>
</div>
<?php endif; ?>
<?php echo template::formClose(); ?>