Splits creation date and author in remaining tables. Adds more tooltips to tables.

This commit is contained in:
Mateus Machado Luna 2018-05-25 09:03:52 -03:00
parent de359e1a79
commit dc31c71e64
7 changed files with 108 additions and 27 deletions

View File

@ -78,7 +78,13 @@
@click="goToCategoryEditPage(category.id)"
:label="$i18n.get('label_name')"
:aria-label="$i18n.get('label_name') + ': ' + category.name">
<p>{{ category.name }}</p>
<p
v-tooltip="{
content: category.name,
autoHide: false,
placement: 'auto-start'
}">
{{ category.name }}</p>
</td>
<!-- Description -->
<td
@ -86,7 +92,13 @@
@click="goToCategoryEditPage(category.id)"
:label="$i18n.get('label_description')"
:aria-label="$i18n.get('label_description') + ': ' + category.description">
<p>{{ category.description }}</p>
<p
v-tooltip="{
content: category.description,
autoHide: false,
placement: 'auto-start'
}">
{{ category.description }}</p>
</td>
<!-- Actions -->
<td

View File

@ -54,9 +54,13 @@
<th>
<div class="th-wrap">{{ $i18n.get('label_description') }}</div>
</th>
<!-- Creation -->
<!-- Creation Date -->
<th>
<div class="th-wrap">{{ $i18n.get('label_creation') }}</div>
<div class="th-wrap">{{ $i18n.get('label_creation_date') }}</div>
</th>
<!-- Created By -->
<th>
<div class="th-wrap">{{ $i18n.get('label_created_by') }}</div>
</th>
<th class="actions-header">
&nbsp;
@ -95,7 +99,13 @@
@click="goToCollectionPage(collection.id)"
:label="$i18n.get('label_name')"
:aria-label="$i18n.get('label_name') + ': ' + collection.name">
<p>{{ collection.name }}</p>
<p
v-tooltip="{
content: collection.name,
autoHide: false,
placement: 'auto-start'
}">
{{ collection.name }}</p>
</td>
<!-- Description -->
<td
@ -103,15 +113,41 @@
@click="goToCollectionPage(collection.id)"
:label="$i18n.get('label_description')"
:aria-label="$i18n.get('label_description') + ': ' + collection.description">
<p>{{ collection.description }}</p>
<p
v-tooltip="{
content: collection.description,
autoHide: false,
placement: 'auto-start'
}">
{{ collection.description }}</p>
</td>
<!-- Creation -->
<!-- Creation Date -->
<td
@click="goToCollectionPage(collection.id)"
class="table-creation column-default-width"
:label="$i18n.get('label_creation')"
:aria-label="$i18n.get('label_creation') + ': ' + collection.creation">
<p v-html="collection.creation" />
:label="$i18n.get('label_creation_date')"
:aria-label="$i18n.get('label_creation_date') + ': ' + collection.creation_date">
<p
v-tooltip="{
content: collection.creation_date,
autoHide: false,
placement: 'auto-start'
}"
v-html="collection.creation_date" />
</td>
<!-- Created by -->
<td
@click="goToCollectionPage(collection.id)"
class="table-creation column-default-width"
:label="$i18n.get('label_created_by')"
:aria-label="$i18n.get('label_created_by') + ': ' + collection.author_name">
<p
v-tooltip="{
content: collection.author_name,
autoHide: false,
placement: 'auto-start'
}"
v-html="collection.author_name" />
</td>
<!-- Actions -->
<td

View File

@ -8,9 +8,13 @@
<th>
<div class="th-wrap">{{ $i18n.get('label_event_title') }}</div>
</th>
<!-- Who and When -->
<!-- Created by -->
<th>
<div class="th-wrap">{{ $i18n.get('label_who_when') }}</div>
<div class="th-wrap">{{ $i18n.get('label_created_by') }}</div>
</th>
<!-- Event date -->
<th>
<div class="th-wrap">{{ $i18n.get('label_event_date') }}</div>
</th>
<!-- Status -->
<!--<th>-->
@ -28,15 +32,40 @@
@click="goToEventPage(event.id)"
:label="$i18n.get('label_event_title')"
:aria-label="$i18n.get('label_event_title') + ': ' + event.title">
<p>{{ event.title }}</p>
<p
v-tooltip="{
content: event.title,
autoHide: false,
placement: 'auto-start'
}">{{ event.title }}</p>
</td>
<!-- Who and When -->
<!-- User -->
<td
class="table-creation column-small-width"
@click="goToEventPage(event.id)"
:label="$i18n.get('label_who_when')"
:aria-label="$i18n.get('label_who_when') + ': ' + event.by">
<p v-html="event.by" />
:label="$i18n.get('label_created_by')"
:aria-label="$i18n.get('label_created_by') + ': ' + event.user_name">
<p
v-tooltip="{
content: event.user_name,
autoHide: false,
placement: 'auto-start'
}"
v-html="event.user_name" />
</td>
<!-- Event Date -->
<td
class="table-creation column-small-width"
@click="goToEventPage(event.id)"
:label="$i18n.get('label_event_date')"
:aria-label="$i18n.get('label_event_date') + ': ' + event.log_date">
<p
v-tooltip="{
content: event.log_date,
autoHide: false,
placement: 'auto-start'
}"
v-html="event.log_date" />
</td>
<!-- Status -->
<!--<td-->

View File

@ -112,7 +112,8 @@
v-tooltip="{
content: renderMetadata( item.metadata[column.slug] ),
html: true,
autoHide: false
autoHide: false,
placement: 'auto-start'
}"
v-if="item.metadata != undefined &&
column.field !== 'row_thumbnail' &&
@ -126,7 +127,14 @@
class="table-thumb"
:src="item[column.slug].thumb">
</span>
<p v-if="column.field == 'row_author' || column.field == 'row_creation'">
<p
v-tooltip="{
content: item[column.slug],
html: true,
autoHide: false,
placement: 'auto-start'
}"
v-if="column.field == 'row_author' || column.field == 'row_creation'">
{{ item[column.slug] }}
</p>

View File

@ -183,12 +183,8 @@ export default {
}
},
computed: {
collections(){
let collectionsList = this.getCollections();
for (let collection of collectionsList)
collection['creation'] = this.$i18n.get('info_created_by') + collection['author_name'] + '<br>' + this.$i18n.get('info_date') + collection['creation_date'];
return collectionsList;
collections() {
return this.getCollections();
}
},
created() {

View File

@ -153,7 +153,7 @@ return [
'label_term_without_name' => __( 'Term without name', 'tainacan' ),
'label_inherited' => __( 'Inherited', 'tainacan' ),
'label_sorting' => __( 'Sorting', 'tainacan' ),
'label_who_when' => __( 'Who and when', 'tainacan' ),
'label_event_date' => __( 'Event date', 'tainacan' ),
'label_event_title' => __( 'Event', 'tainacan' ),
'label_header_image' => __( 'Header Image', 'tainacan' ),
'label_empty_header_image' => __( 'Empty Header Image', 'tainacan' ),

View File

@ -46,7 +46,7 @@ export const filter_type_mixin = {
.then(res => {
if (res.data.length > 0) {
for (let item of res.data) {
this.options.push({label: item.title, value: item.id, img: item.thumbnail });
this.options.push({label: item.title, value: item.id, img: item.thumbnail.thumb });
}
}
})