tickets/app/views/admin/tickets_manage/_ticket_by_c.html.erb

64 lines
1.8 KiB
Plaintext
Raw Normal View History

2015-08-03 10:54:33 +00:00
<% case ticket_by_c.status
when "open"
badge_class = "badge-info"
when "closed"
badge_class = "badge-inverse"
2015-08-18 18:28:47 +00:00
when "commenced"
2015-08-03 10:54:33 +00:00
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
2015-08-03 10:54:33 +00:00
%>
<tr>
<td><i class="fa <%= tagged_class %>"></i></td>
2015-08-03 10:54:33 +00:00
<td><%= ticket_by_c.uid %></td>
2015-09-24 05:46:18 +00:00
<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>
2015-09-24 05:59:15 +00:00
<% else %>
<span class="error-red">Site deleted</span>
2015-09-24 05:46:18 +00:00
<% end %>
</td>
2015-08-03 10:54:33 +00:00
<td class="span6">
2021-07-15 11:51:44 +00:00
<a href="/admin/tickets_manage/<%= ticket_by_c.id.to_s %>"><%= ticket_by_c.subject %></a>
2015-08-03 10:54:33 +00:00
</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>
2015-08-18 18:28:47 +00:00
<% 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 %>
&nbsp;
<% end %>
</td>
<td class="span1">
<% if ticket_by_c.is_urgent? %>
<span class="badge label badge-important">&nbsp;</span>
<% else %>
<span class="badge label badge-success">&nbsp;</span>
<% end %>
2015-08-03 10:54:33 +00:00
</td>
</tr>