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

Instance Method Details

#default_headerObject



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

Returns:

  • (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

Returns:

  • (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: headerObject



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, render_menu]
end

#view: header_titleObject



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