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

Instance Method Details

#account_dropdown_role_itemsObject



72
73
74
# File 'platypus/tmp/set/gem-defaults/mod031-layout/right/enabled_roles.rb', line 72

def 
  Auth.current_roles.map { |role| role_item_checkbox role }
end

#checkbox_inputObject



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
    
  end
end

#edit_successObject



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 hidden_form_tags _action, opts
  "#{super} #{hidden_tags card: { type_id: SessionID }}"
end

#input_typeObject



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_inlineObject

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