|
@@ -472,6 +472,8 @@ module.exports = function(crowi, app) {
|
|
|
page: pageData,
|
|
page: pageData,
|
|
|
revision: pageData.revision || {},
|
|
revision: pageData.revision || {},
|
|
|
author: pageData.revision.author || false,
|
|
author: pageData.revision.author || false,
|
|
|
|
|
+ localTemplateExists: false,
|
|
|
|
|
+ globalTemplateExists: false,
|
|
|
};
|
|
};
|
|
|
var userPage = isUserPage(pageData.path);
|
|
var userPage = isUserPage(pageData.path);
|
|
|
var userData = null;
|
|
var userData = null;
|
|
@@ -509,6 +511,12 @@ module.exports = function(crowi, app) {
|
|
|
}
|
|
}
|
|
|
}).then(function() {
|
|
}).then(function() {
|
|
|
return interceptorManager.process('beforeRenderPage', req, res, renderVars);
|
|
return interceptorManager.process('beforeRenderPage', req, res, renderVars);
|
|
|
|
|
+ }).then(function() {
|
|
|
|
|
+ return Page.checkIfTemplatesExist(pageData.path)
|
|
|
|
|
+ .then(function(templateInfo) {
|
|
|
|
|
+ renderVars.localTemplateExists = templateInfo.localTemplateExists;
|
|
|
|
|
+ renderVars.globalTemplateExists = templateInfo.globalTemplateExists;
|
|
|
|
|
+ });
|
|
|
}).then(function() {
|
|
}).then(function() {
|
|
|
var defaultPageTeamplate = 'customlayout-selector/page';
|
|
var defaultPageTeamplate = 'customlayout-selector/page';
|
|
|
if (userData) {
|
|
if (userData) {
|