Skip to content

Commit

Permalink
feat: Re-use Portlet instance name and description I18 for Portlets -…
Browse files Browse the repository at this point in the history
… MEED-6904 - Meeds-io/MIPs#139 (#87)
  • Loading branch information
boubaker committed Jun 4, 2024
1 parent 973b5d9 commit f4602d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@
@mouseout="menu = false"
@focusout="menu = false">
<v-list-item-group v-model="listItem">
<v-list-item
dense
@click="$root.$emit('portlet-instance-category-edit', category)">
<v-icon size="13">
fa-edit
</v-icon>
<v-list-item-title class="ps-2">
{{ $t('portlets.label.edit') }}
</v-list-item-title>
</v-list-item>
<v-tooltip :disabled="!category.system" bottom>
<template #activator="{ on, attrs }">
<div
v-on="on"
v-bind="attrs">
<v-list-item
dense
@click="$root.$emit('portlet-instance-category-edit', category)">
<v-icon size="13">
fa-edit
</v-icon>
<v-list-item-title class="ps-2">
{{ $t('portlets.label.edit') }}
</v-list-item-title>
</v-list-item>
<v-list-item
:disabled="category.system"
dense
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ export default {
return this.portlet?.id;
},
name() {
return this.$te(this.portlet?.name) ? this.$t(this.portlet?.name) : this.portlet?.name;
return this.$te(`layout.portletInstance.${this.portlet?.portletName}.name`) ? this.$t(`layout.portletInstance.${this.portlet?.portletName}.name`) : this.portlet?.name;
},
description() {
return this.$te(this.portlet?.description) ? this.$t(this.portlet?.description) : this.portlet?.description;
return this.$te(`layout.portletInstance.${this.portlet?.portletName}.description`) ? this.$t(`layout.portletInstance.${this.portlet?.portletName}.description`) : this.portlet?.description;
},
instancesCount() {
return this.$root.portletInstances.filter(a => a.contentId === this.portlet.contentId).length || 0;
Expand Down

0 comments on commit f4602d4

Please sign in to comment.