From b7dd80449dbb326cba6f2bbb1a962e7086e15c57 Mon Sep 17 00:00:00 2001 From: "BOYA,CHIU" Date: Thu, 15 Jul 2021 19:19:13 +0800 Subject: [PATCH] change url to avoid conflict --- app/controllers/admin/tickets_controller.rb | 2 +- app/helpers/tickets_helper.rb | 2 +- app/views/admin/tickets/_query.html.erb | 2 +- app/views/admin/tickets/_response.html.erb | 2 +- app/views/admin/tickets/_search_form.html.erb | 2 +- app/views/admin/tickets/_ticket_by_c.html.erb | 2 +- app/views/admin/tickets/index.html.erb | 2 +- app/views/admin/tickets/my_tickets.html.erb | 8 ++++---- app/views/admin/tickets/search.html.erb | 2 +- app/views/admin/tickets/show.html.erb | 18 +++++++++--------- .../admin/tickets/tagged_tickets.html.erb | 6 +++--- .../admin/tickets/tickets_by_category.html.erb | 6 +++--- config/routes.rb | 18 ++++++++++-------- lib/tickets/engine.rb | 10 +++++----- 14 files changed, 42 insertions(+), 40 deletions(-) diff --git a/app/controllers/admin/tickets_controller.rb b/app/controllers/admin/tickets_controller.rb index da440a4..90bc81f 100644 --- a/app/controllers/admin/tickets_controller.rb +++ b/app/controllers/admin/tickets_controller.rb @@ -207,7 +207,7 @@ class Admin::TicketsController < OrbitAdminController rescue e end end - # url = "/admin/tickets/#{tq.ticket.id.to_s}#response_#{response.id.to_s}" + # url = "/admin/tickets-manage/#{tq.ticket.id.to_s}#response_#{response.id.to_s}" # Fiber.new{ # params[:user_tags].each do |user_id| # WebsocketRails["tag_notifications_for_#{user_id}".to_sym].trigger(:new_notification_recieved, {"ticket_link" => "#{tq.ticket.subject}", "total_ticket_count" => Ticket.get_ticket_unread_count_for_user(user_id), "blink_message" => "#{current_user.name} tagged you!"}) diff --git a/app/helpers/tickets_helper.rb b/app/helpers/tickets_helper.rb index 3252914..3d862b0 100644 --- a/app/helpers/tickets_helper.rb +++ b/app/helpers/tickets_helper.rb @@ -40,7 +40,7 @@ module TicketsHelper end def send_email(useremail,ticket,response, username) - url = "#{request.protocol}#{request.host_with_port}/#{I18n.locale}/admin/tickets/#{ticket.id.to_s}#response_#{response.id.to_s}" + url = "#{request.protocol}#{request.host_with_port}/#{I18n.locale}/admin/tickets-manage/#{ticket.id.to_s}#response_#{response.id.to_s}" email = Email.new(:mail_to => useremail, :mail_subject => "Tagged : #{ticket.subject}.", :template => "email/ticket_tag_email.html.erb", :template_data => {"url" => url, "mention" => current_user.name, "name" => username}) email.deliver end diff --git a/app/views/admin/tickets/_query.html.erb b/app/views/admin/tickets/_query.html.erb index aeab337..d05e578 100644 --- a/app/views/admin/tickets/_query.html.erb +++ b/app/views/admin/tickets/_query.html.erb @@ -17,7 +17,7 @@ <% if params[:reopen] != "true" && @ticket.ticket_queries.count == (query_counter + 1) %>
-
+
diff --git a/app/views/admin/tickets/_response.html.erb b/app/views/admin/tickets/_response.html.erb index f7e2d22..cbcda8a 100644 --- a/app/views/admin/tickets/_response.html.erb +++ b/app/views/admin/tickets/_response.html.erb @@ -16,7 +16,7 @@
<% if !user.nil? && user.id.to_s == current_user.id.to_s %> - + Delete diff --git a/app/views/admin/tickets/_search_form.html.erb b/app/views/admin/tickets/_search_form.html.erb index 2af463d..e1b1f0a 100644 --- a/app/views/admin/tickets/_search_form.html.erb +++ b/app/views/admin/tickets/_search_form.html.erb @@ -4,7 +4,7 @@ Search tickets - " method="get" id="search-form"> + " method="get" id="search-form"> " id="myonoffswitch" data-url="/admin/tickets/<%= @ticket.id.to_s %>/toggleurgent"> + " id="myonoffswitch" data-url="/admin/tickets-manage/<%= @ticket.id.to_s %>/toggleurgent">