+
+
+
+
+ {{ $i18n.getFrom('items','edit_item') }}
+
+
+ {{ $i18n.getFrom('items', 'view_item') }}
+
-
+
+
-
-
-
- +
+
-
-
-
+
+
- {{ $i18n.get('label_thumbnail') }}
+
+
+
+
+
+
+
+
{{ item.status }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ attachment.title.rendered }}
+
+
+
+
+
+ + {{ open ? $i18n.get('label_collapse_all') : $i18n.get('label_expand_all') }} +
+
-
@@ -101,24 +137,36 @@
return {
collectionId: Number,
itemId: Number,
- isLoading: false
+ isLoading: false,
+ open: false,
}
},
methods: {
...mapActions('item', [
'fetchItem',
- 'fetchAttachments'
+ 'fetchAttachments',
+ 'fetchFields',
]),
...mapGetters('item', [
'getItem',
+ 'getFields',
'getAttachments'
]),
+ loadMetadata() {
+ // Obtains Item Field
+ this.fetchFields(this.itemId).then(() => {
+ this.isLoading = false;
+ });
+ },
},
computed: {
item() {
return this.getItem();
},
- attachments() {
+ fieldList() {
+ return JSON.parse(JSON.stringify(this.getFields()));
+ },
+ attachmentsList() {
return this.getAttachments();
}
},
@@ -129,11 +177,10 @@
// Puts loading on Item Loading
this.isLoading = true;
- let loadingInstance = this;
// Obtains Item
this.fetchItem(this.itemId).then(() => {
- loadingInstance.isLoading = false;
+ this.loadMetadata();
});
// Get attachments
@@ -142,3 +189,80 @@
}
+
+
+
+ + {{ open ? $i18n.get('label_collapse_all') : $i18n.get('label_expand_all') }} +
-
-
-
-
-
- --
- -- - {{ metadata.name }} - -
-
-
-
-
+
-
+
- --
- -- - {{ $i18n.get('label_attachments') }} - -