mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: New 'Reviewable' model to make reviewable items generic
Includes support for flags, reviewable users and queued posts, with REST API backwards compatibility. Co-Authored-By: romanrizzi <romanalejandro@gmail.com> Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
export default Discourse.Route.extend({
|
||||
redirect() {
|
||||
let segment = this.siteSettings.flags_default_topics
|
||||
? "topics"
|
||||
: "postsActive";
|
||||
this.replaceWith(`adminFlags.${segment}`);
|
||||
}
|
||||
});
|
||||
@@ -1,20 +0,0 @@
|
||||
import { loadTopicView } from "discourse/models/topic";
|
||||
|
||||
export default Ember.Route.extend({
|
||||
model(params) {
|
||||
let topicRecord = this.store.createRecord("topic", { id: params.id });
|
||||
let topic = loadTopicView(topicRecord).then(() => topicRecord);
|
||||
|
||||
return Ember.RSVP.hash({
|
||||
topic,
|
||||
flaggedPosts: this.store.findAll("flagged-post", {
|
||||
filter: "active",
|
||||
topic_id: params.id
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
setupController(controller, hash) {
|
||||
controller.setProperties(hash);
|
||||
}
|
||||
});
|
||||
@@ -120,18 +120,6 @@ export default function() {
|
||||
}
|
||||
);
|
||||
|
||||
this.route(
|
||||
"adminFlags",
|
||||
{ path: "/flags", resetNamespace: true },
|
||||
function() {
|
||||
this.route("postsActive", { path: "active" });
|
||||
this.route("postsOld", { path: "old" });
|
||||
this.route("topics", { path: "topics" }, function() {
|
||||
this.route("show", { path: ":id" });
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
this.route(
|
||||
"adminLogs",
|
||||
{ path: "/logs", resetNamespace: true },
|
||||
|
||||
Reference in New Issue
Block a user