##// END OF EJS Templates
Merged r1505, r1506, r1511, r1512, r1517, r1518, r1524 to 1526 from trunk....
Jean-Philippe Lang -
r1518:2af910e8e61f
parent child
Show More
@@ -30,7 +30,7 class Journal < ActiveRecord::Base
30 :project_key => "#{Issue.table_name}.project_id",
30 :project_key => "#{Issue.table_name}.project_id",
31 :date_column => "#{Issue.table_name}.created_on"
31 :date_column => "#{Issue.table_name}.created_on"
32
32
33 acts_as_event :title => Proc.new {|o| "#{o.issue.tracker.name} ##{o.issue.id}: #{o.issue.subject}" + ((s = o.new_status) ? " (#{s})" : '') },
33 acts_as_event :title => Proc.new {|o| status = ((s = o.new_status) ? " (#{s})" : nil); "#{o.issue.tracker} ##{o.issue.id}#{status}: #{o.issue.subject}" },
34 :description => :notes,
34 :description => :notes,
35 :author => :user,
35 :author => :user,
36 :type => Proc.new {|o| (s = o.new_status) && s.is_closed? ? 'issue-closed' : 'issue-edit' },
36 :type => Proc.new {|o| (s = o.new_status) && s.is_closed? ? 'issue-closed' : 'issue-edit' },
@@ -76,7 +76,8 class Repository::Cvs < Repository
76 unless revision_to
76 unless revision_to
77 revision_to=scm.get_previous_revision(revision_from)
77 revision_to=scm.get_previous_revision(revision_from)
78 end
78 end
79 diff=diff+scm.diff(change_from.path, revision_from, revision_to, type)
79 file_diff = scm.diff(change_from.path, revision_from, revision_to)
80 diff = diff + file_diff unless file_diff.nil?
80 end
81 end
81 end
82 end
82 return diff
83 return diff
@@ -36,7 +36,7
36 <%= render :partial => 'layouts/project_selector' if User.current.memberships.any? %>
36 <%= render :partial => 'layouts/project_selector' if User.current.memberships.any? %>
37 </div>
37 </div>
38
38
39 <h1><%= h(@project ? @project.name : Setting.app_title) %></h1>
39 <h1><%= h(@project && !@project.new_record? ? @project.name : Setting.app_title) %></h1>
40
40
41 <div id="main-menu">
41 <div id="main-menu">
42 <%= render_main_menu(@project) %>
42 <%= render_main_menu(@project) %>
@@ -26,7 +26,7 end %>
26 <td class="revision"><%= link_to(format_revision(entry.lastrev.name), :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %></td>
26 <td class="revision"><%= link_to(format_revision(entry.lastrev.name), :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %></td>
27 <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
27 <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
28 <td class="author"><%=h(entry.lastrev.author.to_s.split('<').first) if entry.lastrev %></td>
28 <td class="author"><%=h(entry.lastrev.author.to_s.split('<').first) if entry.lastrev %></td>
29 <% changeset = @project.repository.changesets.find_by_revision(entry.lastrev.identifier) if entry.lastrev %>
29 <% changeset = @project.repository.changesets.find_by_revision(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
30 <td class="comments"><%=h truncate(changeset.comments, 50) unless changeset.nil? %></td>
30 <td class="comments"><%=h truncate(changeset.comments, 50) unless changeset.nil? %></td>
31 </tr>
31 </tr>
32 <% end %>
32 <% end %>
@@ -13,6 +13,7
13 <%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
13 <%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
14 </p>
14 </p>
15
15
16 <%= render :partial => 'revisions', :locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }%>
16 <%= render(:partial => 'revisions',
17 :locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %>
17
18
18 <% html_title(l(:label_change_plural)) -%>
19 <% html_title(l(:label_change_plural)) -%>
@@ -829,7 +829,7 module SVG
829 @doc << DocType.new( %q{svg PUBLIC "-//W3C//DTD SVG 1.0//EN" } +
829 @doc << DocType.new( %q{svg PUBLIC "-//W3C//DTD SVG 1.0//EN" } +
830 %q{"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"} )
830 %q{"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"} )
831 if style_sheet && style_sheet != ''
831 if style_sheet && style_sheet != ''
832 @doc << ProcessingInstruction.new( "xml-stylesheet",
832 @doc << Instruction.new( "xml-stylesheet",
833 %Q{href="#{style_sheet}" type="text/css"} )
833 %Q{href="#{style_sheet}" type="text/css"} )
834 end
834 end
835 @root = @doc.add_element( "svg", {
835 @root = @doc.add_element( "svg", {
@@ -1131,7 +1131,7 class RedCloth < String
1131 end
1131 end
1132 end
1132 end
1133
1133
1134 ALLOWED_TAGS = %w(redpre pre code)
1134 ALLOWED_TAGS = %w(redpre pre code notextile)
1135
1135
1136 def escape_html_tags(text)
1136 def escape_html_tags(text)
1137 text.gsub!(%r{<(\/?([!\w]+)[^<>\n]*)(>?)}) {|m| ALLOWED_TAGS.include?($2) ? "<#{$1}#{$3}" : "&lt;#{$1}#{'&gt;' unless $3.blank?}" }
1137 text.gsub!(%r{<(\/?([!\w]+)[^<>\n]*)(>?)}) {|m| ALLOWED_TAGS.include?($2) ? "<#{$1}#{$3}" : "&lt;#{$1}#{'&gt;' unless $3.blank?}" }
@@ -223,7 +223,7 height: 1%;
223 clear:left;
223 clear:left;
224 }
224 }
225
225
226 html>body .tabular p {overflow:auto;}
226 html>body .tabular p {overflow:hidden;}
227
227
228 .tabular label{
228 .tabular label{
229 font-weight: bold;
229 font-weight: bold;
@@ -151,6 +151,14 class ApplicationHelperTest < HelperTestCase
151 to_test.each { |text, result| assert_equal result, textilizable(text) }
151 to_test.each { |text, result| assert_equal result, textilizable(text) }
152 end
152 end
153
153
154 def test_allowed_html_tags
155 to_test = {
156 "<pre>preformatted text</pre>" => "<pre>preformatted text</pre>",
157 "<notextile>no *textile* formatting</notextile>" => "no *textile* formatting",
158 }
159 to_test.each { |text, result| assert_equal result, textilizable(text) }
160 end
161
154 def test_wiki_links_in_tables
162 def test_wiki_links_in_tables
155 to_test = {"|Cell 11|Cell 12|Cell 13|\n|Cell 21|Cell 22||\n|Cell 31||Cell 33|" =>
163 to_test = {"|Cell 11|Cell 12|Cell 13|\n|Cell 21|Cell 22||\n|Cell 31||Cell 33|" =>
156 '<tr><td>Cell 11</td><td>Cell 12</td><td>Cell 13</td></tr>' +
164 '<tr><td>Cell 11</td><td>Cell 12</td><td>Cell 13</td></tr>' +
General Comments 0
You need to be logged in to leave comments. Login now