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
def smart_links_parser(html,site)
if !site.nil?
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
end

View File

@ -13,10 +13,12 @@
<a class="ticket-link" href="<%= admin_ticket_path(ticket.id) %>">
<span class="ticket-title"><%= ticket.subject %></span>
</a>
<% 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>
<% end %>
<div class="ticket-label pull-right">
<% if ticket.is_urgent? %>
<span class="label label-danger">

View File

@ -9,7 +9,12 @@
%>
<tr>
<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">
<a href="/admin/tickets/<%= ticket_by_c.id.to_s %>"><%= ticket_by_c.subject %></a>
</td>

View File

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