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