This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/templates/search.js.handlebars

36 lines
1.2 KiB
Handlebars

{{view 'search-text-field' value=term searchContextEnabled=searchContextEnabled searchContext=searchContext id="search-term"}}
{{#if searchContext}}
<div class='search-context'>
<label>
{{input type="checkbox" name="searchContext" checked=searchContextEnabled}} {{searchContextDescription}}
</label>
</div>
{{/if}}
{{#if loading}}
<div class='searching'></div>
{{else}}
{{#unless noResults}}
{{#each resultType in content.resultTypes}}
<ul>
<li class='heading row'>
{{resultType.name}}
</li>
{{view 'search-results-type' type=resultType.type displayType=resultType.displayType content=resultType.results}}
</ul>
<div class='no-results'>
{{#if resultType.more}}
<a href='#' class='filter' {{action moreOfType resultType.type bubbles=false}}>{{i18n show_more}}</a>
{{else}}
{{#if showCancelFilter}}
<a href='#' class='filter' {{action cancelType bubbles=false}}><i class='fa fa-times-circle'></i></a>
{{/if}}
{{/if}}
</div>
{{/each}}
{{else}}
<div class='no-results'>
{{i18n search.no_results}}
</div>
{{/unless}}
{{/if}}