2013-08-12 15:37:42 +08:00
|
|
|
<% unless @activity.empty? %>
|
2013-08-01 10:33:49 +08:00
|
|
|
<div id="activity">
|
2013-08-12 15:37:42 +08:00
|
|
|
<% @activity.each do |e| %>
|
|
|
|
<% act = e.act %>
|
2013-08-12 16:17:03 +08:00
|
|
|
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;">
|
2013-08-05 22:47:01 +08:00
|
|
|
<tr>
|
|
|
|
<!-- fq -->
|
2013-08-12 15:37:42 +08:00
|
|
|
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(e.user), :class => "avatar"), user_path(e.user_id), :class => "avatar" %></td>
|
2013-08-05 22:47:01 +08:00
|
|
|
<td>
|
|
|
|
<table width="580" border="0">
|
2013-08-12 15:37:42 +08:00
|
|
|
<% case e.act_type %>
|
|
|
|
<% when 'Bid' %>
|
2013-08-05 22:47:01 +08:00
|
|
|
<tr>
|
2013-08-12 20:43:18 +08:00
|
|
|
<% if e.user == User.current%>
|
2013-08-12 15:37:42 +08:00
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_bid_plural)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
|
2013-08-05 22:47:01 +08:00
|
|
|
<% else %>
|
2013-08-12 20:43:18 +08:00
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_bid_plural)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
|
2013-08-05 22:47:01 +08:00
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580" >
|
|
|
|
<p class="font_description">
|
2013-08-12 15:37:42 +08:00
|
|
|
<%= textilizable act.description %>
|
2013-08-05 22:47:01 +08:00
|
|
|
</p></td>
|
|
|
|
</tr>
|
2013-08-12 15:37:42 +08:00
|
|
|
<% when 'Journal' %>
|
|
|
|
<tr>
|
2013-08-12 20:43:18 +08:00
|
|
|
<% if e.user == User.current%>
|
2013-08-12 15:37:42 +08:00
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %></td>
|
|
|
|
<% else %>
|
2013-08-12 20:43:18 +08:00
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %></td>
|
2013-08-12 15:37:42 +08:00
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580" >
|
|
|
|
<p class="font_description">
|
|
|
|
<%= textilizable act.notes %>
|
|
|
|
</p></td>
|
|
|
|
</tr>
|
|
|
|
<% when 'Changeset' %>
|
|
|
|
<tr>
|
2013-08-12 20:43:18 +08:00
|
|
|
<% if e.user == User.current%>
|
2013-08-12 15:37:42 +08:00
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></td>
|
|
|
|
<% else %>
|
2013-08-12 20:43:18 +08:00
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></td>
|
2013-08-12 15:37:42 +08:00
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580" >
|
|
|
|
<p class="font_description">
|
|
|
|
<%= textilizable act.long_comments %>
|
|
|
|
</p></td>
|
|
|
|
</tr>
|
|
|
|
<% when 'Message' %>
|
|
|
|
<tr>
|
2013-08-12 20:43:18 +08:00
|
|
|
<% if e.user == User.current%>
|
2013-08-12 15:37:42 +08:00
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= 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}"}) %></td>
|
|
|
|
<% else %>
|
2013-08-12 20:43:18 +08:00
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user_id)) %></strong><span class="font_lighter"><%= 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}"}) %></td>
|
2013-08-12 15:37:42 +08:00
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580" >
|
|
|
|
<p class="font_description">
|
|
|
|
<%= textilizable act.content %>
|
|
|
|
</p></td>
|
|
|
|
</tr>
|
|
|
|
<% when 'News' %>
|
|
|
|
<tr>
|
2013-08-12 20:43:18 +08:00
|
|
|
<% if e.user == User.current%>
|
2013-08-12 15:37:42 +08:00
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %></td>
|
|
|
|
<% else %>
|
2013-08-12 20:43:18 +08:00
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %></td>
|
2013-08-12 15:37:42 +08:00
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580" >
|
|
|
|
<p class="font_description">
|
|
|
|
<%= textilizable act.description %>
|
|
|
|
</p></td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
2013-08-05 22:47:01 +08:00
|
|
|
<tr>
|
|
|
|
<td align="left"><a class="font_lighter"></a></td>
|
2013-08-12 15:37:42 +08:00
|
|
|
<td width="200" align="right" class="a"><span class="font_lighter"><%= format_time(e.act.created_on) %></span></td>
|
2013-08-05 22:47:01 +08:00
|
|
|
</tr>
|
|
|
|
<!-- <tr><div class="line_under"></div></tr> -->
|
|
|
|
</table></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2013-08-12 23:21:00 +08:00
|
|
|
|
|
|
|
|
2013-08-05 22:47:01 +08:00
|
|
|
<% end %>
|
2013-08-12 23:42:22 +08:00
|
|
|
</div>
|
2013-08-08 10:04:44 +08:00
|
|
|
<div class="pagination" style="float:left;">
|
|
|
|
<ul>
|
|
|
|
<%= pagination_links_full @activity_pages %>
|
|
|
|
<ul>
|
|
|
|
</div>
|
2013-08-12 23:42:22 +08:00
|
|
|
<% else %>
|
|
|
|
<%= l(:label_user_activities) %>
|
|
|
|
|
2013-08-06 22:26:52 +08:00
|
|
|
<% end %>
|