From 2fa9a4855ccaec49721ae0f3cc101c3a4ae93cc0 Mon Sep 17 00:00:00 2001 From: yanxd Date: Sat, 5 Jul 2014 09:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E5=90=8E=E5=88=9B=E5=BB=BA=E4=BA=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E6=AD=A3=E7=A1=AE=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=EF=BC=88+=E5=8E=BB=E6=8E=89=E4=BA=86=E4=B9=B178=E7=B3=9F?= =?UTF-8?q?=E7=9A=84table=E5=A5=97table=EF=BC=89=20div-class=E5=86=85?= =?UTF-8?q?=E6=A0=87=E6=98=8Eactivity-title=E7=AD=89=EF=BC=8C=E5=86=85?= =?UTF-8?q?=E5=B5=8Ccss=E5=B1=9E=E6=80=A7=E7=AD=89=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=86=8D=E7=A7=BB=E5=8A=A8=E5=87=BAhtml?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/show.html.erb | 138 ++++++++++++++----------------- 1 file changed, 62 insertions(+), 76 deletions(-) diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index b4f767a5c..04fb4eb7c 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -1,91 +1,77 @@ <% if @events_by_day.size >0 %> -
- -

- <%= 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")%> - - - - - - - - - - <% if e.event_type == "issue" %> - - <% end %> - -
- <%= h(e.project) if @project.nil? || @project.id != e.project.id %> - - <% if @canShowRealName %> - <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>(<%= link_to_user(e.event_author,@canShowRealName) if e.respond_to?(:event_author) %>) - <% else %> - <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %> - <% end %> +
+

+ <%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %> +

- <%= l(:label_new_activity) %> - - <%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %> -
-

- <%= h(truncate(strip_tags(e.event_description).gsub(/ /,' '), length: 30, omission:'...')) %> -

<%= l :label_activity_time %>:  <%= format_activity_day(day) %> <%= format_time(e.event_datetime, false) %> <%= link_to l(:label_find_all_comments), issue_path(e) %> <%= l(:label_comments_count, :count => e.journals.count)%>
-
- - <% end %> -
+ <% @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 %> + + <% if @canShowRealName %> + <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>(<%= link_to_user(e.event_author,@canShowRealName) if e.respond_to?(:event_author) %>) + <% else %> + <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %> + <% end %> - <% end -%> - + <%= l(:label_new_activity) %> + + <%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %> - -
- <%end%> +
+ <%= h(truncate(strip_tags(e.event_description).gsub(/ /,' '), length: 30, omission:'...')) %> +
+
+ <%= l :label_activity_time %>:  <%= 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 %> +
+
+
-
- - - - - -
<%= image_tag(url_to_avatar(@user), :class => "avatar") %> - - - - - -
- <% - #判断是否显示真名 - if @canShowRealName - %> - <%= link_to (h @user.try(:name)), user_path(@user) if @user %>(<%= link_to (h @user.try(:realname)), user_path(@user) if @user %>) - <% else %> - <%= link_to (h @user.try(:name)), user_path(@user) if @user %> - <% end %> - <%= l(:label_user_create_project) %> <%= link_to @project.name %> !
<%= l :label_update_time %>: <%= format_time(@project.created_on) %> -
+ <% end %> + <% end -%> + <% if(@events_pages.page == @events_pages.last_page) %> +
+
+ <%= image_tag(url_to_avatar(@user), :class => "avatar") %> +
+
+ + <% if @canShowRealName %> + <%= link_to (h @user.try(:name)), user_path(@user) if @user %>(<%= link_to (h @user.try(:realname)), user_path(@user) if @user %>) + <% else %> + <%= link_to (h @user.try(:name)), user_path(@user) if @user %> + <% end %> + <%#= l(:label_new_activity) %> + + <%= l(:label_user_create_project) %> <%= link_to @project.name %> ! +
+
+
+ <%= l :label_activity_time %>: <%= format_time(@project.created_on) %> +
+
+
+ <% end %>
+<%end%> +