Skip to content

Commit

Permalink
feat: Allow to access Page Template Preview from name - MEED-6889 - M…
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker committed May 20, 2024
1 parent 6daf328 commit bf78085
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
<!-- name -->
<td
:width="$root.isMobile && '100%' || 'auto'"
align="left"
class="text-truncate"
v-sanitized-html="name"></td>
align="left">
<v-card
v-sanitized-html="name"
class="text-truncate transparent"
flat
@click="$root.$emit('page-templates-illustration-preview', illustrationSrc)" />
</td>
<!-- description -->
<td
v-if="!$root.isMobile"
Expand Down Expand Up @@ -70,6 +74,12 @@ export default {
description() {
return this.$te(this.pageTemplate?.description) ? this.$t(this.pageTemplate?.description) : this.pageTemplate?.description;
},
illustrationId() {
return this.pageTemplate?.illustrationId;
},
illustrationSrc() {
return this.illustrationId && `${eXo.env.portal.context}/${eXo.env.portal.rest}/v1/social/attachments/pageTemplate/${this.pageTemplateId}/${this.illustrationId}` || '/layout/images/page-templates/DefaultPreview.webp';
},
category() {
const i18nKey = `layout.pageTemplate.category.${this.pageTemplate?.category}`;
return this.pageTemplate?.category
Expand Down

0 comments on commit bf78085

Please sign in to comment.