Skip to content

Commit

Permalink
pkp/pkp-lib#7505 Create locale key for "Last Modified"
Browse files Browse the repository at this point in the history
  • Loading branch information
defstat committed Nov 24, 2023
1 parent de17696 commit 713e9c8
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions src/components/ListPanel/jats/SubmissionJatsListPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,12 @@
<code>
{{ workingJatsContent }}
</code>

</pre>
</div>
<div>
<div v-if="existingJatsFile" class="filePanel__hasData">
<div class="filePanel__fileContentFooter">
<span>Last Modification at </span>
<span>{{ existingJatsFile.updatedAt }}</span>
<span> by </span>
<span> {{ existingJatsFile.uploaderUserName }}</span>
<span>{{ lastModifiedAtActual }}</span>
</div>
</div>
<div v-else>
Expand Down Expand Up @@ -141,6 +137,10 @@ export default {
type: String,
required: true,
},
i18nLastModifiedAt: {
type: String,
required: true,
},
downloadDefaultJatsFileName: {
type: String,
required: false,
Expand Down Expand Up @@ -174,14 +174,6 @@ export default {
return this.defaultJatsContent;
}
},
isDefault() {
if (this.existingJatsFile) {
return false;
} else {
return true;
}
},
/**
* URL to the API endpoint for the current publication
*/
Expand All @@ -191,6 +183,24 @@ export default {
this.publication.id,
);
},
lastModifiedAtActual() {
var actual = '';
if (this.existingJatsFile) {
actual = this.i18nLastModifiedAt.replace(
'{$modificationDate}',
this.existingJatsFile.updatedAt,
);
actual = actual.replace(
'{$username}',
this.existingJatsFile.uploaderUserName,
);
}
return actual;
}
},
methods: {
fetchWorkingJatsFile() {
Expand Down

0 comments on commit 713e9c8

Please sign in to comment.