Module: Card::Set::All::Html::Header::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod004-format/all/html/header.rb
Instance Method Summary collapse
-
#default_header ⇒ Object
-
#header_wrap(header_parts) ⇒ Object
-
#show_draft_link? ⇒ Boolean
-
#structure_editable? ⇒ Boolean
-
#view: header ⇒ Object
-
#view: header_title ⇒ Object
Instance Method Details
#default_header ⇒ Object
28 29 30 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/header.rb', line 28 def default_header main? ? :h1 : :h2 end |
#header_wrap(header_parts) ⇒ Object
16 17 18 19 20 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/header.rb', line 16 def header_wrap header_parts wrap_with :div, class: classy("d0-card-header") do output Array.wrap(header_parts) end end |
#show_draft_link? ⇒ Boolean
32 33 34 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/header.rb', line 32 def show_draft_link? card.drafts.present? && @slot_view == :edit end |
#structure_editable? ⇒ Boolean
36 37 38 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/header.rb', line 36 def structure_editable? card.structure && card.template.ok?(:update) end |
#view: header ⇒ Object
12 13 14 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/header.rb', line 12 view :header, perms: :none do header_wrap [render_header_title, ] end |
#view: header_title ⇒ Object
22 23 24 25 26 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/html/header.rb', line 22 view :header_title, perms: :none do wrap_with (voo.header || default_header), class: classy("d0-card-header-title") do render_title end end |