UX: Rename group tab from Assignments to Assigned (#88)
This commit is contained in:
parent
8e7ef2b797
commit
301be24c13
|
@ -1,7 +1,7 @@
|
|||
export default {
|
||||
resource: "group",
|
||||
map() {
|
||||
this.route("assignments", function() {
|
||||
this.route("assigned", function() {
|
||||
this.route("show", { path: "/:filter" });
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{{group-assignments-menu-item group=group}}
|
||||
{{group-assigned-menu-item group=group}}
|
||||
|
|
|
@ -18,9 +18,9 @@ export default DiscourseRoute.extend({
|
|||
|
||||
redirect(model, transition) {
|
||||
if (transition.to.params.hasOwnProperty("filter")) {
|
||||
this.transitionTo("group.assignments.show", transition.to.params.filter);
|
||||
this.transitionTo("group.assigned.show", transition.to.params.filter);
|
||||
} else {
|
||||
this.transitionTo("group.assignments.show", "everyone");
|
||||
this.transitionTo("group.assigned.show", "everyone");
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,11 +1,11 @@
|
|||
{{#if show-avatar}}
|
||||
{{#link-to "group.assignments.show" filter.username_lower}}
|
||||
{{#link-to "group.assigned.show" filter.username_lower}}
|
||||
{{avatar filter avatarTemplatePath="avatar_template" usernamePath="username" imageSize="small"}}
|
||||
<span class="assign-count">({{filter.assignments_count}})</span>
|
||||
<span class="assign-name">{{displayName}}</span>
|
||||
{{/link-to}}
|
||||
{{else}}
|
||||
{{#link-to "group.assignments.show" filter}}
|
||||
{{#link-to "group.assigned.show" filter}}
|
||||
{{i18n 'discourse_assign.group_everyone'}} ({{assignment_count}})
|
||||
{{/link-to}}
|
||||
{{/if}}
|
|
@ -0,0 +1,3 @@
|
|||
{{#link-to "group.assigned"}}
|
||||
{{d-icon "user-plus" class="glyph"}}{{i18n 'discourse_assign.assigned'}} ({{group.assignment_count}})
|
||||
{{/link-to}}
|
|
@ -1,3 +0,0 @@
|
|||
{{#link-to "group.assignments"}}
|
||||
{{d-icon "user-plus" class="glyph"}}{{i18n 'discourse_assign.group_assignments'}} ({{group.assignment_count}})
|
||||
{{/link-to}}
|
|
@ -1,9 +1,9 @@
|
|||
<section class="user-secondary-navigation group-assignments">
|
||||
{{#mobile-nav class="activity-nav" desktopClass="action-list activity-list nav-stacked" currentPath=router._router.currentPath}}
|
||||
{{#load-more selector=".activity-nav li" action=(action "loadMore")}}
|
||||
{{group-assignments-filter show-avatar=false filter="everyone" routeType=route_type assignment_count=group.assignment_count}}
|
||||
{{group-assigned-filter show-avatar=false filter="everyone" routeType=route_type assignment_count=group.assignment_count}}
|
||||
{{#each members as |member|}}
|
||||
{{group-assignments-filter show-avatar=true filter=member routeType=route_type}}
|
||||
{{group-assigned-filter show-avatar=true filter=member routeType=route_type}}
|
||||
{{/each}}
|
||||
{{conditional-loading-spinner condition=loading}}
|
||||
{{/load-more}}
|
|
@ -12,7 +12,6 @@ en:
|
|||
cant_act: "You cannot act on flags that have been assigned to other users"
|
||||
cant_act_unclaimed: "You must claim this topic before acting on flags."
|
||||
assigned: "Assigned"
|
||||
group_assignments: "Assignments"
|
||||
group_everyone: "Everyone"
|
||||
assigned_to: "Assigned to"
|
||||
assign_notification: "<p><span>%{username}</span> %{description}</p>"
|
||||
|
|
|
@ -22,8 +22,8 @@ Discourse::Application.routes.append do
|
|||
get "topics/private-messages-assigned/:username" => "list#private_messages_assigned", as: "topics_private_messages_assigned", constraints: { username: ::RouteFormat.username }
|
||||
get "/topics/messages-assigned/:username" => "list#messages_assigned", constraints: { username: ::RouteFormat.username }
|
||||
get "/topics/group-topics-assigned/:groupname" => "list#group_topics_assigned", constraints: { username: ::RouteFormat.username }
|
||||
get "/g/:id/assignments" => "groups#index"
|
||||
get "/g/:id/assignments/:route_type" => "groups#index"
|
||||
get "/g/:id/assigned" => "groups#index"
|
||||
get "/g/:id/assigned/:route_type" => "groups#index"
|
||||
end
|
||||
|
||||
after_initialize do
|
||||
|
|
|
@ -19,13 +19,13 @@ acceptance("GroupAssignments", {
|
|||
});
|
||||
|
||||
QUnit.test("Group Assignments Everyone", async assert => {
|
||||
await visit("/g/discourse/assignments");
|
||||
assert.equal(currentPath(), "group.assignments.show");
|
||||
await visit("/g/discourse/assigned");
|
||||
assert.equal(currentPath(), "group.assigned.show");
|
||||
assert.ok(find(".topic-list-item").length === 1);
|
||||
});
|
||||
|
||||
QUnit.test("Group Assignments Ahmedgagan", async assert => {
|
||||
await visit("/g/discourse/assignments/ahmedgagan6");
|
||||
assert.equal(currentPath(), "group.assignments.show");
|
||||
await visit("/g/discourse/assigned/ahmedgagan6");
|
||||
assert.equal(currentPath(), "group.assigned.show");
|
||||
assert.ok(find(".topic-list-item").length === 1);
|
||||
});
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import componentTest from "helpers/component-test";
|
||||
|
||||
moduleForComponent("group-assignments-filter", { integration: true });
|
||||
moduleForComponent("group-assigned-filter", { integration: true });
|
||||
|
||||
componentTest("display username", {
|
||||
template: "{{group-assignments-filter show-avatar=true filter=filter}}",
|
||||
template: "{{group-assigned-filter show-avatar=true filter=filter}}",
|
||||
|
||||
beforeEach() {
|
||||
this.siteSettings.prioritize_username_in_ux = true;
|
||||
|
@ -24,7 +24,7 @@ componentTest("display username", {
|
|||
}
|
||||
});
|
||||
componentTest("display name", {
|
||||
template: "{{group-assignments-filter show-avatar=true filter=filter}}",
|
||||
template: "{{group-assigned-filter show-avatar=true filter=filter}}",
|
||||
|
||||
beforeEach() {
|
||||
this.siteSettings.prioritize_username_in_ux = true;
|
Loading…
Reference in New Issue