% case @ticket.status
when "open"
badge_class = "tk-open"
when "closed"
badge_class = "tk-close"
when "commenced"
badge_class = "tk-processing"
end
%>
<% content_for :page_menu do %>
<% end %>
Ticket number : #<%= @ticket.uid %>
<% if @ticket.status != "commenced" %>
<% case @ticket.status %>
<% when "open" %>
Close
<% if !@ticket.reopened? %>
Delete
<% end %>
<% when "closed" %>
<% if @ticket.can_be_reopened? %>
Reopen
<% end %>
<% end %>
<% end %>
<%= query.query.html_safe %>