Module: Card::Set::Type::Role::HtmlFormat
- Extended by:
- AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod014-account/type/role.rb
Instance Method Summary collapse
-
#related_by_content_items ⇒ Object
-
#role_checkbox ⇒ Object
-
#view: configs ⇒ Object
-
#view: link_with_checkbox ⇒ Object
Instance Method Details
#related_by_content_items ⇒ Object
41 42 43 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/role.rb', line 41 def super.unshift ["members", :members] end |
#role_checkbox ⇒ Object
33 34 35 36 37 38 39 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/role.rb', line 33 def role_checkbox name = card.disabled? ? "add_item" : "drop_item" subformat(Auth.current.field(:disabled_roles)).card_form :update do [check_box_tag(name, card.id, !card.disabled?, class: "_edit-item"), render_link] end end |
#view: configs ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/role.rb', line 19 view :configs do configs_by_cat = card.all_admin_configs_grouped_by(:roles, :category)[card.codename] configs_by_cat.map do |(cat, configs)| if cat == "cardtypes" nested_list_section cat.capitalize, card.config_codenames_grouped_by_title(configs) elsif cat == "views" next else list_section cat.capitalize, configs.map { |c| c.codename.to_sym }, :closed_bar end end end |
#view: link_with_checkbox ⇒ Object
15 16 17 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/role.rb', line 15 view :link_with_checkbox, cache: :never do role_checkbox end |