Module: Card::Set::Self::FollowDefaults::HtmlFormat

Extended by:
AbstractFormat
Defined in:
card/tmpsets/set/mod025-card-mod-follow/self/follow_defaults.rb,
card/tmpsets/set/mod026-card-mod-follow/self/follow_defaults.rb

Instance Method Summary collapse

Instance Method Details

#cancel_to_edit_buttonObject



80
81
82
# File 'card/tmpsets/set/mod025-card-mod-follow/self/follow_defaults.rb', line 80

def cancel_to_edit_button
  cancel_button href: path(view: :edit, id: card.id)
end

#simple_submit_buttonObject



76
77
78
# File 'card/tmpsets/set/mod025-card-mod-follow/self/follow_defaults.rb', line 76

def simple_submit_button
  button_tag "Submit", class: "follow"
end

#submit_and_update_buttonObject



71
72
73
74
# File 'card/tmpsets/set/mod025-card-mod-follow/self/follow_defaults.rb', line 71

def submit_and_update_button
  submit_button text: "Submit and update all users",
                disable_with: "Updating", class: "follow-updater"
end

#view: confirm_update_allObject



84
85
86
87
88
89
90
91
92
93
94
# File 'card/tmpsets/set/mod025-card-mod-follow/self/follow_defaults.rb', line 84

view :confirm_update_all do
  wrap do
    alert "info" do
      %(
        <h1>Are you sure you want to change the default follow rules?</h1>
        <p>You may choose to update all existing users.
           This may take a while. </p>
      )
    end
  end
end

#view: editObject



54
55
56
57
58
59
60
61
62
63
# File 'card/tmpsets/set/mod025-card-mod-follow/self/follow_defaults.rb', line 54

view :edit, perms: :update, unknown: true do
  frame_and_form :update, hidden: { success: "_self",
                                    card: { update_all_users: false } } do
    [
      _render_content_formgroups,
      _render_confirm_update_all,
      _render_edit_buttons
    ]
  end
end

#view: edit_buttonsObject



65
66
67
68
69
# File 'card/tmpsets/set/mod025-card-mod-follow/self/follow_defaults.rb', line 65

view :edit_buttons do
  button_formgroup do
    [submit_and_update_button, simple_submit_button, cancel_to_edit_button]
  end
end