app/views/tickets/show.html.erb
<% title "Ticket" %>
<div class="block">
<div class="content">
<div class="inner">
<table class="table">
<tr>
<th><h4 data-role='title'><%= "#{@ticket.title} - #{@ticket.status} - #{time_ago_in_words(@ticket.created_at)} ago" %></h4></th>
<th></th>
<th class="last"></th>
</tr>
<tr>
<td>
<p data-role='status'>
<strong>Status:</strong>
<%= @ticket.status %>
</p>
<p>
<strong>Priority:</strong>
<%= @ticket.priority %>
</p>
<strong>Start Date:</strong>
<%= @ticket.start_date %>
</p>
<p>
<strong>Due Date:</strong>
<%= @ticket.due_date %>
</p>
</td>
<td>
<p>
<p>
<strong>Submitter:</strong>
<%= @ticket.submitter.full_name unless @ticket.submitter.nil? %>
</p>
<p>
<strong>Worker:</strong>
<%= @ticket.worker.full_name unless @ticket.worker.nil?%>
</p>
<p>
<strong>Project:</strong>
<%= @ticket.project.name unless @ticket.project.nil?%>
</p>
<p>
<strong>Area:</strong>
<%= @ticket.area_name %>
</p></td>
<td class="last"></td>
</tr>
</table>
<p>
<strong>Description:</strong>
<%= raw @ticket.description %>
</p>
<%= render :partial=>"/comments/ticket_comments", :locals=>{:comments=>@comments} %>
<br />
<%= render "/comments/add_comment", :target=>@comment %>
<p>
<%= link_to "Edit", edit_ticket_path(@ticket) %> |
<%= link_to "Destroy", @ticket, data: {confirm: 'Are you sure?'}, method: :delete %> |
<%= link_to "View All", tickets_path %>
</p>
</div>
</div>
</div>