Просмотр исходного кода

move installed plugin information to /admin from /admin/app

Yuki Takei 9 лет назад
Родитель
Сommit
e016195c54
3 измененных файлов с 23 добавлено и 22 удалено
  1. 3 2
      lib/routes/admin.js
  2. 0 20
      lib/views/admin/app.html
  3. 20 0
      lib/views/admin/index.html

+ 3 - 2
lib/routes/admin.js

@@ -68,7 +68,9 @@ module.exports = function(crowi, app) {
   }
 
   actions.index = function(req, res) {
-    return res.render('admin/index');
+    return res.render('admin/index', {
+      plugins: pluginUtils.listPlugins(crowi.rootDir),
+    });
   };
 
   // app.get('/admin/app'                  , admin.app.index);
@@ -79,7 +81,6 @@ module.exports = function(crowi, app) {
 
     return res.render('admin/app', {
       settingForm: settingForm,
-      plugins: pluginUtils.listPlugins(crowi.rootDir),
     });
   };
 

+ 0 - 20
lib/views/admin/app.html

@@ -288,26 +288,6 @@
       </fieldset>
       </form>
 
-      <h4>インストールされているプラグイン一覧</h4>
-      <table class="table table-bordered">
-        <th class="text-center">
-          パッケージ名
-        </th>
-        <th class="text-center">
-          指定バージョン
-        </th>
-        <th class="text-center">
-          インストールされているバージョン
-        </th>
-        {% for pluginName in Object.keys(plugins) %}
-        <tr>
-          <td>{{ pluginName }}</td>
-          <td class="text-center">{{ plugins[pluginName] }}</td>
-          <td class="text-center">(TBD)</td>
-        </tr>
-        {% endfor %}
-      </table>
-
     </div>
   </div>
 

+ 20 - 0
lib/views/admin/index.html

@@ -49,6 +49,26 @@
           <td>{{ yarnVersion() }}</td>
         </tr>
       </table>
+
+      <h3>インストールされているプラグイン一覧</h3>
+      <table class="table table-bordered">
+        <th class="text-center">
+          パッケージ名
+        </th>
+        <th class="text-center">
+          指定バージョン
+        </th>
+        <th class="text-center">
+          インストールされているバージョン
+        </th>
+        {% for pluginName in Object.keys(plugins) %}
+        <tr>
+          <td>{{ pluginName }}</td>
+          <td class="text-center">{{ plugins[pluginName] }}</td>
+          <td class="text-center">(TBD)</td>
+        </tr>
+        {% endfor %}
+      </table>
     </div>
   </div>