2013-09-12 10:41:15 +08:00
|
|
|
<% if User.current.id == @user.id%>
|
|
|
|
<%= show_activity @state%>
|
2013-10-31 21:44:10 +08:00
|
|
|
<%= form_tag(:controller => 'users', :action => "show") do %>
|
2013-11-04 20:51:47 +08:00
|
|
|
|
2013-10-31 21:44:10 +08:00
|
|
|
<% end %>
|
2013-09-12 10:41:15 +08:00
|
|
|
<% end %>
|
|
|
|
<% unless @state == 2%>
|
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-16 20:23:26 +08:00
|
|
|
<% unless act.nil? %>
|
2013-08-30 09:34:21 +08:00
|
|
|
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
2013-08-05 22:47:01 +08:00
|
|
|
<tr>
|
|
|
|
<!-- fq -->
|
2013-11-01 15:48:23 +08:00
|
|
|
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(e.user), :class => "avatar") %></td>
|
2013-08-05 22:47:01 +08:00
|
|
|
<td>
|
2013-11-07 19:14:57 +08:00
|
|
|
<table width="580" border="0" class "info-break">
|
2013-08-12 15:37:42 +08:00
|
|
|
<% case e.act_type %>
|
|
|
|
<% when 'Bid' %>
|
2013-08-05 22:47:01 +08:00
|
|
|
<tr>
|
2013-10-10 22:36:35 +08:00
|
|
|
<% if act.reward_type ==3 %>
|
|
|
|
<% if e.user == User.current%>
|
2013-11-07 19:14:57 +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_i_new_activity) %></span>
|
|
|
|
<%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
|
2013-10-10 22:36:35 +08:00
|
|
|
<% else %>
|
2013-11-07 19:14:57 +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_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
|
2013-10-10 22:36:35 +08:00
|
|
|
<% end %>
|
|
|
|
<% else %>
|
2013-08-12 20:43:18 +08:00
|
|
|
<% if e.user == User.current%>
|
2013-11-07 17:04:37 +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_i_new_activity) %></span>
|
|
|
|
<%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
|
2013-08-05 22:47:01 +08:00
|
|
|
<% else %>
|
2013-11-07 17:04:37 +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_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %></td>
|
2013-08-05 22:47:01 +08:00
|
|
|
<% end %>
|
2013-10-10 22:36:35 +08:00
|
|
|
<% end %>
|
2013-08-05 22:47:01 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580" >
|
|
|
|
<p class="font_description">
|
2013-11-07 19:14:57 +08:00
|
|
|
<%= h act.description %>
|
2013-08-05 22:47:01 +08:00
|
|
|
</p></td>
|
|
|
|
</tr>
|
2013-08-20 15:12:49 +08:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), respond_path(e.act_id) %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.commit)%></a></div>
|
2013-08-12 15:37:42 +08:00
|
|
|
<% when 'Journal' %>
|
2013-09-12 10:41:15 +08:00
|
|
|
<!-- modified by bai -->
|
2013-08-12 15:37:42 +08:00
|
|
|
<tr>
|
2013-08-12 20:43:18 +08:00
|
|
|
<% if e.user == User.current%>
|
2013-09-12 10:41:15 +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_i_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier))%> <%= 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
|
|
|
<% else %>
|
2013-09-12 10:41:15 +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( l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier))%> <%= 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>
|
2013-09-12 10:41:15 +08:00
|
|
|
<!-- end -->
|
2013-08-12 15:37:42 +08:00
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580" >
|
|
|
|
<p class="font_description">
|
2013-11-07 19:14:57 +08:00
|
|
|
<%= h act.notes %>
|
2013-08-12 15:37:42 +08:00
|
|
|
</p></td>
|
|
|
|
</tr>
|
2013-08-20 15:12:49 +08:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
2013-08-12 15:37:42 +08:00
|
|
|
<% when 'Changeset' %>
|
|
|
|
<tr>
|
2013-08-12 20:43:18 +08:00
|
|
|
<% if e.user == User.current%>
|
2013-09-12 10:41:15 +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_i_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
|
|
|
<% else %>
|
2013-09-12 10:41:15 +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">
|
2013-11-07 19:14:57 +08:00
|
|
|
<%= h act.long_comments %>
|
2013-08-12 15:37:42 +08:00
|
|
|
</p></td>
|
|
|
|
</tr>
|
2013-08-20 15:12:49 +08:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.count)%></a></div>
|
2013-08-12 15:37:42 +08:00
|
|
|
<% when 'Message' %>
|
|
|
|
<tr>
|
2013-08-12 20:43:18 +08:00
|
|
|
<% if e.user == User.current%>
|
2013-09-12 10:41:15 +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_i_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
|
|
|
<% else %>
|
2013-09-12 10:41:15 +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">
|
2013-11-07 19:14:57 +08:00
|
|
|
<%= h stringCut240(act.content) %>
|
2013-08-12 15:37:42 +08:00
|
|
|
</p></td>
|
|
|
|
</tr>
|
2013-09-12 10:41:15 +08:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
|
|
|
<% when 'Principal' %>
|
|
|
|
<tr>
|
|
|
|
<% if e.user == User.current%>
|
|
|
|
<td colspan="2" valign="top"><strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_user) %></span></td>
|
|
|
|
<% else %>
|
|
|
|
<td colspan="2" valign="top"><strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_user) %></span></td>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580" >
|
|
|
|
<p class="font_description">
|
|
|
|
|
|
|
|
</p></td>
|
|
|
|
</tr>
|
2013-08-20 15:12:49 +08:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
2013-08-12 15:37:42 +08:00
|
|
|
<% when 'News' %>
|
|
|
|
<tr>
|
2013-08-12 20:43:18 +08:00
|
|
|
<% if e.user == User.current%>
|
2013-09-12 10:41:15 +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_i_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
|
|
|
<% else %>
|
2013-09-12 10:41:15 +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">
|
2013-11-07 19:14:57 +08:00
|
|
|
<%= h act.description %>
|
2013-08-12 15:37:42 +08:00
|
|
|
</p></td>
|
|
|
|
</tr>
|
2013-08-20 15:12:49 +08:00
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.comments_count)%></a></div>
|
2013-08-13 16:29:02 +08:00
|
|
|
<% when 'Issue' %>
|
2013-09-12 10:41:15 +08:00
|
|
|
<!-- modified by bai -->
|
2013-08-13 16:29:02 +08:00
|
|
|
<tr>
|
|
|
|
<% if e.user == User.current%>
|
2013-09-12 10:41:15 +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_i_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.project.name, project_path(act.project.identifier))%> <%= link_to format_activity_title("#{act.tracker.name} ##{act.id} (#{act.status}): #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %></td>
|
2013-08-13 16:29:02 +08:00
|
|
|
<% else %>
|
2013-09-12 10:41:15 +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(l(:label_activity_project)+act.project.name, project_path(act.project.identifier))%> <%= link_to format_activity_title("#{act.tracker.name} ##{act.id} (#{act.status}): #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %></td>
|
2013-08-13 16:29:02 +08:00
|
|
|
<% end %>
|
|
|
|
</tr>
|
2013-09-12 10:41:15 +08:00
|
|
|
<!-- end -->
|
2013-08-13 16:29:02 +08:00
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580" >
|
|
|
|
<p class="font_description">
|
|
|
|
<%= textilizable act.description %>
|
|
|
|
</p></td>
|
|
|
|
</tr>
|
2013-08-20 15:12:49 +08:00
|
|
|
<!--modified by nie -->
|
2013-08-05 22:47:01 +08:00
|
|
|
<tr>
|
2013-08-20 15:12:49 +08:00
|
|
|
<td>
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.journals.count)%></a></div>
|
|
|
|
<% end %>
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a"><span class="font_lighter"> <% if e.act_type == 'Changeset' %>
|
2013-08-13 16:29:02 +08:00
|
|
|
<%= format_time(e.act.committed_on) %>
|
|
|
|
<% else %>
|
2013-11-07 17:21:32 +08:00
|
|
|
<%= l :label_update_time %>: <%= format_time(e.act.created_on) %>
|
2013-08-20 15:12:49 +08:00
|
|
|
<% end %></span></div>
|
|
|
|
</td>
|
2013-08-05 22:47:01 +08:00
|
|
|
</tr>
|
|
|
|
<!-- <tr><div class="line_under"></div></tr> -->
|
|
|
|
</table></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2013-08-16 20:23:26 +08:00
|
|
|
<% end %>
|
2013-08-20 15:12:49 +08:00
|
|
|
|
2013-08-05 22:47:01 +08:00
|
|
|
<% end %>
|
2013-08-20 15:12:49 +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-20 15:12:49 +08:00
|
|
|
<% else %>
|
2013-11-07 17:21:32 +08:00
|
|
|
<% if @user == User.current %>
|
|
|
|
<%= l(:label_user_activities) %>
|
|
|
|
<% else %>
|
|
|
|
<p class="font_description">
|
|
|
|
<%= l(:label_user_activities_other) %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
2013-09-12 10:41:15 +08:00
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<!-- fq -->
|
|
|
|
<% unless @message.empty? %>
|
|
|
|
<div id="activity">
|
|
|
|
<% @message.each do |e| -%>
|
|
|
|
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;">
|
|
|
|
<tr>
|
|
|
|
<!-- fq -->
|
2013-11-01 15:48:23 +08:00
|
|
|
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(e.user), :class => "avatar") %></td>
|
2013-09-12 10:41:15 +08:00
|
|
|
<td>
|
|
|
|
<table width="580" border="0">
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" valign="top"><strong> <%= link_to(h(e.user), user_path(e.user)) %></strong><span class="font_lighter">
|
|
|
|
<% if e.instance_of?(JournalsForMessage)%>
|
|
|
|
<% if e.reply_id == User.current.id%>
|
|
|
|
<%if e.jour_type == 'Bid'%>
|
|
|
|
<%= l(:label_in_bids)%><%= link_to(e.jour.name, respond_path(e.jour))%> <%= l(:label_quote_my_words) %>
|
|
|
|
<% else %>
|
|
|
|
<%= l(:label_in_users)%><%= link_to(e.jour.firstname, feedback_path(e.jour))%> <%= l(:label_quote_my_words) %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<%= l(:label_about_requirement) %><%= link_to(e.jour.name, respond_path(e.jour_id))%> <%= l(:label_have_respond) %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% if e.journal_reply.nil? || e.journal_reply.reply_id != User.current.id %>
|
|
|
|
<%= l(:label_about_issue) %><%= link_to(e.issue.subject, issue_path(e.journalized_id))%><%= l(:label_have_respond) %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
<%= l(:label_in_issues)%><%= link_to(e.issue.subject, issue_path(e.issue))%><%= l(:label_quote_my_words) %>
|
|
|
|
<% end %>
|
|
|
|
<% end %> </span></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" width="580" >
|
|
|
|
<p class="font_description">
|
|
|
|
<%= textilizable e.notes %>
|
|
|
|
</p></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td align="left"><a class="font_lighter"></a></td>
|
|
|
|
<td width="200" align="right" class="a"><span class="font_lighter"><%= format_time e.created_on %></span></td>
|
|
|
|
</tr>
|
|
|
|
<!-- <tr><div class="line_under"></div></tr> -->
|
|
|
|
</table></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="pagination" style="float:left;">
|
|
|
|
<ul>
|
|
|
|
<%= pagination_links_full @info_pages %>
|
|
|
|
<ul>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<p class="font_description"><%= l(:label_no_user_respond_you) %></p>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<% end %>
|