DEV: apply coding standards (#109)
This commit is contained in:
parent
cd31a821fc
commit
598c717009
92
.eslintrc
92
.eslintrc
|
@ -1,93 +1,3 @@
|
||||||
{
|
{
|
||||||
"env": {
|
"extends": "eslint-config-discourse"
|
||||||
"jasmine": true,
|
|
||||||
"node": true,
|
|
||||||
"mocha": true,
|
|
||||||
"browser": true,
|
|
||||||
"builtin": true
|
|
||||||
},
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": 7,
|
|
||||||
"sourceType": "module"
|
|
||||||
},
|
|
||||||
"globals": {
|
|
||||||
"Ember": true,
|
|
||||||
"jQuery": true,
|
|
||||||
"$": true,
|
|
||||||
"QUnit": true,
|
|
||||||
"RSVP": true,
|
|
||||||
"Discourse": true,
|
|
||||||
"Handlebars": true,
|
|
||||||
"I18n": true,
|
|
||||||
"bootbox": true,
|
|
||||||
"moduleFor": true,
|
|
||||||
"moduleForComponent": true,
|
|
||||||
"Pretender": true,
|
|
||||||
"sandbox": true,
|
|
||||||
"controllerFor": true,
|
|
||||||
"test": true,
|
|
||||||
"visit": true,
|
|
||||||
"andThen": true,
|
|
||||||
"click": true,
|
|
||||||
"currentPath": true,
|
|
||||||
"currentRouteName": true,
|
|
||||||
"currentURL": true,
|
|
||||||
"fillIn": true,
|
|
||||||
"keyEvent": true,
|
|
||||||
"triggerEvent": true,
|
|
||||||
"count": true,
|
|
||||||
"exists": true,
|
|
||||||
"visible": true,
|
|
||||||
"invisible": true,
|
|
||||||
"asyncRender": true,
|
|
||||||
"asyncTestDiscourse": true,
|
|
||||||
"fixture": true,
|
|
||||||
"find": true,
|
|
||||||
"sinon": true,
|
|
||||||
"moment": true,
|
|
||||||
"_": true,
|
|
||||||
"alert": true,
|
|
||||||
"define": true,
|
|
||||||
"require": true,
|
|
||||||
"requirejs": true,
|
|
||||||
"hasModule": true,
|
|
||||||
"Blob": true,
|
|
||||||
"File": true
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"block-scoped-var": 2,
|
|
||||||
"dot-notation": 0,
|
|
||||||
"eqeqeq": [2, "allow-null"],
|
|
||||||
"guard-for-in": 2,
|
|
||||||
"no-bitwise": 2,
|
|
||||||
"no-caller": 2,
|
|
||||||
"no-cond-assign": 0,
|
|
||||||
"no-debugger": 2,
|
|
||||||
"no-empty": 0,
|
|
||||||
"no-eval": 2,
|
|
||||||
"no-extend-native": 2,
|
|
||||||
"no-extra-parens": 0,
|
|
||||||
"no-inner-declarations": 2,
|
|
||||||
"no-irregular-whitespace": 2,
|
|
||||||
"no-iterator": 2,
|
|
||||||
"no-loop-func": 2,
|
|
||||||
"no-multi-str": 2,
|
|
||||||
"no-new": 2,
|
|
||||||
"no-plusplus": 0,
|
|
||||||
"no-proto": 2,
|
|
||||||
"no-script-url": 2,
|
|
||||||
"no-sequences": 2,
|
|
||||||
"no-shadow": 2,
|
|
||||||
"no-undef": 2,
|
|
||||||
"no-unused-vars": 2,
|
|
||||||
"no-with": 2,
|
|
||||||
"no-this-before-super": 2,
|
|
||||||
"semi": 2,
|
|
||||||
"strict": 0,
|
|
||||||
"valid-typeof": 2,
|
|
||||||
"wrap-iife": [2, "inside"],
|
|
||||||
"no-mixed-spaces-and-tabs": 2,
|
|
||||||
"no-trailing-spaces": 2
|
|
||||||
},
|
|
||||||
"parser": "babel-eslint"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
module.exports = {
|
||||||
|
plugins: ["ember-template-lint-plugin-discourse"],
|
||||||
|
extends: "discourse:recommended"
|
||||||
|
};
|
|
@ -1,8 +1,8 @@
|
||||||
export default {
|
export default {
|
||||||
resource: "group",
|
resource: "group",
|
||||||
map() {
|
map() {
|
||||||
this.route("assigned", function() {
|
this.route("assigned", function () {
|
||||||
this.route("show", { path: "/:filter" });
|
this.route("show", { path: "/:filter" });
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,5 +2,5 @@ export default {
|
||||||
resource: "user.userPrivateMessages",
|
resource: "user.userPrivateMessages",
|
||||||
map() {
|
map() {
|
||||||
this.route("assigned");
|
this.route("assigned");
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,5 +2,5 @@ export default {
|
||||||
resource: "user.userActivity",
|
resource: "user.userActivity",
|
||||||
map() {
|
map() {
|
||||||
this.route("assigned");
|
this.route("assigned");
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class='reviewable-filter discourse-assign-assign-to-filter'>
|
<div class="reviewable-filter discourse-assign-assign-to-filter">
|
||||||
<label class='filter-label'>{{i18n "discourse_assign.assigned_to"}}</label>
|
<label class="filter-label">{{i18n "discourse_assign.assigned_to"}}</label>
|
||||||
{{user-selector
|
{{user-selector
|
||||||
single=true
|
single=true
|
||||||
fullWidthWrap=true
|
fullWidthWrap=true
|
||||||
|
@ -13,4 +13,4 @@
|
||||||
placeholderKey=placeholderKey
|
placeholderKey=placeholderKey
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,8 +8,8 @@ export default {
|
||||||
.split("|")
|
.split("|")
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
const groupNames = this.site.groups
|
const groupNames = this.site.groups
|
||||||
.filter(group => groupIDs.includes(group.id.toString()))
|
.filter((group) => groupIDs.includes(group.id.toString()))
|
||||||
.mapBy("name");
|
.mapBy("name");
|
||||||
component.set("allowedGroups", groupNames);
|
component.set("allowedGroups", groupNames);
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<h3>{{i18n 'discourse_assign.assign.title'}}</h3>
|
<h3>{{i18n "discourse_assign.assign.title"}}</h3>
|
||||||
<section class='field'>
|
<section class="field">
|
||||||
<div class="enable-accepted-answer">
|
<div class="enable-accepted-answer">
|
||||||
<label class="checkbox-label">
|
<label class="checkbox-label">
|
||||||
{{input
|
{{input
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
checked=(readonly category.enable_unassigned_filter)
|
checked=(readonly category.enable_unassigned_filter)
|
||||||
change=(action "onChangeSetting" value="target.checked")
|
change=(action "onChangeSetting" value="target.checked")
|
||||||
}}
|
}}
|
||||||
{{i18n 'discourse_assign.add_unassigned_filter'}}
|
{{i18n "discourse_assign.add_unassigned_filter"}}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -5,6 +5,6 @@ export default {
|
||||||
"category.custom_fields.enable_unassigned_filter",
|
"category.custom_fields.enable_unassigned_filter",
|
||||||
value ? "true" : "false"
|
value ? "true" : "false"
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,5 +6,5 @@ export default {
|
||||||
args.group.can_show_assigned_tab &&
|
args.group.can_show_assigned_tab &&
|
||||||
args.group.assignment_count > 0
|
args.group.assignment_count > 0
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{#if currentUser.can_assign}}
|
{{#if currentUser.can_assign}}
|
||||||
{{#link-to 'userActivity.assigned'}}
|
{{#link-to "userActivity.assigned"}}
|
||||||
{{d-icon "user-plus"}} {{i18n 'discourse_assign.assigned'}}
|
{{d-icon "user-plus"}} {{i18n "discourse_assign.assigned"}}
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{#link-to 'userPrivateMessages.assigned' model}}
|
{{#link-to "userPrivateMessages.assigned" model}}
|
||||||
{{d-icon "user-plus" class="glyph"}}
|
{{d-icon "user-plus" class="glyph"}}
|
||||||
{{i18n 'discourse_assign.assigned'}}
|
{{i18n "discourse_assign.assigned"}}
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
|
|
|
@ -10,5 +10,5 @@ export function shouldShowAssigned(args, component) {
|
||||||
export default {
|
export default {
|
||||||
shouldRender(args, component) {
|
shouldRender(args, component) {
|
||||||
return shouldShowAssigned(args, component);
|
return shouldShowAssigned(args, component);
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export default {
|
export default {
|
||||||
shouldRender(args, component) {
|
shouldRender(args, component) {
|
||||||
return component.currentUser && component.currentUser.get("can_assign");
|
return component.currentUser && component.currentUser.get("can_assign");
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ export default Ember.Controller.extend({
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
this.allowedGroups = [];
|
this.allowedGroups = [];
|
||||||
|
|
||||||
ajax("/assign/suggestions").then(data => {
|
ajax("/assign/suggestions").then((data) => {
|
||||||
this.set("assignSuggestions", data.suggestions);
|
this.set("assignSuggestions", data.suggestions);
|
||||||
this.set("allowedGroups", data.assign_allowed_on_groups);
|
this.set("allowedGroups", data.assign_allowed_on_groups);
|
||||||
});
|
});
|
||||||
|
@ -26,7 +26,7 @@ export default Ember.Controller.extend({
|
||||||
assignUser(user) {
|
assignUser(user) {
|
||||||
this.setProperties({
|
this.setProperties({
|
||||||
"model.username": user.username,
|
"model.username": user.username,
|
||||||
"model.allowedGroups": this.taskActions.allowedGroups
|
"model.allowedGroups": this.taskActions.allowedGroups,
|
||||||
});
|
});
|
||||||
this.send("assign");
|
this.send("assign");
|
||||||
},
|
},
|
||||||
|
@ -45,8 +45,8 @@ export default Ember.Controller.extend({
|
||||||
type: "PUT",
|
type: "PUT",
|
||||||
data: {
|
data: {
|
||||||
username: this.get("model.username"),
|
username: this.get("model.username"),
|
||||||
topic_id: this.get("model.topic.id")
|
topic_id: this.get("model.topic.id"),
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (this.get("model.onSuccess")) {
|
if (this.get("model.onSuccess")) {
|
||||||
|
@ -54,6 +54,6 @@ export default Ember.Controller.extend({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(popupAjaxError);
|
.catch(popupAjaxError);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -24,10 +24,10 @@ export default UserTopicsList.extend({
|
||||||
params: {
|
params: {
|
||||||
order: this.order,
|
order: this.order,
|
||||||
ascending: this.ascending,
|
ascending: this.ascending,
|
||||||
q: this.q
|
q: this.q,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
.then(result => this.set("model", result))
|
.then((result) => this.set("model", result))
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.set("loading", false);
|
this.set("loading", false);
|
||||||
});
|
});
|
||||||
|
@ -54,6 +54,6 @@ export default UserTopicsList.extend({
|
||||||
},
|
},
|
||||||
onChangeFilter(value) {
|
onChangeFilter(value) {
|
||||||
debounce(this, this._setSearchTerm, value, INPUT_DELAY * 2);
|
debounce(this, this._setSearchTerm, value, INPUT_DELAY * 2);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -42,9 +42,9 @@ export default Controller.extend({
|
||||||
const groupName = this.group.name;
|
const groupName = this.group.name;
|
||||||
ajax(`/assign/members/${groupName}`, {
|
ajax(`/assign/members/${groupName}`, {
|
||||||
type: "GET",
|
type: "GET",
|
||||||
data: { filter: this.filter, offset: this.offset }
|
data: { filter: this.filter, offset: this.offset },
|
||||||
})
|
})
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
if (this.router.currentRoute.params.filter !== "everyone") {
|
if (this.router.currentRoute.params.filter !== "everyone") {
|
||||||
this.transitionToRoute("group.assigned.show", groupName, "everyone");
|
this.transitionToRoute("group.assigned.show", groupName, "everyone");
|
||||||
}
|
}
|
||||||
|
@ -70,9 +70,9 @@ export default Controller.extend({
|
||||||
this.set("offset", this.offset + 50);
|
this.set("offset", this.offset + 50);
|
||||||
ajax(`/assign/members/${this.group.name}`, {
|
ajax(`/assign/members/${this.group.name}`, {
|
||||||
type: "GET",
|
type: "GET",
|
||||||
data: { filter: this.filter, offset: this.offset }
|
data: { filter: this.filter, offset: this.offset },
|
||||||
})
|
})
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
this.members.pushObjects(result.members);
|
this.members.pushObjects(result.members);
|
||||||
})
|
})
|
||||||
.finally(() => this.set("loading", false));
|
.finally(() => this.set("loading", false));
|
||||||
|
@ -87,5 +87,5 @@ export default Controller.extend({
|
||||||
@action
|
@action
|
||||||
onChangeFilterName(value) {
|
onChangeFilterName(value) {
|
||||||
debounce(this, this._setFilter, value, INPUT_DELAY * 2);
|
debounce(this, this._setFilter, value, INPUT_DELAY * 2);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -25,6 +25,6 @@ export default UserTopicsList.extend({
|
||||||
this.setProperties({ order: sortBy, ascending: false });
|
this.setProperties({ order: sortBy, ascending: false });
|
||||||
this.model.refreshSort(sortBy, false);
|
this.model.refreshSort(sortBy, false);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,11 +7,12 @@ import { queryRegistry } from "discourse/widgets/widget";
|
||||||
import { getOwner } from "discourse-common/lib/get-owner";
|
import { getOwner } from "discourse-common/lib/get-owner";
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
import getURL from "discourse-common/lib/get-url";
|
import getURL from "discourse-common/lib/get-url";
|
||||||
|
import I18n from "I18n";
|
||||||
|
|
||||||
function titleForState(user) {
|
function titleForState(user) {
|
||||||
if (user) {
|
if (user) {
|
||||||
return I18n.t("discourse_assign.unassign.help", {
|
return I18n.t("discourse_assign.unassign.help", {
|
||||||
username: user.username
|
username: user.username,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return I18n.t("discourse_assign.assign.help");
|
return I18n.t("discourse_assign.assign.help");
|
||||||
|
@ -48,14 +49,14 @@ function registerTopicFooterButtons(api) {
|
||||||
user.username
|
user.username
|
||||||
}</span></span>${renderAvatar(user, {
|
}</span></span>${renderAvatar(user, {
|
||||||
imageSize: "small",
|
imageSize: "small",
|
||||||
ignoreTitle: true
|
ignoreTitle: true,
|
||||||
})}`
|
})}`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return htmlSafe(
|
return htmlSafe(
|
||||||
`${renderAvatar(user, {
|
`${renderAvatar(user, {
|
||||||
imageSize: "tiny",
|
imageSize: "tiny",
|
||||||
ignoreTitle: true
|
ignoreTitle: true,
|
||||||
})}<span class="unassign-label">${label}</span>`
|
})}<span class="unassign-label">${label}</span>`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -86,21 +87,21 @@ function registerTopicFooterButtons(api) {
|
||||||
dependentKeys: [
|
dependentKeys: [
|
||||||
"topic.assigned_to_user",
|
"topic.assigned_to_user",
|
||||||
"currentUser.can_assign",
|
"currentUser.can_assign",
|
||||||
"topic.assigned_to_user.username"
|
"topic.assigned_to_user.username",
|
||||||
],
|
],
|
||||||
displayed() {
|
displayed() {
|
||||||
return this.currentUser && this.currentUser.can_assign;
|
return this.currentUser && this.currentUser.can_assign;
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function initialize(api) {
|
function initialize(api) {
|
||||||
api.addNavigationBarItem({
|
api.addNavigationBarItem({
|
||||||
name: "unassigned",
|
name: "unassigned",
|
||||||
customFilter: category => {
|
customFilter: (category) => {
|
||||||
return category && category.enable_unassigned_filter;
|
return category && category.enable_unassigned_filter;
|
||||||
},
|
},
|
||||||
customHref: category => {
|
customHref: (category) => {
|
||||||
if (category) {
|
if (category) {
|
||||||
return getURL(category.url) + "/l/latest?status=open&assigned=nobody";
|
return getURL(category.url) + "/l/latest?status=open&assigned=nobody";
|
||||||
}
|
}
|
||||||
|
@ -115,7 +116,7 @@ function initialize(api) {
|
||||||
queryParams["status"] === "open"
|
queryParams["status"] === "open"
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
before: "top"
|
before: "top",
|
||||||
});
|
});
|
||||||
|
|
||||||
// You can't act on flags claimed by another user
|
// You can't act on flags claimed by another user
|
||||||
|
@ -146,7 +147,7 @@ function initialize(api) {
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
||||||
this.messageBus.subscribe("/staff/topic-assignment", data => {
|
this.messageBus.subscribe("/staff/topic-assignment", (data) => {
|
||||||
let flaggedPost = this.flaggedPost;
|
let flaggedPost = this.flaggedPost;
|
||||||
if (data.topic_id === flaggedPost.get("topic.id")) {
|
if (data.topic_id === flaggedPost.get("topic.id")) {
|
||||||
flaggedPost.set(
|
flaggedPost.set(
|
||||||
|
@ -162,7 +163,7 @@ function initialize(api) {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
||||||
this.messageBus.unsubscribe("/staff/topic-assignment");
|
this.messageBus.unsubscribe("/staff/topic-assignment");
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{ ignoreMissing: true }
|
{ ignoreMissing: true }
|
||||||
);
|
);
|
||||||
|
@ -177,7 +178,7 @@ function initialize(api) {
|
||||||
assignedToUser.username
|
assignedToUser.username
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
api.modifyClass("model:bookmark", {
|
api.modifyClass("model:bookmark", {
|
||||||
|
@ -189,13 +190,13 @@ function initialize(api) {
|
||||||
assignedToUser.username
|
assignedToUser.username
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
api.addPostSmallActionIcon("assigned", "user-plus");
|
api.addPostSmallActionIcon("assigned", "user-plus");
|
||||||
api.addPostSmallActionIcon("unassigned", "user-times");
|
api.addPostSmallActionIcon("unassigned", "user-times");
|
||||||
|
|
||||||
api.addPostTransformCallback(transformed => {
|
api.addPostTransformCallback((transformed) => {
|
||||||
if (
|
if (
|
||||||
transformed.actionCode === "assigned" ||
|
transformed.actionCode === "assigned" ||
|
||||||
transformed.actionCode === "unassigned"
|
transformed.actionCode === "unassigned"
|
||||||
|
@ -207,7 +208,7 @@ function initialize(api) {
|
||||||
|
|
||||||
api.addDiscoveryQueryParam("assigned", { replace: true, refreshModel: true });
|
api.addDiscoveryQueryParam("assigned", { replace: true, refreshModel: true });
|
||||||
|
|
||||||
api.addTagsHtmlCallback(topic => {
|
api.addTagsHtmlCallback((topic) => {
|
||||||
const assignedTo = topic.get("assigned_to_user.username");
|
const assignedTo = topic.get("assigned_to_user.username");
|
||||||
if (assignedTo) {
|
if (assignedTo) {
|
||||||
const assignedPath = topic.assignedToUserPath;
|
const assignedPath = topic.assignedToUserPath;
|
||||||
|
@ -217,13 +218,13 @@ function initialize(api) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
api.addUserMenuGlyph(widget => {
|
api.addUserMenuGlyph((widget) => {
|
||||||
if (widget.currentUser && widget.currentUser.can_assign) {
|
if (widget.currentUser && widget.currentUser.can_assign) {
|
||||||
const glyph = {
|
const glyph = {
|
||||||
label: "discourse_assign.assigned",
|
label: "discourse_assign.assigned",
|
||||||
className: "assigned",
|
className: "assigned",
|
||||||
icon: "user-plus",
|
icon: "user-plus",
|
||||||
href: `${widget.currentUser.path}/activity/assigned`
|
href: `${widget.currentUser.path}/activity/assigned`,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (queryRegistry("quick-access-panel")) {
|
if (queryRegistry("quick-access-panel")) {
|
||||||
|
@ -246,16 +247,16 @@ function initialize(api) {
|
||||||
"a",
|
"a",
|
||||||
{ attributes: { class: "assigned-to-username", href } },
|
{ attributes: { class: "assigned-to-username", href } },
|
||||||
assignedToUser.username
|
assignedToUser.username
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
api.modifyClass("controller:topic", {
|
api.modifyClass("controller:topic", {
|
||||||
subscribe() {
|
subscribe() {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
||||||
this.messageBus.subscribe("/staff/topic-assignment", data => {
|
this.messageBus.subscribe("/staff/topic-assignment", (data) => {
|
||||||
const topic = this.model;
|
const topic = this.model;
|
||||||
const topicId = topic.id;
|
const topicId = topic.id;
|
||||||
|
|
||||||
|
@ -276,10 +277,10 @@ function initialize(api) {
|
||||||
if (!this.get("model.id")) return;
|
if (!this.get("model.id")) return;
|
||||||
|
|
||||||
this.messageBus.unsubscribe("/staff/topic-assignment");
|
this.messageBus.unsubscribe("/staff/topic-assignment");
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
api.decorateWidget("post-contents:after-cooked", dec => {
|
api.decorateWidget("post-contents:after-cooked", (dec) => {
|
||||||
if (dec.attrs.post_number === 1) {
|
if (dec.attrs.post_number === 1) {
|
||||||
const postModel = dec.getModel();
|
const postModel = dec.getModel();
|
||||||
if (postModel) {
|
if (postModel) {
|
||||||
|
@ -287,7 +288,7 @@ function initialize(api) {
|
||||||
if (assignedToUser) {
|
if (assignedToUser) {
|
||||||
return dec.widget.attach("assigned-to", {
|
return dec.widget.attach("assigned-to", {
|
||||||
assignedToUser,
|
assignedToUser,
|
||||||
href: Ember.get(postModel, "topic.assignedToUserPath")
|
href: Ember.get(postModel, "topic.assignedToUserPath"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -304,8 +305,8 @@ function initialize(api) {
|
||||||
save() {
|
save() {
|
||||||
this.saveAttrNames.push("custom_fields");
|
this.saveAttrNames.push("custom_fields");
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
api.addKeyboardShortcut("g a", "", { path: "/my/activity/assigned" });
|
api.addKeyboardShortcut("g a", "", { path: "/my/activity/assigned" });
|
||||||
|
@ -319,7 +320,9 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
withPluginApi("0.8.11", api => initialize(api, container));
|
withPluginApi("0.8.11", (api) => initialize(api, container));
|
||||||
withPluginApi("0.8.28", api => registerTopicFooterButtons(api, container));
|
withPluginApi("0.8.28", (api) =>
|
||||||
}
|
registerTopicFooterButtons(api, container)
|
||||||
|
);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,9 +15,9 @@ export default {
|
||||||
return this.custom_fields.enable_unassigned_filter === "true";
|
return this.custom_fields.enable_unassigned_filter === "true";
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
)
|
),
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,19 +28,19 @@ export default DiscourseRoute.extend({
|
||||||
params: {
|
params: {
|
||||||
order: params.order,
|
order: params.order,
|
||||||
ascending: params.ascending,
|
ascending: params.ascending,
|
||||||
q: params.q
|
q: params.q,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
setupController(controller, model) {
|
setupController(controller, model) {
|
||||||
controller.setProperties({
|
controller.setProperties({
|
||||||
model,
|
model,
|
||||||
searchTerm: this.currentModel.params.q
|
searchTerm: this.currentModel.params.q,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
renderTemplate() {
|
renderTemplate() {
|
||||||
this.render("group-topics-list");
|
this.render("group-topics-list");
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -10,7 +10,7 @@ export default DiscourseRoute.extend({
|
||||||
controller.setProperties({
|
controller.setProperties({
|
||||||
model,
|
model,
|
||||||
members: [],
|
members: [],
|
||||||
group: this.modelFor("group")
|
group: this.modelFor("group"),
|
||||||
});
|
});
|
||||||
controller.group.set("assignment_count", model.assignment_count);
|
controller.group.set("assignment_count", model.assignment_count);
|
||||||
|
|
||||||
|
@ -28,6 +28,6 @@ export default DiscourseRoute.extend({
|
||||||
actions: {
|
actions: {
|
||||||
changeAssigned() {
|
changeAssigned() {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
|
import I18n from "I18n";
|
||||||
import UserTopicListRoute from "discourse/routes/user-topic-list";
|
import UserTopicListRoute from "discourse/routes/user-topic-list";
|
||||||
|
|
||||||
export default UserTopicListRoute.extend({
|
export default UserTopicListRoute.extend({
|
||||||
queryParams: {
|
queryParams: {
|
||||||
order: { refreshModel: true },
|
order: { refreshModel: true },
|
||||||
ascending: { refreshModel: true }
|
ascending: { refreshModel: true },
|
||||||
},
|
},
|
||||||
userActionType: 16,
|
userActionType: 16,
|
||||||
noContentHelpKey: "discourse_assigns.no_assigns",
|
noContentHelpKey: "discourse_assigns.no_assigns",
|
||||||
|
@ -17,8 +18,8 @@ export default UserTopicListRoute.extend({
|
||||||
// core is a bit odd here and is not sending an array, should be fixed
|
// core is a bit odd here and is not sending an array, should be fixed
|
||||||
exclude_category_ids: [-1],
|
exclude_category_ids: [-1],
|
||||||
order: params.order,
|
order: params.order,
|
||||||
ascending: params.ascending
|
ascending: params.ascending,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -39,6 +40,6 @@ export default UserTopicListRoute.extend({
|
||||||
actions: {
|
actions: {
|
||||||
changeAssigned() {
|
changeAssigned() {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import I18n from "I18n";
|
||||||
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
|
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
|
||||||
|
|
||||||
export default DropdownSelectBoxComponent.extend({
|
export default DropdownSelectBoxComponent.extend({
|
||||||
|
@ -14,15 +15,15 @@ export default DropdownSelectBoxComponent.extend({
|
||||||
icon: "user-times",
|
icon: "user-times",
|
||||||
name: I18n.t("discourse_assign.unassign.title"),
|
name: I18n.t("discourse_assign.unassign.title"),
|
||||||
description: I18n.t("discourse_assign.unassign.help", {
|
description: I18n.t("discourse_assign.unassign.help", {
|
||||||
username: this.topic.assigned_to_user.username
|
username: this.topic.assigned_to_user.username,
|
||||||
})
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "reassign",
|
id: "reassign",
|
||||||
icon: "users",
|
icon: "users",
|
||||||
name: I18n.t("discourse_assign.reassign.title"),
|
name: I18n.t("discourse_assign.reassign.title"),
|
||||||
description: I18n.t("discourse_assign.reassign.help")
|
description: I18n.t("discourse_assign.reassign.help"),
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -36,6 +37,6 @@ export default DropdownSelectBoxComponent.extend({
|
||||||
this.reassign(this.topic, this.user);
|
this.reassign(this.topic, this.user);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
classNames: ["assigned-to-user"]
|
classNames: ["assigned-to-user"],
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {
|
import {
|
||||||
ListItemDefaults,
|
ListItemDefaults,
|
||||||
default as TopicListItem
|
default as TopicListItem,
|
||||||
} from "discourse/components/topic-list-item";
|
} from "discourse/components/topic-list-item";
|
||||||
|
|
||||||
// This is a backward compatible fix so that this change:
|
// This is a backward compatible fix so that this change:
|
||||||
|
@ -10,11 +10,17 @@ let assignedTopicListItem = null;
|
||||||
|
|
||||||
if (ListItemDefaults) {
|
if (ListItemDefaults) {
|
||||||
assignedTopicListItem = Ember.Component.extend(ListItemDefaults, {
|
assignedTopicListItem = Ember.Component.extend(ListItemDefaults, {
|
||||||
isPrivateMessage: Ember.computed.equal("topic.archetype", "private_message")
|
isPrivateMessage: Ember.computed.equal(
|
||||||
|
"topic.archetype",
|
||||||
|
"private_message"
|
||||||
|
),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
assignedTopicListItem = TopicListItem.extend({
|
assignedTopicListItem = TopicListItem.extend({
|
||||||
isPrivateMessage: Ember.computed.equal("topic.archetype", "private_message")
|
isPrivateMessage: Ember.computed.equal(
|
||||||
|
"topic.archetype",
|
||||||
|
"private_message"
|
||||||
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default Ember.Component.extend({
|
||||||
this.set("unassigning", true);
|
this.set("unassigning", true);
|
||||||
return ajax("/assign/unassign", {
|
return ajax("/assign/unassign", {
|
||||||
type: "PUT",
|
type: "PUT",
|
||||||
data: { topic_id: this.get("topic.id") }
|
data: { topic_id: this.get("topic.id") },
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.set("topic.assigned_to_user", null);
|
this.set("topic.assigned_to_user", null);
|
||||||
|
@ -27,12 +27,12 @@ export default Ember.Component.extend({
|
||||||
|
|
||||||
let topic = this.topic;
|
let topic = this.topic;
|
||||||
ajax(`/assign/claim/${topic.id}`, {
|
ajax(`/assign/claim/${topic.id}`, {
|
||||||
method: "PUT"
|
method: "PUT",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.set("topic.assigned_to_user", this.currentUser);
|
this.set("topic.assigned_to_user", this.currentUser);
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch((e) => {
|
||||||
if (e.jqXHR && e.jqXHR.responseJSON) {
|
if (e.jqXHR && e.jqXHR.responseJSON) {
|
||||||
let json = e.jqXHR.responseJSON;
|
let json = e.jqXHR.responseJSON;
|
||||||
if (json && json.extras) {
|
if (json && json.extras) {
|
||||||
|
@ -47,6 +47,6 @@ export default Ember.Component.extend({
|
||||||
}
|
}
|
||||||
this.set("claiming", false);
|
this.set("claiming", false);
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,10 +7,10 @@ function assignIfEqual(topic, data) {
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
this._super();
|
this._super();
|
||||||
this.messageBus.subscribe("/staff/topic-assignment", data => {
|
this.messageBus.subscribe("/staff/topic-assignment", (data) => {
|
||||||
let flaggedTopics = this.flaggedTopics;
|
let flaggedTopics = this.flaggedTopics;
|
||||||
if (flaggedTopics) {
|
if (flaggedTopics) {
|
||||||
flaggedTopics.forEach(ft => assignIfEqual(ft.topic, data));
|
flaggedTopics.forEach((ft) => assignIfEqual(ft.topic, data));
|
||||||
} else {
|
} else {
|
||||||
assignIfEqual(this.topic, data);
|
assignIfEqual(this.topic, data);
|
||||||
}
|
}
|
||||||
|
@ -20,5 +20,5 @@ export default Ember.Component.extend({
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
this._super();
|
this._super();
|
||||||
this.messageBus.unsubscribe("/staff/topic-assignment");
|
this.messageBus.unsubscribe("/staff/topic-assignment");
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
tagName: "li"
|
tagName: "li",
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
tagName: ""
|
tagName: "",
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import I18n from "I18n";
|
||||||
import computed from "discourse-common/utils/decorators";
|
import computed from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
|
@ -5,11 +6,11 @@ export default Ember.Component.extend({
|
||||||
|
|
||||||
@computed("user.reminders_frequency")
|
@computed("user.reminders_frequency")
|
||||||
availableFrequencies(userRemindersFrequency) {
|
availableFrequencies(userRemindersFrequency) {
|
||||||
return userRemindersFrequency.map(freq => {
|
return userRemindersFrequency.map((freq) => {
|
||||||
return {
|
return {
|
||||||
name: I18n.t(freq.name),
|
name: I18n.t(freq.name),
|
||||||
value: freq.value,
|
value: freq.value,
|
||||||
selected: false
|
selected: false,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -31,6 +32,6 @@ export default Ember.Component.extend({
|
||||||
actions: {
|
actions: {
|
||||||
setFrequency(newFrequency) {
|
setFrequency(newFrequency) {
|
||||||
this.set("user.custom_fields.remind_assigns_frequency", newFrequency);
|
this.set("user.custom_fields.remind_assigns_frequency", newFrequency);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,7 +5,7 @@ export default Ember.Service.extend({
|
||||||
unassign(topicId) {
|
unassign(topicId) {
|
||||||
return ajax("/assign/unassign", {
|
return ajax("/assign/unassign", {
|
||||||
type: "PUT",
|
type: "PUT",
|
||||||
data: { topic_id: topicId }
|
data: { topic_id: topicId },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ export default Ember.Service.extend({
|
||||||
return showModal("assign-user", {
|
return showModal("assign-user", {
|
||||||
model: {
|
model: {
|
||||||
topic,
|
topic,
|
||||||
username: topic.get("assigned_to_user.username")
|
username: topic.get("assigned_to_user.username"),
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ export default Ember.Service.extend({
|
||||||
type: "PUT",
|
type: "PUT",
|
||||||
data: {
|
data: {
|
||||||
username: user.username,
|
username: user.username,
|
||||||
topic_id: topic.id
|
topic_id: topic.id,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{avatar user imageSize="small"}}
|
{{avatar user imageSize="small"}}
|
||||||
<span class='assigned-username'>
|
<span class="assigned-username">
|
||||||
{{user.username}}
|
{{user.username}}
|
||||||
</span>
|
</span>
|
||||||
{{yield}}
|
{{yield}}
|
||||||
|
|
|
@ -5,18 +5,18 @@
|
||||||
This causes the topic-post-badge to be considered the same word as "text"
|
This causes the topic-post-badge to be considered the same word as "text"
|
||||||
at the end of the link, preventing it from line wrapping onto its own line.
|
at the end of the link, preventing it from line wrapping onto its own line.
|
||||||
--}}
|
--}}
|
||||||
<td class='main-link clearfix' colspan="1">
|
<td class="main-link clearfix" colspan="1">
|
||||||
<span class='link-top-line'>
|
<span class="link-top-line">
|
||||||
{{~raw "topic-status" topic=topic}}
|
{{~raw "topic-status" topic=topic}}
|
||||||
{{~#if isPrivateMessage}}
|
{{~#if isPrivateMessage}}
|
||||||
{{~d-icon "envelope" class="private-message-icon"}}
|
{{~d-icon "envelope" class="private-message-icon"}}
|
||||||
{{~/if}}
|
{{~/if}}
|
||||||
{{~topic-link topic class="raw-link raw-topic-link"}}
|
{{~topic-link topic class="raw-link raw-topic-link"}}
|
||||||
{{~#if topic.featured_link}}
|
{{~#if topic.featured_link}}
|
||||||
{{~topic-featured-link topic}}
|
{{~topic-featured-link topic}}
|
||||||
{{~/if}}
|
{{~/if}}
|
||||||
{{~#if showTopicPostBadges}}
|
{{~#if showTopicPostBadges}}
|
||||||
{{~raw "topic-post-badges" unread=topic.unread newPosts=topic.displayNewPosts unseen=topic.unseen url=topic.lastUnreadUrl newDotText=newDotText}}
|
{{~raw "topic-post-badges" unread=topic.unread newPosts=topic.displayNewPosts unseen=topic.unseen url=topic.lastUnreadUrl newDotText=newDotText}}
|
||||||
{{~/if}}
|
{{~/if}}
|
||||||
</span>
|
</span>
|
||||||
<div class="link-bottom-line">
|
<div class="link-bottom-line">
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{{#conditional-loading-spinner condition=loading}}
|
{{#conditional-loading-spinner condition=loading}}
|
||||||
{{#if hasIncoming}}
|
{{#if hasIncoming}}
|
||||||
<div class="show-mores">
|
<div class="show-mores">
|
||||||
<div class='alert alert-info clickable' {{action showInserted}}>
|
<div class="alert alert-info clickable" {{action showInserted}}>
|
||||||
<a tabindex="0" href="" {{action showInserted}}>
|
<a tabindex="0" href="" {{action showInserted}}>
|
||||||
{{count-i18n key="topic_count_" suffix="latest" count=incomingCount}}
|
{{count-i18n key="topic_count_" suffix="latest" count=incomingCount}}
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if topics}}
|
{{#if topics}}
|
||||||
|
@ -24,9 +24,9 @@
|
||||||
scrollOnLoad=scrollOnLoad}}
|
scrollOnLoad=scrollOnLoad}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#unless loadingMore}}
|
{{#unless loadingMore}}
|
||||||
<div class='alert alert-info'>
|
<div class="alert alert-info">
|
||||||
{{i18n 'choose_topic.none_found'}}
|
{{i18n "choose_topic.none_found"}}
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/conditional-loading-spinner}}
|
{{/conditional-loading-spinner}}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#link-to "group.assigned.show" filter (query-params order=order ascending=ascending q=q)}}
|
{{#link-to "group.assigned.show" filter (query-params order=order ascending=ascending q=q)}}
|
||||||
<div class="assign-everyone">
|
<div class="assign-everyone">
|
||||||
{{i18n 'discourse_assign.group_everyone'}}
|
{{i18n "discourse_assign.group_everyone"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="assign-count">
|
<div class="assign-count">
|
||||||
{{assignmentCount}}
|
{{assignmentCount}}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{{#link-to "group.assigned"}}
|
{{#link-to "group.assigned"}}
|
||||||
{{d-icon "user-plus" class="glyph"}}{{i18n 'discourse_assign.assigned'}} ({{group.assignment_count}})
|
{{d-icon "user-plus" class="glyph"}}{{i18n "discourse_assign.assigned"}} ({{group.assignment_count}})
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
{{#if siteSettings.assign_enabled}}
|
{{#if siteSettings.assign_enabled}}
|
||||||
<div class="controls controls-dropdown">
|
<div class="controls controls-dropdown">
|
||||||
<label>{{i18n "discourse_assign.reminders_frequency.description"}}</label>
|
<label>{{i18n "discourse_assign.reminders_frequency.description"}}</label>
|
||||||
{{combo-box valueAttribute="value"
|
{{combo-box
|
||||||
content=availableFrequencies
|
valueAttribute="value"
|
||||||
value=selectedFrequency
|
content=availableFrequencies
|
||||||
onSelect=(action "setFrequency")
|
value=selectedFrequency
|
||||||
|
onSelect=(action "setFrequency")
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -8,23 +8,22 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{#load-more class="paginated-topics-list" selector=".paginated-topics-list .topic-list tr" action=(action "loadMore")}}
|
{{#load-more class="paginated-topics-list" selector=".paginated-topics-list .topic-list tr" action=(action "loadMore")}}
|
||||||
{{basic-assigned-topic-list topicList=model
|
{{basic-assigned-topic-list
|
||||||
hideCategory=hideCategory
|
topicList=model
|
||||||
showPosters=showPosters
|
hideCategory=hideCategory
|
||||||
bulkSelectEnabled=bulkSelectEnabled
|
showPosters=showPosters
|
||||||
selected=selected
|
bulkSelectEnabled=bulkSelectEnabled
|
||||||
hasIncoming=hasIncoming
|
selected=selected
|
||||||
incomingCount=incomingCount
|
hasIncoming=hasIncoming
|
||||||
showInserted=(action "showInserted")
|
incomingCount=incomingCount
|
||||||
tagsForUser=tagsForUser
|
showInserted=(action "showInserted")
|
||||||
changeSort=(action 'changeSort')
|
tagsForUser=tagsForUser
|
||||||
unassign=(action 'unassign')
|
changeSort=(action "changeSort")
|
||||||
reassign=(action 'reassign')
|
unassign=(action "unassign")
|
||||||
onScroll=saveScrollPosition
|
reassign=(action "reassign")
|
||||||
scrollOnLoad=true}}
|
onScroll=saveScrollPosition
|
||||||
|
scrollOnLoad=true
|
||||||
|
}}
|
||||||
|
|
||||||
{{conditional-loading-spinner condition=model.loadingMore}}
|
{{conditional-loading-spinner condition=model.loadingMore}}
|
||||||
{{/load-more}}
|
{{/load-more}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<td>
|
<td>
|
||||||
<div class='main-link'>
|
<div class="main-link">
|
||||||
{{topic-status topic=topic}}
|
{{topic-status topic=topic}}
|
||||||
{{~#if isPrivateMessage}}
|
{{~#if isPrivateMessage}}
|
||||||
{{~d-icon "envelope" class="private-message-icon"}}
|
{{~d-icon "envelope" class="private-message-icon"}}
|
||||||
|
@ -10,34 +10,36 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if topic.hasExcerpt}}
|
{{#if topic.hasExcerpt}}
|
||||||
<div class="topic-excerpt">
|
<div class="topic-excerpt">
|
||||||
{{{topic.excerpt}}}
|
{{html-safe topic.excerpt}}
|
||||||
{{#if topic.excerptTruncated}}
|
{{#if topic.excerptTruncated}}
|
||||||
{{#unless topic.canClearPin}}<a href="{{unbound topic.url}}">{{i18n 'read_more'}}</a>{{/unless}}
|
{{#unless topic.canClearPin}}<a href={{unbound topic.url}}>{{i18n "read_more"}}</a>{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if topic.canClearPin}}
|
{{#if topic.canClearPin}}
|
||||||
<a href {{action "clearPin" topic}} title="{{i18n 'topic.clear_pin.help'}}">{{i18n 'topic.clear_pin.title'}}</a>
|
<a href {{action "clearPin" topic}} title={{i18n "topic.clear_pin.help"}}>{{i18n "topic.clear_pin.title"}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class='pull-right'>
|
<div class="pull-right">
|
||||||
{{assign-actions-dropdown topic=topic
|
{{assign-actions-dropdown
|
||||||
user=username
|
topic=topic
|
||||||
unassign=unassign
|
user=username
|
||||||
reassign=reassign}}
|
unassign=unassign
|
||||||
|
reassign=reassign
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class='clearfix'></div>
|
<div class="clearfix"></div>
|
||||||
<div class="topic-item-stats clearfix">
|
<div class="topic-item-stats clearfix">
|
||||||
{{discourse-tags topic mode="list" tagsForUser=tagsForUser}}
|
{{discourse-tags topic mode="list" tagsForUser=tagsForUser}}
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
{{raw "list/activity-column" topic=topic tagName="div" class="num activity last"}}
|
{{raw "list/activity-column" topic=topic tagName="div" class="num activity last"}}
|
||||||
<a href="{{topic.lastPostUrl}}" title='{{i18n 'last_post'}}: {{{raw-date topic.bumped_at}}}'>{{topic.last_poster_username}}</a>
|
<a href={{topic.lastPostUrl}} title="{{i18n 'last_post'}}: {{html-safe raw-date topic.bumped_at}}">{{topic.last_poster_username}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{#unless hideCategory}}
|
{{#unless hideCategory}}
|
||||||
<div class='category'>
|
<div class="category">
|
||||||
{{category-link topic.category}}
|
{{category-link topic.category}}
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1,30 +1,32 @@
|
||||||
{{#conditional-loading-spinner condition=loading}}
|
{{#conditional-loading-spinner condition=loading}}
|
||||||
{{#if hasIncoming}}
|
{{#if hasIncoming}}
|
||||||
<div class="show-mores">
|
<div class="show-mores">
|
||||||
<div class='alert alert-info clickable' {{action showInserted}}>
|
<div class="alert alert-info clickable" {{action showInserted}}>
|
||||||
{{count-i18n key="topic_count_" suffix="latest" count=incomingCount}}
|
{{count-i18n key="topic_count_" suffix="latest" count=incomingCount}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if topics}}
|
{{#if topics}}
|
||||||
<table class="topic-list">
|
<table class="topic-list">
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#each topics as |t|}}
|
{{#each topics as |t|}}
|
||||||
{{assigned-topic-list-item topic=t
|
{{assigned-topic-list-item
|
||||||
expandGloballyPinned=expandGloballyPinned
|
topic=t
|
||||||
expandAllPinned=expandAllPinned
|
expandGloballyPinned=expandGloballyPinned
|
||||||
lastVisitedTopic=lastVisitedTopic
|
expandAllPinned=expandAllPinned
|
||||||
selected=selected
|
lastVisitedTopic=lastVisitedTopic
|
||||||
tagsForUser=tagsForUser
|
selected=selected
|
||||||
unassign=unassign
|
tagsForUser=tagsForUser
|
||||||
reassign=reassign}}
|
unassign=unassign
|
||||||
{{/each}}
|
reassign=reassign
|
||||||
|
}}
|
||||||
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class='alert alert-info'>
|
<div class="alert alert-info">
|
||||||
{{i18n 'choose_topic.none_found'}}
|
{{i18n "choose_topic.none_found"}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/conditional-loading-spinner}}
|
{{/conditional-loading-spinner}}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{#d-modal-body title="discourse_assign.assign_modal.title" class="assign"}}
|
{{#d-modal-body title="discourse_assign.assign_modal.title" class="assign"}}
|
||||||
<div>
|
<div>
|
||||||
{{i18n 'discourse_assign.assign_modal.description'}}
|
{{i18n "discourse_assign.assign_modal.description"}}
|
||||||
{{user-selector
|
{{user-selector
|
||||||
single=true
|
single=true
|
||||||
allowAny=false
|
allowAny=false
|
||||||
groupMembersOf=allowedGroups
|
groupMembersOf=allowedGroups
|
||||||
|
@ -10,16 +10,23 @@
|
||||||
hasGroups=false
|
hasGroups=false
|
||||||
usernames=model.username
|
usernames=model.username
|
||||||
placeholderKey=placeholderKey
|
placeholderKey=placeholderKey
|
||||||
autocomplete="off"}}
|
autocomplete="off"
|
||||||
<div class='assign-suggestions'>
|
}}
|
||||||
{{#each assignSuggestions as |user|}}
|
<div class="assign-suggestions">
|
||||||
<a {{action "assignUser" user}}>
|
{{#each assignSuggestions as |user|}}
|
||||||
{{avatar user imageSize="small"}}
|
<a {{action "assignUser" user}}>
|
||||||
</a>
|
{{avatar user imageSize="small"}}
|
||||||
{{/each}}
|
</a>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{{/d-modal-body}}
|
{{/d-modal-body}}
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
{{d-button label='discourse_assign.assign_modal.assign' icon=inviteIcon action=(action "assign") class="btn-primary" disabled=disabled}}
|
{{d-button
|
||||||
|
label="discourse_assign.assign_modal.assign"
|
||||||
|
icon=inviteIcon action=(action "assign")
|
||||||
|
class="btn-primary"
|
||||||
|
disabled=disabled
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
{{#load-more class="paginated-topics-list" selector=".paginated-topics-list .topic-list tr" action=(action "loadMore")}}
|
{{#load-more class="paginated-topics-list" selector=".paginated-topics-list .topic-list tr" action=(action "loadMore")}}
|
||||||
{{basic-assigned-topic-list topicList=model
|
{{basic-assigned-topic-list
|
||||||
hideCategory=hideCategory
|
topicList=model
|
||||||
showPosters=showPosters
|
hideCategory=hideCategory
|
||||||
bulkSelectEnabled=bulkSelectEnabled
|
showPosters=showPosters
|
||||||
selected=selected
|
bulkSelectEnabled=bulkSelectEnabled
|
||||||
hasIncoming=hasIncoming
|
selected=selected
|
||||||
incomingCount=incomingCount
|
hasIncoming=hasIncoming
|
||||||
showInserted=(action "showInserted")
|
incomingCount=incomingCount
|
||||||
tagsForUser=tagsForUser
|
showInserted=(action "showInserted")
|
||||||
changeSort=(action 'changeSort')
|
tagsForUser=tagsForUser
|
||||||
unassign=(action 'unassign')
|
changeSort=(action "changeSort")
|
||||||
reassign=(action 'reassign')
|
unassign=(action "unassign")
|
||||||
onScroll=saveScrollPosition
|
reassign=(action "reassign")
|
||||||
scrollOnLoad=true}}
|
onScroll=saveScrollPosition
|
||||||
|
scrollOnLoad=true
|
||||||
|
}}
|
||||||
|
|
||||||
{{conditional-loading-spinner condition=model.loadingMore}}
|
{{conditional-loading-spinner condition=model.loadingMore}}
|
||||||
{{/load-more}}
|
{{/load-more}}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ if (QuickAccessPanel) {
|
||||||
.findFiltered("topicList", {
|
.findFiltered("topicList", {
|
||||||
filter: `topics/messages-assigned/${this.currentUser.username_lower}`,
|
filter: `topics/messages-assigned/${this.currentUser.username_lower}`,
|
||||||
params: {
|
params: {
|
||||||
exclude_category_ids: [-1]
|
exclude_category_ids: [-1],
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
.then(({ topic_list }) => {
|
.then(({ topic_list }) => {
|
||||||
return topic_list.topics;
|
return topic_list.topics;
|
||||||
|
@ -35,8 +35,8 @@ if (QuickAccessPanel) {
|
||||||
assignedTopic.id,
|
assignedTopic.id,
|
||||||
assignedTopic.last_read_post_number + 1
|
assignedTopic.last_read_post_number + 1
|
||||||
),
|
),
|
||||||
escapedContent: assignedTopic.fancy_title
|
escapedContent: assignedTopic.fancy_title,
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
"author": "Discourse",
|
"author": "Discourse",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-eslint": "^8.2",
|
"eslint-config-discourse": "latest"
|
||||||
"eslint": "^4.19",
|
|
||||||
"prettier": "1.14.3"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,10 @@ acceptance("Assign disabled mobile", {
|
||||||
settings: { assign_enabled: false },
|
settings: { assign_enabled: false },
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
clearTopicFooterButtons();
|
clearTopicFooterButtons();
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test("Footer dropdown does not contain button", async assert => {
|
QUnit.test("Footer dropdown does not contain button", async (assert) => {
|
||||||
updateCurrentUser({ can_assign: true });
|
updateCurrentUser({ can_assign: true });
|
||||||
const menu = selectKit(".topic-footer-mobile-dropdown");
|
const menu = selectKit(".topic-footer-mobile-dropdown");
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,10 @@ acceptance("Assign mobile", {
|
||||||
settings: { assign_enabled: true },
|
settings: { assign_enabled: true },
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
clearTopicFooterButtons();
|
clearTopicFooterButtons();
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test("Footer dropdown contains button", async assert => {
|
QUnit.test("Footer dropdown contains button", async (assert) => {
|
||||||
updateCurrentUser({ can_assign: true });
|
updateCurrentUser({ can_assign: true });
|
||||||
const menu = selectKit(".topic-footer-mobile-dropdown");
|
const menu = selectKit(".topic-footer-mobile-dropdown");
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,16 @@ acceptance("GroupAssignments", {
|
||||||
server.get(groupPath, () => helper.response(groupAssigns));
|
server.get(groupPath, () => helper.response(groupAssigns));
|
||||||
server.get(memberPath, () => helper.response(memberAssigns));
|
server.get(memberPath, () => helper.response(memberAssigns));
|
||||||
server.get(getMembersPath, () => helper.response(getMembers));
|
server.get(getMembersPath, () => helper.response(getMembers));
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test("Group Assignments Everyone", async assert => {
|
QUnit.test("Group Assignments Everyone", async (assert) => {
|
||||||
await visit("/g/discourse/assigned");
|
await visit("/g/discourse/assigned");
|
||||||
assert.equal(currentPath(), "group.assigned.show");
|
assert.equal(currentPath(), "group.assigned.show");
|
||||||
assert.ok(find(".topic-list-item").length === 1);
|
assert.ok(find(".topic-list-item").length === 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test("Group Assignments Ahmedgagan", async assert => {
|
QUnit.test("Group Assignments Ahmedgagan", async (assert) => {
|
||||||
await visit("/g/discourse/assigned/ahmedgagan6");
|
await visit("/g/discourse/assigned/ahmedgagan6");
|
||||||
assert.equal(currentPath(), "group.assigned.show");
|
assert.equal(currentPath(), "group.assigned.show");
|
||||||
assert.ok(find(".topic-list-item").length === 1);
|
assert.ok(find(".topic-list-item").length === 1);
|
||||||
|
|
|
@ -8,16 +8,16 @@ acceptance("Quick access assignments panel", {
|
||||||
loggedIn: true,
|
loggedIn: true,
|
||||||
settings: {
|
settings: {
|
||||||
assign_enabled: true,
|
assign_enabled: true,
|
||||||
assigns_user_url_path: "/"
|
assigns_user_url_path: "/",
|
||||||
},
|
},
|
||||||
pretend(server, helper) {
|
pretend(server, helper) {
|
||||||
const messagesPath = "/topics/messages-assigned/eviltrout.json";
|
const messagesPath = "/topics/messages-assigned/eviltrout.json";
|
||||||
const assigns = AssignedTopics[messagesPath];
|
const assigns = AssignedTopics[messagesPath];
|
||||||
server.get(messagesPath, () => helper.response(assigns));
|
server.get(messagesPath, () => helper.response(assigns));
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test("Quick access assignments panel", async assert => {
|
QUnit.test("Quick access assignments panel", async (assert) => {
|
||||||
updateCurrentUser({ can_assign: true });
|
updateCurrentUser({ can_assign: true });
|
||||||
|
|
||||||
await visit("/");
|
await visit("/");
|
||||||
|
|
|
@ -6,16 +6,16 @@ acceptance("UnAssign/Re-assign from the topics list", {
|
||||||
loggedIn: true,
|
loggedIn: true,
|
||||||
settings: {
|
settings: {
|
||||||
assign_enabled: true,
|
assign_enabled: true,
|
||||||
assigns_user_url_path: "/"
|
assigns_user_url_path: "/",
|
||||||
},
|
},
|
||||||
pretend(server, helper) {
|
pretend(server, helper) {
|
||||||
const messagesPath = "/topics/messages-assigned/eviltrout.json";
|
const messagesPath = "/topics/messages-assigned/eviltrout.json";
|
||||||
const assigns = AssignedTopics[messagesPath];
|
const assigns = AssignedTopics[messagesPath];
|
||||||
server.get(messagesPath, () => helper.response(assigns));
|
server.get(messagesPath, () => helper.response(assigns));
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
QUnit.test("Unassing/Re-assign options are visible", async assert => {
|
QUnit.test("Unassing/Re-assign options are visible", async (assert) => {
|
||||||
const options = selectKit(".assign-actions-dropdown");
|
const options = selectKit(".assign-actions-dropdown");
|
||||||
|
|
||||||
await visit("/u/eviltrout/activity/assigned");
|
await visit("/u/eviltrout/activity/assigned");
|
||||||
|
|
|
@ -16,12 +16,12 @@ componentTest("display username", {
|
||||||
last_posted_at: "2020-06-22T10:15:54.532Z",
|
last_posted_at: "2020-06-22T10:15:54.532Z",
|
||||||
last_seen_at: "2020-07-07T11:55:59.437Z",
|
last_seen_at: "2020-07-07T11:55:59.437Z",
|
||||||
added_at: "2020-06-22T09:55:31.692Z",
|
added_at: "2020-06-22T09:55:31.692Z",
|
||||||
timezone: "Asia/Calcutta"
|
timezone: "Asia/Calcutta",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async test(assert) {
|
async test(assert) {
|
||||||
assert.ok(find("li")[0].innerText.trim(), "Ahmed");
|
assert.ok(find("li")[0].innerText.trim(), "Ahmed");
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
componentTest("display name", {
|
componentTest("display name", {
|
||||||
template: "{{group-assigned-filter show-avatar=true filter=filter}}",
|
template: "{{group-assigned-filter show-avatar=true filter=filter}}",
|
||||||
|
@ -37,10 +37,10 @@ componentTest("display name", {
|
||||||
last_posted_at: "2020-06-22T10:15:54.532Z",
|
last_posted_at: "2020-06-22T10:15:54.532Z",
|
||||||
last_seen_at: "2020-07-07T11:55:59.437Z",
|
last_seen_at: "2020-07-07T11:55:59.437Z",
|
||||||
added_at: "2020-06-22T09:55:31.692Z",
|
added_at: "2020-06-22T09:55:31.692Z",
|
||||||
timezone: "Asia/Calcutta"
|
timezone: "Asia/Calcutta",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async test(assert) {
|
async test(assert) {
|
||||||
assert.ok(find("li")[0].innerText.trim(), "Ahmed Gagan");
|
assert.ok(find("li")[0].innerText.trim(), "Ahmed Gagan");
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,14 +5,14 @@ export default {
|
||||||
id: -2,
|
id: -2,
|
||||||
username: "discobot",
|
username: "discobot",
|
||||||
name: "discobot",
|
name: "discobot",
|
||||||
avatar_template: "/user_avatar/localhost/discobot/{size}/1_2.png"
|
avatar_template: "/user_avatar/localhost/discobot/{size}/1_2.png",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: -1,
|
id: -1,
|
||||||
username: "system",
|
username: "system",
|
||||||
name: "system",
|
name: "system",
|
||||||
avatar_template: "/user_avatar/localhost/system/{size}/2_2.png"
|
avatar_template: "/user_avatar/localhost/system/{size}/2_2.png",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
primary_groups: [],
|
primary_groups: [],
|
||||||
topic_list: {
|
topic_list: {
|
||||||
|
@ -61,27 +61,27 @@ export default {
|
||||||
extras: "latest single",
|
extras: "latest single",
|
||||||
description: "Original Poster, Most Recent Poster",
|
description: "Original Poster, Most Recent Poster",
|
||||||
user_id: -2,
|
user_id: -2,
|
||||||
primary_group_id: null
|
primary_group_id: null,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
participants: [
|
participants: [
|
||||||
{
|
{
|
||||||
extras: "latest",
|
extras: "latest",
|
||||||
description: null,
|
description: null,
|
||||||
user_id: -2,
|
user_id: -2,
|
||||||
primary_group_id: null
|
primary_group_id: null,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
assigned_to_user: {
|
assigned_to_user: {
|
||||||
id: 19,
|
id: 19,
|
||||||
username: "eviltrout",
|
username: "eviltrout",
|
||||||
name: null,
|
name: null,
|
||||||
avatar_template:
|
avatar_template:
|
||||||
"/letter_avatar_proxy/v4/letter/r/ed8c4c/{size}.png"
|
"/letter_avatar_proxy/v4/letter/r/ed8c4c/{size}.png",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
"/topics/messages-assigned/ahmedgagan6.json": {
|
"/topics/messages-assigned/ahmedgagan6.json": {
|
||||||
users: [
|
users: [
|
||||||
|
@ -89,14 +89,14 @@ export default {
|
||||||
id: -2,
|
id: -2,
|
||||||
username: "discobot",
|
username: "discobot",
|
||||||
name: "discobot",
|
name: "discobot",
|
||||||
avatar_template: "/user_avatar/localhost/discobot/{size}/1_2.png"
|
avatar_template: "/user_avatar/localhost/discobot/{size}/1_2.png",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: -1,
|
id: -1,
|
||||||
username: "system",
|
username: "system",
|
||||||
name: "system",
|
name: "system",
|
||||||
avatar_template: "/user_avatar/localhost/system/{size}/2_2.png"
|
avatar_template: "/user_avatar/localhost/system/{size}/2_2.png",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
primary_groups: [],
|
primary_groups: [],
|
||||||
topic_list: {
|
topic_list: {
|
||||||
|
@ -145,26 +145,26 @@ export default {
|
||||||
extras: "latest single",
|
extras: "latest single",
|
||||||
description: "Original Poster, Most Recent Poster",
|
description: "Original Poster, Most Recent Poster",
|
||||||
user_id: -2,
|
user_id: -2,
|
||||||
primary_group_id: null
|
primary_group_id: null,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
participants: [
|
participants: [
|
||||||
{
|
{
|
||||||
extras: "latest",
|
extras: "latest",
|
||||||
description: null,
|
description: null,
|
||||||
user_id: -2,
|
user_id: -2,
|
||||||
primary_group_id: null
|
primary_group_id: null,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
assigned_to_user: {
|
assigned_to_user: {
|
||||||
id: 2770,
|
id: 2770,
|
||||||
username: "awesomerobot",
|
username: "awesomerobot",
|
||||||
name: null,
|
name: null,
|
||||||
avatar_template:
|
avatar_template:
|
||||||
"/user_avatar/meta.discourse.org/awesomerobot/{size}/33872.png"
|
"/user_avatar/meta.discourse.org/awesomerobot/{size}/33872.png",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,14 +5,14 @@ export default {
|
||||||
id: -2,
|
id: -2,
|
||||||
username: "discobot",
|
username: "discobot",
|
||||||
name: "discobot",
|
name: "discobot",
|
||||||
avatar_template: "/user_avatar/localhost/discobot/{size}/1_2.png"
|
avatar_template: "/user_avatar/localhost/discobot/{size}/1_2.png",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: -1,
|
id: -1,
|
||||||
username: "system",
|
username: "system",
|
||||||
name: "system",
|
name: "system",
|
||||||
avatar_template: "/user_avatar/localhost/system/{size}/2_2.png"
|
avatar_template: "/user_avatar/localhost/system/{size}/2_2.png",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
primary_groups: [],
|
primary_groups: [],
|
||||||
topic_list: {
|
topic_list: {
|
||||||
|
@ -61,26 +61,26 @@ export default {
|
||||||
extras: "latest single",
|
extras: "latest single",
|
||||||
description: "Original Poster, Most Recent Poster",
|
description: "Original Poster, Most Recent Poster",
|
||||||
user_id: -2,
|
user_id: -2,
|
||||||
primary_group_id: null
|
primary_group_id: null,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
participants: [
|
participants: [
|
||||||
{
|
{
|
||||||
extras: "latest",
|
extras: "latest",
|
||||||
description: null,
|
description: null,
|
||||||
user_id: -2,
|
user_id: -2,
|
||||||
primary_group_id: null
|
primary_group_id: null,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
assigned_to_user: {
|
assigned_to_user: {
|
||||||
id: 19,
|
id: 19,
|
||||||
username: "eviltrout",
|
username: "eviltrout",
|
||||||
name: null,
|
name: null,
|
||||||
avatar_template:
|
avatar_template:
|
||||||
"/letter_avatar_proxy/v4/letter/r/ed8c4c/{size}.png"
|
"/letter_avatar_proxy/v4/letter/r/ed8c4c/{size}.png",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,7 +7,7 @@ export default {
|
||||||
name: null,
|
name: null,
|
||||||
avatar_template: "/letter_avatar_proxy/v4/letter/a/838e76/{size}.png",
|
avatar_template: "/letter_avatar_proxy/v4/letter/a/838e76/{size}.png",
|
||||||
assignments_count: 40,
|
assignments_count: 40,
|
||||||
username_lower: "ahmedgagan6"
|
username_lower: "ahmedgagan6",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
|
@ -15,7 +15,7 @@ export default {
|
||||||
name: "Gagan ",
|
name: "Gagan ",
|
||||||
avatar_template: "/letter_avatar_proxy/v4/letter/g/8edcca/{size}.png",
|
avatar_template: "/letter_avatar_proxy/v4/letter/g/8edcca/{size}.png",
|
||||||
assignments_count: 17,
|
assignments_count: 17,
|
||||||
username_lower: "gaganahmed"
|
username_lower: "gaganahmed",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 3,
|
id: 3,
|
||||||
|
@ -23,7 +23,7 @@ export default {
|
||||||
name: "",
|
name: "",
|
||||||
avatar_template: "/user_avatar/localhost/ahmedgagan/{size}/2_2.png",
|
avatar_template: "/user_avatar/localhost/ahmedgagan/{size}/2_2.png",
|
||||||
assignments_count: 16,
|
assignments_count: 16,
|
||||||
username_lower: "ahmedgagan"
|
username_lower: "ahmedgagan",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
|
@ -31,8 +31,8 @@ export default {
|
||||||
name: "Ahmed Gagan",
|
name: "Ahmed Gagan",
|
||||||
avatar_template: "/letter_avatar_proxy/v4/letter/a/8c91f0/{size}.png",
|
avatar_template: "/letter_avatar_proxy/v4/letter/a/8c91f0/{size}.png",
|
||||||
assignments_count: 15,
|
assignments_count: 15,
|
||||||
username_lower: "ahmed"
|
username_lower: "ahmed",
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue