Better identification for situations where no item or collection or metadata exists yet on repository.

This commit is contained in:
Mateus Machado Luna 2019-10-24 13:47:01 -03:00
parent 9fcc276226
commit d4e1ee4766
6 changed files with 32 additions and 12 deletions

View File

@ -233,7 +233,7 @@
</div> </div>
</b-tab-item> </b-tab-item>
<!-- Exposer --------------- --> <!-- Mapping --------------- -->
<b-tab-item :label="$i18n.get('mapping')"> <b-tab-item :label="$i18n.get('mapping')">
<div> <div>
<section <section
@ -246,10 +246,9 @@
</span> </span>
</p> </p>
<p>{{ $i18n.get('info_there_is_no_metadatum') }}</p> <p>{{ $i18n.get('info_there_is_no_metadatum') }}</p>
<p>{{ $i18n.get('info_create_metadata') }}</p>
</div> </div>
</section> </section>
<section> <section v-else>
<div class="field is-grouped form-submit"> <div class="field is-grouped form-submit">
<b-select <b-select
id="mappers-options-dropdown" id="mappers-options-dropdown"

View File

@ -25,14 +25,20 @@
:key="index" :key="index"
@click="onSelectCollection(collection)"> @click="onSelectCollection(collection)">
<h4>{{ collection.name }}</h4> <h4>{{ collection.name }}</h4>
<p>{{ collection.length > 200 ? (collection.description.substring(0,197) + '...') : collection.description }}</p> <p>{{ collection.description.length > 200 ? (collection.description.substring(0,197) + '...') : collection.description }}</p>
</div>
<div
v-if="collections.length <= 0"
class="block">
<p class="has-text-gray">
{{ $i18n.get('info_no_collection_created') }}
</p>
</div>
</div> </div>
<b-loading <b-loading
:is-full-page="false" :is-full-page="false"
:active.sync="isLoading" :active.sync="isLoading"
:can-cancel="false"/> :can-cancel="false"/>
</div>
<footer class="field is-grouped form-submit"> <footer class="field is-grouped form-submit">
<div class="control"> <div class="control">

View File

@ -18,6 +18,7 @@
</label> </label>
<div <div
v-if="collections && collections.length"
class="block"> class="block">
<div <div
v-for="(collection, key) in collections" v-for="(collection, key) in collections"
@ -31,6 +32,13 @@
</b-checkbox> </b-checkbox>
</div> </div>
</div> </div>
<div
v-else
class="block">
<p class="has-text-gray">
{{ $i18n.get('info_no_collection_created') }}
</p>
</div>
</b-collapse> </b-collapse>
</b-field> </b-field>
</template> </template>

View File

@ -140,7 +140,7 @@
{{ $i18n.getWithVariables('label_view_all_%s_collections', [collectionsTotal]) }} {{ $i18n.getWithVariables('label_view_all_%s_collections', [collectionsTotal]) }}
</span> </span>
<span <span
v-if="collectionsTotal != undefined && collectionsTotal == 1" v-if="collectionsTotal != undefined && collectionsTotal <= 1"
class="menu-text"> class="menu-text">
{{ $i18n.get('label_view_collections_list') }} {{ $i18n.get('label_view_collections_list') }}
</span> </span>

View File

@ -791,13 +791,20 @@
</p> </p>
<router-link <router-link
v-if="!isSortingByCustomMetadata && !hasFiltered && (status == undefined || status == '') && !$route.query.iframemode" v-if="!isRepositoryLevel && !isSortingByCustomMetadata && !hasFiltered && (status == undefined || status == '') && !$route.query.iframemode"
id="button-create-item" id="button-create-item"
tag="button" tag="button"
class="button is-secondary" class="button is-secondary"
:to="{ path: $routerHelper.getNewItemPath(collectionId) }"> :to="{ path: $routerHelper.getNewItemPath(collectionId) }">
{{ $i18n.getFrom('items', 'add_new') }} {{ $i18n.getFrom('items', 'add_new') }}
</router-link> </router-link>
<button
v-else-if="isRepositoryLevel && !isSortingByCustomMetadata && !hasFiltered && (status == undefined || status == '') && !$route.query.iframemode"
id="button-create-item"
class="button is-secondary"
@click="onOpenCollectionsModal">
{{ $i18n.get('add_one_item') }}
</button>
</div> </div>
</section> </section>

View File

@ -533,7 +533,7 @@ return apply_filters( 'tainacan-admin-i18n', [
'info_no_terms_created_on_taxonomy' => __( 'No term was created for this taxonomy.', 'tainacan' ), 'info_no_terms_created_on_taxonomy' => __( 'No term was created for this taxonomy.', 'tainacan' ),
'info_no_terms_found' => __( 'No term was found here', 'tainacan' ), 'info_no_terms_found' => __( 'No term was found here', 'tainacan' ),
'info_no_more_terms_found' => __( 'No more terms found', 'tainacan' ), 'info_no_more_terms_found' => __( 'No more terms found', 'tainacan' ),
'info_no_item_created' => __( 'No item was created in this collection.', 'tainacan' ), 'info_no_item_created' => __( 'No item was created so far.', 'tainacan' ),
'info_no_page_found' => __( 'No page was found with this name.', 'tainacan' ), 'info_no_page_found' => __( 'No page was found with this name.', 'tainacan' ),
'info_no_user_found' => __( 'No user was found with this name.', 'tainacan' ), 'info_no_user_found' => __( 'No user was found with this name.', 'tainacan' ),
'info_no_item_found_filter' => __( 'No item was found here with these filters.', 'tainacan' ), 'info_no_item_found_filter' => __( 'No item was found here with these filters.', 'tainacan' ),
@ -583,7 +583,7 @@ return apply_filters( 'tainacan-admin-i18n', [
'info_warning_taxonomy_not_saved' => __( 'Are you sure? The taxonomy is not saved, changes will be lost.', 'tainacan' ), 'info_warning_taxonomy_not_saved' => __( 'Are you sure? The taxonomy is not saved, changes will be lost.', 'tainacan' ),
'info_warning_terms_not_saved' => __( 'Are you sure? There are terms not saved, changes will be lost.', 'tainacan' ), 'info_warning_terms_not_saved' => __( 'Are you sure? There are terms not saved, changes will be lost.', 'tainacan' ),
'info_warning_orphan_terms' => __( 'Are you sure? This term is parent of other terms. These will be converted to root terms.', 'tainacan' ), 'info_warning_orphan_terms' => __( 'Are you sure? This term is parent of other terms. These will be converted to root terms.', 'tainacan' ),
'info_no_activities' => __( 'No activities', 'tainacan' ), 'info_no_activities' => __( 'No activities yet.', 'tainacan' ),
'info_logs_before' => __( 'Before', 'tainacan' ), 'info_logs_before' => __( 'Before', 'tainacan' ),
'info_logs_after' => __( 'After', 'tainacan' ), 'info_logs_after' => __( 'After', 'tainacan' ),
'info_there_is_no_metadatum' => __( 'There is no metadata here yet.', 'tainacan' ), 'info_there_is_no_metadatum' => __( 'There is no metadata here yet.', 'tainacan' ),