Adds parent=any paramether to fetch all metadata on the edition list. #17.
This commit is contained in:
parent
bb1d86e25c
commit
789df4435d
|
@ -38,8 +38,8 @@
|
|||
'not-sortable-item': isRepositoryLevel || metadatum.id == undefined || openedMetadatumId != '' || isUpdatingMetadataOrder,
|
||||
'not-focusable-item': openedMetadatumId == metadatum.id,
|
||||
'disabled-metadatum': metadatum.enabled == false,
|
||||
'inherited-metadatum': (metadatum.collection_id != collectionId && metadatum.parent == 0) || isRepositoryLevel,
|
||||
'child-metadatum': (metadatum.parent > 0)
|
||||
'inherited-metadatum': metadatum.collection_id != collectionId || isRepositoryLevel,
|
||||
'child-metadatum': metadatum.parent > 0
|
||||
}"
|
||||
:key="metadatum.id">
|
||||
<div class="handle">
|
||||
|
@ -651,7 +651,8 @@ export default {
|
|||
collectionId: this.collectionId,
|
||||
isRepositoryLevel: this.isRepositoryLevel,
|
||||
isContextEdit: true,
|
||||
includeDisabled: true
|
||||
includeDisabled: true,
|
||||
parent: 'any'
|
||||
}).then((resp) => {
|
||||
resp.request
|
||||
.then(() => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import axios from '../../../axios';
|
||||
|
||||
export const fetchMetadata = ({commit}, {collectionId, isRepositoryLevel, isContextEdit, includeDisabled, isAdvancedSearch}) => {
|
||||
export const fetchMetadata = ({commit}, {collectionId, isRepositoryLevel, isContextEdit, includeDisabled, isAdvancedSearch, parent}) => {
|
||||
|
||||
const source = axios.CancelToken.source();
|
||||
|
||||
|
@ -20,6 +20,9 @@ export const fetchMetadata = ({commit}, {collectionId, isRepositoryLevel, isCont
|
|||
if (includeDisabled)
|
||||
endpoint += '&include_disabled=' + includeDisabled;
|
||||
|
||||
if (parent)
|
||||
endpoint += '&parent=' + parent;
|
||||
|
||||
axios.tainacan.get(endpoint, { cancelToken: source.token })
|
||||
.then((res) => {
|
||||
let metadata = res.data;
|
||||
|
|
|
@ -71,9 +71,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
.metadata-list-page {
|
||||
.metadata-list-page {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue