Sha256: 8dcf63f4a144f7e3e47de7522b3578be2b0260aa3b1aef02ca324a3ec9fc1e47
Contents?: true
Size: 924 Bytes
Versions: 11
Compression:
Stored size: 924 Bytes
Contents
format :html do view :raw do wrap_with :div, class: "form-group w-100" do text_field_tag :_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 w-25" _render_core end view :core do form_tag Card.path_setting("/:search"), method: "get", role: "search", class: classy("navbox-form", "nodblclick") do _render_raw end end end
Version data entries
11 entries across 11 versions & 1 rubygems