Thumnail placeholder images on Table, Cards and Records view mode for theme.

This commit is contained in:
mateuswetah 2018-08-02 21:04:19 -03:00
parent a7c169f8dd
commit 5137e7fc12
4 changed files with 1718 additions and 1703 deletions

3402
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -75,6 +75,11 @@ export default {
items: Array, items: Array,
isLoading: false isLoading: false
}, },
data () {
return {
thumbPlaceholderPath: tainacan_plugin.base_url + '/admin/images/placeholder_square.png'
}
},
methods: { methods: {
goToItemPage(item) { goToItemPage(item) {
window.location.href = item.url; window.location.href = item.url;

View File

@ -73,7 +73,12 @@ export default {
collectionId: Number, collectionId: Number,
displayedMetadata: Array, displayedMetadata: Array,
items: Array, items: Array,
isLoading: false isLoading: false,
},
data () {
return {
thumbPlaceholderPath: tainacan_plugin.base_url + '/admin/images/placeholder_square.png'
}
}, },
methods: { methods: {
goToItemPage(item) { goToItemPage(item) {

View File

@ -74,7 +74,7 @@
<span v-if="column.metadatum == 'row_thumbnail'"> <span v-if="column.metadatum == 'row_thumbnail'">
<img <img
class="table-thumb" class="table-thumb"
:src="item[column.slug].thumb"> :src="item[column.slug].thumb ? item[column.slug].thumb : thumbPlaceholderPath">
</span> </span>
<p <p
v-tooltip="{ v-tooltip="{
@ -105,6 +105,11 @@ export default {
items: Array, items: Array,
isLoading: false isLoading: false
}, },
data () {
return {
thumbPlaceholderPath: tainacan_plugin.base_url + '/admin/images/placeholder_square.png'
}
},
methods: { methods: {
goToItemPage(item) { goToItemPage(item) {
window.location.href = item.url; window.location.href = item.url;