more messing around
This commit is contained in:
parent
9bd1a19f99
commit
8f11f6c599
|
@ -40,15 +40,12 @@ export default class AssignActionsDropdown extends DropdownSelectBoxComponent {
|
|||
Object.entries(this.topic.indirectly_assigned_to).forEach((entry) => {
|
||||
const [postId, assignment_map] = entry;
|
||||
const assignee = assignment_map.assigned_to;
|
||||
console.log("!!!!!!!!!!!!!!!!!!!");
|
||||
options = options.concat({
|
||||
id: `unassign_post_${postId}`,
|
||||
icon: assignee.username ? "user-xmark" : "group-times",
|
||||
name: i18n("discourse_assign.unassign_post.title"),
|
||||
description: i18n("discourse_assign.unassign_post.help", {
|
||||
username: !siteSettings.prioritize_full_name_in_ux
|
||||
? assignee.username
|
||||
: assignee.name,
|
||||
username: assignee.username || assignee.name,
|
||||
}),
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,6 +9,7 @@ import DMenu from "float-kit/components/d-menu";
|
|||
|
||||
export default class AssignedToPost extends Component {
|
||||
@service taskActions;
|
||||
@service siteSettings;
|
||||
|
||||
@action
|
||||
unassign() {
|
||||
|
|
|
@ -485,10 +485,6 @@ function initialize(api) {
|
|||
? `href="${getURL(assignedPath)}" data-auto-route="true"`
|
||||
: "";
|
||||
|
||||
const name = !siteSettings.prioritize_full_name_in_ux
|
||||
? assignee.username
|
||||
: assignee.name;
|
||||
|
||||
return `<${tagName} class="assigned-to discourse-tag simple" ${href}>${icon}<span title="${escapeExpression(
|
||||
note
|
||||
)}">${name}</span></${tagName}>`;
|
||||
|
@ -568,6 +564,10 @@ function initialize(api) {
|
|||
];
|
||||
const assigneeElements = [];
|
||||
|
||||
const nameOrUsername = siteSettings.prioritize_full_name_in_ux
|
||||
? assignedToUser.name
|
||||
: assignedToUser.username;
|
||||
|
||||
const assignedHtml = (username, path, type) => {
|
||||
return `<span class="assigned-to--${type}">${htmlSafe(
|
||||
i18n("discourse_assign.assigned_topic_to", {
|
||||
|
@ -583,7 +583,7 @@ function initialize(api) {
|
|||
"span.assignee",
|
||||
new RawHtml({
|
||||
html: assignedHtml(
|
||||
assignedToUser.username,
|
||||
nameOrUsername,
|
||||
assignedToUserPath(assignedToUser),
|
||||
"user"
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue