|
|
@@ -14,6 +14,14 @@ module.exports = function(crowi, app) {
|
|
|
return path;
|
|
|
}
|
|
|
|
|
|
+ function isUserPage(path) {
|
|
|
+ if (path.match(/^\/user\/[^\/]+$/)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
// TODO: total とかでちゃんと計算する
|
|
|
function generatePager(options) {
|
|
|
var next = null, prev = null,
|
|
|
@@ -75,7 +83,12 @@ module.exports = function(crowi, app) {
|
|
|
|
|
|
Revision.findRevisionList(pageData.path, {}, function(err, tree) {
|
|
|
var revision = pageData.revision || {};
|
|
|
- res.render(req.query.presentation ? 'page_presentation' : 'page', {
|
|
|
+ var defaultPageTeamplate = 'page';
|
|
|
+ if (isUserPage(pageData.path)) {
|
|
|
+ defaultPageTeamplate = 'user_page';
|
|
|
+ }
|
|
|
+
|
|
|
+ res.render(req.query.presentation ? 'page_presentation' : defaultPageTeamplate, {
|
|
|
path: pageData.path,
|
|
|
revision: revision,
|
|
|
author: revision.author || false,
|