Module: Card::Set::Rule::BarView::HtmlFormat

Extended by:
AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod010-rules/rule/bar_view.rb

Instance Method Summary collapse

Instance Method Details

#existing_rule_cardObject



12
13
14
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/bar_view.rb', line 12

def existing_rule_card
  @existing_rule_card ||= card.find_existing_rule_card
end

#rule_short_contentObject



54
55
56
57
58
59
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/bar_view.rb', line 54

def rule_short_content
  return "" unless existing_rule_card
  nest existing_rule_card,
       { view: :one_line_content },
       { set_context: card.name.trunk_name }
end

#view: barObject



16
17
18
19
20
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/bar_view.rb', line 16

view :bar, unknown: true do
  class_up "card-slot", "_rule-item #{category_classes}"
  voo.hide :bar_nav unless existing_rule_card
  super()
end

#view: bar_bottomObject



38
39
40
41
42
43
44
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/bar_view.rb', line 38

view :bar_bottom, unknown: true do
  if nest_mode == :edit
    current_rule_form
  else
    nest existing_rule_card, view: :core
  end
end

#view: bar_middleObject



46
47
48
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/bar_view.rb', line 46

view :bar_middle, unknown: true do
  # rule_info
end

#view: bar_rightObject



50
51
52
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/bar_view.rb', line 50

view :bar_right, unknown: true do
  rule_short_content
end

#view: one_line_contentObject



22
23
24
25
26
27
28
29
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/bar_view.rb', line 22

view :one_line_content,
     wrap: { div: { class: "text-muted one-line" } }, unknown: true do
  return render_mini_unknown unless existing_rule_card

  with_nest_mode :compact do
    one_line_content
  end
end

#view: raw_one_line_contentObject



31
32
33
34
35
36
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/bar_view.rb', line 31

view :raw_one_line_content,
     wrap: { div: { class: "text-muted one-line" } }, unknown: true do
  return render_mini_unknown unless existing_rule_card

  raw_one_line_content
end