diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index e2ebfe36d..8b9e469f0 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1398,4 +1398,8 @@ module ApplicationHelper
user.watcher_users.count
end
#end
+ #author : nyan
+ def stringCut240(str)
+ (str.length > 240) ? (str[0,240]<<"\n......") : str
+ end
end
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 3ab6302d9..903ad70ff 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -1,57 +1,66 @@
-<% if @events_by_day.size >0 %>
-
-
<%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)).html_safe %>
-
- <%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>
-
-
- <% @events_by_day.keys.sort.reverse.each do |day| %>
-
-
- <% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
-
-
-
- <%= image_tag(url_to_avatar(e.event_author), :class => "avatar")%> |
-
-
- <%= h(e.project) if @project.nil? || @project.id != e.project.id %>
- <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %> <%= l(:label_new_activity) %>
-
- <%= link_to format_activity_title(e.event_title), e.event_url %>
- |
-
-
- <%= textilizable(e.event_description) %> |
-
-
-
-
- <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %> |
- <% if e.event_type == "issue" %>
-
- <%= link_to l(:label_find_all_comments), issue_path(e) %>
- <%= l(:label_comments_count, :count => e.journals.count)%> |
- <% end %>
-
- |
-
-
+
+ <% if @events_by_day.size >0 %>
+
+
<%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)).html_safe %>
+
+ <%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>
+
+
+ <% @events_by_day.keys.sort.reverse.each do |day| %>
+
+
+ <% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
+
+
+
+ <%= image_tag(url_to_avatar(e.event_author), :class => "avatar")%> |
+
+
+
+ <%= h(e.project) if @project.nil? || @project.id != e.project.id %> <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title(e.event_title), e.event_url %> |
+
+
+
+
+
+ <%= textilizable( stringCut240(e.event_description) ) %>
+ |
+
+
+ <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %> |
+ <% if e.event_type == "issue" %>
+ <%= link_to l(:label_find_all_comments), issue_path(e) %> <%= l(:label_comments_count, :count => e.journals.count)%> |
+ <% end %>
+
+ |
+
+
+
+ <% end %>
+
+ <% end -%>
+
- <% end -%>
- <% end -%>
-
-
-
-<% else %>
+ <% else %>
-
<%=link_to image_tag(url_to_avatar(@user), :class => "avatar"), user_path(@user)%> |
-
- <%=link_to (h @user.lastname+@user.firstname), user_path(@user) %> <%= l(:label_user_create_project) %> <%=link_to @project.name %> ! |
- <%= format_time(@project.created_on) %> | |
+
+
+ <%= link_to image_tag(url_to_avatar(@user), :class => "avatar"), user_path(@user)%> |
+
+
+
+ <%= link_to (h @user.lastname+@user.firstname), user_path(@user) %> <%= l(:label_user_create_project) %> <%= link_to @project.name %> ! |
+
+
+ <%= format_time(@project.created_on) %>
+ | |
+
+
+
<% end %>
+
\ No newline at end of file