1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-01 19:45:24 +02:00
documize/gui/app/templates/components/search/search-view.hbs
sauls8t f70d4b33a3 Warn if search criteria too short
Minimum keywords > 3
2018-06-13 15:54:58 +01:00

34 lines
1.4 KiB
Handlebars

<div class="view-search">
<form onsubmit={{action 'onSearch'}} class="form-inline">
<div class="form-group">
{{focus-input type="text" value=filter class="form-control mr-3 search-box" placeholder='keywords, tags'}}
</div>
<div class="form-group">
<button class="btn btn-success" {{action 'onSearch'}}>Search</button>
</div>
</form>
<div class="form-group mt-2">
<div class="form-check form-check-inline">
{{input type="checkbox" id="search-1" class="form-check-input" checked=matchDoc}}
<label class="form-check-label" for="search-1">&nbsp;document title</label>
</div>
<div class="form-check form-check-inline">
{{input type="checkbox" id="search-2" class="form-check-input" checked=matchContent}}
<label class="form-check-label" for="search-2">&nbsp;content</label>
</div>
<div class="form-check form-check-inline">
{{input type="checkbox" id="search-3" class="form-check-input" checked=matchTag}}
<label class="form-check-label" for="search-3">&nbsp;tag name</label>
</div>
<div class="form-check form-check-inline">
{{input type="checkbox" id="search-4" class="form-check-input" checked=matchFile}}
<label class="form-check-label" for="search-4">&nbsp;attachment name</label>
</div>
</div>
{{#if validSearch}}
{{search/search-results results=results keywords=filter}}
{{else}}
<p class="text-danger my-5">Your search term is too short</p>
{{/if}}
</div>