mirror of
https://github.com/discourse/discourse.git
synced 2024-12-18 20:35:58 +08:00
d69c5eebcf
* UI: Mass grant a badge from the admin ui * Send the uploaded CSV and badge ID to the backend * Read the CSV and grant badge in batches * UX: Communicate the result to the user * Don't award if badge is disabled * Create a 'send_notification' method to remove duplicated code, slightly shrink badge image. Replace router transition with href. * Dynamically discover current route
13 lines
259 B
JavaScript
13 lines
259 B
JavaScript
import Route from "discourse/routes/discourse";
|
|
|
|
export default Route.extend({
|
|
model(params) {
|
|
if (params.badge_id !== "new") {
|
|
return this.modelFor("adminBadges").findBy(
|
|
"id",
|
|
parseInt(params.badge_id, 10)
|
|
);
|
|
}
|
|
}
|
|
});
|