浏览代码

Show number of disable docs

Thibaut 11 年之前
父节点
当前提交
9f54308272
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 1
      assets/javascripts/templates/sidebar_tmpl.coffee
  2. 1 1
      assets/javascripts/views/sidebar/doc_list.coffee

+ 2 - 1
assets/javascripts/templates/sidebar_tmpl.coffee

@@ -30,7 +30,8 @@ templates.sidebarLabel = (doc, options = {}) ->
 templates.sidebarDisabledList = (options) ->
   """<div class="_disabled-list">#{templates.render 'sidebarDoc', options.docs, disabled: true}</div>"""
 
-templates.sidebarDisabled = '<h6 class="_list-title"><span class="_list-arrow"></span>Disabled</h6>'
+templates.sidebarDisabled = (options) ->
+  """<h6 class="_list-title"><span class="_list-arrow"></span>Disabled (#{options.count})</h6>"""
 
 templates.sidebarVote = '<a href="https://trello.com/b/6BmTulfx/devdocs-documentation" class="_list-link" target="_blank">Vote for new documentation</a>'
 

+ 1 - 1
assets/javascripts/views/sidebar/doc_list.coffee

@@ -41,7 +41,7 @@ class app.views.DocList extends app.View
     return
 
   renderDisabled: ->
-    @append @tmpl('sidebarDisabled')
+    @append @tmpl('sidebarDisabled', count: app.disabledDocs.size())
     @renderDisabledList()
     return