mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
add full name if exists in email-invite-subject or when tagging someone with '@' while commenting a card
This commit is contained in:
parent
b12312f998
commit
d9329a9e15
6 changed files with 23 additions and 7 deletions
|
@ -17,8 +17,10 @@ Template.editor.onRendered(() => {
|
||||||
currentBoard
|
currentBoard
|
||||||
.activeMembers()
|
.activeMembers()
|
||||||
.map(member => {
|
.map(member => {
|
||||||
const username = Users.findOne(member.userId).username;
|
const user = Users.findOne(member.userId);
|
||||||
return username.includes(term) ? username : null;
|
const username = user.username;
|
||||||
|
const fullName = user.profile && user.profile !== undefined ? user.profile.fullname : "";
|
||||||
|
return username.includes(term) || fullName.includes(term) ? fullName + "(" + username + ")" : null;
|
||||||
})
|
})
|
||||||
.filter(Boolean), [...specialHandleNames])
|
.filter(Boolean), [...specialHandleNames])
|
||||||
);
|
);
|
||||||
|
|
|
@ -34,8 +34,9 @@ template(name="userFormsLayout")
|
||||||
img(src="{{currentSetting.customLoginLogoImageUrl}}" width="300" height="auto")
|
img(src="{{currentSetting.customLoginLogoImageUrl}}" width="300" height="auto")
|
||||||
br
|
br
|
||||||
unless currentSetting.customLoginLogoImageUrl
|
unless currentSetting.customLoginLogoImageUrl
|
||||||
img(src="{{pathFor '/wekan-logo.svg'}}" alt="" width="300" height="auto")
|
if isSettingDatabaseFctCallDone
|
||||||
br
|
img(src="{{pathFor '/wekan-logo.svg'}}" alt="" width="300" height="auto")
|
||||||
|
br
|
||||||
if currentSetting.textBelowCustomLoginLogo
|
if currentSetting.textBelowCustomLoginLogo
|
||||||
+viewer
|
+viewer
|
||||||
| {{currentSetting.textBelowCustomLoginLogo}}
|
| {{currentSetting.textBelowCustomLoginLogo}}
|
||||||
|
|
|
@ -23,6 +23,8 @@ const validator = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let isSettingDatabaseFctCallDone = false;
|
||||||
|
|
||||||
Template.userFormsLayout.onCreated(function() {
|
Template.userFormsLayout.onCreated(function() {
|
||||||
const templateInstance = this;
|
const templateInstance = this;
|
||||||
templateInstance.currentSetting = new ReactiveVar();
|
templateInstance.currentSetting = new ReactiveVar();
|
||||||
|
@ -37,6 +39,8 @@ Template.userFormsLayout.onCreated(function() {
|
||||||
let htmlvalue = "<i class='fa fa-oidc'></i>" + currSetting.oidcBtnText;
|
let htmlvalue = "<i class='fa fa-oidc'></i>" + currSetting.oidcBtnText;
|
||||||
oidcBtnElt.html(htmlvalue);
|
oidcBtnElt.html(htmlvalue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isSettingDatabaseFctCallDone = true;
|
||||||
return this.stop();
|
return this.stop();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -65,6 +69,10 @@ Template.userFormsLayout.helpers({
|
||||||
return Template.instance().currentSetting.get();
|
return Template.instance().currentSetting.get();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isSettingDatabaseCallDone(){
|
||||||
|
return isSettingDatabaseFctCallDone;
|
||||||
|
},
|
||||||
|
|
||||||
isLoading() {
|
isLoading() {
|
||||||
return Template.instance().isLoading.get();
|
return Template.instance().isLoading.get();
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,7 +25,7 @@ Template.memberMenuPopup.helpers({
|
||||||
isNotOAuth2AuthenticationMethod(){
|
isNotOAuth2AuthenticationMethod(){
|
||||||
currentUser = Meteor.user();
|
currentUser = Meteor.user();
|
||||||
if (currentUser) {
|
if (currentUser) {
|
||||||
return currentUser.authenticationMethod != 'OAuth2';
|
return currentUser.authenticationMethod.toLowerCase() != 'oauth2';
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,9 +217,13 @@ if (Meteor.isServer) {
|
||||||
const icode = InvitationCodes.findOne(_id);
|
const icode = InvitationCodes.findOne(_id);
|
||||||
const author = Users.findOne(Meteor.userId());
|
const author = Users.findOne(Meteor.userId());
|
||||||
try {
|
try {
|
||||||
|
const fullName = Users.findOne(icode.authorId)
|
||||||
|
&& Users.findOne(icode.authorId).profile
|
||||||
|
&& Users.findOne(icode.authorId).profile !== undefined ? Users.findOne(icode.authorId).profile.fullname : "";
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
email: icode.email,
|
email: icode.email,
|
||||||
inviter: Users.findOne(icode.authorId).username,
|
inviter: fullName != "" ? fullName + " (" + Users.findOne(icode.authorId).username + " )" : Users.findOne(icode.authorId).username,
|
||||||
user: icode.email.split('@')[0],
|
user: icode.email.split('@')[0],
|
||||||
icode: icode.code,
|
icode: icode.code,
|
||||||
url: FlowRouter.url('sign-up'),
|
url: FlowRouter.url('sign-up'),
|
||||||
|
|
|
@ -1237,9 +1237,10 @@ if (Meteor.isServer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const fullName = inviter.profile !== undefined ? inviter.profile.fullname : "";
|
||||||
const params = {
|
const params = {
|
||||||
user: user.username,
|
user: user.username,
|
||||||
inviter: inviter.username,
|
inviter: fullName != "" ? fullName + " (" + inviter.username + " )" : inviter.username,
|
||||||
board: board.title,
|
board: board.title,
|
||||||
url: board.absoluteUrl(),
|
url: board.absoluteUrl(),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue