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