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>
</b-tab-item>
<!-- Exposer --------------- -->
<!-- Mapping --------------- -->
<b-tab-item :label="$i18n.get('mapping')">
<div>
<section
@ -245,11 +245,10 @@
<i class="tainacan-icon tainacan-icon-36px tainacan-icon-metadata"/>
</span>
</p>
<p>{{ $i18n.get('info_there_is_no_metadatum') }}</p>
<p>{{ $i18n.get('info_create_metadata') }}</p>
<p>{{ $i18n.get('info_there_is_no_metadatum') }}</p>
</div>
</section>
<section>
<section v-else>
<div class="field is-grouped form-submit">
<b-select
id="mappers-options-dropdown"

View File

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

View File

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

View File

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

View File

@ -791,13 +791,20 @@
</p>
<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"
tag="button"
class="button is-secondary"
:to="{ path: $routerHelper.getNewItemPath(collectionId) }">
{{ $i18n.getFrom('items', 'add_new') }}
</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>
</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_found' => __( 'No term was found here', '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_user_found' => __( 'No user was found with this name.', '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_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_no_activities' => __( 'No activities', 'tainacan' ),
'info_no_activities' => __( 'No activities yet.', 'tainacan' ),
'info_logs_before' => __( 'Before', 'tainacan' ),
'info_logs_after' => __( 'After', 'tainacan' ),
'info_there_is_no_metadatum' => __( 'There is no metadata here yet.', 'tainacan' ),