1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-14 11:23:17 +02:00
pigallery2/frontend/app/gallery/search/search.gallery.component.html

42 lines
1.6 KiB
HTML
Raw Normal View History

2017-07-07 22:54:18 +02:00
<form class="navbar-form" role="search" #SearchForm="ngForm">
<div class="input-group">
2017-07-25 21:16:57 +02:00
<input type="text"
class="form-control"
i18n-placeholder
2017-07-25 21:16:57 +02:00
placeholder="Search"
(keyup)="onSearchChange($event)"
(blur)="onFocusLost()"
(focus)="onFocus()"
[(ngModel)]="searchText"
#name="ngModel"
size="30"
2017-07-07 22:54:18 +02:00
ngControl="search"
2017-07-25 21:16:57 +02:00
name="srch-term"
id="srch-term"
autocomplete="off">
2017-07-08 09:43:05 +02:00
2017-07-07 22:54:18 +02:00
<div class="autocomplete-list" *ngIf="autoCompleteItems.length > 0"
(mouseover)="setMouseOverAutoComplete(true)" (mouseout)="setMouseOverAutoComplete(false)">
<div class="autocomplete-item" *ngFor="let item of autoCompleteItems">
<a [routerLink]="['/search', item.text, {type: SearchTypes[item.type]}]">
2016-05-15 19:46:25 +02:00
<span [ngSwitch]="item.type">
2016-12-27 00:36:38 +02:00
<span *ngSwitchCase="0" class="glyphicon glyphicon-picture"></span>
<span *ngSwitchCase="1" class="glyphicon glyphicon-folder-open"></span>
<span *ngSwitchCase="2" class="glyphicon glyphicon-tag"></span>
<span *ngSwitchCase="3" class="glyphicon glyphicon-map-marker"></span>
2016-05-15 19:46:25 +02:00
</span>
2017-07-07 22:54:18 +02:00
{{item.preText}}<strong>{{item.highLightText}}</strong>{{item.postText}}
</a>
</div>
</div>
<div class="input-group-btn" style="display: block">
<button class="btn btn-default dropdown-toggle" type="button" (click)="onSearch()"><i
class="glyphicon glyphicon-search"></i>
</button>
</div>
</div>
</form>