]>
Commit | Line | Data |
---|---|---|
0b18f4aa C |
1 | <form role="form" (ngSubmit)="formUpdated()"> |
2 | ||
3 | <div class="row"> | |
4 | <div class="col-lg-4 col-md-6 col-xs-12"> | |
cddf4503 | 5 | <div class="form-group"> |
25266908 RK |
6 | <div class="radio-label label-container"> |
7 | <label i18n>Sort</label> | |
8 | <button i18n class="reset-button reset-button-small" (click)="resetField('sort', '-match')" *ngIf="advancedSearch.sort !== '-match'"> | |
9 | Reset | |
10 | </button> | |
11 | </div> | |
cddf4503 C |
12 | |
13 | <div class="peertube-radio-container" *ngFor="let sort of sorts"> | |
14 | <input type="radio" name="sort" [id]="sort.id" [value]="sort.id" [(ngModel)]="advancedSearch.sort"> | |
15 | <label [for]="sort.id" class="radio">{{ sort.label }}</label> | |
16 | </div> | |
17 | </div> | |
18 | ||
5fb2e288 C |
19 | <div class="form-group"> |
20 | <div class="radio-label label-container"> | |
21 | <label i18n>Display sensitive content</label> | |
22 | <button i18n class="reset-button reset-button-small" (click)="resetField('nsfw')" *ngIf="advancedSearch.nsfw !== undefined"> | |
23 | Reset | |
24 | </button> | |
25 | </div> | |
26 | ||
27 | <div class="peertube-radio-container"> | |
28 | <input type="radio" name="sensitiveContent" id="sensitiveContentYes" value="both" [(ngModel)]="advancedSearch.nsfw"> | |
29 | <label i18n for="sensitiveContentYes" class="radio">Yes</label> | |
30 | </div> | |
31 | ||
32 | <div class="peertube-radio-container"> | |
33 | <input type="radio" name="sensitiveContent" id="sensitiveContentNo" value="false" [(ngModel)]="advancedSearch.nsfw"> | |
34 | <label i18n for="sensitiveContentNo" class="radio">No</label> | |
35 | </div> | |
36 | </div> | |
37 | ||
0b18f4aa | 38 | <div class="form-group"> |
25266908 RK |
39 | <div class="radio-label label-container"> |
40 | <label i18n>Published date</label> | |
41 | <button i18n class="reset-button reset-button-small" (click)="resetLocalField('publishedDateRange')" *ngIf="publishedDateRange !== undefined"> | |
42 | Reset | |
43 | </button> | |
44 | </div> | |
0b18f4aa C |
45 | |
46 | <div class="peertube-radio-container" *ngFor="let date of publishedDateRanges"> | |
25266908 | 47 | <input type="radio" (change)="inputUpdated()" name="publishedDateRange" [id]="date.id" [value]="date.id" [(ngModel)]="publishedDateRange"> |
0b18f4aa C |
48 | <label [for]="date.id" class="radio">{{ date.label }}</label> |
49 | </div> | |
50 | </div> | |
51 | ||
31d065cc | 52 | <div class="form-group"> |
25266908 RK |
53 | <div class="label-container"> |
54 | <label i18n for="original-publication-after">Original publication year</label> | |
55 | <button i18n class="reset-button reset-button-small" (click)="resetOriginalPublicationYears()" *ngIf="originallyPublishedStartYear || originallyPublishedEndYear"> | |
56 | Reset | |
57 | </button> | |
58 | </div> | |
31d065cc AM |
59 | |
60 | <div class="row"> | |
5fb2e288 | 61 | <div class="pl-0 col-sm-6"> |
31d065cc | 62 | <input |
25266908 RK |
63 | (change)="inputUpdated()" |
64 | (keydown.enter)="$event.preventDefault()" | |
31d065cc AM |
65 | type="text" id="original-publication-after" name="original-publication-after" |
66 | i18n-placeholder placeholder="After..." | |
67 | [(ngModel)]="originallyPublishedStartYear" | |
a6d5ff76 | 68 | class="form-control" |
31d065cc AM |
69 | > |
70 | </div> | |
5fb2e288 | 71 | <div class="pr-0 col-sm-6"> |
31d065cc | 72 | <input |
25266908 RK |
73 | (change)="inputUpdated()" |
74 | (keydown.enter)="$event.preventDefault()" | |
31d065cc AM |
75 | type="text" id="original-publication-before" name="original-publication-before" |
76 | i18n-placeholder placeholder="Before..." | |
77 | [(ngModel)]="originallyPublishedEndYear" | |
a6d5ff76 | 78 | class="form-control" |
31d065cc AM |
79 | > |
80 | </div> | |
81 | </div> | |
82 | </div> | |
83 | ||
5fb2e288 C |
84 | </div> |
85 | ||
86 | <div class="col-lg-4 col-md-6 col-xs-12"> | |
0b18f4aa | 87 | <div class="form-group"> |
25266908 RK |
88 | <div class="radio-label label-container"> |
89 | <label i18n>Duration</label> | |
90 | <button i18n class="reset-button reset-button-small" (click)="resetLocalField('durationRange')" *ngIf="durationRange !== undefined"> | |
91 | Reset | |
92 | </button> | |
93 | </div> | |
0b18f4aa C |
94 | |
95 | <div class="peertube-radio-container" *ngFor="let duration of durationRanges"> | |
25266908 | 96 | <input type="radio" (change)="inputUpdated()" name="durationRange" [id]="duration.id" [value]="duration.id" [(ngModel)]="durationRange"> |
0b18f4aa C |
97 | <label [for]="duration.id" class="radio">{{ duration.label }}</label> |
98 | </div> | |
99 | </div> | |
100 | ||
0b18f4aa C |
101 | <div class="form-group"> |
102 | <label i18n for="category">Category</label> | |
25266908 RK |
103 | <button i18n class="reset-button reset-button-small" (click)="resetField('categoryOneOf')" *ngIf="advancedSearch.categoryOneOf !== undefined"> |
104 | Reset | |
105 | </button> | |
0b18f4aa | 106 | <div class="peertube-select-container"> |
a6d5ff76 | 107 | <select id="category" name="category" [(ngModel)]="advancedSearch.categoryOneOf" class="form-control"> |
a2e0046c | 108 | <option [value]="undefined" i18n>Display all categories</option> |
0b18f4aa C |
109 | <option *ngFor="let category of videoCategories" [value]="category.id">{{ category.label }}</option> |
110 | </select> | |
111 | </div> | |
112 | </div> | |
113 | ||
114 | <div class="form-group"> | |
115 | <label i18n for="licence">Licence</label> | |
25266908 RK |
116 | <button i18n class="reset-button reset-button-small" (click)="resetField('licenceOneOf')" *ngIf="advancedSearch.licenceOneOf !== undefined"> |
117 | Reset | |
118 | </button> | |
0b18f4aa | 119 | <div class="peertube-select-container"> |
a6d5ff76 | 120 | <select id="licence" name="licence" [(ngModel)]="advancedSearch.licenceOneOf" class="form-control"> |
a2e0046c | 121 | <option [value]="undefined" i18n>Display all licenses</option> |
0b18f4aa C |
122 | <option *ngFor="let licence of videoLicences" [value]="licence.id">{{ licence.label }}</option> |
123 | </select> | |
124 | </div> | |
125 | </div> | |
126 | ||
127 | <div class="form-group"> | |
128 | <label i18n for="language">Language</label> | |
25266908 RK |
129 | <button i18n class="reset-button reset-button-small" (click)="resetField('languageOneOf')" *ngIf="advancedSearch.languageOneOf !== undefined"> |
130 | Reset | |
131 | </button> | |
0b18f4aa | 132 | <div class="peertube-select-container"> |
a6d5ff76 | 133 | <select id="language" name="language" [(ngModel)]="advancedSearch.languageOneOf" class="form-control"> |
a2e0046c | 134 | <option [value]="undefined" i18n>Display all languages</option> |
0b18f4aa C |
135 | <option *ngFor="let language of videoLanguages" [value]="language.id">{{ language.label }}</option> |
136 | </select> | |
137 | </div> | |
138 | </div> | |
139 | </div> | |
140 | ||
141 | <div class="col-lg-4 col-md-6 col-xs-12"> | |
142 | <div class="form-group"> | |
143 | <label i18n for="tagsAllOf">All of these tags</label> | |
25266908 RK |
144 | <button i18n class="reset-button reset-button-small" (click)="resetField('tagsAllOf')" *ngIf="advancedSearch.tagsAllOf"> |
145 | Reset | |
146 | </button> | |
147 | <tag-input | |
148 | [(ngModel)]="advancedSearch.tagsAllOf" name="tagsAllOf" id="tagsAllOf" | |
149 | [validators]="tagValidators" [errorMessages]="tagValidatorsMessages" | |
150 | i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a tag" | |
be27ef3b | 151 | [maxItems]="5" [modelAsStrings]="true" |
25266908 | 152 | ></tag-input> |
0b18f4aa C |
153 | </div> |
154 | ||
155 | <div class="form-group"> | |
156 | <label i18n for="tagsOneOf">One of these tags</label> | |
25266908 RK |
157 | <button i18n class="reset-button reset-button-small" (click)="resetField('tagsOneOf')" *ngIf="advancedSearch.tagsOneOf"> |
158 | Reset | |
159 | </button> | |
160 | <tag-input | |
161 | [(ngModel)]="advancedSearch.tagsOneOf" name="tagsOneOf" id="tagsOneOf" | |
162 | [validators]="tagValidators" [errorMessages]="tagValidatorsMessages" | |
163 | i18n-placeholder placeholder="+ Tag" i18n-secondaryPlaceholder secondaryPlaceholder="Enter a tag" | |
be27ef3b | 164 | [maxItems]="5" [modelAsStrings]="true" |
25266908 | 165 | ></tag-input> |
0b18f4aa | 166 | </div> |
5fb2e288 C |
167 | |
168 | <div class="form-group" *ngIf="isSearchTargetEnabled()"> | |
169 | <div class="radio-label label-container"> | |
170 | <label i18n>Search target</label> | |
171 | </div> | |
172 | ||
173 | <div class="peertube-radio-container"> | |
174 | <input type="radio" name="searchTarget" id="searchTargetLocal" value="local" [(ngModel)]="advancedSearch.searchTarget"> | |
175 | <label i18n for="searchTargetLocal" class="radio">Instance</label> | |
176 | </div> | |
177 | ||
178 | <div class="peertube-radio-container"> | |
179 | <input type="radio" name="searchTarget" id="searchTargetSearchIndex" value="search-index" [(ngModel)]="advancedSearch.searchTarget"> | |
180 | <label i18n for="searchTargetSearchIndex" class="radio">Vidiverse</label> | |
181 | </div> | |
182 | </div> | |
0b18f4aa C |
183 | </div> |
184 | </div> | |
185 | ||
186 | <div class="submit-button"> | |
25266908 RK |
187 | <button i18n class="reset-button" (click)="reset()" *ngIf="advancedSearch.size()"> |
188 | Reset | |
189 | </button> | |
190 | ||
0b18f4aa C |
191 | <input type="submit" i18n-value value="Filter"> |
192 | </div> | |
31d065cc | 193 | </form> |