]>
Commit | Line | Data |
---|---|---|
63347a0f | 1 | <div class="video-edit" [formGroup]="form"> |
45c6bcf3 | 2 | <div ngbNav #nav="ngbNav" class="nav-tabs"> |
63347a0f | 3 | |
45c6bcf3 C |
4 | <ng-container ngbNavItem> |
5 | <a ngbNavLink i18n>Basic info</a> | |
6 | ||
7 | <ng-template ngbNavContent> | |
63347a0f | 8 | <div class="row"> |
6f02515e | 9 | <div class="col-video-edit"> |
63347a0f C |
10 | <div class="form-group"> |
11 | <label i18n for="name">Title</label> | |
a6d5ff76 | 12 | <input type="text" id="name" class="form-control" formControlName="name" /> |
63347a0f C |
13 | <div *ngIf="formErrors.name" class="form-error"> |
14 | {{ formErrors.name }} | |
15 | </div> | |
16 | </div> | |
17 | ||
18 | <div class="form-group"> | |
b0c36821 | 19 | <label i18n class="label-tags">Tags</label> |
421d935d C |
20 | |
21 | <my-help> | |
22 | <ng-template ptTemplate="customHtml"> | |
23 | <ng-container i18n> | |
24 | Tags could be used to suggest relevant recommendations. <br /> | |
47594fd7 | 25 | There is a maximum of 5 tags. <br /> |
9e8929d6 | 26 | Press <kbd>Enter</kbd> to add a new tag. |
421d935d C |
27 | </ng-container> |
28 | </ng-template> | |
29 | </my-help> | |
30 | ||
02c01341 RK |
31 | <my-select-tags labelForId="label-tags" formControlName="tags"></my-select-tags> |
32 | <div *ngIf="formErrors.tags" class="form-error"> | |
33 | {{ formErrors.tags }} | |
34 | </div> | |
63347a0f C |
35 | </div> |
36 | ||
37 | <div class="form-group"> | |
38 | <label i18n for="description">Description</label> | |
421d935d C |
39 | |
40 | <my-help helpType="markdownText"> | |
41 | <ng-template ptTemplate="preHtml"> | |
42 | <ng-container i18n> | |
43 | Video descriptions are truncated by default and require manual action to expand them. | |
44 | </ng-container> | |
45 | </ng-template> | |
46 | </my-help> | |
47 | ||
be27ef3b | 48 | <my-markdown-textarea [truncate]="250" formControlName="description" [markdownVideo]="true"></my-markdown-textarea> |
63347a0f C |
49 | |
50 | <div *ngIf="formErrors.description" class="form-error"> | |
51 | {{ formErrors.description }} | |
52 | </div> | |
53 | </div> | |
6de36768 | 54 | </div> |
6de36768 | 55 | |
6f02515e | 56 | <div class="col-video-edit"> |
63347a0f | 57 | <div class="form-group"> |
02c01341 RK |
58 | <label i18n for="channel">Channel</label> |
59 | <my-select-channel labelForId="channel" [items]="userVideoChannels" formControlName="channelId"></my-select-channel> | |
63347a0f C |
60 | </div> |
61 | ||
62 | <div class="form-group"> | |
63 | <label i18n for="category">Category</label> | |
02c01341 RK |
64 | <my-select-options |
65 | labelForId="category" [items]="videoCategories" formControlName="category" [clearable]="true" | |
66 | ></my-select-options> | |
63347a0f C |
67 | |
68 | <div *ngIf="formErrors.category" class="form-error"> | |
69 | {{ formErrors.category }} | |
70 | </div> | |
71 | </div> | |
72 | ||
73 | <div class="form-group"> | |
74 | <label i18n for="licence">Licence</label> | |
02c01341 RK |
75 | <my-select-options |
76 | labelForId="licence" [items]="videoLicences" formControlName="licence" [clearable]="true" | |
77 | ></my-select-options> | |
63347a0f C |
78 | |
79 | <div *ngIf="formErrors.licence" class="form-error"> | |
80 | {{ formErrors.licence }} | |
81 | </div> | |
82 | </div> | |
83 | ||
84 | <div class="form-group"> | |
85 | <label i18n for="language">Language</label> | |
02c01341 RK |
86 | <my-select-options |
87 | labelForId="language" [items]="videoLanguages" formControlName="language" | |
88 | [clearable]="true" [searchable]="true" [groupBy]="'group'" | |
89 | ></my-select-options> | |
63347a0f C |
90 | |
91 | <div *ngIf="formErrors.language" class="form-error"> | |
92 | {{ formErrors.language }} | |
93 | </div> | |
94 | </div> | |
95 | ||
96 | <div class="form-group"> | |
97 | <label i18n for="privacy">Privacy</label> | |
02c01341 RK |
98 | <my-select-options |
99 | labelForId="privacy" [items]="videoPrivacies" formControlName="privacy" [clearable]="false" | |
100 | ></my-select-options> | |
63347a0f C |
101 | |
102 | <div *ngIf="formErrors.privacy" class="form-error"> | |
103 | {{ formErrors.privacy }} | |
104 | </div> | |
105 | </div> | |
106 | ||
107 | <div *ngIf="schedulePublicationEnabled" class="form-group"> | |
108 | <label i18n for="schedulePublicationAt">Schedule publication ({{ calendarTimezone }})</label> | |
109 | <p-calendar | |
110 | id="schedulePublicationAt" formControlName="schedulePublicationAt" [dateFormat]="calendarDateFormat" | |
111 | [locale]="calendarLocale" [minDate]="minScheduledDate" [showTime]="true" [hideOnDateTimeSelect]="true" | |
112 | > | |
113 | </p-calendar> | |
114 | ||
115 | <div *ngIf="formErrors.schedulePublicationAt" class="form-error"> | |
116 | {{ formErrors.schedulePublicationAt }} | |
117 | </div> | |
118 | </div> | |
119 | ||
421d935d C |
120 | <my-peertube-checkbox inputName="nsfw" formControlName="nsfw" helpPlacement="bottom-right"> |
121 | <ng-template ptTemplate="label"> | |
02c01341 | 122 | <ng-container i18n>Contains sensitive content</ng-container> |
421d935d C |
123 | </ng-template> |
124 | ||
125 | <ng-template ptTemplate="help"> | |
126 | <ng-container i18n>Some instances do not list videos containing mature or explicit content by default.</ng-container> | |
127 | </ng-template> | |
128 | </my-peertube-checkbox> | |
129 | ||
130 | <my-peertube-checkbox *ngIf="waitTranscodingEnabled" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right"> | |
131 | <ng-template ptTemplate="label"> | |
02c01341 | 132 | <ng-container i18n>Publish after transcoding</ng-container> |
421d935d C |
133 | </ng-template> |
134 | ||
135 | <ng-template ptTemplate="help"> | |
136 | <ng-container i18n>If you decide not to wait for transcoding before publishing the video, it could be unplayable until transcoding ends.</ng-container> | |
137 | </ng-template> | |
138 | </my-peertube-checkbox> | |
6de36768 | 139 | |
6de36768 C |
140 | </div> |
141 | </div> | |
63347a0f | 142 | </ng-template> |
45c6bcf3 C |
143 | </ng-container> |
144 | ||
145 | <ng-container ngbNavItem> | |
146 | <a ngbNavLink i18n>Captions</a> | |
63347a0f | 147 | |
45c6bcf3 | 148 | <ng-template ngbNavContent> |
63347a0f C |
149 | <div class="captions"> |
150 | ||
151 | <div class="captions-header"> | |
152 | <a (click)="openAddCaptionModal()" class="create-caption"> | |
6ad971d5 | 153 | <my-global-icon iconName="add" aria-hidden="true"></my-global-icon> |
63347a0f C |
154 | <ng-container i18n>Add another caption</ng-container> |
155 | </a> | |
6de36768 | 156 | </div> |
6de36768 | 157 | |
63347a0f | 158 | <div class="form-group" *ngFor="let videoCaption of videoCaptions"> |
6de36768 | 159 | |
63347a0f C |
160 | <div class="caption-entry"> |
161 | <ng-container *ngIf="!videoCaption.action"> | |
162 | <a | |
163 | i18n-title title="See the subtitle file" class="caption-entry-label" target="_blank" rel="noopener noreferrer" | |
164 | [href]="videoCaption.captionPath" | |
165 | >{{ videoCaption.language.label }}</a> | |
6de36768 | 166 | |
cc3d1dce | 167 | <div i18n class="caption-entry-state">Already uploaded ✔</div> |
6de36768 | 168 | |
63347a0f C |
169 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Delete</span> |
170 | </ng-container> | |
6de36768 | 171 | |
63347a0f C |
172 | <ng-container *ngIf="videoCaption.action === 'CREATE'"> |
173 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
6de36768 | 174 | |
cc3d1dce | 175 | <div i18n class="caption-entry-state caption-entry-state-create">Will be created on update</div> |
6de36768 | 176 | |
63347a0f C |
177 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel create</span> |
178 | </ng-container> | |
6de36768 | 179 | |
63347a0f C |
180 | <ng-container *ngIf="videoCaption.action === 'REMOVE'"> |
181 | <span class="caption-entry-label">{{ videoCaption.language.label }}</span> | |
6de36768 | 182 | |
cc3d1dce | 183 | <div i18n class="caption-entry-state caption-entry-state-delete">Will be deleted on update</div> |
bbe0f064 | 184 | |
63347a0f C |
185 | <span i18n class="caption-entry-delete" (click)="deleteCaption(videoCaption)">Cancel deletion</span> |
186 | </ng-container> | |
187 | </div> | |
bbe0f064 | 188 | </div> |
bbe0f064 | 189 | |
cc3d1dce | 190 | <div i18n class="no-caption" *ngIf="videoCaptions?.length === 0"> |
63347a0f | 191 | No captions for now. |
40e87e9e | 192 | </div> |
40e87e9e | 193 | |
6de36768 | 194 | </div> |
63347a0f | 195 | </ng-template> |
45c6bcf3 C |
196 | </ng-container> |
197 | ||
198 | <ng-container ngbNavItem> | |
199 | <a ngbNavLink i18n>Advanced settings</a> | |
63347a0f | 200 | |
45c6bcf3 | 201 | <ng-template ngbNavContent> |
6913f691 C |
202 | <div class="row advanced-settings"> |
203 | <div class="col-md-12 col-xl-8"> | |
6de36768 | 204 | |
6913f691 | 205 | <div class="form-group"> |
7b992a86 C |
206 | <label i18n for="previewfile">Video preview</label> |
207 | ||
208 | <my-preview-upload | |
209 | i18n-inputLabel inputLabel="Edit" inputName="previewfile" formControlName="previewfile" | |
6913f691 | 210 | previewWidth="360px" previewHeight="200px" |
7b992a86 | 211 | ></my-preview-upload> |
6913f691 | 212 | </div> |
07fa4c97 | 213 | |
6913f691 C |
214 | <div class="form-group"> |
215 | <label i18n for="support">Support</label> | |
9e8929d6 RK |
216 | <my-help helpType="markdownEnhanced"> |
217 | <ng-template ptTemplate="preHtml"> | |
218 | <ng-container i18n> | |
219 | Short text to tell people how they can support you (membership platform...). | |
220 | </ng-container> | |
221 | </ng-template> | |
222 | </my-help> | |
6913f691 | 223 | <my-markdown-textarea |
b15fe00f | 224 | id="support" formControlName="support" markdownType="enhanced" |
6913f691 C |
225 | [classes]="{ 'input-error': formErrors['support'] }" |
226 | ></my-markdown-textarea> | |
227 | <div *ngIf="formErrors.support" class="form-error"> | |
228 | {{ formErrors.support }} | |
229 | </div> | |
63347a0f | 230 | </div> |
07fa4c97 | 231 | </div> |
501e9611 | 232 | |
6913f691 C |
233 | <div class="col-md-12 col-xl-4"> |
234 | <div class="form-group originally-published-at"> | |
235 | <label i18n for="originallyPublishedAt">Original publication date</label> | |
9e8929d6 RK |
236 | <my-help> |
237 | <ng-template ptTemplate="preHtml"> | |
238 | <ng-container i18n> | |
239 | This is the date when the content was originally published (e.g. the release date for a film) | |
240 | </ng-container> | |
241 | </ng-template> | |
242 | </my-help> | |
6913f691 C |
243 | <p-calendar |
244 | id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat" | |
245 | [locale]="calendarLocale" [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange" | |
246 | > | |
247 | </p-calendar> | |
248 | ||
249 | <div *ngIf="formErrors.originallyPublishedAt" class="form-error"> | |
250 | {{ formErrors.originallyPublishedAt }} | |
251 | </div> | |
252 | </div> | |
253 | ||
254 | <my-peertube-checkbox | |
255 | inputName="commentsEnabled" formControlName="commentsEnabled" | |
256 | i18n-labelText labelText="Enable video comments" | |
257 | ></my-peertube-checkbox> | |
501e9611 | 258 | |
6913f691 C |
259 | <my-peertube-checkbox |
260 | inputName="downloadEnabled" formControlName="downloadEnabled" | |
261 | i18n-labelText labelText="Enable download" | |
262 | ></my-peertube-checkbox> | |
263 | </div> | |
07fa4c97 | 264 | </div> |
63347a0f | 265 | </ng-template> |
45c6bcf3 | 266 | </ng-container> |
ff249f49 | 267 | |
45c6bcf3 | 268 | </div> |
47564bbe | 269 | |
45c6bcf3 | 270 | <div [ngbNavOutlet]="nav"></div> |
ff249f49 | 271 | </div> |
40e87e9e C |
272 | |
273 | <my-video-caption-add-modal | |
ba430d75 | 274 | #videoCaptionAddModal [existingCaptions]="existingCaptions" [serverConfig]="serverConfig" (captionAdded)="onCaptionAdded($event)" |
b0c36821 | 275 | ></my-video-caption-add-modal> |