Module: Card::Set::Right::EnabledRoles::HtmlFormat
- Extended by:
- AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb
Instance Method Summary collapse
-
#account_dropdown_role_items ⇒ Object
-
#checkbox_input ⇒ Object
-
#edit_success ⇒ Object
-
#hidden_form_tags(_action, opts) ⇒ Object
-
#input_type ⇒ Object
-
#role_item_checkbox(role_name) ⇒ Object
-
#view: edit_inline ⇒ Object
permission change compared to super.
Instance Method Details
#account_dropdown_role_items ⇒ Object
72 73 74 |
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 72 def account_dropdown_role_items Auth.current_roles.map { |role| role_item_checkbox role } end |
#checkbox_input ⇒ Object
58 59 60 61 62 63 64 |
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 58 def checkbox_input card.ensure_roles voo.show! :role_item_checkbox wrap_with :div, class: "pointer-checkbox-list" do account_dropdown end end |
#edit_success ⇒ Object
50 51 52 |
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 50 def edit_success { reload: true } end |
#hidden_form_tags(_action, opts) ⇒ Object
54 55 56 |
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 54 def _action, opts "#{super} #{ card: { type_id: SessionID }}" end |
#input_type ⇒ Object
46 47 48 |
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 46 def input_type :checkbox end |
#role_item_checkbox(role_name) ⇒ Object
66 67 68 69 70 |
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 66 def role_item_checkbox role_name haml :role_checkbox, id: "pointer-checkbox-#{role_name.to_name.key}", checked: card.item_names.include?(role_name), option_name: role_name end |
#view: edit_inline ⇒ Object
permission change compared to super
42 43 44 |
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 42 view :edit_inline, perms: :none, unknown: true, cache: :never, wrap: :slot do super() end |