Sha256: bdf8ebcef0145142e2f54c215fa79e9422974e64d3fee9af6b5bc1fa0040b8e9
Contents?: true
Size: 924 Bytes
Versions: 13
Compression:
Stored size: 924 Bytes
Contents
format :html do view :raw do wrap_with :div, class: "form-group w-100" do select_tag "query[keyword]", "", class: "_navbox navbox form-control w-100", placeholder: navbar_placeholder end end # TODO: the more natural placeholder would be the content of the navbox card, no? # Also, the forced division of "raw" and "core" should probably be replaced # with a single haml template (for core view) def navbar_placeholder @@placeholder ||= begin holder_card = Card["#{Card[:navbox].name}+*placeholder"] holder_card ? holder_card.content : "Search" end end view :navbar do class_up "navbox-form", "form-inline col-md-3" _render_core end view :core do form_tag path(mark: :search), method: "get", role: "search", class: classy("navbox-form", "nodblclick") do _render_raw end end end
Version data entries
13 entries across 13 versions & 1 rubygems