mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 05:27:14 -04:00
Merge branch 'Emile840-master'
This commit is contained in:
commit
47540df916
12 changed files with 64 additions and 4 deletions
|
@ -38,7 +38,8 @@ template(name="header")
|
|||
unless currentSetting.customTopLeftCornerLogoLinkUrl
|
||||
img(src="{{currentSetting.customTopLeftCornerLogoImageUrl}}" height="{{#if currentSetting.customTopLeftCornerLogoHeight}}#{currentSetting.customTopLeftCornerLogoHeight}{{else}}27{{/if}}" width="auto" margin="0" padding="0" alt="{{currentSetting.productName}}" title="{{currentSetting.productName}}")
|
||||
unless currentSetting.customTopLeftCornerLogoImageUrl
|
||||
img(src="{{pathFor '/logo-header.png'}}" alt="{{currentSetting.productName}}" title="{{currentSetting.productName}}")
|
||||
div#headerIsSettingDatabaseCallDone
|
||||
img(src="{{pathFor '/logo-header.png'}}" alt="{{currentSetting.productName}}" title="{{currentSetting.productName}}")
|
||||
span.allBoards
|
||||
a(href="{{pathFor 'home'}}")
|
||||
span.fa.fa-home
|
||||
|
|
|
@ -1,7 +1,23 @@
|
|||
Meteor.subscribe('user-admin');
|
||||
Meteor.subscribe('boards');
|
||||
Meteor.subscribe('setting');
|
||||
Template.header.onCreated(function(){
|
||||
const templateInstance = this;
|
||||
templateInstance.currentSetting = new ReactiveVar();
|
||||
templateInstance.isLoading = new ReactiveVar(false);
|
||||
|
||||
Meteor.subscribe('setting', {
|
||||
onReady() {
|
||||
templateInstance.currentSetting.set(Settings.findOne());
|
||||
let currSetting = templateInstance.currentSetting.curValue;
|
||||
if(currSetting && currSetting !== undefined && currSetting.customLoginLogoImageUrl !== undefined && document.getElementById("headerIsSettingDatabaseCallDone") != null)
|
||||
document.getElementById("headerIsSettingDatabaseCallDone").style.display = 'none';
|
||||
else if(document.getElementById("headerIsSettingDatabaseCallDone") != null)
|
||||
document.getElementById("headerIsSettingDatabaseCallDone").style.display = 'block';
|
||||
return this.stop();
|
||||
},
|
||||
});
|
||||
});
|
||||
Template.header.helpers({
|
||||
wrappedHeader() {
|
||||
return !Session.get('currentBoard');
|
||||
|
|
|
@ -250,3 +250,6 @@
|
|||
p
|
||||
margin: 7px
|
||||
padding: 0
|
||||
|
||||
#headerIsSettingDatabaseCallDone
|
||||
display: none;
|
||||
|
|
|
@ -48,6 +48,11 @@ template(name="userFormsLayout")
|
|||
+Template.dynamic(template=content)
|
||||
if currentSetting.displayAuthenticationMethod
|
||||
+connectionMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
|
||||
if isLegalNoticeLinkExist
|
||||
div#legalNoticeDiv
|
||||
span {{_ 'acceptance_of_our_legalNotice'}}
|
||||
a.at-link(href="{{currentSetting.legalNotice}}", target="_blank", rel="noopener noreferrer")
|
||||
| {{_ 'legalNotice'}}
|
||||
div.at-form-lang
|
||||
select.select-lang.js-userform-set-language
|
||||
each languages
|
||||
|
|
|
@ -77,6 +77,15 @@ Template.userFormsLayout.helpers({
|
|||
// return isSettingDatabaseFctCallDone;
|
||||
// },
|
||||
|
||||
isLegalNoticeLinkExist(){
|
||||
const currSet = Template.instance().currentSetting.get();
|
||||
if(currSet && currSet !== undefined && currSet != null){
|
||||
return currSet.legalNotice !== undefined && currSet.legalNotice.trim() != "";
|
||||
}
|
||||
else
|
||||
return false;
|
||||
},
|
||||
|
||||
isLoading() {
|
||||
return Template.instance().isLoading.get();
|
||||
},
|
||||
|
|
|
@ -545,3 +545,8 @@ a
|
|||
|
||||
#isSettingDatabaseCallDone
|
||||
display: none;
|
||||
|
||||
.at-link
|
||||
color: #17683a;
|
||||
text-decoration: underline;
|
||||
text-decoration-color: #17683a;
|
||||
|
|
|
@ -188,6 +188,10 @@ template(name='layoutSettings')
|
|||
.title {{_ 'can-invite-if-same-mailDomainName'}}
|
||||
.form-group
|
||||
input.wekan-form-control#mailDomainNamevalue(type="text", placeholder="" value="{{currentSetting.mailDomainName}}")
|
||||
li.layout-form
|
||||
.title {{_ 'custom-legal-notice-link-url'}}
|
||||
.form-group
|
||||
input.wekan-form-control#legalNoticevalue(type="text", placeholder="" value="{{currentSetting.legalNotice}}")
|
||||
li.layout-form
|
||||
.title {{_ 'display-authentication-method'}}
|
||||
.form-group.flex
|
||||
|
|
|
@ -210,6 +210,11 @@ BlazeComponent.extendComponent({
|
|||
)
|
||||
.val()
|
||||
.trim();
|
||||
const legalNotice = $(
|
||||
'#legalNoticevalue',
|
||||
)
|
||||
.val()
|
||||
.trim();
|
||||
const hideLogoChange = $('input[name=hideLogo]:checked').val() === 'true';
|
||||
const displayAuthenticationMethod =
|
||||
$('input[name=displayAuthenticationMethod]:checked').val() === 'true';
|
||||
|
@ -234,6 +239,7 @@ BlazeComponent.extendComponent({
|
|||
spinnerName,
|
||||
oidcBtnText,
|
||||
mailDomainName,
|
||||
legalNotice,
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
|
|
|
@ -1119,5 +1119,8 @@
|
|||
"add-organizations": "Add organizations",
|
||||
"add-organizations-label": "Added organizations are displayed below:",
|
||||
"remove-organization-from-board": "Are you sure you want to remove this organization from this board ?",
|
||||
"to-create-organizations-contact-admin": "To create organizations, please contact administrator."
|
||||
"to-create-organizations-contact-admin": "To create organizations, please contact administrator.",
|
||||
"custom-legal-notice-link-url": "Custom legal notice page URL",
|
||||
"acceptance_of_our_legalNotice": "By continuing, you accept our",
|
||||
"legalNotice": "legal notice"
|
||||
}
|
||||
|
|
|
@ -1118,5 +1118,8 @@
|
|||
"add-organizations": "Ajouter des organisations",
|
||||
"add-organizations-label": "Les organisations ajoutées sont affichées ci-dessous :",
|
||||
"remove-organization-from-board": "Voulez-vous vraiment supprimer cette organisation de ce tableau ?",
|
||||
"to-create-organizations-contact-admin": "Pour créer des organisations, veuillez contacter l'administrateur."
|
||||
}
|
||||
"to-create-organizations-contact-admin": "Pour créer des organisations, veuillez contacter l'administrateur.",
|
||||
"custom-legal-notice-link-url": "URL de la page des mentions légales personnalisées",
|
||||
"acceptance_of_our_legalNotice": "En continuant, vous acceptez nos",
|
||||
"legalNotice": "mentions légales"
|
||||
}
|
||||
|
|
|
@ -92,6 +92,10 @@ Settings.attachSchema(
|
|||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
legalNotice: {
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
createdAt: {
|
||||
type: Date,
|
||||
denyUpdate: true,
|
||||
|
|
|
@ -26,6 +26,7 @@ Meteor.publish('setting', () => {
|
|||
spinnerName: 1,
|
||||
oidcBtnText: 1,
|
||||
mailDomainName: 1,
|
||||
legalNotice: 1,
|
||||
},
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue