##// END OF EJS Templates
add Redmine::CodesetUtil and move replacing invalid utf8 logic to it....
Toshi MARUYAMA -
r5354:a78b12706a46
parent child
Show More
@@ -0,0 +1,31
1 require 'iconv'
2
3 module Redmine
4 module CodesetUtil
5
6 def self.replace_invalid_utf8(str)
7 return str if str.nil?
8 if str.respond_to?(:force_encoding)
9 str.force_encoding('UTF-8')
10 if ! str.valid_encoding?
11 str = str.encode("US-ASCII", :invalid => :replace,
12 :undef => :replace, :replace => '?').encode("UTF-8")
13 end
14 else
15 ic = Iconv.new('UTF-8', 'UTF-8')
16 txtar = ""
17 begin
18 txtar += ic.iconv(str)
19 rescue Iconv::IllegalSequence
20 txtar += $!.success
21 str = '?' + $!.failed[1,$!.failed.length]
22 retry
23 rescue
24 txtar += $!.success
25 end
26 str = txtar
27 end
28 str
29 end
30 end
31 end
@@ -1,287 +1,263
1 # redMine - project management software
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 require 'iconv'
18 require 'iconv'
19 require 'redmine/codeset_util'
19
20
20 module RepositoriesHelper
21 module RepositoriesHelper
21 def format_revision(revision)
22 def format_revision(revision)
22 if revision.respond_to? :format_identifier
23 if revision.respond_to? :format_identifier
23 revision.format_identifier
24 revision.format_identifier
24 else
25 else
25 revision.to_s
26 revision.to_s
26 end
27 end
27 end
28 end
28
29
29 def truncate_at_line_break(text, length = 255)
30 def truncate_at_line_break(text, length = 255)
30 if text
31 if text
31 text.gsub(%r{^(.{#{length}}[^\n]*)\n.+$}m, '\\1...')
32 text.gsub(%r{^(.{#{length}}[^\n]*)\n.+$}m, '\\1...')
32 end
33 end
33 end
34 end
34
35
35 def render_properties(properties)
36 def render_properties(properties)
36 unless properties.nil? || properties.empty?
37 unless properties.nil? || properties.empty?
37 content = ''
38 content = ''
38 properties.keys.sort.each do |property|
39 properties.keys.sort.each do |property|
39 content << content_tag('li', "<b>#{h property}</b>: <span>#{h properties[property]}</span>")
40 content << content_tag('li', "<b>#{h property}</b>: <span>#{h properties[property]}</span>")
40 end
41 end
41 content_tag('ul', content, :class => 'properties')
42 content_tag('ul', content, :class => 'properties')
42 end
43 end
43 end
44 end
44
45
45 def render_changeset_changes
46 def render_changeset_changes
46 changes = @changeset.changes.find(:all, :limit => 1000, :order => 'path').collect do |change|
47 changes = @changeset.changes.find(:all, :limit => 1000, :order => 'path').collect do |change|
47 case change.action
48 case change.action
48 when 'A'
49 when 'A'
49 # Detects moved/copied files
50 # Detects moved/copied files
50 if !change.from_path.blank?
51 if !change.from_path.blank?
51 change.action = @changeset.changes.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C'
52 change.action = @changeset.changes.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C'
52 end
53 end
53 change
54 change
54 when 'D'
55 when 'D'
55 @changeset.changes.detect {|c| c.from_path == change.path} ? nil : change
56 @changeset.changes.detect {|c| c.from_path == change.path} ? nil : change
56 else
57 else
57 change
58 change
58 end
59 end
59 end.compact
60 end.compact
60
61
61 tree = { }
62 tree = { }
62 changes.each do |change|
63 changes.each do |change|
63 p = tree
64 p = tree
64 dirs = change.path.to_s.split('/').select {|d| !d.blank?}
65 dirs = change.path.to_s.split('/').select {|d| !d.blank?}
65 path = ''
66 path = ''
66 dirs.each do |dir|
67 dirs.each do |dir|
67 path += '/' + dir
68 path += '/' + dir
68 p[:s] ||= {}
69 p[:s] ||= {}
69 p = p[:s]
70 p = p[:s]
70 p[path] ||= {}
71 p[path] ||= {}
71 p = p[path]
72 p = p[path]
72 end
73 end
73 p[:c] = change
74 p[:c] = change
74 end
75 end
75
76
76 render_changes_tree(tree[:s])
77 render_changes_tree(tree[:s])
77 end
78 end
78
79
79 def render_changes_tree(tree)
80 def render_changes_tree(tree)
80 return '' if tree.nil?
81 return '' if tree.nil?
81
82
82 output = ''
83 output = ''
83 output << '<ul>'
84 output << '<ul>'
84 tree.keys.sort.each do |file|
85 tree.keys.sort.each do |file|
85 style = 'change'
86 style = 'change'
86 text = File.basename(h(file))
87 text = File.basename(h(file))
87 if s = tree[file][:s]
88 if s = tree[file][:s]
88 style << ' folder'
89 style << ' folder'
89 path_param = to_path_param(@repository.relative_path(file))
90 path_param = to_path_param(@repository.relative_path(file))
90 text = link_to(text, :controller => 'repositories',
91 text = link_to(text, :controller => 'repositories',
91 :action => 'show',
92 :action => 'show',
92 :id => @project,
93 :id => @project,
93 :path => path_param,
94 :path => path_param,
94 :rev => @changeset.identifier)
95 :rev => @changeset.identifier)
95 output << "<li class='#{style}'>#{text}</li>"
96 output << "<li class='#{style}'>#{text}</li>"
96 output << render_changes_tree(s)
97 output << render_changes_tree(s)
97 elsif c = tree[file][:c]
98 elsif c = tree[file][:c]
98 style << " change-#{c.action}"
99 style << " change-#{c.action}"
99 path_param = to_path_param(@repository.relative_path(c.path))
100 path_param = to_path_param(@repository.relative_path(c.path))
100 text = link_to(text, :controller => 'repositories',
101 text = link_to(text, :controller => 'repositories',
101 :action => 'entry',
102 :action => 'entry',
102 :id => @project,
103 :id => @project,
103 :path => path_param,
104 :path => path_param,
104 :rev => @changeset.identifier) unless c.action == 'D'
105 :rev => @changeset.identifier) unless c.action == 'D'
105 text << " - #{c.revision}" unless c.revision.blank?
106 text << " - #{c.revision}" unless c.revision.blank?
106 text << ' (' + link_to('diff', :controller => 'repositories',
107 text << ' (' + link_to('diff', :controller => 'repositories',
107 :action => 'diff',
108 :action => 'diff',
108 :id => @project,
109 :id => @project,
109 :path => path_param,
110 :path => path_param,
110 :rev => @changeset.identifier) + ') ' if c.action == 'M'
111 :rev => @changeset.identifier) + ') ' if c.action == 'M'
111 text << ' ' + content_tag('span', c.from_path, :class => 'copied-from') unless c.from_path.blank?
112 text << ' ' + content_tag('span', c.from_path, :class => 'copied-from') unless c.from_path.blank?
112 output << "<li class='#{style}'>#{text}</li>"
113 output << "<li class='#{style}'>#{text}</li>"
113 end
114 end
114 end
115 end
115 output << '</ul>'
116 output << '</ul>'
116 output
117 output
117 end
118 end
118
119
119 def to_utf8(str)
120 def to_utf8(str)
120 return str if str.nil?
121 return str if str.nil?
121 str = to_utf8_internal(str)
122 str = to_utf8_internal(str)
122 if str.respond_to?(:force_encoding)
123 if str.respond_to?(:force_encoding)
123 str.force_encoding('UTF-8')
124 str.force_encoding('UTF-8')
124 end
125 end
125 str
126 str
126 end
127 end
127
128
128 def to_utf8_internal(str)
129 def to_utf8_internal(str)
129 return str if str.nil?
130 return str if str.nil?
130 if str.respond_to?(:force_encoding)
131 if str.respond_to?(:force_encoding)
131 str.force_encoding('ASCII-8BIT')
132 str.force_encoding('ASCII-8BIT')
132 end
133 end
133 return str if str.empty?
134 return str if str.empty?
134 return str if /\A[\r\n\t\x20-\x7e]*\Z/n.match(str) # for us-ascii
135 return str if /\A[\r\n\t\x20-\x7e]*\Z/n.match(str) # for us-ascii
135 if str.respond_to?(:force_encoding)
136 if str.respond_to?(:force_encoding)
136 str.force_encoding('UTF-8')
137 str.force_encoding('UTF-8')
137 end
138 end
138 @encodings ||= Setting.repositories_encodings.split(',').collect(&:strip)
139 @encodings ||= Setting.repositories_encodings.split(',').collect(&:strip)
139 @encodings.each do |encoding|
140 @encodings.each do |encoding|
140 begin
141 begin
141 return Iconv.conv('UTF-8', encoding, str)
142 return Iconv.conv('UTF-8', encoding, str)
142 rescue Iconv::Failure
143 rescue Iconv::Failure
143 # do nothing here and try the next encoding
144 # do nothing here and try the next encoding
144 end
145 end
145 end
146 end
146 str = replace_invalid_utf8(str)
147 str = Redmine::CodesetUtil.replace_invalid_utf8(str)
147 end
148 end
148 private :to_utf8_internal
149 private :to_utf8_internal
149
150
150 def replace_invalid_utf8(str)
151 return str if str.nil?
152 if str.respond_to?(:force_encoding)
153 str.force_encoding('UTF-8')
154 if ! str.valid_encoding?
155 str = str.encode("US-ASCII", :invalid => :replace,
156 :undef => :replace, :replace => '?').encode("UTF-8")
157 end
158 else
159 ic = Iconv.new('UTF-8', 'UTF-8')
160 txtar = ""
161 begin
162 txtar += ic.iconv(str)
163 rescue Iconv::IllegalSequence
164 txtar += $!.success
165 str = '?' + $!.failed[1,$!.failed.length]
166 retry
167 rescue
168 txtar += $!.success
169 end
170 str = txtar
171 end
172 str
173 end
174
175 def repository_field_tags(form, repository)
151 def repository_field_tags(form, repository)
176 method = repository.class.name.demodulize.underscore + "_field_tags"
152 method = repository.class.name.demodulize.underscore + "_field_tags"
177 if repository.is_a?(Repository) &&
153 if repository.is_a?(Repository) &&
178 respond_to?(method) && method != 'repository_field_tags'
154 respond_to?(method) && method != 'repository_field_tags'
179 send(method, form, repository)
155 send(method, form, repository)
180 end
156 end
181 end
157 end
182
158
183 def scm_select_tag(repository)
159 def scm_select_tag(repository)
184 scm_options = [["--- #{l(:actionview_instancetag_blank_option)} ---", '']]
160 scm_options = [["--- #{l(:actionview_instancetag_blank_option)} ---", '']]
185 Redmine::Scm::Base.all.each do |scm|
161 Redmine::Scm::Base.all.each do |scm|
186 if Setting.enabled_scm.include?(scm) ||
162 if Setting.enabled_scm.include?(scm) ||
187 (repository && repository.class.name.demodulize == scm)
163 (repository && repository.class.name.demodulize == scm)
188 scm_options << ["Repository::#{scm}".constantize.scm_name, scm]
164 scm_options << ["Repository::#{scm}".constantize.scm_name, scm]
189 end
165 end
190 end
166 end
191 select_tag('repository_scm',
167 select_tag('repository_scm',
192 options_for_select(scm_options, repository.class.name.demodulize),
168 options_for_select(scm_options, repository.class.name.demodulize),
193 :disabled => (repository && !repository.new_record?),
169 :disabled => (repository && !repository.new_record?),
194 :onchange => remote_function(
170 :onchange => remote_function(
195 :url => {
171 :url => {
196 :controller => 'repositories',
172 :controller => 'repositories',
197 :action => 'edit',
173 :action => 'edit',
198 :id => @project
174 :id => @project
199 },
175 },
200 :method => :get,
176 :method => :get,
201 :with => "Form.serialize(this.form)")
177 :with => "Form.serialize(this.form)")
202 )
178 )
203 end
179 end
204
180
205 def with_leading_slash(path)
181 def with_leading_slash(path)
206 path.to_s.starts_with?('/') ? path : "/#{path}"
182 path.to_s.starts_with?('/') ? path : "/#{path}"
207 end
183 end
208
184
209 def without_leading_slash(path)
185 def without_leading_slash(path)
210 path.gsub(%r{^/+}, '')
186 path.gsub(%r{^/+}, '')
211 end
187 end
212
188
213 def subversion_field_tags(form, repository)
189 def subversion_field_tags(form, repository)
214 content_tag('p', form.text_field(:url, :size => 60, :required => true,
190 content_tag('p', form.text_field(:url, :size => 60, :required => true,
215 :disabled => (repository && !repository.root_url.blank?)) +
191 :disabled => (repository && !repository.root_url.blank?)) +
216 '<br />(file:///, http://, https://, svn://, svn+[tunnelscheme]://)') +
192 '<br />(file:///, http://, https://, svn://, svn+[tunnelscheme]://)') +
217 content_tag('p', form.text_field(:login, :size => 30)) +
193 content_tag('p', form.text_field(:login, :size => 30)) +
218 content_tag('p', form.password_field(
194 content_tag('p', form.password_field(
219 :password, :size => 30, :name => 'ignore',
195 :password, :size => 30, :name => 'ignore',
220 :value => ((repository.new_record? || repository.password.blank?) ? '' : ('x'*15)),
196 :value => ((repository.new_record? || repository.password.blank?) ? '' : ('x'*15)),
221 :onfocus => "this.value=''; this.name='repository[password]';",
197 :onfocus => "this.value=''; this.name='repository[password]';",
222 :onchange => "this.name='repository[password]';"))
198 :onchange => "this.name='repository[password]';"))
223 end
199 end
224
200
225 def darcs_field_tags(form, repository)
201 def darcs_field_tags(form, repository)
226 content_tag('p', form.text_field(:url, :label => 'Root directory',
202 content_tag('p', form.text_field(:url, :label => 'Root directory',
227 :size => 60, :required => true,
203 :size => 60, :required => true,
228 :disabled => (repository && !repository.new_record?))) +
204 :disabled => (repository && !repository.new_record?))) +
229 content_tag('p', form.select(:log_encoding, [nil] + Setting::ENCODINGS,
205 content_tag('p', form.select(:log_encoding, [nil] + Setting::ENCODINGS,
230 :label => 'Commit messages encoding', :required => true))
206 :label => 'Commit messages encoding', :required => true))
231 end
207 end
232
208
233 def mercurial_field_tags(form, repository)
209 def mercurial_field_tags(form, repository)
234 content_tag('p', form.text_field(:url, :label => 'Root directory',
210 content_tag('p', form.text_field(:url, :label => 'Root directory',
235 :size => 60, :required => true,
211 :size => 60, :required => true,
236 :disabled => (repository && !repository.root_url.blank?)) +
212 :disabled => (repository && !repository.root_url.blank?)) +
237 '<br />Local repository (e.g. /hgrepo, c:\hgrepo)' ) +
213 '<br />Local repository (e.g. /hgrepo, c:\hgrepo)' ) +
238 content_tag('p', form.select(
214 content_tag('p', form.select(
239 :path_encoding, [nil] + Setting::ENCODINGS,
215 :path_encoding, [nil] + Setting::ENCODINGS,
240 :label => 'Path encoding') +
216 :label => 'Path encoding') +
241 '<br />Default: UTF-8')
217 '<br />Default: UTF-8')
242 end
218 end
243
219
244 def git_field_tags(form, repository)
220 def git_field_tags(form, repository)
245 content_tag('p', form.text_field(:url, :label => 'Path to repository',
221 content_tag('p', form.text_field(:url, :label => 'Path to repository',
246 :size => 60, :required => true,
222 :size => 60, :required => true,
247 :disabled => (repository && !repository.root_url.blank?)) +
223 :disabled => (repository && !repository.root_url.blank?)) +
248 '<br />Bare and local repository (e.g. /gitrepo, c:\gitrepo)') +
224 '<br />Bare and local repository (e.g. /gitrepo, c:\gitrepo)') +
249 content_tag('p', form.select(
225 content_tag('p', form.select(
250 :path_encoding, [nil] + Setting::ENCODINGS,
226 :path_encoding, [nil] + Setting::ENCODINGS,
251 :label => 'Path encoding') +
227 :label => 'Path encoding') +
252 '<br />Default: UTF-8')
228 '<br />Default: UTF-8')
253 end
229 end
254
230
255 def cvs_field_tags(form, repository)
231 def cvs_field_tags(form, repository)
256 content_tag('p', form.text_field(:root_url,
232 content_tag('p', form.text_field(:root_url,
257 :label => 'CVSROOT', :size => 60, :required => true,
233 :label => 'CVSROOT', :size => 60, :required => true,
258 :disabled => !repository.new_record?)) +
234 :disabled => !repository.new_record?)) +
259 content_tag('p', form.text_field(:url, :label => 'Module',
235 content_tag('p', form.text_field(:url, :label => 'Module',
260 :size => 30, :required => true,
236 :size => 30, :required => true,
261 :disabled => !repository.new_record?)) +
237 :disabled => !repository.new_record?)) +
262 content_tag('p', form.select(:log_encoding, [nil] + Setting::ENCODINGS,
238 content_tag('p', form.select(:log_encoding, [nil] + Setting::ENCODINGS,
263 :label => 'Commit messages encoding', :required => true)) +
239 :label => 'Commit messages encoding', :required => true)) +
264 content_tag('p', form.select(
240 content_tag('p', form.select(
265 :path_encoding, [nil] + Setting::ENCODINGS,
241 :path_encoding, [nil] + Setting::ENCODINGS,
266 :label => 'Path encoding') +
242 :label => 'Path encoding') +
267 '<br />Default: UTF-8')
243 '<br />Default: UTF-8')
268 end
244 end
269
245
270 def bazaar_field_tags(form, repository)
246 def bazaar_field_tags(form, repository)
271 content_tag('p', form.text_field(:url, :label => 'Root directory',
247 content_tag('p', form.text_field(:url, :label => 'Root directory',
272 :size => 60, :required => true,
248 :size => 60, :required => true,
273 :disabled => (repository && !repository.new_record?))) +
249 :disabled => (repository && !repository.new_record?))) +
274 content_tag('p', form.select(:log_encoding, [nil] + Setting::ENCODINGS,
250 content_tag('p', form.select(:log_encoding, [nil] + Setting::ENCODINGS,
275 :label => 'Commit messages encoding', :required => true))
251 :label => 'Commit messages encoding', :required => true))
276 end
252 end
277
253
278 def filesystem_field_tags(form, repository)
254 def filesystem_field_tags(form, repository)
279 content_tag('p', form.text_field(:url, :label => 'Root directory',
255 content_tag('p', form.text_field(:url, :label => 'Root directory',
280 :size => 60, :required => true,
256 :size => 60, :required => true,
281 :disabled => (repository && !repository.root_url.blank?))) +
257 :disabled => (repository && !repository.root_url.blank?))) +
282 content_tag('p', form.select(
258 content_tag('p', form.select(
283 :path_encoding, [nil] + Setting::ENCODINGS,
259 :path_encoding, [nil] + Setting::ENCODINGS,
284 :label => 'Path encoding') +
260 :label => 'Path encoding') +
285 '<br />Default: UTF-8')
261 '<br />Default: UTF-8')
286 end
262 end
287 end
263 end
@@ -1,27 +1,27
1 <% @entries.each do |entry| %>
1 <% @entries.each do |entry| %>
2 <% tr_id = Digest::MD5.hexdigest(entry.path)
2 <% tr_id = Digest::MD5.hexdigest(entry.path)
3 depth = params[:depth].to_i %>
3 depth = params[:depth].to_i %>
4 <% ent_path = replace_invalid_utf8(entry.path) %>
4 <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %>
5 <% ent_name = replace_invalid_utf8(entry.name) %>
5 <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %>
6 <tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>">
6 <tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>">
7 <td style="padding-left: <%=18 * depth%>px;" class="filename">
7 <td style="padding-left: <%=18 * depth%>px;" class="filename">
8 <% if entry.is_dir? %>
8 <% if entry.is_dir? %>
9 <span class="expander" onclick="<%= remote_function :url => {:action => 'show', :id => @project, :path => to_path_param(ent_path), :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
9 <span class="expander" onclick="<%= remote_function :url => {:action => 'show', :id => @project, :path => to_path_param(ent_path), :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
10 :method => :get,
10 :method => :get,
11 :update => { :success => tr_id },
11 :update => { :success => tr_id },
12 :position => :after,
12 :position => :after,
13 :success => "scmEntryLoaded('#{tr_id}')",
13 :success => "scmEntryLoaded('#{tr_id}')",
14 :condition => "scmEntryClick('#{tr_id}')"%>">&nbsp</span>
14 :condition => "scmEntryClick('#{tr_id}')"%>">&nbsp</span>
15 <% end %>
15 <% end %>
16 <%= link_to h(ent_name),
16 <%= link_to h(ent_name),
17 {:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :path => to_path_param(ent_path), :rev => @rev},
17 {:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :path => to_path_param(ent_path), :rev => @rev},
18 :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
18 :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
19 </td>
19 </td>
20 <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
20 <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
21 <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
21 <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
22 <td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td>
22 <td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td>
23 <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
23 <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
24 <td class="author"><%= changeset.nil? ? h(replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : changeset.author if entry.lastrev %></td>
24 <td class="author"><%= changeset.nil? ? h(Redmine::CodesetUtil.replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : changeset.author if entry.lastrev %></td>
25 <td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td>
25 <td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td>
26 </tr>
26 </tr>
27 <% end %>
27 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now