-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow to edit Page Template Layout - MEED-6847 - Meeds-io/MIPs#133
- Loading branch information
Showing
11 changed files
with
160 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...p/src/main/webapp/vue-app/layout-editor/components/toolbar/actions/SaveTemplateButton.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<!-- | ||
This file is part of the Meeds project (https://meeds.io/). | ||
Copyright (C) 2020 - 2024 Meeds Association [email protected] | ||
This program is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
License as published by the Free Software Foundation; either | ||
version 3 of the License, or (at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Lesser General Public License for more details. | ||
You should have received a copy of the GNU Lesser General Public License | ||
along with this program; if not, write to the Free Software Foundation, | ||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
--> | ||
<template> | ||
<v-btn | ||
:disabled="disabled" | ||
:loading="loading" | ||
:aria-label="$t('layout.save')" | ||
class="btn btn-primary d-flex align-center" | ||
elevation="0" | ||
@click="savePageTemplate"> | ||
<span class="text-none">{{ $t('layout.save') }}</span> | ||
</v-btn> | ||
</template> | ||
<script> | ||
export default { | ||
props: { | ||
disabled: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}, | ||
data: () => ({ | ||
loading: false, | ||
}), | ||
methods: { | ||
savePageTemplate() { | ||
const pageLayout = this.$layoutUtils.cleanAttributes(this.$root.layout, true, true); | ||
this.$root.$emit('close-alert-message'); | ||
this.loading = true; | ||
this.$pageTemplateService.getPageTemplate(this.$root.pageTemplateId) | ||
.then(pageTemplate => this.$pageTemplateService.updatePageTemplate({ | ||
...pageTemplate, | ||
content: JSON.stringify(pageLayout), | ||
})) | ||
.then(() => { | ||
this.$root.$emit('alert-message', this.$t('pageTemplate.layout.update.success'), 'success'); | ||
}) | ||
.catch(() => this.$root.$emit('alert-message', this.$t('pageTemplate.layout.update.error'), 'error')) | ||
.finally(() => this.loading = false); | ||
}, | ||
}, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 0 additions & 121 deletions
121
...n/webapp/vue-app/page-templates-management/components/list/PageTemplateItemBottomMenu.vue
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.