Browse Source

Fix: Incorrect variable assignee on page_list view

Sotaro KARASAWA 9 years ago
parent
commit
35888b11f0
3 changed files with 4 additions and 4 deletions
  1. 2 2
      lib/routes/page.js
  2. 1 1
      lib/views/page_list.html
  3. 1 1
      lib/views/widget/page_list.html

+ 2 - 2
lib/routes/page.js

@@ -101,8 +101,8 @@ module.exports = function(crowi, app) {
 
       pagerOptions.length = pageList.length;
 
-      renderVars.config = {
-        seener_threshold: SEENER_THRESHOLD
+      renderVars.viewConfig = {
+        seener_threshold: SEENER_THRESHOLD,
       };
       renderVars.pager = generatePager(pagerOptions);
       renderVars.pages = pageList;

+ 1 - 1
lib/views/page_list.html

@@ -174,7 +174,7 @@
 
     {# list view #}
     <div class="active tab-pane fade page-list-container in" id="view-list">
-      {% include 'widget/page_list.html' with { pages: pages, pager: pager, config: config } %}
+      {% include 'widget/page_list.html' with { pages: pages, pager: pager, viewConfig: viewConfig } %}
     </div>
 
     {# timeline view #}

+ 1 - 1
lib/views/widget/page_list.html

@@ -31,7 +31,7 @@
     </span>
     {% endif  %}
 
-    {% if page.seenUsers.length >= config.seener_threshold %}
+    {% if viewConfig.seener_threshold and page.seenUsers.length >= viewConfig.seener_threshold %}
     <span>
       <i class="fa fa-eye">{{ page.seenUsers.length }}</i>
     </span>