diff -r ca1c0a625d70 -r b71475c27159 src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue --- a/src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue Fri Apr 28 11:17:15 2017 +0200 +++ b/src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue Fri Apr 28 11:29:47 2017 +0200 @@ -34,7 +34,11 @@ @change="onTagsChange($event.tags)"> -
{{ lastRevisionText }}
++ Dernière version + {{ dateComputed }} par + {{ annotation.author }} +
@@ -70,7 +74,9 @@ isAuthenticated: { type: Boolean, default: false - } + }, + revisionsUrl: String, + authorUrl: String }, components: { 'tag-list': TagList @@ -102,6 +108,21 @@ return 'Dernière version ' + date.fromNow() + ' par ' + this.annotation.author; } }, + revisionsUrlComputed: function() { + if (this.annotation) { + return this.revisionsUrl.replace(':annotation_guid', this.annotation.annotation_guid); + } + }, + authorUrlComputed: function() { + if (this.annotation) { + return this.authorUrl.replace('--username--', this.annotation.author); + } + }, + dateComputed: function() { + if (this.annotation) { + return moment(this.annotation.created).locale('fr').fromNow(); + } + }, formAction: function() { if (this.annotation) { return this.action.replace(':annotation_guid', this.annotation.annotation_guid);