mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
- Admin Panel / Layout / Custom HTML after <body> start, and Custom HTML before </body> end.
In progress, does not work yet. Thanks to xet7 !
This commit is contained in:
parent
a42d9871bd
commit
f1ed6304a4
7 changed files with 48 additions and 2 deletions
|
@ -12,6 +12,7 @@ template(name="board")
|
|||
+spinner
|
||||
|
||||
template(name="boardBody")
|
||||
| {{currentSetting.customHTMLafterBodyStart}}
|
||||
.board-wrapper(class=currentBoard.colorClass)
|
||||
+sidebar
|
||||
.board-canvas.js-swimlanes.js-perfect-scrollbar(
|
||||
|
@ -27,6 +28,7 @@ template(name="boardBody")
|
|||
+listsGroup
|
||||
if isViewCalendar
|
||||
+calendarView
|
||||
| {{currentSetting.customHTMLbeforeBodyEnd}}
|
||||
|
||||
template(name="calendarView")
|
||||
.calendar-view.swimlane
|
||||
|
|
|
@ -145,5 +145,11 @@ template(name='layoutSettings')
|
|||
.title {{_ 'custom-product-name'}}
|
||||
.form-group
|
||||
input.form-control#product-name(type="text", placeholder="Wekan" value="{{currentSetting.productName}}")
|
||||
li.layout-form
|
||||
.title {{_ 'add-custom-html-after-body-start'}}
|
||||
textarea#customHTMLafterBodyStart.form-control= currentSetting.customHTMLafterBodyStart
|
||||
li.layout-form
|
||||
.title {{_ 'add-custom-html-before-body-end'}}
|
||||
textarea#customHTMLbeforeBodyEnd.form-control= currentSetting.customHTMLbeforeBodyEnd
|
||||
li
|
||||
button.js-save-layout.primary {{_ 'save'}}
|
||||
|
|
|
@ -140,6 +140,8 @@ BlazeComponent.extendComponent({
|
|||
|
||||
const productName = $('#product-name').val().trim();
|
||||
const hideLogoChange = ($('input[name=hideLogo]:checked').val() === 'true');
|
||||
const customHTMLafterBodyStart = $('#customHTMLafterBodyStart').val().trim();
|
||||
const customHTMLbeforeBodyEnd = $('#customHTMLbeforeBodyEnd').val().trim();
|
||||
|
||||
try {
|
||||
|
||||
|
@ -147,6 +149,8 @@ BlazeComponent.extendComponent({
|
|||
$set: {
|
||||
productName,
|
||||
hideLogo: hideLogoChange,
|
||||
customHTMLafterBodyStart,
|
||||
customHTMLbeforeBodyEnd,
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
|
|
|
@ -618,5 +618,7 @@
|
|||
"authentication-type": "Authentication type",
|
||||
"custom-product-name": "Custom Product Name",
|
||||
"layout": "Layout",
|
||||
"hide-logo": "Hide Logo"
|
||||
"hide-logo": "Hide Logo",
|
||||
"add-custom-html-after-body-start": "Add Custom HTML after <body> start",
|
||||
"add-custom-html-before-body-end": "Add Custom HTML before </body> end"
|
||||
}
|
||||
|
|
|
@ -32,6 +32,14 @@ Settings.attachSchema(new SimpleSchema({
|
|||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
customHTMLafterBodyStart: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
customHTMLbeforeBodyEnd: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
hideLogo: {
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
|
|
|
@ -374,3 +374,27 @@ Migrations.add('add-hide-logo', () => {
|
|||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
|
||||
Migrations.add('add-custom-html-after-body-start', () => {
|
||||
Settings.update({
|
||||
customHTMLafterBodyStart: {
|
||||
$exists: false,
|
||||
},
|
||||
}, {
|
||||
$set: {
|
||||
customHTMLafterBodyStart:'',
|
||||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
|
||||
Migrations.add('add-custom-html-before-body-end', () => {
|
||||
Settings.update({
|
||||
customHTMLbeforeBodyEnd: {
|
||||
$exists: false,
|
||||
},
|
||||
}, {
|
||||
$set: {
|
||||
customHTMLbeforeBodyEnd:'',
|
||||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Meteor.publish('setting', () => {
|
||||
return Settings.find({}, {fields:{disableRegistration: 1, productName: 1, hideLogo: 1}});
|
||||
return Settings.find({}, {fields:{disableRegistration: 1, productName: 1, hideLogo: 1, customHTMLafterBodyStart: 1, customHTMLbeforeBodyEnd: 1}});
|
||||
});
|
||||
|
||||
Meteor.publish('mailServer', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue