This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/routes/static_route.js

23 lines
455 B
JavaScript

/**
The routes used for rendering static content
@class StaticRoute
@extends Discourse.Route
@namespace Discourse
@module Discourse
**/
Discourse.StaticController.pages.forEach(function(page) {
Discourse[(page.capitalize()) + "Route"] = Discourse.Route.extend({
renderTemplate: function() {
this.render('static');
},
setupController: function() {
this.controllerFor('static').loadPath("/" + page);
}
});
});