Commit e260daf447159c51df9bbbab203937d2ecb90aa7

Authored by Nick Recobra
1 parent b8cd5720
Exists in master and in 1 other branch production

Applying config.confirm_resolve_err option to errs list.

app/helpers/errs_helper.rb
... ... @@ -3,5 +3,8 @@ module ErrsHelper
3 3 def last_notice_at err
4 4 err.last_notice_at || err.created_at
5 5 end
6   -
  6 +
  7 + def err_confirm
  8 + Errbit::Config.confirm_resolve_err === false ? nil : 'Seriously?'
  9 + end
7 10 end
8 11 \ No newline at end of file
... ...
app/views/errs/_table.html.haml
... ... @@ -19,7 +19,7 @@
19 19 %td.latest #{time_ago_in_words(last_notice_at err)} ago
20 20 %td.deploy= err.app.last_deploy_at ? err.app.last_deploy_at.to_s(:micro) : 'n/a'
21 21 %td.count= link_to err.notices.count, app_err_path(err.app, err)
22   - %td.resolve= link_to image_tag("thumbs-up.png"), resolve_app_err_path(err.app, err), :title => "Resolve", :method => :put, :confirm => 'Seriously?', :class => 'resolve' if err.unresolved?
  22 + %td.resolve= link_to image_tag("thumbs-up.png"), resolve_app_err_path(err.app, err), :title => "Resolve", :method => :put, :confirm => err_confirm, :class => 'resolve' if err.unresolved?
23 23 - if errs.none?
24 24 %tr
25 25 %td{:colspan => (@app ? 5 : 6)}
... ...
app/views/errs/show.html.haml
... ... @@ -8,7 +8,7 @@
8 8 %strong Last Notice:
9 9 = last_notice_at(@err).to_s(:micro)
10 10 - content_for :action_bar do
11   - %span= link_to 'resolve', resolve_app_err_path(@app, @err), :method => :put, :confirm => (Errbit::Config.confirm_resolve_err === false ? nil : 'Seriously?'), :class => 'resolve' if @err.unresolved?
  11 + %span= link_to 'resolve', resolve_app_err_path(@app, @err), :method => :put, :confirm => err_confirm, :class => 'resolve' if @err.unresolved?
12 12  
13 13 %h4= @notice.try(:message)
14 14  
... ...