2013-02-22 15:41:12 -05:00
|
|
|
/**
|
|
|
|
Handles routes related to viewing and editing site settings.
|
2013-02-20 13:15:50 -05:00
|
|
|
|
2013-04-05 02:43:48 -04:00
|
|
|
@class AdminSiteSettingsRoute
|
2013-02-22 15:41:12 -05:00
|
|
|
@extends Discourse.Route
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
|
|
|
Discourse.AdminSiteSettingsRoute = Discourse.Route.extend({
|
|
|
|
model: function() {
|
|
|
|
return Discourse.SiteSetting.findAll();
|
2013-11-14 12:37:41 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
afterModel: function(siteSettings) {
|
|
|
|
this.controllerFor('adminSiteSettings').set('allSiteSettings', siteSettings);
|
2013-04-05 02:43:48 -04:00
|
|
|
}
|
2013-02-22 15:41:12 -05:00
|
|
|
});
|
2013-11-13 14:02:47 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
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() {
|
2014-06-05 10:18:11 -04:00
|
|
|
this.replaceWith('adminSiteSettingsCategory', this.modelFor('adminSiteSettings')[0].nameKey);
|
2013-11-13 14:02:47 -05:00
|
|
|
}
|
2014-06-05 10:18:11 -04:00
|
|
|
});
|