Skip to content

Commit

Permalink
feat: Allow to save a Site as Template - MEED-8092 - Meeds-io/MIPs#173 (
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker authored and exo-swf committed Jan 17, 2025
1 parent 4343353 commit 4ee4cd7
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
v-if="description"
v-sanitized-html="description"
:title="$utils.htmlToText(description)"
class="flex-grow-0 flex-shrink-0 subtitle-2 text-truncate-2 pt-0 text-sub-title"></div>
class="flex-grow-0 flex-shrink-0 text-truncate-2 pt-0 text-subtitle"></div>
<div class="d-flex flex-grow-1 flex-shrink-1 justify-center mt-2 overflow-hidden">
<layout-image-illustration
ref="illustration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
:key="application.id"
dense>
<v-list-item-content>
<v-list-item-title class="subtitle-2 text-color">
<v-list-item-title>
<v-card
v-on="application.illustrationId && {
click: () => openIllustration(application)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<site-navigation-node-drawer />
<site-navigation-element-drawer />
<manage-permissions-drawer />
<site-template-drawer />
<layout-analytics application-name="siteManagement" />
</v-app>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
<tr>
<!-- Illustration -->
<!-- name -->
<td colspan="2" align="left" class="pe-0">
<td
colspan="2"
align="left"
class="pe-0">
<div class="d-flex align-center text-start">
<v-card
color="transparent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
v-if="isPortalSite && !isGlobalSite"
:aria-label="$t('siteManagement.label.properties')"
role="button"
class="subtitle-2 px-3"
class="px-3"
@click="openSitePropertiesDrawer">
<v-card
color="transparent"
Expand All @@ -61,7 +61,7 @@
<v-list-item
:aria-label="$t('siteManagement.label.navigation')"
role="button"
class="subtitle-2 px-3"
class="px-3"
@click="openSiteNavigationDrawer">
<v-card
color="transparent"
Expand All @@ -81,7 +81,7 @@
v-if="!isGlobalSite"
:aria-label="$t('siteManagement.label.manageAccess')"
role="button"
class="subtitle-2 px-3"
class="px-3"
@click="$root.$emit('open-manage-permissions-drawer', site, true, true)">
<v-card
color="transparent"
Expand All @@ -97,6 +97,21 @@
<span class="ps-1">{{ $t('siteManagement.label.manageAccess') }}</span>
</v-list-item-title>
</v-list-item>
<v-list-item
dense
@click="saveAsTemplate">
<v-card
color="transparent"
min-width="15"
flat>
<v-icon size="13">
fa-columns
</v-icon>
</v-card>
<v-list-item-title class="ps-2">
{{ $t('sites.saveAsSiteTemplate') }}
</v-list-item-title>
</v-list-item>
<v-tooltip
v-if="canEditSite"
:disabled="canDelete"
Expand Down Expand Up @@ -188,6 +203,9 @@ export default {
openSitePropertiesDrawer() {
this.$root.$emit('open-site-properties-drawer', this.site);
},
saveAsTemplate() {
this.$root.$emit('site-template-add', null, this.site.siteId);
},
}
};
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
<tr>
<!-- Illustration -->
<!-- name -->
<td colspan="2" align="left" class="pe-0">
<td
colspan="2"
align="left"
class="pe-0">
<div class="d-flex align-center text-start">
<v-card
color="transparent"
Expand Down

0 comments on commit 4ee4cd7

Please sign in to comment.