Project

General

Profile

Patch #258 » truncate_activity_document.patch

Panta Rhei, 2008-02-03 11:02

View differences:

documents/_document.rhtml (working copy)
1 1
<p><%= link_to h(document.title), :controller => 'documents', :action => 'show', :id => document %><br />
2
<% unless document.description.blank? %><%=h(truncate(document.description, 250)) %><br /><% end %>
2
<% unless document.description.blank? %><%=(simple_format(sanitize(truncate(document.description, 250)))) %><br /><% end %>
3 3
<em><%= format_time(document.created_on) %></em></p>
projects/activity.rhtml (working copy)
5 5
  <ul>
6 6
  <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| %>
7 7
    <li><p><%= format_time(e.event_datetime, false) %> <%= link_to truncate(e.event_title, 100), e.event_url %><br />
8
    <% unless e.event_description.blank? %><em><%= truncate(e.event_description, 500) %></em><br /><% end %>
8
    <% unless e.event_description.blank? %><em><%= (simple_format(sanitize(truncate(e.event_description, 500)))) %></em><br /><% end %>
9 9
    <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></p></li>
10 10
  <% end %>
11 11
  </ul>
(2-2/3)