Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 32 additions & 11 deletions administrator/components/com_finder/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
>

<field
name="logging_enabled"
name="show_taxonomy"
type="radio"
label="COM_FINDER_CONFIG_GATHER_SEARCH_STATISTICS_LABEL"
label="COM_FINDER_CONFIG_SHOW_TAXONOMY_LABEL"
class="switcher"
default="0"
default="1"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
Expand All @@ -37,16 +37,15 @@
showon="show_description:1"
/>


<field
name="allow_empty_query"
name="show_date"
type="radio"
label="COM_FINDER_CONFIG_ALLOW_EMPTY_QUERY_LABEL"
label="COM_FINDER_CONFIG_SHOW_DATE_LABEL"
class="switcher"
default="0"
default="1"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
Expand All @@ -60,6 +59,28 @@
<option value="1">JSHOW</option>
</field>

<field
name="logging_enabled"
type="radio"
label="COM_FINDER_CONFIG_GATHER_SEARCH_STATISTICS_LABEL"
class="switcher"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field
name="allow_empty_query"
type="radio"
label="COM_FINDER_CONFIG_ALLOW_EMPTY_QUERY_LABEL"
class="switcher"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field
name="show_autosuggest"
type="radio"
Expand Down
2 changes: 2 additions & 0 deletions administrator/language/en-GB/en-GB.com_finder.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ COM_FINDER_CONFIG_SHOW_ADVANCED_LABEL="Advanced Search"
COM_FINDER_CONFIG_SHOW_ADVANCED_TIPS_LABEL="Advanced Tips"
COM_FINDER_CONFIG_SHOW_AUTOSUGGEST_LABEL="Search Suggestions"
COM_FINDER_CONFIG_SHOW_DATE_FILTERS_LABEL="Date Filters"
COM_FINDER_CONFIG_SHOW_DATE_LABEL="Result Date"
COM_FINDER_CONFIG_SHOW_DESCRIPTION_LABEL="Result Description"
COM_FINDER_CONFIG_SHOW_EXPLAINED_QUERY_LABEL="Query Explanation"
COM_FINDER_CONFIG_SHOW_SUGGESTED_QUERY_LABEL="Did You Mean"
COM_FINDER_CONFIG_SHOW_TAXONOMY_LABEL="Result Taxonomy"
COM_FINDER_CONFIG_SHOW_URL_LABEL="Result URL"
COM_FINDER_CONFIG_SORT_DIRECTION_LABEL="Sort Direction"
COM_FINDER_CONFIG_SORT_OPTION_ASCENDING="Ascending"
Expand Down
22 changes: 22 additions & 0 deletions components/com_finder/tmpl/search/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@
<option value="0">JNO</option>
</field>
<field type="spacer" />
<field
name="show_taxonomy"
type="list"
label="COM_FINDER_CONFIG_SHOW_TAXONOMY_LABEL"
default=""
useglobal="true"
class="chzn-color"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="show_description"
type="list"
Expand All @@ -80,6 +91,17 @@
size="5"
useglobal="true"
/>
<field
name="show_date"
type="list"
label="COM_FINDER_CONFIG_SHOW_DATE_LABEL"
default=""
useglobal="true"
class="chzn-color"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
<field
name="show_url"
type="list"
Expand Down
46 changes: 32 additions & 14 deletions components/com_finder/tmpl/search/default_result.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,38 @@
$description = JHtml::_('string.truncate', StringHelper::substr($this->result->description, $start), $desc_length, true);
}
?>
<li class="com-finder__result">
<dt class="result-title">
<h4 class="result-title <?php echo $mime; ?>">
<a href="<?php echo JRoute::_($this->result->route); ?>">
<?php if ($this->result->route) : ?>
<a href="<?php echo JRoute::_($this->result->route); ?>">
<?php echo $this->result->title; ?>
</a>
<?php else : ?>
<?php echo $this->result->title; ?>
</a>
<?php endif; ?>
</h4>
<?php if ($show_description && $description !== '') : ?>
<p class="result-text">
<?php echo $description; ?>
</p>
<?php endif; ?>
<?php if ($this->params->get('show_url', 1)) : ?>
<div class="small result-url">
<?php echo $this->baseUrl, JRoute::_($this->result->cleanURL); ?>
</div>
<?php endif; ?>
</li>
</dt>

<?php $taxonomies = $this->result->getTaxonomy(); ?>
<?php if (count($taxonomies) && $this->params->get('show_taxonomy', 1)) : ?>
<dd class="result-taxonomy">
<?php foreach ($taxonomies as $type => $taxonomy) : ?>
<span class="badge badge-secondary"><?php echo $type . ': ' . implode(',', array_column($taxonomy, 'title')); ?></span>
<?php endforeach; ?>
</dd>
<?php endif; ?>
<?php if ($show_description && $description !== '') : ?>
<dd class="result-text">
<?php echo $description; ?>
</dd>
<?php endif; ?>
<?php if ($this->result->start_date && $this->params->get('show_date', 1)) : ?>
<dd class="result-date small">
<?php echo \JHtml::_('date', $this->result->start_date, \JText::_('DATE_FORMAT_LC3')); ?>
</dd>
<?php endif; ?>
<?php if ($this->params->get('show_url', 1)) : ?>
<dd class="result-url small">
<?php echo $this->baseUrl, JRoute::_($this->result->cleanURL); ?>
</dd>
<?php endif; ?>
7 changes: 4 additions & 3 deletions components/com_finder/tmpl/search/default_results.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@
<?php endif; ?>
<?php // Display a list of results ?>
<br id="highlighter-start" />
<ul class="com-finder__results-list search-results list-striped">
<dl class="search-results list-striped">
<?php $this->baseUrl = JUri::getInstance()->toString(array('scheme', 'host', 'port')); ?>
<?php foreach ($this->results as $result) : ?>
<?php foreach ($this->results as $i => $result) : ?>
<?php $this->result = &$result; ?>
<?php $this->result->counter = $i + 1; ?>
<?php $layout = $this->getLayoutFile($this->result->layout); ?>
<?php echo $this->loadTemplate($layout); ?>
<?php endforeach; ?>
</ul>
</dl>
<br id="highlighter-end" />
<?php // Display the pagination ?>
<div class="com-finder__navigation search-pagination">
Expand Down