mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
wiki
This commit is contained in:
1 parent
649f65b17d
commit
e3bbff7e11
22 files changed
+315
-441
No files matched your search
@@ -68,9 +68,13 @@ class DiscussionMainHandler extends DiscussionHandler {
|
||||
constants.DISCUSSION_PER_PAGE,
|
||||
);
|
||||
const udict = await user.getList(ddocs.map((ddoc) => ddoc.owner));
|
||||
const path = [
|
||||
['Hydro', '/'],
|
||||
['discussion_main', null],
|
||||
];
|
||||
this.response.template = 'discussion_main_or_node.html';
|
||||
this.response.body = {
|
||||
ddocs, dpcount, udict, page, page_name: 'discussion_main', vnode: {},
|
||||
ddocs, dpcount, udict, page, page_name: 'discussion_main', vnode: {}, path,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,9 +80,13 @@ class TrainingMainHandler extends TrainingHandler {
|
||||
if (enrolledTids.size) tdict = await training.getList(Array.from(enrolledTids));
|
||||
}
|
||||
for (const tdoc in tdocs) tdict[tdoc._id] = tdoc;
|
||||
const path = [
|
||||
['Hydro', '/'],
|
||||
['training_main', null],
|
||||
];
|
||||
this.response.template = 'training_main.html';
|
||||
this.response.body = {
|
||||
tdocs, page, tpcount, qs, tsdict, tdict,
|
||||
tdocs, page, tpcount, qs, tsdict, tdict, path,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -154,8 +158,13 @@ class TrainingCreateHandler extends TrainingHandler {
|
||||
}
|
||||
|
||||
async get() {
|
||||
const path = [
|
||||
['Hydro', '/'],
|
||||
['problem_main', '/t'],
|
||||
['problem_create', null],
|
||||
];
|
||||
this.response.template = 'training_edit.html';
|
||||
this.response.body = { page_name: 'training_create' };
|
||||
this.response.body = { page_name: 'training_create', path };
|
||||
}
|
||||
|
||||
async post({
|
||||
|
||||
Reference in new issue
Block a user