fix merge
This commit is contained in:
parent
770d06f0ca
commit
a7cc7053d3
|
@ -469,33 +469,8 @@ function initialize(api) {
|
||||||
.filter(({ assignee }) => assignee)
|
.filter(({ assignee }) => assignee)
|
||||||
.flat();
|
.flat();
|
||||||
|
|
||||||
if (assignedTo) {
|
if (!assignedTo) {
|
||||||
return assignedTo
|
return "";
|
||||||
.map(({ assignee, note }) => {
|
|
||||||
let assignedPath;
|
|
||||||
if (assignee.assignedToPostId) {
|
|
||||||
assignedPath = `/p/${assignee.assignedToPostId}`;
|
|
||||||
} else {
|
|
||||||
assignedPath = `/t/${topic.id}`;
|
|
||||||
}
|
|
||||||
const icon = iconHTML(assignee.username ? "user-plus" : "group-plus");
|
|
||||||
let name;
|
|
||||||
|
|
||||||
name =
|
|
||||||
siteSettings.prioritize_full_name_in_ux || !assignee.username
|
|
||||||
? assignee.name || assignee.username
|
|
||||||
: assignee.username;
|
|
||||||
|
|
||||||
const tagName = params.tagName || "a";
|
|
||||||
const href =
|
|
||||||
tagName === "a"
|
|
||||||
? `href="${getURL(assignedPath)}" data-auto-route="true"`
|
|
||||||
: "";
|
|
||||||
return `<${tagName} class="assigned-to discourse-tag simple" ${href}>${icon}<span title="${escapeExpression(
|
|
||||||
note
|
|
||||||
)}">${name}</span></${tagName}>`;
|
|
||||||
})
|
|
||||||
.join("");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const createTagHtml = ({ assignee, note }) => {
|
const createTagHtml = ({ assignee, note }) => {
|
||||||
|
@ -507,7 +482,12 @@ function initialize(api) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const icon = iconHTML(assignee.username ? "user-plus" : "group-plus");
|
const icon = iconHTML(assignee.username ? "user-plus" : "group-plus");
|
||||||
const name = assignee.username || assignee.name;
|
let name;
|
||||||
|
name =
|
||||||
|
siteSettings.prioritize_full_name_in_ux || !assignee.username
|
||||||
|
? assignee.name || assignee.username
|
||||||
|
: assignee.username;
|
||||||
|
|
||||||
const tagName = params.tagName || "a";
|
const tagName = params.tagName || "a";
|
||||||
const href =
|
const href =
|
||||||
tagName === "a"
|
tagName === "a"
|
||||||
|
|
Loading…
Reference in New Issue