mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-25 06:52:24 -05:00
27 lines
No EOL
767 B
JavaScript
27 lines
No EOL
767 B
JavaScript
/**
|
|
Handles routes related to viewing and editing site settings.
|
|
|
|
@class AdminSiteSettingsRoute
|
|
@extends Discourse.Route
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.AdminSiteSettingsRoute = Discourse.Route.extend({
|
|
model: function() {
|
|
return Discourse.SiteSetting.findAll();
|
|
},
|
|
|
|
afterModel: function(siteSettings) {
|
|
this.controllerFor('adminSiteSettings').set('allSiteSettings', siteSettings);
|
|
}
|
|
});
|
|
|
|
/**
|
|
Handles when you click the Site Settings tab in admin, but haven't
|
|
chosen a category. It will redirect to the first category.
|
|
**/
|
|
Discourse.AdminSiteSettingsIndexRoute = Discourse.Route.extend({
|
|
model: function() {
|
|
this.transitionTo('adminSiteSettingsCategory', this.modelFor('adminSiteSettings')[0].nameKey);
|
|
}
|
|
}); |