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

45 lines
1.5 KiB
Plaintext
Raw Normal View History

2015-08-18 18:28:47 +00:00
<% return if ticket_counter >= 5 %>
<% case ticket.status
when "open"
badge_class = "t-status-open"
when "closed"
badge_class = "t-status-close"
when "commenced"
badge_class = "t-status-processing"
2015-08-18 18:28:47 +00:00
end
%>
<div class="ticket ticket-item" id="ticket_<%= ticket.id.to_s %>" data-id="<%= ticket.id.to_s %>">
2015-08-25 10:49:47 +00:00
#<%= ticket.uid %> -
<a class="ticket-link" href="<%= admin_ticket_path(ticket.id) %>">
<span class="ticket-title"><%= ticket.subject %></span>
</a>
2015-09-24 05:46:18 +00:00
<% if !ticket.registered_site.nil? %>
<a class="ticket-site-link" href="http://<%= ticket.registered_site.site_domain %>" target="_blank">
<i class="fa fa-external-link"></i>
<%= ticket.registered_site.title %>
</a>
2015-09-24 05:59:15 +00:00
<% else %>
2015-09-24 06:08:41 +00:00
<span class="ticket-site-dead"><i class="fa fa-chain-broken"></i> Site deleted</span>
2015-09-24 05:46:18 +00:00
<% end %>
2017-09-26 04:00:55 +00:00
<span class="ticket-date"><abbr title="<%= ticket.created_at.strftime("%dth %B %y %H:%M") %>"><i class="fa fa-calendar" aria-hidden="true"></i></abbr></span>
<div class="ticket-label pull-right">
2015-08-18 18:28:47 +00:00
<% if ticket.is_urgent? %>
2015-09-02 10:16:01 +00:00
<span class="label label-danger">
<i class="fa fa-fire"></i>
Urgent
</span>
2015-08-18 18:28:47 +00:00
<% end %>
2015-08-25 10:49:47 +00:00
<span class="label <%= badge_class %>">
2015-08-18 18:28:47 +00:00
<i class="fa fa-eye"></i>
2015-08-25 10:49:47 +00:00
<%= ticket.status.capitalize %>
2015-08-18 18:28:47 +00:00
</span>
<% if !ticket.taken_by.nil? %>
2015-08-25 10:49:47 +00:00
<span class="ticket-author label label-primary">
2015-08-18 18:28:47 +00:00
<i class="icon-user"></i>
2017-09-26 03:00:28 +00:00
<% user = User.find(ticket.taken_by) rescue nil %>
<%= !user.nil? ? user.name : "User Deleted" %>
2015-08-18 18:28:47 +00:00
</span>
<% end %>
</div>
</div>