Fixes missing collection name on Filters and Metadata list. Replaces some assets for plugin page.

This commit is contained in:
Mateus Machado Luna 2018-11-20 11:37:14 -02:00
parent cdcd673a00
commit d899dd7a85
8 changed files with 106 additions and 3 deletions

View File

@ -1,7 +1,20 @@
<template> <template>
<div class="filters-list-page"> <div class="filters-list-page">
<b-loading :active.sync="isLoadingMetadatumTypes"/> <b-loading :active.sync="isLoadingMetadatumTypes"/>
<tainacan-title v-if="!isRepositoryLevel"/> <div
v-if="!isRepositoryLevel"
class="tainacan-page-title">
<h1>
{{ $i18n.get('title_collection_filters_edition') + ' ' }}
<span style="font-weight: 600;">{{ collectionName }}</span>
</h1>
<a
@click="$router.go(-1)"
class="back-link has-text-secondary">
{{ $i18n.get('back') }}
</a>
<hr>
</div>
<p v-if="isRepositoryLevel">{{ $i18n.get('info_repository_filters_inheritance') }}</p> <p v-if="isRepositoryLevel">{{ $i18n.get('info_repository_filters_inheritance') }}</p>
<br> <br>
<div class="columns"> <div class="columns">
@ -207,6 +220,7 @@ export default {
data(){ data(){
return { return {
collectionId: '', collectionId: '',
collectionName: '',
isRepositoryLevel: false, isRepositoryLevel: false,
isDraggingFromAvailable: false, isDraggingFromAvailable: false,
isLoadingMetadatumTypes: true, isLoadingMetadatumTypes: true,
@ -284,6 +298,9 @@ export default {
...mapGetters('metadata', [ ...mapGetters('metadata', [
'getMetadata', 'getMetadata',
]), ]),
...mapActions('collection', [
'fetchCollectionName'
]),
handleChange($event) { handleChange($event) {
if ($event.added) { if ($event.added) {
this.addNewFilter($event.added.element, $event.added.newIndex); this.addNewFilter($event.added.element, $event.added.newIndex);
@ -494,6 +511,13 @@ export default {
.catch(() => { .catch(() => {
this.isLoadingFilters = false; this.isLoadingFilters = false;
}); });
// Obtains collection name
this.fetchCollectionName(this.collectionId).then((collectionName) => {
this.collectionName = collectionName;
});
} }
} }
</script> </script>
@ -504,6 +528,35 @@ export default {
.filters-list-page { .filters-list-page {
.tainacan-page-title {
margin-bottom: 40px;
display: flex;
flex-wrap: wrap;
align-items: flex-end;
justify-content: space-between;
h1, h2 {
font-size: 20px;
font-weight: 500;
color: $gray5;
display: inline-block;
width: 80%;
flex-shrink: 1;
flex-grow: 1;
}
a.back-link{
font-weight: 500;
float: right;
margin-top: 5px;
}
hr{
margin: 3px 0px 4px 0px;
height: 1px;
background-color: $secondary;
width: 100%;
}
}
.column:not(.available-metadata-area){ .column:not(.available-metadata-area){
overflow: hidden; overflow: hidden;
flex-grow: 2; flex-grow: 2;

View File

@ -2,7 +2,20 @@
<div class="metadata-list-page"> <div class="metadata-list-page">
<b-loading :active.sync="isLoadingMetadatumTypes"/> <b-loading :active.sync="isLoadingMetadatumTypes"/>
<b-loading :active.sync="isLoadingMetadatumMappers"/> <b-loading :active.sync="isLoadingMetadatumMappers"/>
<tainacan-title v-if="!isRepositoryLevel"/> <div
v-if="!isRepositoryLevel"
class="tainacan-page-title">
<h1>
{{ $i18n.get('title_collection_metadata_edition') + ' ' }}
<span style="font-weight: 600;">{{ collectionName }}</span>
</h1>
<a
@click="$router.go(-1)"
class="back-link has-text-secondary">
{{ $i18n.get('back') }}
</a>
<hr>
</div>
<p v-if="isRepositoryLevel">{{ $i18n.get('info_repository_metadata_inheritance') }}</p> <p v-if="isRepositoryLevel">{{ $i18n.get('info_repository_metadata_inheritance') }}</p>
<br> <br>
<b-tabs v-model="activeTab"> <b-tabs v-model="activeTab">
@ -457,6 +470,9 @@ export default {
'getMetadata', 'getMetadata',
'getMetadatumMappers' 'getMetadatumMappers'
]), ]),
...mapActions('collection', [
'fetchCollectionName'
]),
handleChange(event) { handleChange(event) {
if (event.added) { if (event.added) {
this.addNewMetadatum(event.added.element, event.added.newIndex); this.addNewMetadatum(event.added.element, event.added.newIndex);
@ -784,6 +800,11 @@ export default {
.catch(() => { .catch(() => {
this.isLoadingMetadatumMappers = false; this.isLoadingMetadatumMappers = false;
}); });
// Obtains collection name
this.fetchCollectionName(this.collectionId).then((collectionName) => {
this.collectionName = collectionName;
});
} }
} }
</script> </script>
@ -794,6 +815,35 @@ export default {
.metadata-list-page { .metadata-list-page {
.tainacan-page-title {
margin-bottom: 40px;
display: flex;
flex-wrap: wrap;
align-items: flex-end;
justify-content: space-between;
h1, h2 {
font-size: 20px;
font-weight: 500;
color: $gray5;
display: inline-block;
width: 80%;
flex-shrink: 1;
flex-grow: 1;
}
a.back-link{
font-weight: 500;
float: right;
margin-top: 5px;
}
hr{
margin: 3px 0px 4px 0px;
height: 1px;
background-color: $secondary;
width: 100%;
}
}
.column:not(.available-metadata-area){ .column:not(.available-metadata-area){
overflow: hidden; overflow: hidden;
flex-grow: 2; flex-grow: 2;

View File

@ -77,7 +77,7 @@ If you have Imagick installed in your server, Tainacan will be able to automatic
== Screenshots == == Screenshots ==
1. Manage collections 1. Manage your repository
2. Set up your collection 2. Set up your collection
3. Choose the metadata and filters for your collection 3. Choose the metadata and filters for your collection
4. Add items described by your metadata 4. Add items described by your metadata

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 KiB

After

Width:  |  Height:  |  Size: 440 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 172 KiB