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:
- 2395 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 | <div id="ticket-change-entry"> |
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 | </div> |
66 | <% end -%> |
67 | <% unless first -%> |
68 | </div> |
69 | <% end -%> |
70 | |
71 | <p /> |
72 | <ul> |
73 | <li><%= link_to 'Comment on, or change status of, this ticket', :action => 'comment', :id => @ticket.id, :anchor => 'comment' %></li> |
74 | </ul> |
75 | <%= render_next_prev_links -%> |
76 | </div> |