|
| 1 | +(()=>{var l=`{% block sw_mail_template_list_grid %} |
| 2 | +<sw-card |
| 3 | + :title="$tc('sw-mail-template.list.titleMailTemplateList')" |
| 4 | + position-identifier="sw-mail-template-list" |
| 5 | +> |
| 6 | +
|
| 7 | + <template> |
| 8 | + {% block sw_mail_template_list_grid_empty_state %} |
| 9 | + <sw-empty-state |
| 10 | + v-if="!isLoading && !showListing" |
| 11 | + :title="$tc('sw-mail-template.list.emptyStateTitle')" |
| 12 | + :subline="$tc('sw-mail-template.list.emptyStateSubTitle')" |
| 13 | + :absolute="false" |
| 14 | + > |
| 15 | +
|
| 16 | + {% block sw_mail_template_list_grid_empty_state_icon %} |
| 17 | + <template #icon> |
| 18 | + <img |
| 19 | + :src="'/administration/static/img/empty-states/settings-empty-state.svg' | asset" |
| 20 | + alt="" |
| 21 | + > |
| 22 | + </template> |
| 23 | + {% endblock %} |
| 24 | +
|
| 25 | + </sw-empty-state> |
| 26 | + {% endblock %} |
| 27 | + </template> |
| 28 | +
|
| 29 | + <template #grid> |
| 30 | + <sw-entity-listing |
| 31 | + v-if="isLoading || showListing" |
| 32 | + id="mailTemplateGrid" |
| 33 | + class="sw-mail-templates-list-grid" |
| 34 | + detail-route="sw.mail.template.detail" |
| 35 | + identifier="sw-mail-template-list" |
| 36 | + :items="mailTemplates" |
| 37 | + :columns="getListColumns()" |
| 38 | + :repository="mailTemplateRepository" |
| 39 | + :full-page="false" |
| 40 | + :is-loading="isLoading" |
| 41 | + :allow-view="acl.can('mail_templates.viewer')" |
| 42 | + :allow-edit="acl.can('mail_templates.editor')" |
| 43 | + :allow-delete="acl.can('mail_templates.deleter')" |
| 44 | + :show-selection="acl.can('mail_templates.deleter')" |
| 45 | + :skeleton-item-amount="skeletonItemAmount" |
| 46 | + @update-records="updateRecords" |
| 47 | + > |
| 48 | + {% block sw_mail_template_list_grid_columns_frosh_template_mail %} |
| 49 | + <template #column-froshTemplateMail="{ item }"> |
| 50 | + <sw-label |
| 51 | + appearance="circle" |
| 52 | + :variant="item.extensions?.froshTemplateMail.subject ? 'success' : 'warning'" |
| 53 | + v-tooltip="getFroshTooltip('subject', item.extensions.froshTemplateMail.subject)" |
| 54 | + > |
| 55 | + <sw-icon name="regular-exclamation-s" small /> |
| 56 | + </sw-label> |
| 57 | + <sw-label |
| 58 | + appearance="circle" |
| 59 | + :variant="item.extensions?.froshTemplateMail.plain ? 'success' : 'warning'" |
| 60 | + v-tooltip="getFroshTooltip('plain', item.extensions.froshTemplateMail.plain)" |
| 61 | + > |
| 62 | + <sw-icon name="regular-align-left" small /> |
| 63 | + </sw-label> |
| 64 | + <sw-label |
| 65 | + appearance="circle" |
| 66 | + :variant="item.extensions?.froshTemplateMail.html ? 'success' : 'warning'" |
| 67 | + v-tooltip="getFroshTooltip('html', item.extensions.froshTemplateMail.html)" |
| 68 | + > |
| 69 | + <sw-icon name="regular-code" small /> |
| 70 | + </sw-label> |
| 71 | + </template> |
| 72 | + {% endblock %} |
| 73 | +
|
| 74 | + {% block sw_mail_template_list_grid_columns_technical_name %} |
| 75 | + <template #column-technicalName="{ item }"> |
| 76 | + {{ item.extensions.froshTemplateMail.technicalName }} |
| 77 | + </template> |
| 78 | + {% endblock %} |
| 79 | +
|
| 80 | + <template #more-actions="{ item }"> |
| 81 | + {% block sw_mail_template_list_grid_columns_actions_duplicate %} |
| 82 | + <sw-context-menu-item |
| 83 | + class="sw-mail-template-list-grid__duplicate-action" |
| 84 | + :disabled="!acl.can('mail_templates.creator')" |
| 85 | + @click="onDuplicate(item.id)" |
| 86 | + > |
| 87 | + {{ $tc('sw-mail-template.list.contextMenuDuplicate') }} |
| 88 | + </sw-context-menu-item> |
| 89 | + {% endblock %} |
| 90 | + </template> |
| 91 | + </sw-entity-listing> |
| 92 | + </template> |
| 93 | +</sw-card> |
| 94 | +{% endblock %} |
| 95 | +`;Shopware.Component.override("sw-mail-template-list",{template:l,methods:{getListColumns(){let e=this.$super("getListColumns");return e.unshift({property:"froshTemplateMail",label:"sw-mail-template.list.columnTemplateMail",allowResize:!0},{property:"technicalName",label:"sw-mail-template.list.columnTechnicalName",allowResize:!0,visible:!1}),e},getFroshTooltip(e,t){return{message:t?this.$t(`sw-mail-template.frosh.${e}`,{folder:t}):this.$t("sw-mail-template.frosh.noTemplate")}}}});var a=`{% block sw_mail_template_options_form_subject_field %} |
| 96 | + {% parent %} |
| 97 | + <sw-label |
| 98 | + v-if="mailTemplate.extensions.froshTemplateMail" |
| 99 | + appearance="circle" |
| 100 | + :variant="mailTemplate.extensions.froshTemplateMail.subject ? 'success' : 'warning'" |
| 101 | + v-tooltip="getFroshTooltip('subject', mailTemplate.extensions.froshTemplateMail.subject)" |
| 102 | + > |
| 103 | + <sw-icon name="regular-exclamation-s" small /> |
| 104 | + </sw-label> |
| 105 | +{% endblock %} |
| 106 | +
|
| 107 | +{% block sw_mail_template_mail_text_form_content_plain_field %} |
| 108 | + {% parent %} |
| 109 | + <sw-label |
| 110 | + v-if="mailTemplate.extensions.froshTemplateMail" |
| 111 | + appearance="circle" |
| 112 | + :variant="mailTemplate.extensions.froshTemplateMail.plain ? 'success' : 'warning'" |
| 113 | + v-tooltip="getFroshTooltip('plain', mailTemplate.extensions.froshTemplateMail.plain)" |
| 114 | + > |
| 115 | + <sw-icon name="regular-align-left" small /> |
| 116 | + </sw-label> |
| 117 | +{% endblock %} |
| 118 | +
|
| 119 | +{% block sw_mail_template_mail_text_form_content_html_field %} |
| 120 | + {% parent %} |
| 121 | + <sw-label |
| 122 | + v-if="mailTemplate.extensions.froshTemplateMail" |
| 123 | + appearance="circle" |
| 124 | + :variant="mailTemplate.extensions.froshTemplateMail.html ? 'success' : 'warning'" |
| 125 | + v-tooltip="getFroshTooltip('html', mailTemplate.extensions.froshTemplateMail.html)" |
| 126 | + > |
| 127 | + <sw-icon name="regular-code" small /> |
| 128 | + </sw-label> |
| 129 | +{% endblock %} |
| 130 | +`;Shopware.Component.override("sw-mail-template-detail",{template:a,methods:{getFroshTooltip(e,t){return{message:t?this.$t(`sw-mail-template.frosh.${e}`,{folder:t}):this.$t("sw-mail-template.frosh.noTemplate")}}}});})(); |
0 commit comments