From 9da165b2b7585d4a08d31a1654a0b9ba8113f543 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 2 Nov 2016 14:18:17 +0800 Subject: [PATCH] =?UTF-8?q?issue=E6=9F=A5=E7=9C=8B=E5=B7=AE=E5=88=AB?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/journals_controller.rb | 5 ++++- app/views/journals/diff.html.erb | 23 +++++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index a38bd4096..88502a171 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -45,6 +45,9 @@ class JournalsController < ApplicationController end def diff + # 顶部导航 + @project_menu_type = 2 + @issue = @journal.issue if params[:detail_id].present? @detail = @journal.details.find_by_id(params[:detail_id]) @@ -55,7 +58,7 @@ class JournalsController < ApplicationController @diff = Redmine::Helpers::Diff.new(@detail.value, @detail.old_value) respond_to do |format| format.html { - render :layout => 'new_base' + render :layout => 'base_projects' } end end diff --git a/app/views/journals/diff.html.erb b/app/views/journals/diff.html.erb index b842d87d0..4bd23728e 100644 --- a/app/views/journals/diff.html.erb +++ b/app/views/journals/diff.html.erb @@ -1,10 +1,17 @@ -

<%=h @issue.tracker %> #<%= @issue.id %>

-

由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %>

+
+

<%=h @issue.tracker %> #<%= @issue.id %>

+

由<%= link_to @journal.user, user_path(@journal.user), :class => "c_blue" %> 更新于 <%= format_time @journal.created_on %>

+ +
+
之前版本:
<%= @detail.old_value.html_safe %>
+
+
当前版本:
<%= @detail.value.html_safe %>
+
+ <%#= @diff.to_html.gsub("<","<").gsub(">",">").gsub(""","\"").gsub("&gt;", ">").gsub("&lt;", "<").gsub("&quot;", "\"").html_safe %> +
+ +

<%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %>

+ + <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %> -
- <%= @diff.to_html.gsub("<","<").gsub(">",">").gsub(""","\"").gsub("&gt;", ">").gsub("&lt;", "<").gsub("&quot;", "\"").html_safe %>
- -

<%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %>

- -<% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>