]>
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 | ||
0b18f4aa | 19 | <div class="form-group"> |
25266908 RK |
20 | <div class="radio-label label-container"> |
21 | <label i18n>Published date</label> | |
22 | <button i18n class="reset-button reset-button-small" (click)="resetLocalField('publishedDateRange')" *ngIf="publishedDateRange !== undefined"> | |
23 | Reset | |
24 | </button> | |
25 | </div> | |
0b18f4aa C |
26 | |
27 | <div class="peertube-radio-container" *ngFor="let date of publishedDateRanges"> | |
25266908 | 28 | <input type="radio" (change)="inputUpdated()" name="publishedDateRange" [id]="date.id" [value]="date.id" [(ngModel)]="publishedDateRange"> |
0b18f4aa C |
29 | <label [for]="date.id" class="radio">{{ date.label }}</label> |
30 | </div> | |
31 | </div> | |
32 | ||
31d065cc | 33 | <div class="form-group"> |
25266908 RK |
34 | <div class="label-container"> |
35 | <label i18n for="original-publication-after">Original publication year</label> | |
36 | <button i18n class="reset-button reset-button-small" (click)="resetOriginalPublicationYears()" *ngIf="originallyPublishedStartYear || originallyPublishedEndYear"> | |
37 | Reset | |
38 | </button> | |
39 | </div> | |
31d065cc AM |
40 | |
41 | <div class="row"> | |
42 | <div class="col-sm-6"> | |
43 | <input | |
25266908 RK |
44 | (change)="inputUpdated()" |
45 | (keydown.enter)="$event.preventDefault()" | |
31d065cc AM |
46 | type="text" id="original-publication-after" name="original-publication-after" |
47 | i18n-placeholder placeholder="After..." | |
48 | [(ngModel)]="originallyPublishedStartYear" | |
a6d5ff76 | 49 | class="form-control" |
31d065cc AM |
50 | > |
51 | </div> | |
52 | <div class="col-sm-6"> | |
53 | <input | |
25266908 RK |
54 | (change)="inputUpdated()" |
55 | (keydown.enter)="$event.preventDefault()" | |
31d065cc AM |
56 | type="text" id="original-publication-before" name="original-publication-before" |
57 | i18n-placeholder placeholder="Before..." | |
58 | [(ngModel)]="originallyPublishedEndYear" | |
a6d5ff76 | 59 | class="form-control" |
31d065cc AM |
60 | > |
61 | </div> | |
62 | </div> | |
63 | </div> | |
64 | ||
0b18f4aa | 65 | <div class="form-group"> |
25266908 RK |
66 | <div class="radio-label label-container"> |
67 | <label i18n>Duration</label> | |
68 | <button i18n class="reset-button reset-button-small" (click)="resetLocalField('durationRange')" *ngIf="durationRange !== undefined"> | |
69 | Reset | |
70 | </button> | |
71 | </div> | |
0b18f4aa C |
72 | |
73 | <div class="peertube-radio-container" *ngFor="let duration of durationRanges"> | |
25266908 | 74 | <input type="radio" (change)="inputUpdated()" name="durationRange" [id]="duration.id" [value]="duration.id" [(ngModel)]="durationRange"> |
0b18f4aa C |
75 | <label [for]="duration.id" class="radio">{{ duration.label }}</label> |
76 | </div> | |
77 | </div> | |
78 | ||
79 | <div class="form-group"> | |
25266908 RK |
80 | <div class="radio-label label-container"> |
81 | <label i18n>Display sensitive content</label> | |
82 | <button i18n class="reset-button reset-button-small" (click)="resetField('nsfw')" *ngIf="advancedSearch.nsfw !== undefined"> | |
83 | Reset | |
84 | </button> | |
85 | </div> | |
0b18f4aa C |
86 | |
87 | <div class="peertube-radio-container"> | |
88 | <input type="radio" name="sensitiveContent" id="sensitiveContentYes" value="both" [(ngModel)]="advancedSearch.nsfw"> | |
89 | <label i18n for="sensitiveContentYes" class="radio">Yes</label> | |
90 | </div> | |
91 | ||
92 | <div class="peertube-radio-container"> | |
93 | <input type="radio" name="sensitiveContent" id="sensitiveContentNo" value="false" [(ngModel)]="advancedSearch.nsfw"> | |
94 | <label i18n for="sensitiveContentNo" class="radio">No</label> | |
95 | </div> | |
96 | </div> | |
97 | ||
98 | </div> | |
99 | ||
100 | <div class="col-lg-4 col-md-6 col-xs-12"> | |
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 C |
166 | </div> |
167 | </div> | |
168 | </div> | |
169 | ||
170 | <div class="submit-button"> | |
25266908 RK |
171 | <button i18n class="reset-button" (click)="reset()" *ngIf="advancedSearch.size()"> |
172 | Reset | |
173 | </button> | |
174 | ||
0b18f4aa C |
175 | <input type="submit" i18n-value value="Filter"> |
176 | </div> | |
31d065cc | 177 | </form> |