2015-04-07 12:48:47 +08:00
|
|
|
|
<%= javascript_include_tag "jquery.infinitescroll.js" %>
|
2015-03-07 10:52:20 +08:00
|
|
|
|
<div class="project_r_h">
|
|
|
|
|
<h2 class="project_h2"><%= l(:label_activity) %></h2>
|
|
|
|
|
</div>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<!--CONTENT LIST-->
|
|
|
|
|
<% unless @events_pages.empty? %>
|
2015-03-07 10:52:20 +08:00
|
|
|
|
<% @events_pages.each do |e| -%>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<!--创建-->
|
|
|
|
|
<% if e.forge_act_type == "ProjectCreateInfo"%>
|
|
|
|
|
<div class="problem_main">
|
|
|
|
|
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
|
2015-04-16 19:08:16 +08:00
|
|
|
|
<div class="problem_txt fl mt5 break_word">
|
2015-04-14 15:34:04 +08:00
|
|
|
|
<%= link_to e.user, user_path(e.user), :class => "problem_name c_orange fl" %> <span class="fl"> <%= l(:label_project_create) %> :</span>
|
2015-04-17 14:51:10 +08:00
|
|
|
|
<%= link_to e.project.name,{} ,:class => "problem_tit fl fb" %></a><br />
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<p class="mt5"><br /> <%= l :label_create_time %> :<%= format_time(e.project.created_on) %></p>
|
2015-03-07 10:52:20 +08:00
|
|
|
|
</div>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% next if e.forge_act_type.safe_constantize.nil?
|
|
|
|
|
act = e.forge_act;
|
|
|
|
|
next if act.nil? %>
|
|
|
|
|
<!--缺陷动态-->
|
|
|
|
|
<% if e.forge_act_type == "Issue" %>
|
|
|
|
|
<div class="problem_main">
|
|
|
|
|
<a class="problem_pic fl"><%= image_tag(url_to_avatar(act.author), :width => "42", :height => "42") %></a>
|
2015-04-16 19:08:16 +08:00
|
|
|
|
<div class="problem_txt fl mt5 break_word">
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<a class="problem_name fl ">
|
|
|
|
|
<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
|
|
|
|
|
<%= link_to act.author, user_path(act.author), :class => "problem_name c_orange fl" %><span class="fl"> <%= l(:label_new_activity) %> :</span>
|
|
|
|
|
<%= link_to format_activity_title("#{act.source_from}##{act.project_issues_index} (#{act.status}): #{act.tracker.name} #{act.subject}"),
|
|
|
|
|
{:controller => 'issues',
|
|
|
|
|
:action => 'show',
|
|
|
|
|
:id => act.id},
|
|
|
|
|
:class => "problem_tit fl fb " %>
|
|
|
|
|
</a><br />
|
2015-04-15 15:30:33 +08:00
|
|
|
|
<p class="mt5 break_word"><%= textAreailizable act,:description %><br />
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2015-03-07 10:52:20 +08:00
|
|
|
|
</div>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<!--jou留言-->
|
|
|
|
|
<% elsif e.forge_act_type == "Journal" %>
|
|
|
|
|
<div class="problem_main">
|
|
|
|
|
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
|
2015-04-16 19:08:16 +08:00
|
|
|
|
<div class="problem_txt fl mt5 break_word">
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<a class="problem_name fl ">
|
|
|
|
|
<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
|
2015-04-09 19:18:04 +08:00
|
|
|
|
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %><span class="fl"> <%= l(:label_new_activity) %> :</span>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.project_issues_index}: #{act.issue.subject}"),
|
|
|
|
|
{:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"}, :class => "problem_tit fl fb" %>
|
|
|
|
|
</a><br />
|
2015-04-15 15:30:33 +08:00
|
|
|
|
<p class="mt5 break_word"><%= textAreailizable act,:notes %><br />
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2015-03-07 10:52:20 +08:00
|
|
|
|
</div>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<!--message -->
|
|
|
|
|
<% elsif e.forge_act_type == "Message" %>
|
|
|
|
|
<div class="problem_main">
|
|
|
|
|
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
|
2015-04-16 19:08:16 +08:00
|
|
|
|
<div class="problem_txt fl mt5 break_word">
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<a class="problem_name fl ">
|
|
|
|
|
<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
|
|
|
|
|
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> :</span>
|
|
|
|
|
|
|
|
|
|
<%= link_to format_activity_title("#{act.board.name}: #{act.subject}"),
|
|
|
|
|
{:controller => 'messages',
|
|
|
|
|
:action => 'show',
|
|
|
|
|
:board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}),
|
|
|
|
|
:class => "problem_tit fl fb " %>
|
|
|
|
|
<br />
|
2015-04-15 15:30:33 +08:00
|
|
|
|
<p class="mt5 break_word"><%= textAreailizable act,:content %><br />
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<%= l :label_create_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></p>
|
2015-03-07 10:52:20 +08:00
|
|
|
|
</div>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-03-07 10:52:20 +08:00
|
|
|
|
</div>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<!--new 新闻-->
|
|
|
|
|
<% elsif e.forge_act_type == "News" %>
|
|
|
|
|
<div class="problem_main">
|
|
|
|
|
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
|
2015-04-16 19:08:16 +08:00
|
|
|
|
<div class="problem_txt fl mt5 break_word">
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<a class="problem_name fl ">
|
|
|
|
|
<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
|
|
|
|
|
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> :</span>
|
|
|
|
|
<a class="problem_tit fl fb">
|
|
|
|
|
<% unless act.nil? %>
|
|
|
|
|
<%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id}, :class => "problem_tit fl fb " %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a><br />
|
2015-04-15 15:30:33 +08:00
|
|
|
|
<p class="mt5 break_word"><%= textAreailizable act,:description %><br />
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<%= l :label_create_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2015-03-07 10:52:20 +08:00
|
|
|
|
</div>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<!--Document-->
|
|
|
|
|
<% elsif e.forge_act_type == "Document" %>
|
|
|
|
|
<div class="problem_main">
|
|
|
|
|
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
|
2015-04-16 19:08:16 +08:00
|
|
|
|
<div class="problem_txt fl mt5 break_word">
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<a class="problem_name fl ">
|
|
|
|
|
<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
|
|
|
|
|
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> :</span>
|
2015-03-07 10:52:20 +08:00
|
|
|
|
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<%= link_to format_activity_title("#{l(:label_document)}: #{act.title}"), {:controller => 'documents', :action => 'show', :id => act.id}, :class => "problem_tit fl fb" %><br />
|
2015-04-15 15:30:33 +08:00
|
|
|
|
<p class="mt5 break_word"><%= textAreailizable act,:description %><br />
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<%= l :label_create_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<!--Attachment -->
|
|
|
|
|
<% elsif e.forge_act_type == "Attachment" %>
|
|
|
|
|
<div class="problem_main">
|
|
|
|
|
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
|
2015-04-16 19:08:16 +08:00
|
|
|
|
<div class="problem_txt fl mt5 break_word">
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<a class="problem_name fl ">
|
|
|
|
|
<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
|
|
|
|
|
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> :</span>
|
|
|
|
|
<%= link_to format_activity_title("#{l(:label_attachment)}: #{act.filename}"), {:controller => 'attachments', :action => 'show', :id => act.id}, :class => "problem_tit fl fb" %></a><br />
|
2015-04-15 15:30:33 +08:00
|
|
|
|
<p class="mt5 break_word"><%= textAreailizable act,:description %><br />
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<%= l :label_create_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
2015-03-07 10:52:20 +08:00
|
|
|
|
<% end %>
|
2015-04-07 12:48:47 +08:00
|
|
|
|
<% end %>
|
2015-04-07 13:47:39 +08:00
|
|
|
|
<%= paginate @events_pages, :left => 3, :right => 3 %>
|