Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Applying config.confirm_resolve_err option to errs list.

  • Loading branch information...
commit e260daf447159c51df9bbbab203937d2ecb90aa7 1 parent b8cd572
@oruen oruen authored
View
5 app/helpers/errs_helper.rb
@@ -3,5 +3,8 @@ module ErrsHelper
def last_notice_at err
err.last_notice_at || err.created_at
end
-
+
+ def err_confirm
+ Errbit::Config.confirm_resolve_err === false ? nil : 'Seriously?'
+ end
end
View
2  app/views/errs/_table.html.haml
@@ -19,7 +19,7 @@
%td.latest #{time_ago_in_words(last_notice_at err)} ago
%td.deploy= err.app.last_deploy_at ? err.app.last_deploy_at.to_s(:micro) : 'n/a'
%td.count= link_to err.notices.count, app_err_path(err.app, err)
- %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?
+ %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?
- if errs.none?
%tr
%td{:colspan => (@app ? 5 : 6)}
View
2  app/views/errs/show.html.haml
@@ -8,7 +8,7 @@
%strong Last Notice:
= last_notice_at(@err).to_s(:micro)
- content_for :action_bar do
- %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?
+ %span= link_to 'resolve', resolve_app_err_path(@app, @err), :method => :put, :confirm => err_confirm, :class => 'resolve' if @err.unresolved?
%h4= @notice.try(:message)
Please sign in to comment.
Something went wrong with that request. Please try again.