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

Extended by:
AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod028-follow/self/follow_defaults.rb

Instance Method Summary collapse

Instance Method Details

#cancel_to_edit_buttonObject



73
74
75
# File 'platypus/tmp/set/gem-defaults/mod028-follow/self/follow_defaults.rb', line 73

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

#simple_submit_buttonObject



69
70
71
# File 'platypus/tmp/set/gem-defaults/mod028-follow/self/follow_defaults.rb', line 69

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

#submit_and_update_buttonObject



63
64
65
66
67
# File 'platypus/tmp/set/gem-defaults/mod028-follow/self/follow_defaults.rb', line 63

def submit_and_update_button
  submit_button text: "Submit and update all users",
                name: "card[trigger]", value: "update_follow_rules",
                disable_with: "Updating", class: "follow-updater"
end

#view: confirm_update_allObject



77
78
79
80
81
82
83
84
85
86
87
# File 'platypus/tmp/set/gem-defaults/mod028-follow/self/follow_defaults.rb', line 77

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: edit_buttonsObject



56
57
58
59
60
61
# File 'platypus/tmp/set/gem-defaults/mod028-follow/self/follow_defaults.rb', line 56

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