Module: Card::Set::Type::Role::HtmlFormat

Extended by:
AbstractFormat
Defined in:
card/tmpsets/set/mod011-card-mod-account/type/role.rb,
card/tmpsets/set/mod010-card-mod-account/type/role.rb

Instance Method Summary collapse

Instance Method Details



25
26
27
# File 'card/tmpsets/set/mod011-card-mod-account/type/role.rb', line 25

def related_by_content_items
  super.unshift ["members", :members]
end

#role_checkboxObject



17
18
19
20
21
22
23
# File 'card/tmpsets/set/mod011-card-mod-account/type/role.rb', line 17

def role_checkbox
  name = card.disabled? ? "add_item" : "drop_item"
  subformat(Auth.current.field(:disabled_roles, new: {})).card_form :update do
    [check_box_tag(name, card.id, !card.disabled?, class: "_edit-item"),
     render_link]
  end
end


13
14
15
# File 'card/tmpsets/set/mod011-card-mod-account/type/role.rb', line 13

view :link_with_checkbox, cache: :never do
  role_checkbox
end