Module: Card::Set::Rule::TableRow::HtmlFormat
- Extended by:
- AbstractFormat
- Defined in:
- tmpsets/set/mod022-rules/rule/table_row.rb
Instance Method Summary collapse
- #closed_rule_content_cell(rule_card) ⇒ Object
- #closed_rule_link_cell(_rule_card) ⇒ Object
- #closed_rule_modal_link_cell(_rule_card) ⇒ Object
- #closed_rule_set_cell(rule_card) ⇒ Object
- #closed_rule_setting_cell(_rule_card) ⇒ Object
- #wrap_closed_rule(rule_card) ⇒ Object
- #wrap_rule_cell(css_class) ⇒ Object
Instance Method Details
#closed_rule_content_cell(rule_card) ⇒ Object
55 56 57 58 59 |
# File 'tmpsets/set/mod022-rules/rule/table_row.rb', line 55 def closed_rule_content_cell rule_card wrap_rule_cell "rule-content" do rule_content_container { closed_rule_content rule_card } end end |
#closed_rule_link_cell(_rule_card) ⇒ Object
32 33 34 35 36 37 38 |
# File 'tmpsets/set/mod022-rules/rule/table_row.rb', line 32 def closed_rule_link_cell _rule_card wrap_rule_cell "rule-setting" do opts = bridge_link_opts(class: "edit-rule-link") opts[:path].delete(:layout) link_to_view :overlay_rule, setting_title, opts end end |
#closed_rule_modal_link_cell(_rule_card) ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'tmpsets/set/mod022-rules/rule/table_row.rb', line 40 def closed_rule_modal_link_cell _rule_card wrap_rule_cell "rule-setting" do opts = bridge_link_opts(class: "edit-rule-link") opts[:path].delete(:layout) opts["data-modal-class"] = "modal-lg" link_to_view :modal_rule, setting_title, opts end end |
#closed_rule_set_cell(rule_card) ⇒ Object
61 62 63 64 65 |
# File 'tmpsets/set/mod022-rules/rule/table_row.rb', line 61 def closed_rule_set_cell rule_card wrap_rule_cell "rule-set d-none d-sm-table-cell" do rule_card ? rule_card.trunk.label : "" end end |
#closed_rule_setting_cell(_rule_card) ⇒ Object
49 50 51 52 53 |
# File 'tmpsets/set/mod022-rules/rule/table_row.rb', line 49 def closed_rule_setting_cell _rule_card wrap_rule_cell "rule-setting" do link_to_open_rule end end |
#wrap_closed_rule(rule_card) ⇒ Object
27 28 29 30 |
# File 'tmpsets/set/mod022-rules/rule/table_row.rb', line 27 def wrap_closed_rule rule_card klass = rule_card&.real? ? "known-rule" : "missing-rule" wrap(true, { class: "closed-rule #{klass}" }, :tr) { yield } end |
#wrap_rule_cell(css_class) ⇒ Object
67 68 69 |
# File 'tmpsets/set/mod022-rules/rule/table_row.rb', line 67 def wrap_rule_cell css_class wrap_with(:td, class: "rule-cell #{css_class}") { yield } end |