Преглед изворни кода

User page list can not portalize

Sotaro KARASAWA пре 10 година
родитељ
комит
5a69f4f1a4
2 измењених фајлова са 9 додато и 1 уклоњено
  1. 8 0
      lib/util/swigFunctions.js
  2. 1 1
      lib/views/page_list.html

+ 8 - 0
lib/util/swigFunctions.js

@@ -20,6 +20,14 @@ module.exports = function(crowi, app, locals) {
     return Config.isUploadable(config);
   };
 
+  locals.isUserPageList = function(path) {
+    if (path.match(/^\/user\/[^\/]+\/$/)) {
+      return true;
+    }
+
+    return false;
+  };
+
   locals.user_page_root = function(user) {
     if (!user) {
       return '';

+ 1 - 1
lib/views/page_list.html

@@ -160,7 +160,7 @@
 
 {% block side_header %}
 
-{% if not page %}
+{% if not page and not isUserPageList(path) %}
 <div class="portal-side">
   <div class="portal-form-button">
     <button class="btn btn-primary" id="create-portal-button">Create Portal</button>