Diff
Modified: branches/rails2/app/helpers/application_helper.rb (2756 => 2757)
--- branches/rails2/app/helpers/application_helper.rb 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/helpers/application_helper.rb 2011-10-24 21:06:59 UTC (rev 2757)
@@ -102,7 +102,7 @@
return nil
end
- name = truncate_to ? truncate(user.name, truncate_to) : name = user.name
+ name = truncate_to ? truncate(user.name, :length => truncate_to) : name = user.name
return link_to(h(name), user_url(user), :title => tooltip_title_attrib(h(user.name)))
end
@@ -117,7 +117,7 @@
return nil
end
- title = truncate_to ? truncate(network.title, truncate_to) : network.title
+ title = truncate_to ? truncate(network.title, :length => truncate_to) : network.title
return link_to(h(title), group_url(network))
end
@@ -441,7 +441,7 @@
def contributable_name(contributableid, contributabletype, truncate=nil)
str = contributable(contributableid, contributabletype, false)
- return truncate ? truncate(str, truncate) : str
+ return truncate ? truncate(str, :length => truncate) : str
end
def contributable_url(contributableid, contributabletype, base_host=nil)
@@ -502,7 +502,7 @@
end
def trim_body_html(body, limit=nil)
- truncate(body, limit)
+ truncate(body, :length => limit)
white_list(body)
end
Modified: branches/rails2/app/views/announcements/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/announcements/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/announcements/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -19,7 +19,7 @@
<% if announcement.body and announcement.body.length > 0 %>
<div class="desc" style="font-size: 85%;">
- <%= truncate(strip_html(announcement.body), 180) %>
+ <%= truncate(strip_html(announcement.body), :length => 180) %>
</div>
<% end %>
Modified: branches/rails2/app/views/blobs/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/blobs/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/blobs/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -69,7 +69,7 @@
<div class="desc" style="font-size: 85%;">
<% if blob.body and blob.body.length > 0 %>
- <% desc = truncate(strip_html(blob.body), 500) %>
+ <% desc = truncate(strip_html(blob.body), :length => 500) %>
<%= query ? highlight_all(desc, query) : desc %>
<% else -%>
<span class="none_text">No description</span>
Modified: branches/rails2/app/views/blogs/show.rhtml (2756 => 2757)
--- branches/rails2/app/views/blogs/show.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/blogs/show.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -8,11 +8,11 @@
<ul class="sectionIcons">
<% if Authorization.is_authorized?("edit", nil, @blog, current_user) %>
<li><%= icon('new', new_blog_blog_post_path(@blog), nil, nil, "New post") %></li>
- <li><%= icon('edit', edit_blog_path(@blog), nil, nil, 'Edit ' + truncate(@blog.title, 10)) %></li>
+ <li><%= icon('edit', edit_blog_path(@blog), nil, nil, 'Edit ' + truncate(@blog.title, :length => 10)) %></li>
<% end %>
<% if Authorization.is_authorized?("destroy", nil, @blog, current_user) %>
- <li><%= icon('destroy', blog_path(@blog), nil, { :confirm => 'Are you sure?', :method => :delete }, 'Remove ' + truncate(@blog.title, 10)) %></li>
+ <li><%= icon('destroy', blog_path(@blog), nil, { :confirm => 'Are you sure?', :method => :delete }, 'Remove ' + truncate(@blog.title, :length => 10)) %></li>
<% end %>
</ul>
<% end %>
Modified: branches/rails2/app/views/experiments/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/experiments/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/experiments/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -24,7 +24,7 @@
<div class="desc" style="font-size: 85%;">
<% unless experiment.description.blank? %>
- <%= truncate(strip_html(experiment.description), 180) %>
+ <%= truncate(strip_html(experiment.description), :length => 180) %>
<% else -%>
<span class="none_text">No description</span>
<% end -%>
Modified: branches/rails2/app/views/gadgets/_asset_manager.rhtml (2756 => 2757)
--- branches/rails2/app/views/gadgets/_asset_manager.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/gadgets/_asset_manager.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -26,7 +26,7 @@
<div class="content">
<ul class="gadget_list">
<% current_user.friends.each do |friend| %>
- <li><%= icon "user", nil, nil, nil, "" %> <%= link_to truncate(h(friend.name), gadget_characters_limit), user_path(friend), :title => tooltip_title_attrib(h(friend.name)) %></li>
+ <li><%= icon "user", nil, nil, nil, "" %> <%= link_to truncate(h(friend.name), :length => gadget_characters_limit), user_path(friend), :title => tooltip_title_attrib(h(friend.name)) %></li>
<% end %>
</ul>
</div>
@@ -41,10 +41,10 @@
<div class="content">
<ul class="gadget_list">
<% current_user.networks_owned.each do |network_owned| %>
- <li><%= icon "network-owned", nil, nil, nil, "" %> <%= link_to truncate(h(network_owned.title), gadget_characters_limit), group_path(network_owned), :title => tooltip_title_attrib(h(network_owned.title)) %></li>
+ <li><%= icon "network-owned", nil, nil, nil, "" %> <%= link_to truncate(h(network_owned.title), :length => gadget_characters_limit), group_path(network_owned), :title => tooltip_title_attrib(h(network_owned.title)) %></li>
<% end %>
<% current_user.networks.each do |network_member| %>
- <li><%= icon "network-member", nil, nil, nil, "" %> <%= link_to truncate(h(network_member.title), gadget_characters_limit), group_path(network_member), :title => tooltip_title_attrib(h(network_member.title)) %></li>
+ <li><%= icon "network-member", nil, nil, nil, "" %> <%= link_to truncate(h(network_member.title), :length => gadget_characters_limit), group_path(network_member), :title => tooltip_title_attrib(h(network_member.title)) %></li>
<% end %>
</ul>
</div>
Modified: branches/rails2/app/views/gadgets/_user_monitor.rhtml (2756 => 2757)
--- branches/rails2/app/views/gadgets/_user_monitor.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/gadgets/_user_monitor.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -40,7 +40,7 @@
<% current_user.messages_unread.each do |message| %>
<li>
<%= icon "message", message_path(message), nil, nil, "" %>
- <b><%= link_to truncate(h(message.subject), trunc_length), message_path(message), :title => tooltip_title_attrib(h(message.subject)) -%></b>
+ <b><%= link_to truncate(h(message.subject), :length => trunc_length), message_path(message), :title => tooltip_title_attrib(h(message.subject)) -%></b>
</li>
<% end %>
</ul>
@@ -59,7 +59,7 @@
<% current_user.friendships_pending.each do |friendship| %>
<li>
<%= icon "user", user_friendship_path(current_user, friendship), nil, nil, "" %>
- <b><%= link_to truncate(h(friendship.user.name), trunc_length), user_friendship_path(current_user, friendship), :title => tooltip_title_attrib(h(friendship.user.name)) -%></b>
+ <b><%= link_to truncate(h(friendship.user.name), :length => trunc_length), user_friendship_path(current_user, friendship), :title => tooltip_title_attrib(h(friendship.user.name)) -%></b>
</li>
<% end %>
</ul>
@@ -79,7 +79,7 @@
<% membership_invites.each do |membership| %>
<li>
<%= icon "membership", membership_path(membership.user, membership), nil, nil, "" -%>
- <b><%= link_to truncate("From #{h(membership.network.owner.name)}", trunc_length), membership_path(membership.user, membership), :title => tooltip_title_attrib("From #{h(membership.network.owner.name)}") -%></b>
+ <b><%= link_to truncate("From #{h(membership.network.owner.name)}", :length => trunc_length), membership_path(membership.user, membership), :title => tooltip_title_attrib("From #{h(membership.network.owner.name)}") -%></b>
<span style="margin-left: 20px; display: block;"><small>(for Group: <%= title membership.network_id %>)</small></span>
</li>
<% end %>
@@ -100,7 +100,7 @@
<% membership_requests.each do |membership| %>
<li>
<%= icon "membership", membership_path(membership.user, membership), nil, nil, "" -%>
- <b><%= link_to truncate("From #{h(membership.user.name)}", trunc_length), membership_path(membership.user, membership), :title => tooltip_title_attrib("From #{h(membership.user.name)}") -%></b>
+ <b><%= link_to truncate("From #{h(membership.user.name)}", :length => trunc_length), membership_path(membership.user, membership), :title => tooltip_title_attrib(">From #{h(membership.user.name)}") -%></b>
<span style="margin-left: 20px; display: block;"><small>(for Group: <%= title membership.network_id %>)</small></span>
</li>
<% end %>
Modified: branches/rails2/app/views/group_announcements/_breadcrumbs.rhtml (2756 => 2757)
--- branches/rails2/app/views/group_announcements/_breadcrumbs.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/group_announcements/_breadcrumbs.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -8,11 +8,11 @@
<li><b>»</b></li>
<% case controller.action_name.to_s; when "show" -%>
- <li><%= truncate(h(@announcement.title),50) -%></li>
+ <li><%= truncate(h(@announcement.title), :length => 50) -%></li>
<% when "new" -%>
<li>New Announcement</li>
<% when "edit" -%>
- <li><%= link_to "#{truncate(h(@announcement.title),50)}", group_announcement_path(@group, @announcement) -%></li>
+ <li><%= link_to "#{truncate(h(@announcement.title), :length => 50)}", group_announcement_path(@group, @announcement) -%></li>
<li><b>»</b></li>
<li>Edit</li>
<% else -%>
Modified: branches/rails2/app/views/group_announcements/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/group_announcements/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/group_announcements/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -19,7 +19,7 @@
<% if announcement.body and announcement.body.length > 0 %>
<div class="desc" style="font-size: 85%;">
- <%= truncate(strip_html(announcement.body), 180) %>
+ <%= truncate(strip_html(announcement.body), :length => 180) %>
</div>
<% end %>
Modified: branches/rails2/app/views/home/_latest_comments.rhtml (2756 => 2757)
--- branches/rails2/app/views/home/_latest_comments.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/home/_latest_comments.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -19,7 +19,7 @@
(<%= timeago_fuzzy c.created_at %>)
</span>
<div class="box_standout" style="font-size: 85%; margin: 0.4em 2em; padding: 0.2em 0.5em;">
- <%= truncate(strip_html(white_list(c.comment)), 150) %>
+ <%= truncate(strip_html(white_list(c.comment)), :length => 150) %>
<p style="text-align: right;">[ <%= link_to "More", (c.commentable_type == 'Network' ? group_url(c.commentable) + "#comment_#{c.id}" : contributable_url(c.commentable_id, c.commentable_type) + "#comment_#{c.id}") %> ]</p>
</div>
<br/>
Modified: branches/rails2/app/views/home/_latest_reviews.rhtml (2756 => 2757)
--- branches/rails2/app/views/home/_latest_reviews.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/home/_latest_reviews.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -31,7 +31,7 @@
<% end -%>
</span>
</p>
- <%= truncate(strip_html(white_list(r.review)), 150) %>
+ <%= truncate(strip_html(white_list(r.review)), :length => 150) %>
<p style="text-align: right;">[ <%= link_to "More", workflow_review_url(r.reviewable, r) -%> ]</p>
</div>
<br/>
Modified: branches/rails2/app/views/jobs/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/jobs/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/jobs/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -21,7 +21,7 @@
<% unless job.description.blank? %>
<div class="desc" style="font-size: 85%; margin: 0.3em 0;">
- <%= truncate(strip_html(job.description), 180) %>
+ <%= truncate(strip_html(job.description), :length => 180) %>
</div>
<% end %>
Modified: branches/rails2/app/views/licenses/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/licenses/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/licenses/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -23,7 +23,7 @@
<% if license.description_html and license.description_html.length > 0 %>
<div class="desc" style="font-size: 85%;">
- <%= truncate(strip_html(license.description_html), 180) %>
+ <%= truncate(strip_html(license.description_html), :length => 180) %>
</div>
<% end %>
Modified: branches/rails2/app/views/networks/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/networks/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/networks/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -28,7 +28,7 @@
<div class="desc">
<div style="font-size: 85%;">
<% if network.description and network.description.length > 0 -%>
- <% desc = truncate(strip_html(network.description), 400) -%>
+ <% desc = truncate(strip_html(network.description), :length => 400) -%>
<%= query ? highlight_all(desc, query) : desc -%>
<% else -%>
<span class="none_text">No description</span>
Modified: branches/rails2/app/views/openid/_new.rhtml (2756 => 2757)
--- branches/rails2/app/views/openid/_new.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/openid/_new.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -1,6 +1,6 @@
<p>
<b>Current OpenID:</b><br />
- <p title="<%= tooltip_title_attrib(current_user.openid_url) %>" ><%= current_user.openid_url.blank? ? "<span class='none_text'>Not registered yet</span>" : truncate(h(current_user.openid_url), 30) %></P>
+ <p title="<%= tooltip_title_attrib(current_user.openid_url) %>" ><%= current_user.openid_url.blank? ? "<span class='none_text'>Not registered yet</span>" : truncate(h(current_user.openid_url), :length => 30) %></P>
</p>
Modified: branches/rails2/app/views/packs/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/packs/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/packs/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -34,7 +34,7 @@
<div class="desc" style="font-size: 85%;">
<% unless pack.description.blank? %>
- <% desc = truncate(strip_html(pack.description), 500) %>
+ <% desc = truncate(strip_html(pack.description), :length => 500) %>
<%= query ? highlight_all(desc, query) : desc %>
<% else -%>
<span class="none_text">No description</span>
Modified: branches/rails2/app/views/reviews/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/reviews/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/reviews/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -31,7 +31,7 @@
<div class="desc" style="font-size: 85%;">
<% unless (text = strip_html(review.review)).blank? %>
- <%= truncate(text, 500) %>
+ <%= truncate(text, :length => 500) %>
<% else %>
<p class="none_text">No text</p>
<% end %>
Modified: branches/rails2/app/views/runners/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/runners/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/runners/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -24,7 +24,7 @@
<% unless runner.description.blank? %>
<div class="desc" style="font-size: 85%;">
- <%= truncate(strip_html(runner.description), 180) %>
+ <%= truncate(strip_html(runner.description), :length => 180) %>
</div>
<% end %>
Modified: branches/rails2/app/views/services/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/services/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/services/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -70,7 +70,7 @@
<div class="desc" style="font-size: 85%;">
<% unless service.description.blank? -%>
- <% desc = truncate(strip_html(service.description), 500) -%>
+ <% desc = truncate(strip_html(service.description), :length => 500) -%>
<%= query ? highlight_all(desc, query) : desc %>
<% else -%>
<span class="none_text">No description</span>
Modified: branches/rails2/app/views/userhistory/show.rhtml (2756 => 2757)
--- branches/rails2/app/views/userhistory/show.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/userhistory/show.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -34,7 +34,7 @@
<%= datetime c.created_at, false %> - for <%= visible_name c.commentable_type %>:
<%= c.commentable_type == 'Network' ? title(c.commentable_id) : contributable(c.commentable_id, c.commentable_type) %>
<div class="box_standout" style="margin: 0.5em 0;">
- <%= truncate(white_list(c.comment), 300) %>
+ <%= truncate(white_list(c.comment), :length => 300) %>
</div>
<br/><br/>
</li>
Modified: branches/rails2/app/views/users/_listing.rhtml (2756 => 2757)
--- branches/rails2/app/views/users/_listing.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/users/_listing.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -18,7 +18,7 @@
<div class="desc" style="font-size: 85%;">
<% unless user.profile.body.blank? %>
- <% desc = truncate(strip_html(user.profile.body), 180) %>
+ <% desc = truncate(strip_html(user.profile.body), :length => 180) %>
<%= query ? highlight_all(desc, query) : desc %>
<% else -%>
<span class="none_text">No description</span>
Modified: branches/rails2/app/views/workflows/_table.rhtml (2756 => 2757)
--- branches/rails2/app/views/workflows/_table.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/workflows/_table.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -87,7 +87,7 @@
<p style="margin: 0; padding: 0; border: 0;">
<div class="desc" style="<%= desc_style -%>">
<% if workflow.body and workflow.body.length > 0 -%>
- <% desc = truncate(strip_html(workflow.body), 500) -%>
+ <% desc = truncate(strip_html(workflow.body), :length => 500) -%>
<%= query ? highlight_all(desc, query) : desc %>
<% else -%>
<span class="none_text">No description</span>
Modified: branches/rails2/app/views/workflows/_workflow.rhtml (2756 => 2757)
--- branches/rails2/app/views/workflows/_workflow.rhtml 2011-10-24 21:05:37 UTC (rev 2756)
+++ branches/rails2/app/views/workflows/_workflow.rhtml 2011-10-24 21:06:59 UTC (rev 2757)
@@ -21,7 +21,7 @@
<% if show and desc = workflow.body %>
<tr>
<td width="320" colspan="<%= image ? 2 : 3 %>">
- <%= truncate(desc, 100) %>
+ <%= truncate(desc, :length => 100) %>
</td>
</tr>
<% end %>
@@ -53,4 +53,4 @@
</tr>
</table>
</center>
-<% end %>
\ No newline at end of file
+<% end %>