Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 456
- Log:
Reduce code duplicat - "htmlize" was always wrapped by a call
to "make_links", so just include that call inside "htmlize".
- Author:
- rool
- Date:
- Fri Sep 06 07:23:16 +0100 2013
- Size:
- 4023 Bytes
1 | <% @page_title = 'Ticket #' + @ticket.id.to_s %> |
2 | |
3 | <div id="content"> |
4 | <%= render_next_prev_links -%> |
5 | |
6 | <div class="breadcrumbs"> |
7 | <ul> |
8 | <li><%= link_to 'Tickets', :action => 'index' -%></li> |
9 | <li>» Ticket #<%= @ticket.id -%></li> |
10 | </ul> |
11 | </div> |
12 | |
13 | <%= error_messages_for 'ticket' %> |
14 | <%= error_messages_for 'change' %> |
15 | |
16 | <div id="ticket"> |
17 | <h1>Ticket #<%= @ticket.id -%> (<%= @ticket.status.name -%>)<span class="date"><%= @ticket.created_at -%></span></h1> |
18 | <h2><%=h @ticket.summary -%></h2> |
19 | |
20 | <table id="ticket-details"> |
21 | <tr> |
22 | <td class="info">Reported by:</td> |
23 | <td><%= format_author @ticket.author -%></td> |
24 | <td class="info">Severity:</td> |
25 | <td><%= @ticket.severity.name -%></td> |
26 | </tr> |
27 | <tr> |
28 | <td class="info">Part:</td> |
29 | <td><%= @ticket.part.name unless @ticket.part.nil? -%></td> |
30 | <td class="info">Release:</td> |
31 | <td><%= @ticket.release.name unless @ticket.release.nil? -%></td> |
32 | </tr> |
33 | <tr> |
34 | <td class="info">Milestone:</td> |
35 | <td><%= @ticket.milestone.name unless @ticket.milestone.nil? -%></td> |
36 | <td class="info">Status</td> |
37 | <td><%= @ticket.status.name-%></td> |
38 | </tr> |
39 | </table> |
40 | |
41 | <h3>Details by <%= format_author @ticket.author -%>:</h3> |
42 | <%= htmlize(@ticket.content) %> |
43 | </div> |
44 | |
45 | <% first = true %> |
46 | <% @ticket.ticket_changes.each do |change| -%> |
47 | <% if (first) -%> |
48 | <h3>Changelog:</h3> |
49 | <div id="ticket-changes"> |
50 | <% first = false; end -%> |
51 | |
52 | <h4>Modified by <%= format_author change.author -%> <%= change.created_at.strftime('%a, %B %d %Y - %H:%M:%S %Z') -%></h4> |
53 | <ul> |
54 | <% change.each_log do |log_entry| -%> |
55 | <li><%= format_changes log_entry %></li> |
56 | <% end -%> |
57 | <% if change.has_attachment? -%> |
58 | <li><strong>Attachment</strong> added: <%= link_to(change.attachment, :action => "attachment", :id => change.id) %></li> |
59 | <% end -%> |
60 | </ul> |
61 | |
62 | <% unless change.comment.nil? -%> |
63 | <div id="ticket-change-comment"><%= htmlize(change.comment) %></div> |
64 | <% end -%> |
65 | <% end -%> |
66 | <% unless first -%> |
67 | </div> |
68 | <% end -%> |
69 | |
70 | <h3 id="comment">Update ticket:</h3> |
71 | |
72 | <%= form_tag({ :action => 'comment', :id => @ticket.id }, :multipart => true) %> |
73 | <fieldset> |
74 | <legend>Add comment and/or change ticket properties</legend> |
75 | <label class="first"> |
76 | Name/Email: |
77 | <% if hubssolib_privileged? -%> |
78 | <input id="change_author" name="change[author]" size="30" type="text" value="<%= h(@change.author) %>"> |
79 | <% else -%> |
80 | <input id="change_author" name="change[author]" size="30" type="hidden" value="<%= h(@change.author) %>"> |
81 | <br /><b><%= h(@change.author) %></b><br style="margin-bottom: 10px" /> |
82 | <% end -%> |
83 | </label> |
84 | |
85 | <br /> |
86 | <label>Attachment: |
87 | <%= file_field('change', 'attachment') -%></label> |
88 | |
89 | <br /> |
90 | <label>Comment: |
91 | <%= text_area 'change', 'comment', :rows => 12 -%></label> |
92 | |
93 | <br /> |
94 | <label>Ticket Summary: |
95 | <%= text_field 'ticket', 'summary' -%></label> |
96 | |
97 | <table> |
98 | <tr class="set-status"> |
99 | <td>Status:</td> |
100 | <td><%= collection_select 'ticket', 'status_id', @status, 'id', 'name' -%></td> |
101 | </tr> |
102 | <tr> |
103 | <td>Severity:</td> |
104 | <td><%= collection_select 'ticket', 'severity_id', @severities, 'id', 'name' -%></td> |
105 | </tr> |
106 | <tr> |
107 | <td>Part: </td> |
108 | <td><%= collection_select 'ticket', 'part_id', @parts, 'id', 'name', { :include_blank => true } -%></td> |
109 | </tr> |
110 | <tr> |
111 | <td>Release:</td> |
112 | <td><%= collection_select 'ticket', 'release_id', @releases, 'id', 'name', { :include_blank => true } -%></td> |
113 | </tr> |
114 | <tr> |
115 | <td>Milestone: </td> |
116 | <td><%= collection_select 'ticket', 'milestone_id', @milestones, 'id', 'name', { :include_blank => true } -%></td> |
117 | </tr> |
118 | </table> |
119 | |
120 | </fieldset> |
121 | <input type="submit" value="Submit changes" class="submit"> |
122 | <%= end_form_tag %> |
123 | <%= render_next_prev_links -%> |
124 | </div> |