issue查看差别界面
This commit is contained in:
parent
5a506d7c40
commit
9da165b2b7
|
@ -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
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
<h3><%=h @issue.tracker %> #<%= @issue.id %></h3>
|
||||
<p>由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %></p>
|
||||
<div class="myissues_con mb10">
|
||||
<h3><%=h @issue.tracker %> #<%= @issue.id %></h3>
|
||||
<p class="mb5">由<%= link_to @journal.user, user_path(@journal.user), :class => "c_blue" %> 更新于 <%= format_time @journal.created_on %></p>
|
||||
|
||||
<div class="text-diff" style="word-break:break-all; word-wrap:break-word;">
|
||||
<div class="mb10 fl">之前版本:</div><div class="fl"><%= @detail.old_value.html_safe %></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fl"> 当前版本:</div><div class="fl"><%= @detail.value.html_safe %></div>
|
||||
<div class="cl"></div>
|
||||
<%#= @diff.to_html.gsub("<","<").gsub(">",">").gsub(""","\"").gsub("&gt;", ">").gsub("&lt;", "<").gsub("&quot;", "\"").html_safe %>
|
||||
</div>
|
||||
|
||||
<p><%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %></p>
|
||||
|
||||
<% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
|
||||
|
||||
<div class="text-diff" style="word-break:break-all; word-wrap:break-word;">
|
||||
<%= @diff.to_html.gsub("<","<").gsub(">",">").gsub(""","\"").gsub("&gt;", ">").gsub("&lt;", "<").gsub("&quot;", "\"").html_safe %>
|
||||
</div>
|
||||
|
||||
<p><%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %></p>
|
||||
|
||||
<% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
|
||||
|
|
Loading…
Reference in New Issue