Skip to content

Commit

Permalink
Display date_time with a pretty format #755
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeauchesne committed Aug 21, 2019
1 parent 7b0f25f commit 556e73b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/components/generics/DocumentField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
{{ value }}
</a>

<span v-else-if="field.type==='date_time'">
{{ $moment.toLocalizedString(value, 'LLL') }}
</span>

<textual-array
v-else-if="isArray"
:array="value"
Expand Down
12 changes: 9 additions & 3 deletions src/components/image-viewer/ImageInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,26 @@
<div v-if="document">
<p>
<fa-icon icon="calendar" />
<label>{{ document.date_time }}</label>
<label>
{{ $moment.toLocalizedString(document.date_time, 'LLL') }}
</label>
</p>

<p v-if="document.cooked.title">
<fa-icon icon="tag" />
<label>{{ document.cooked.title }}</label>
<label>
{{ document.cooked.title }}
</label>
</p>

<markdown v-if="document.cooked.summary" class="is-italic" :content="document.cooked.summary" />
<markdown v-if="document.cooked.description" :content="document.cooked.description" />

<p v-if="document.image_type">
<icon-creative-commons />
<label>{{ $gettext(document.image_type) }}</label>
<label>
{{ $gettext(document.image_type) }}
</label>
</p>

<h4 class="title is-4 has-text-light" v-translate>
Expand Down

0 comments on commit 556e73b

Please sign in to comment.