Merged trunk r1773.
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1774 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<% Redmine::UnifiedDiff.new(diff, diff_type).each do |table_file| -%>
|
||||
<div class="autoscroll">
|
||||
<% if diff_type == 'sbs' -%>
|
||||
<table class="filecontent CodeRay">
|
||||
<thead>
|
||||
<tr><th colspan="4" class="filename"><%= table_file.file_name %></th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% prev_line_left, prev_line_right = nil, nil -%>
|
||||
<% table_file.keys.sort.each do |key| -%>
|
||||
<% if prev_line_left && prev_line_right && (table_file[key].nb_line_left != prev_line_left+1) && (table_file[key].nb_line_right != prev_line_right+1) -%>
|
||||
<tr class="spacing">
|
||||
<th class="line-num">...</th><td></td><th class="line-num">...</th><td></td>
|
||||
<% end -%>
|
||||
<tr>
|
||||
<th class="line-num"><%= table_file[key].nb_line_left %></th>
|
||||
<td class="line-code <%= table_file[key].type_diff_left %>">
|
||||
<pre><%=to_utf8 table_file[key].line_left %></pre>
|
||||
</td>
|
||||
<th class="line-num"><%= table_file[key].nb_line_right %></th>
|
||||
<td class="line-code <%= table_file[key].type_diff_right %>">
|
||||
<pre><%=to_utf8 table_file[key].line_right %></pre>
|
||||
</td>
|
||||
</tr>
|
||||
<% prev_line_left, prev_line_right = table_file[key].nb_line_left.to_i, table_file[key].nb_line_right.to_i -%>
|
||||
<% end -%>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<% else -%>
|
||||
<table class="filecontent CodeRay">
|
||||
<thead>
|
||||
<tr><th colspan="3" class="filename"><%= table_file.file_name %></th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% prev_line_left, prev_line_right = nil, nil -%>
|
||||
<% table_file.keys.sort.each do |key, line| %>
|
||||
<% if prev_line_left && prev_line_right && (table_file[key].nb_line_left != prev_line_left+1) && (table_file[key].nb_line_right != prev_line_right+1) -%>
|
||||
<tr class="spacing">
|
||||
<th class="line-num">...</th><th class="line-num">...</th><td></td>
|
||||
</tr>
|
||||
<% end -%>
|
||||
<tr>
|
||||
<th class="line-num"><%= table_file[key].nb_line_left %></th>
|
||||
<th class="line-num"><%= table_file[key].nb_line_right %></th>
|
||||
<% if table_file[key].line_left.empty? -%>
|
||||
<td class="line-code <%= table_file[key].type_diff_right %>">
|
||||
<pre><%=to_utf8 table_file[key].line_right %></pre>
|
||||
</td>
|
||||
<% else -%>
|
||||
<td class="line-code <%= table_file[key].type_diff_left %>">
|
||||
<pre><%=to_utf8 table_file[key].line_left %></pre>
|
||||
</td>
|
||||
<% end -%>
|
||||
</tr>
|
||||
<% prev_line_left = table_file[key].nb_line_left.to_i if table_file[key].nb_line_left.to_i > 0 -%>
|
||||
<% prev_line_right = table_file[key].nb_line_right.to_i if table_file[key].nb_line_right.to_i > 0 -%>
|
||||
<% end -%>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end -%>
|
||||
|
||||
</div>
|
||||
<% end -%>
|
||||
@@ -0,0 +1,11 @@
|
||||
<div class="autoscroll">
|
||||
<table class="filecontent CodeRay">
|
||||
<tbody>
|
||||
<% line_num = 1 %>
|
||||
<% syntax_highlight(filename, to_utf8(content)).each_line do |line| %>
|
||||
<tr><th class="line-num" id="L<%= line_num %>"><%= line_num %></th><td class="line-code"><pre><%= line %></pre></td></tr>
|
||||
<% line_num += 1 %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1,3 +1,3 @@
|
||||
<fieldset class="preview"><legend><%= l(:label_preview) %></legend>
|
||||
<%= textilizable @text, :attachments => @attachements %>
|
||||
<%= textilizable @text, :attachments => @attachements, :object => @previewed %>
|
||||
</fieldset>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
xml.instruct!
|
||||
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
||||
xml.title @title
|
||||
xml.title truncate_single_line(@title, 100)
|
||||
xml.link "rel" => "self", "href" => url_for(params.merge({:format => nil, :only_path => false}))
|
||||
xml.link "rel" => "alternate", "href" => url_for(:controller => 'welcome', :only_path => false)
|
||||
xml.id url_for(:controller => 'welcome', :only_path => false)
|
||||
@@ -10,11 +10,15 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
|
||||
@items.each do |item|
|
||||
xml.entry do
|
||||
url = url_for(item.event_url(:only_path => false))
|
||||
xml.title truncate(item.event_title, 100)
|
||||
if @project
|
||||
xml.title truncate_single_line(item.event_title, 100)
|
||||
else
|
||||
xml.title truncate_single_line("#{item.project} - #{item.event_title}", 100)
|
||||
end
|
||||
xml.link "rel" => "alternate", "href" => url
|
||||
xml.id url
|
||||
xml.updated item.event_datetime.xmlschema
|
||||
author = item.event_author if item.respond_to?(:author)
|
||||
author = item.event_author if item.respond_to?(:event_author)
|
||||
xml.author do
|
||||
xml.name(author)
|
||||
xml.email(author.mail) if author.respond_to?(:mail) && !author.mail.blank?
|
||||
|
||||
Reference in New Issue
Block a user