aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.html14
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.ts4
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.html6
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.scss2
4 files changed, 23 insertions, 3 deletions
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.html b/client/src/app/videos/+video-edit/shared/video-edit.component.html
index 59ba15b53..2fb540170 100644
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.html
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.html
@@ -114,6 +114,20 @@
114 </div> 114 </div>
115 </div> 115 </div>
116 116
117 <div class="form-group">
118 <label i18n for="originallyPublishedAt">Original publication date</label>
119 <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>
120 <p-calendar
121 id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat"
122 [locale]="calendarLocale" [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange"
123 >
124 </p-calendar>
125
126 <div *ngIf="formErrors.originallyPublishedAt" class="form-error">
127 {{ formErrors.originallyPublishedAt }}
128 </div>
129 </div>
130
117 <my-peertube-checkbox 131 <my-peertube-checkbox
118 inputName="nsfw" formControlName="nsfw" 132 inputName="nsfw" formControlName="nsfw"
119 i18n-labelText labelText="This video contains mature or explicit content" 133 i18n-labelText labelText="This video contains mature or explicit content"
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts
index 3ed7a4a10..836452948 100644
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts
@@ -45,6 +45,7 @@ export class VideoEditComponent implements OnInit, OnDestroy {
45 45
46 calendarLocale: any = {} 46 calendarLocale: any = {}
47 minScheduledDate = new Date() 47 minScheduledDate = new Date()
48 myYearRange = '1880:' + (new Date()).getFullYear()
48 49
49 calendarTimezone: string 50 calendarTimezone: string
50 calendarDateFormat: string 51 calendarDateFormat: string
@@ -101,7 +102,8 @@ export class VideoEditComponent implements OnInit, OnDestroy {
101 thumbnailfile: null, 102 thumbnailfile: null,
102 previewfile: null, 103 previewfile: null,
103 support: this.videoValidatorsService.VIDEO_SUPPORT, 104 support: this.videoValidatorsService.VIDEO_SUPPORT,
104 schedulePublicationAt: this.videoValidatorsService.VIDEO_SCHEDULE_PUBLICATION_AT 105 schedulePublicationAt: this.videoValidatorsService.VIDEO_SCHEDULE_PUBLICATION_AT,
106 originallyPublishedAt: this.videoValidatorsService.VIDEO_ORIGINALLY_PUBLISHED_AT
105 } 107 }
106 108
107 this.formValidatorService.updateForm( 109 this.formValidatorService.updateForm(
diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html
index 1875230d8..6e18ab6a6 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.html
+++ b/client/src/app/videos/+video-watch/video-watch.component.html
@@ -33,7 +33,6 @@
33 <div> 33 <div>
34 <div class="d-block d-sm-none"> <!-- only shown on small devices, has its conterpart for larger viewports below --> 34 <div class="d-block d-sm-none"> <!-- only shown on small devices, has its conterpart for larger viewports below -->
35 <h1 class="video-info-name">{{ video.name }}</h1> 35 <h1 class="video-info-name">{{ video.name }}</h1>
36
37 <div i18n class="video-info-date-views"> 36 <div i18n class="video-info-date-views">
38 Published {{ video.publishedAt | myFromNow }} - {{ video.views | myNumberFormatter }} views 37 Published {{ video.publishedAt | myFromNow }} - {{ video.views | myNumberFormatter }} views
39 </div> 38 </div>
@@ -162,6 +161,11 @@
162 <span class="video-attribute-value">{{ video.privacy.label }}</span> 161 <span class="video-attribute-value">{{ video.privacy.label }}</span>
163 </div> 162 </div>
164 163
164 <div *ngIf="!!video.originallyPublishedAt" class="video-attribute">
165 <span i18n class="video-attribute-label">Originally published</span>
166 <span class="video-attribute-value">{{ video.originallyPublishedAt | date: 'dd MMMM yyyy' }}</span>
167 </div>
168
165 <div class="video-attribute"> 169 <div class="video-attribute">
166 <span i18n class="video-attribute-label">Category</span> 170 <span i18n class="video-attribute-label">Category</span>
167 <span *ngIf="!video.category.id" class="video-attribute-value">{{ video.category.label }}</span> 171 <span *ngIf="!video.category.id" class="video-attribute-value">{{ video.category.label }}</span>
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss
index b03ed197d..cfe3533b6 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.scss
+++ b/client/src/app/videos/+video-watch/video-watch.component.scss
@@ -286,7 +286,7 @@ $other-videos-width: 260px;
286 margin-bottom: 12px; 286 margin-bottom: 12px;
287 287
288 .video-attribute-label { 288 .video-attribute-label {
289 min-width: 91px; 289 min-width: 142px;
290 padding-right: 5px; 290 padding-right: 5px;
291 display: inline-block; 291 display: inline-block;
292 color: $grey-foreground-color; 292 color: $grey-foreground-color;