diff --git a/app/views/problems/show.html.haml b/app/views/problems/show.html.haml index 9f8f20a..b3abd1c 100644 --- a/app/views/problems/show.html.haml +++ b/app/views/problems/show.html.haml @@ -3,7 +3,7 @@ - content_for :title, @problem.error_class || truncate(@problem.message, :length => 32) - content_for :meta do %strong App: - = link_to @app.name, app_path(@app) + = link_to @app.name, @app %strong Where: = @problem.where %br @@ -13,9 +13,9 @@ = @problem.last_notice_at.to_s(:precise) - content_for :action_bar do - if @problem.unresolved? - %span= link_to 'resolve', resolve_app_problem_path(@app, @problem), :method => :put, :data => { :confirm => problem_confirm }, :class => 'resolve' + %span= link_to 'resolve', [:resolve, @app, @problem], :method => :put, :data => { :confirm => problem_confirm }, :class => 'resolve' - if current_user.authentication_token - %span= link_to 'iCal', app_problem_path(:app_id => @app.id, :id => @problem.id, :format => "ics", :auth_token => current_user.authentication_token), :class => "calendar_link" + %span= link_to 'iCal', polymorphic_path([@app, @problem], :format => "ics", :auth_token => current_user.authentication_token), :class => "calendar_link" %span>= link_to 'up', (request.env['HTTP_REFERER'] ? :back : app_problems_path(@app)), :class => 'up' %br = render "issue_tracker_links" @@ -33,15 +33,15 @@ = gravatar_tag comment.user.email, :s => 24 %span.comment-info = time_ago_in_words(comment.created_at, true) << " ago by " - = link_to comment.user.email, user_path(comment.user) + = link_to comment.user.email, comment.user - else %span.comment-info = time_ago_in_words(comment.created_at, true) << " ago by [Unknown User]" - %span.delete= link_to '✘'.html_safe, app_problem_comment_path(@app, @problem, comment), :method => :delete, :data => { :confirm => "Are sure you don't need this comment?" }, :class => "destroy-comment" + %span.delete= link_to '✘'.html_safe, [@app, @problem, comment], :method => :delete, :data => { :confirm => "Are sure you don't need this comment?" }, :class => "destroy-comment" %tr %td= simple_format comment.body - if @problem.comments_allowed? - = form_for @comment, :url => app_problem_comments_path(@app, @problem) do |comment_form| + = form_for [@app, @problem, @comment] do |comment_form| %p Add a comment = comment_form.text_area :body = comment_form.submit "Save Comment" -- libgit2 0.21.2