Taichi Masuyama 4 лет назад
Родитель
Сommit
1c915828c8

+ 2 - 3
packages/app/src/server/routes/page.js

@@ -568,9 +568,8 @@ module.exports = function(crowi, app) {
     const query = redirectFrom == null ? '' : `?redirectFrom=${redirectFrom}`;
     const query = redirectFrom == null ? '' : `?redirectFrom=${redirectFrom}`;
 
 
     if (pages.length >= 2) {
     if (pages.length >= 2) {
-      // TODO: return res.render('layout-growi/select_same_path_page', renderVars);
-      // TODO: put redirectFrom into renderVars
-      return res.send('Two or more pages found.');
+      // WIP
+      return res.render('layout-growi/select-go-to-page', { pages, redirectFrom });
     }
     }
 
 
     if (pages.length === 1) {
     if (pages.length === 1) {

+ 22 - 0
packages/app/src/server/views/layout-growi/select-go-to-page.html

@@ -0,0 +1,22 @@
+{% extends 'base/layout.html' %}
+
+<!-- WIP -->
+
+{% block content_main %}
+  <div>ContentMain</div>
+  <div>
+    {% for page in pages %}
+      <li>{{page._id.toString()}}: {{page.path}}</li>
+    {% endfor %}
+  </div>
+  <br>
+  <div>redirectFrom: {{redirectFrom}}</div>
+{% endblock %}
+
+{% block content_footer %}
+  <div>Footer</div>
+{% endblock %}
+
+{% block body_end %}
+  <div>BodyEnd</div>
+{% endblock %}