Add note about docs and search

pull/165/head
Thibaut 10 years ago
parent 5066259cdc
commit 2696402458

@ -18,10 +18,11 @@ templates.sidebarResult = (entry) ->
"""<a href="#{entry.fullPath()}" class="_list-item _list-hover _list-result _icon-#{entry.doc.slug}"><span class="_list-reveal" data-reset-list title="Reveal in list"></span>#{$.escape entry.name}</a>""" """<a href="#{entry.fullPath()}" class="_list-item _list-hover _list-result _icon-#{entry.doc.slug}"><span class="_list-reveal" data-reset-list title="Reveal in list"></span>#{$.escape entry.name}</a>"""
templates.sidebarNoResults = -> templates.sidebarNoResults = ->
info = if app.isSingleDoc() or app.disabledDocs.isEmpty() then '' else """ html = """ <div class="_list-note">No results.</div> """
<span class="_list-noresults-note">Note: documentations must be <a class="_list-noresults-link" data-pick-docs>enabled</a> to appear in the search.</span> html += """
""" <div class="_list-note">Note: documentations must be <a class="_list-note-link" data-pick-docs>enabled</a> to appear in the search.</div>
""" <div class="_list-noresults">No results. #{info}</div> """ """ unless app.isSingleDoc() or app.disabledDocs.isEmpty()
html
templates.sidebarPageLink = (count) -> templates.sidebarPageLink = (count) ->
"""<span class="_list-item _list-pagelink">Show more\u2026 (#{count})</span>""" """<span class="_list-item _list-pagelink">Show more\u2026 (#{count})</span>"""
@ -39,7 +40,10 @@ templates.sidebarDisabledList = (options) ->
templates.sidebarDisabled = (options) -> templates.sidebarDisabled = (options) ->
"""<h6 class="_list-title"><span class="_list-arrow"></span>Disabled (#{options.count})</h6>""" """<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>' templates.sidebarPickerNote = """
<div class="_list-note">Tip: for faster and better search results, select only the docs you need.</div>
<a href="https://trello.com/b/6BmTulfx/devdocs-documentation" class="_list-link" target="_blank">Vote for new documentation</a>
"""
sidebarFooter = (html) -> """<div class="_sidebar-footer">#{html}</div>""" sidebarFooter = (html) -> """<div class="_sidebar-footer">#{html}</div>"""

@ -28,7 +28,7 @@ class app.views.DocPicker extends app.View
render: -> render: ->
@html @tmpl('sidebarLabel', app.docs.all(), checked: true) + @html @tmpl('sidebarLabel', app.docs.all(), checked: true) +
@tmpl('sidebarLabel', app.disabledDocs.all()) + @tmpl('sidebarLabel', app.disabledDocs.all()) +
@tmpl('sidebarVote') + @tmpl('sidebarPickerNote') +
@tmpl('sidebarSave') @tmpl('sidebarSave')
@refreshElements() @refreshElements()

@ -214,19 +214,20 @@
} }
} }
._list-noresults { //
padding: .5rem .75rem; // List note
//
._list-note {
margin: .5rem .75rem;
line-height: 1.25rem; line-height: 1.25rem;
font-size: .8125rem; font-size: .8125rem;
color: $textColorLight; color: $textColorLight;
}
._list-noresults-note { & + & { margin-top: .25rem; }
display: block;
margin-top: .25rem;
} }
._list-noresults-link { cursor: pointer; } ._list-note-link { cursor: pointer; }
// //
// List hover clone // List hover clone

Loading…
Cancel
Save