@@ -22,6 +22,12 module RepositoriesHelper | |||
|
22 | 22 | txt.to_s[0,8] |
|
23 | 23 | end |
|
24 | 24 | |
|
25 | def truncate_at_line_break(text, length = 255) | |
|
26 | if text | |
|
27 | text.gsub(%r{^(.{#{length}}[^\n]*)\n.+$}m, '\\1...') | |
|
28 | end | |
|
29 | end | |
|
30 | ||
|
25 | 31 | def render_properties(properties) |
|
26 | 32 | unless properties.nil? || properties.empty? |
|
27 | 33 | content = '' |
@@ -18,7 +18,7 | |||
|
18 | 18 | <td class="checkbox"><%= radio_button_tag('rev_to', changeset.revision, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %></td> |
|
19 | 19 | <td class="committed_on"><%= format_time(changeset.committed_on) %></td> |
|
20 | 20 | <td class="author"><%=h changeset.committer.to_s.split('<').first %></td> |
|
21 | <td class="comments"><%= textilizable(changeset.comments) %></td> | |
|
21 | <td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td> | |
|
22 | 22 | </tr> |
|
23 | 23 | <% line_num += 1 %> |
|
24 | 24 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now