small fix for delete sites

This commit is contained in:
Harry Bomrah 2015-09-24 13:46:18 +08:00
parent 7fb6c177b0
commit 4fd1ac944e
4 changed files with 26 additions and 15 deletions

View File

@ -1,7 +1,9 @@
module TicketsHelper module TicketsHelper
def smart_links_parser(html,site) def smart_links_parser(html,site)
html = html.gsub("href=\"/uploads/","href=\"http://#{site.site_domain}/uploads/") if !site.nil?
html = html.gsub("src=\"/uploads/","src=\"http://#{site.site_domain}/uploads/") html = html.gsub("href=\"/uploads/","href=\"http://#{site.site_domain}/uploads/")
html = html.gsub("src=\"/uploads/","src=\"http://#{site.site_domain}/uploads/")
end
return html return html
end end

View File

@ -13,10 +13,12 @@
<a class="ticket-link" href="<%= admin_ticket_path(ticket.id) %>"> <a class="ticket-link" href="<%= admin_ticket_path(ticket.id) %>">
<span class="ticket-title"><%= ticket.subject %></span> <span class="ticket-title"><%= ticket.subject %></span>
</a> </a>
<a class="ticket-site-link" href="http://<%= ticket.registered_site.site_domain %>" target="_blank"> <% if !ticket.registered_site.nil? %>
<i class="fa fa-external-link"></i> <a class="ticket-site-link" href="http://<%= ticket.registered_site.site_domain %>" target="_blank">
<%= ticket.registered_site.title %> <i class="fa fa-external-link"></i>
</a> <%= ticket.registered_site.title %>
</a>
<% end %>
<div class="ticket-label pull-right"> <div class="ticket-label pull-right">
<% if ticket.is_urgent? %> <% if ticket.is_urgent? %>
<span class="label label-danger"> <span class="label label-danger">

View File

@ -9,7 +9,12 @@
%> %>
<tr> <tr>
<td><%= ticket_by_c.uid %></td> <td><%= ticket_by_c.uid %></td>
<td><a href="http://<%= ticket_by_c.registered_site.site_domain %>" target="_blank"><%= ticket_by_c.registered_site.title %></a></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>
<% end %>
&nbsp;
</td>
<td class="span6"> <td class="span6">
<a href="/admin/tickets/<%= ticket_by_c.id.to_s %>"><%= ticket_by_c.subject %></a> <a href="/admin/tickets/<%= ticket_by_c.id.to_s %>"><%= ticket_by_c.subject %></a>
</td> </td>

View File

@ -24,14 +24,16 @@
<i class="ticket-home-btn-icon fa fa-home"></i> <i class="ticket-home-btn-icon fa fa-home"></i>
Back to Dashboard Back to Dashboard
</a> </a>
<a href="http://<%= @ticket.registered_site.site_domain %>" target="_blank" class="btn btn-normal"> <% if !@ticket.registered_site.nil?
<i class="ticket-external-link-icon fa fa-external-link"></i> <a href="http://<%= @ticket.registered_site.site_domain %>" target="_blank" class="btn btn-normal">
<%= @ticket.registered_site.title %> <i class="ticket-external-link-icon fa fa-external-link"></i>
</a> <%= @ticket.registered_site.title %>
<a href="/admin/tickets/search?keywords=sitename%3A+<%= @ticket.registered_site.title %>" target="_blank" class="btn btn-normal"> </a>
<i class="ticket-external-link-icon fa fa-search"></i> <a href="/admin/tickets/search?keywords=sitename%3A+<%= @ticket.registered_site.title %>" target="_blank" class="btn btn-normal">
Search tickets from <b><i><%= @ticket.registered_site.title %></i></b> <i class="ticket-external-link-icon fa fa-search"></i>
</a> Search tickets from <b><i><%= @ticket.registered_site.title %></i></b>
</a>
<% end %>
</div> </div>
<div class="ticket-wrap"> <div class="ticket-wrap">
<div class="ticket-header"> <div class="ticket-header">