From f8a75f02b8cc08156bcc520a025364e5f751b73e Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 28 Oct 2016 16:59:15 +0200 Subject: [PATCH] Fixed issue#317 - Display origin url from tweet/facebook post. --- .../ticket_zoom/article_view.coffee | 11 +++++++ .../views/ticket_zoom/article_view.jst.eco | 10 +++--- app/models/channel/driver/facebook.rb | 2 +- lib/facebook.rb | 32 +++++++++++++++++-- lib/tweet_base.rb | 2 +- 5 files changed, 47 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee index 8fa3a7054..4738e61ad 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee @@ -120,6 +120,17 @@ class ArticleViewItem extends App.ObserverController article['html'] = App.Utils.text2html(body) article['html'] = article['html'].replace(signatureDetected, '') + # check if email link need to be updated + if article.type.name is 'email' + if !article.preferences.links + article.preferences.links = [ + { + name: 'Raw' + url: "#{@Config.get('api_path')}/ticket_article_plain/#{article.id}" + target: '_blank' + } + ] + if article.preferences.delivery_message @html App.view('ticket_zoom/article_view_delivery_failed')( ticket: @ticket diff --git a/app/assets/javascripts/app/views/ticket_zoom/article_view.jst.eco b/app/assets/javascripts/app/views/ticket_zoom/article_view.jst.eco index 4ec147742..cc367e43f 100644 --- a/app/assets/javascripts/app/views/ticket_zoom/article_view.jst.eco +++ b/app/assets/javascripts/app/views/ticket_zoom/article_view.jst.eco @@ -28,7 +28,6 @@ -
<% if @article.sender.name isnt 'Agent': %> <% position = 'left' %> @@ -46,7 +45,7 @@
<%- @T('See more') %>
- <% if !_.isEmpty( @article.attachments ): %> + <% if !_.isEmpty(@article.attachments): %>
<%- @Icon('paperclip') %>
<%- @article.attachments.length %> <%- @T('Attached Files') %>
@@ -62,7 +61,6 @@
-