<% @page_title = 'Ticket #' + @ticket.id.to_s %>
<%= render_next_prev_links -%> <%= error_messages_for 'ticket' %> <%= error_messages_for 'change' %>

Ticket #<%= @ticket.id -%> (<%= @ticket.status.name -%>)<%= @ticket.created_at -%>

<%=h @ticket.summary -%>

Reported by: <%= format_author @ticket.author -%> Severity: <%= @ticket.severity.name -%>
Part: <%= @ticket.part.name unless @ticket.part.nil? -%> Release: <%= @ticket.release.name unless @ticket.release.nil? -%>
Milestone: <%= @ticket.milestone.name unless @ticket.milestone.nil? -%> Status <%= @ticket.status.name-%>

Details by <%= format_author @ticket.author -%>:

<%= htmlize(@ticket.content) %>
<% first = true %> <% @ticket.ticket_changes.each do |change| -%> <% if (first) -%>

Changelog:

<% first = false; end -%>

Modified by <%= format_author change.author -%> <%= change.created_at.strftime('%a, %B %d %Y - %H:%M:%S %Z') -%>

<% unless change.comment.nil? -%>
<%= htmlize(change.comment) %>
<% end -%> <% end -%> <% unless first -%>
<% end -%>

Update ticket:

<%= form_tag({ :action => 'comment', :id => @ticket.id }, :multipart => true) %>
Add comment and/or change ticket properties


Status: <%= collection_select 'ticket', 'status_id', @status, 'id', 'name' -%>
Severity: <%= collection_select 'ticket', 'severity_id', @severities, 'id', 'name' -%>
Part: <%= collection_select 'ticket', 'part_id', @parts, 'id', 'name', { :include_blank => true } -%>
Release: <%= collection_select 'ticket', 'release_id', @releases, 'id', 'name', { :include_blank => true } -%>
Milestone: <%= collection_select 'ticket', 'milestone_id', @milestones, 'id', 'name', { :include_blank => true } -%>
<%= end_form_tag %> <%= render_next_prev_links -%>