64 lines
1.8 KiB
Plaintext
64 lines
1.8 KiB
Plaintext
<% case ticket_by_c.status
|
|
when "open"
|
|
badge_class = "badge-info"
|
|
when "closed"
|
|
badge_class = "badge-inverse"
|
|
when "commenced"
|
|
badge_class = "badge-success"
|
|
end
|
|
|
|
case ticket_by_c.tagged_status(current_user)
|
|
when "not_tagged"
|
|
tagged_class = "fa-minus"
|
|
when "tagged"
|
|
tagged_class = "fa-eye-slash"
|
|
when "read"
|
|
tagged_class = "fa-eye"
|
|
end
|
|
|
|
%>
|
|
<tr>
|
|
<td><i class="fa <%= tagged_class %>"></i></td>
|
|
<td><%= ticket_by_c.uid %></td>
|
|
<td>
|
|
<% if !ticket_by_c.registered_site.nil? %>
|
|
<a href="http://<%= ticket_by_c.registered_site.site_domain %>" target="_blank"><%= ticket_by_c.registered_site.title %></a>
|
|
<% else %>
|
|
<span class="error-red">Site deleted</span>
|
|
<% end %>
|
|
</td>
|
|
<td class="span6">
|
|
<a href="/admin/tickets_manage/<%= ticket_by_c.id.to_s %>"><%= ticket_by_c.subject %></a>
|
|
</td>
|
|
<td class="span3">
|
|
<% t = DateTime.parse(ticket_by_c.created_at.to_s) %>
|
|
<%= t.strftime("%d %B %Y - %H:%M") %>
|
|
</td>
|
|
<td>
|
|
<% ticket_by_c.tags.each do |tag| %>
|
|
<span class="label label-warning"><%= tag.name %></span>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<span class="label <%= badge_class %>"><%= ticket_by_c.status %></span>
|
|
<% if (ticket_by_c.status == "open" || ticket_by_c.status == "commenced") && ticket_by_c.reopened? %>
|
|
<span class="label badge-success">Reopened</span>
|
|
<% end %>
|
|
</td>
|
|
<td class="span2">
|
|
<% if !ticket_by_c.taken_by.nil?
|
|
user = User.find(ticket_by_c.taken_by) rescue nil%>
|
|
<%= user.name if !user.nil? %>
|
|
<% else %>
|
|
|
|
<% end %>
|
|
</td>
|
|
<td class="span1">
|
|
<% if ticket_by_c.is_urgent? %>
|
|
<span class="badge label badge-important"> </span>
|
|
<% else %>
|
|
<span class="badge label badge-success"> </span>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|