2020-06-06 00:03:37 +02:00
|
|
|
"use strict";
|
2016-03-19 21:37:04 +01:00
|
|
|
|
2020-06-06 00:03:37 +02:00
|
|
|
const topNavigation = require("../models/top_navigation.js");
|
|
|
|
const HelpView = require("../views/help_view.js");
|
2016-04-01 00:20:34 +02:00
|
|
|
|
2016-03-19 21:37:04 +01:00
|
|
|
class HelpController {
|
2016-06-14 10:31:48 +02:00
|
|
|
constructor(section, subsection) {
|
2020-06-06 00:03:37 +02:00
|
|
|
topNavigation.activate("help");
|
|
|
|
topNavigation.setTitle("Help");
|
2016-06-14 10:31:48 +02:00
|
|
|
this._helpView = new HelpView(section, subsection);
|
2016-03-19 21:37:04 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-06 00:03:37 +02:00
|
|
|
module.exports = (router) => {
|
|
|
|
router.enter(["help"], (ctx, next) => {
|
2016-06-14 10:31:48 +02:00
|
|
|
new HelpController();
|
|
|
|
});
|
2020-06-06 00:03:37 +02:00
|
|
|
router.enter(["help", ":section"], (ctx, next) => {
|
2016-07-07 21:18:35 +02:00
|
|
|
new HelpController(ctx.parameters.section);
|
2016-06-14 10:31:48 +02:00
|
|
|
});
|
2020-06-06 00:03:37 +02:00
|
|
|
router.enter(["help", ":section", ":subsection"], (ctx, next) => {
|
2016-07-07 21:18:35 +02:00
|
|
|
new HelpController(ctx.parameters.section, ctx.parameters.subsection);
|
2016-06-14 10:31:48 +02:00
|
|
|
});
|
|
|
|
};
|