show.html.haml
3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
- content_for :page_title, @problem.message
- content_for :title_css_class, 'err_show'
- content_for :title, @problem.error_class || truncate(@problem.message, :length => 32)
- content_for :meta do
%strong App:
= link_to @app.name, @app
%strong Where:
= @problem.where
%br
%strong Environment:
= @problem.environment
%strong Last Notice:
= @problem.last_notice_at.to_s(:precise)
- content_for :action_bar do
- if @problem.unresolved?
%span= link_to 'resolve', [:resolve, @app, @problem], :method => :put, :data => { :confirm => problem_confirm }, :class => 'resolve'
- if current_user.authentication_token
%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"
- if @problem.comments_allowed? || @problem.comments.any?
- content_for :comments do
%h3 Comments
- @problem.comments.each do |comment|
.window
%table.comment
%tr
%th
- if comment.user
- if Errbit::Config.use_gravatar
= 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, 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], :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 [@app, @problem, @comment] do |comment_form|
%p Add a comment
= comment_form.text_area :body
= comment_form.submit "Save Comment"
%h4= @notice.try(:message)
= paginate @notices, :param_name => :notice, :theme => :notices
.tab-bar
%ul
%li= link_to 'Summary', '#summary', :rel => 'summary', :class => 'button'
%li= link_to 'Backtrace', '#backtrace', :rel => 'backtrace', :class => 'button'
- if @notice && @notice.user_attributes.present?
%li= link_to 'User', '#user_attributes', :rel => 'user_attributes', :class => 'button'
%li= link_to 'Environment', '#environment', :rel => 'environment', :class => 'button'
%li= link_to 'Parameters', '#params', :rel => 'params', :class => 'button'
%li= link_to 'Session', '#session', :rel => 'session', :class => 'button'
- if @notice
#summary
%h3 Summary
= render 'notices/summary', :notice => @notice, :problem => @problem
#backtrace
%h3 Backtrace
= render 'notices/backtrace', :lines => @notice.backtrace_lines
- if @notice.user_attributes.present?
#user_attributes
%h3 User
= render 'notices/user_attributes', :user => @notice.user_attributes
#environment
%h3 Environment
= render 'notices/environment', :notice => @notice
#params
%h3 Parameters
= render 'notices/params', :notice => @notice
#session
%h3 Session
= render 'notices/session', :notice => @notice