2018-08-14 16:30:13 -04:00
|
|
|
mixin faq_search(headerText, headerClass)
|
|
|
|
- if(typeof(settings.algolia) != "undefined" && typeof(settings.algolia.indexes) != "undefined" && typeof(settings.algolia.indexes.wiki) != "undefined")
|
|
|
|
if headerText
|
2019-03-18 06:24:54 -04:00
|
|
|
div(class=headerClass, ng-non-bindable) #{headerText}
|
2018-08-14 16:30:13 -04:00
|
|
|
.wiki(ng-controller="SearchWikiController")
|
2018-11-15 12:22:08 -05:00
|
|
|
form.project-search.form-horizontal(role="search")
|
2018-08-14 16:30:13 -04:00
|
|
|
.form-group.has-feedback.has-feedback-left
|
|
|
|
.col-sm-12
|
|
|
|
input.form-control(type='text', ng-model='searchQueryText', ng-keyup='search()', placeholder="Search help library....")
|
2018-11-19 04:41:34 -05:00
|
|
|
i.fa.fa-search.form-control-feedback-left(aria-hidden="true")
|
2018-08-14 16:30:13 -04:00
|
|
|
i.fa.fa-times.form-control-feedback(
|
|
|
|
ng-click="clearSearchText()",
|
|
|
|
style="cursor: pointer;",
|
|
|
|
ng-show="searchQueryText.length > 0"
|
2018-11-19 04:41:34 -05:00
|
|
|
aria-hidden="true"
|
2018-08-14 16:30:13 -04:00
|
|
|
)
|
2018-11-15 12:21:45 -05:00
|
|
|
button.sr-only(
|
2019-03-07 10:29:15 -05:00
|
|
|
type="button"
|
2018-11-15 12:21:45 -05:00
|
|
|
ng-click="clearSearchText()",
|
|
|
|
ng-show="searchQueryText.length > 0"
|
|
|
|
) #{translate('clear_search')}
|
2018-08-14 16:30:13 -04:00
|
|
|
|
2018-11-15 12:22:08 -05:00
|
|
|
.row(role="region" aria-label="search results")
|
2018-08-14 16:30:13 -04:00
|
|
|
.col-md-12(ng-cloak)
|
2018-11-15 12:22:08 -05:00
|
|
|
span.sr-only(ng-show="searchQueryText.length > 0" aria-live="polite")
|
|
|
|
span(ng-if="hits_total > config_hits_per_page") Showing first {{hits.length}} results of {{hits_total}} for {{searchQueryText}}
|
|
|
|
span(ng-if="hits_total <= config_hits_per_page") {{hits.length}} results for {{searchQueryText}}
|
2018-08-14 16:30:13 -04:00
|
|
|
a(ng-href='{{hit.url}}',ng-repeat='hit in hits').search-result.card.card-thin
|
|
|
|
span(ng-bind-html='hit.name')
|
|
|
|
div.search-result-content(ng-show="hit.content != ''", ng-bind-html='hit.content')
|