Module: Card::Set::All::HtmlShow::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
card/tmpsets/set/mod008-card-mod-format/all/html_show.rb,
card/tmpsets/set/mod007-card-mod-format/all/html_show.rb

Instance Method Summary collapse

Instance Method Details

#head_contentObject



43
44
45
# File 'card/tmpsets/set/mod008-card-mod-format/all/html_show.rb', line 43

def head_content
  nest card.rule_card(:head), view: :head_content
end

#show(view, args) ⇒ Object



9
10
11
12
13
14
# File 'card/tmpsets/set/mod008-card-mod-format/all/html_show.rb', line 9

def show view, args
  capture_the_freak do
    content = send show_method, view, args
    show_full_page? ? wrap_with_html_page(content) : content
  end
end

#show_full_page?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'card/tmpsets/set/mod008-card-mod-format/all/html_show.rb', line 27

def show_full_page?
  !Env.ajax?
end

#show_methodObject



16
17
18
# File 'card/tmpsets/set/mod008-card-mod-format/all/html_show.rb', line 16

def show_method
  "show_#{show_layout? ? :with : :without}_page_layout"
end

#show_without_page_layout(view, args) ⇒ Object



20
21
22
23
24
25
# File 'card/tmpsets/set/mod008-card-mod-format/all/html_show.rb', line 20

def show_without_page_layout view, args
  @main = true if params[:is_main] || args[:main]
  args.delete(:layout)
  view ||= args[:home_view] || :open # default_nest_view
  render! view, args
end