2014-09-16 11:11:40 +08:00
|
|
|
|
<% if User.current.id == @user.id %>
|
|
|
|
|
<div class="menu-div">
|
|
|
|
|
<div class="menu">
|
2014-10-22 12:02:05 +08:00
|
|
|
|
<span style="color: #000; font-weight: bold;">
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= l(:label_user_activities, :name => @user.name) %>
|
2014-10-22 12:02:05 +08:00
|
|
|
|
</span>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
<ul><%#链接绑定在页面最下方的jQuery%>
|
2014-10-22 12:02:05 +08:00
|
|
|
|
<li mode='all' class="<%= "on" if @state.eql?(0) %>">
|
|
|
|
|
<%= l :label_user_all_activity %>
|
|
|
|
|
</li>
|
|
|
|
|
<li mode='myself' class="<%= "on" if @state.eql?(1) %>">
|
|
|
|
|
<%= l :label_user_activity_myself %>
|
|
|
|
|
</li>
|
|
|
|
|
<li mode='respond' class="<%= "on" if @state.eql?(2) %>">
|
|
|
|
|
<%= l :label_user_all_respond %>
|
|
|
|
|
</li>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
</script>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="height:20px"></div>
|
|
|
|
|
<%= form_tag(:controller => 'users', :action => "show") do %>
|
|
|
|
|
<div class="user-search-block hidden" style="float:right;margin-top:-55px">
|
|
|
|
|
<table width="100%" valign="center">
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="right">
|
|
|
|
|
<div class="project-search">
|
|
|
|
|
<%= text_field_tag 'user', params[:user], :size => 30 %>
|
|
|
|
|
<%= submit_tag l(:label_search_by_user), :class => "small", :name => nil %>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
<% end %>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
|
2014-10-22 12:02:05 +08:00
|
|
|
|
<%= render_flash_messages %>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
<% unless @state == 2 %>
|
|
|
|
|
<% unless @activity.empty? %>
|
|
|
|
|
<div id="activity">
|
|
|
|
|
<% @activity.each do |e| %>
|
|
|
|
|
<%# 以下一行代码解决有未知的活动无法转换成Model报错%>
|
|
|
|
|
<% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %>
|
|
|
|
|
<% act = e.act %>
|
|
|
|
|
<% unless act.nil? %>
|
2015-06-02 14:35:17 +08:00
|
|
|
|
<% if e.act_type == 'JournalsForMessage' || e.act_type == 'HomeworkCommon' || e.act_type == 'Journal'|| e.act_type == 'Changeset' || e.act_type == 'Message' || e.act_type == 'Principal' || e.act_type == 'News' || e.act_type == 'Issue' || e.act_type == 'Contest' %>
|
2014-12-22 01:29:53 +08:00
|
|
|
|
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
2014-09-16 11:11:40 +08:00
|
|
|
|
<tr>
|
2014-12-22 01:29:53 +08:00
|
|
|
|
<td colspan="2" valign="top" width="50">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<table border="0" class="info-break" style="width:580px;">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<% case e.act_type %>
|
|
|
|
|
<% when 'JournalsForMessage' %>
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<% if User.current.login == e.user.try(:login) %>
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
|
|
|
|
<% if User.current.language == "zh" %>
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_i_have_feedback) %>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %>
|
|
|
|
|
<%= l(:label_of_feedback) + l(:label_layouts_feedback) %>
|
|
|
|
|
</span>
|
|
|
|
|
<% else %>
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_i_have_feedback) %>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<%= l(:label_layouts_feedback) + l(:label_of_feedback) %>
|
|
|
|
|
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %>
|
2015-03-10 09:45:36 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to("#{e.user.name}", user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
<% if User.current.language == "zh" %>
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<span class="font_lighter">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<%= l(:label_have_feedback) %>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %>
|
|
|
|
|
<%= l(:label_of_feedback) + l(:label_layouts_feedback) %>
|
|
|
|
|
</span>
|
|
|
|
|
<% else %>
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_have_feedback) %>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<%= l(:label_layouts_feedback) + l(:label_of_feedback) %>
|
|
|
|
|
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %>
|
2015-03-10 09:45:36 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<td colspan="2" class="upload_img" style="max-width:580px;">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<p class="font_description">
|
|
|
|
|
<%= textAreailizable act.notes %>
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span>
|
2015-04-10 16:34:57 +08:00
|
|
|
|
<%= user_jour_feed_back_url e %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2015-06-02 14:35:17 +08:00
|
|
|
|
<% when 'HomeworkCommon' %>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<tr>
|
2015-06-02 14:35:17 +08:00
|
|
|
|
<% if e.user == User.current %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_i_new_activity) %>
|
|
|
|
|
</span>
|
2015-06-02 14:35:17 +08:00
|
|
|
|
<%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), student_work_index_path(:homework => e.act_id) %>
|
|
|
|
|
</td>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<% else %>
|
2015-06-02 14:35:17 +08:00
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
2015-06-02 14:35:17 +08:00
|
|
|
|
<%= l(:label_new_activity) %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-06-02 14:35:17 +08:00
|
|
|
|
<%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), student_work_index_path(:homework => e.act_id) %>
|
|
|
|
|
</td>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<td colspan="2" class="upload_img" style="max-width:580px;">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<p class="font_description">
|
|
|
|
|
<%= textAreailizable act, :description %>
|
|
|
|
|
</p></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
2015-06-02 14:35:17 +08:00
|
|
|
|
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_at)).to_s %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
<!--<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>-->
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% when 'Journal' %>
|
|
|
|
|
<tr>
|
|
|
|
|
<% if e.user == User.current %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_i_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
|
|
|
|
|
<%= link_to(l(:label_activity_project)+":"+act.issue.project.name, project_path(act.issue.project.id)) %>
|
|
|
|
|
<%= 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 %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
|
|
|
|
|
<%= link_to(l(:label_activity_project)+":"+act.issue.project.name, project_path(act.issue.project.id)) %>
|
|
|
|
|
<%= 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>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<% if act.notes.nil? %>
|
|
|
|
|
<% desStr = '' %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<% desStr= textAreailizable(act, :notes) %>
|
|
|
|
|
<% end %>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<td colspan="2" class="upload_img" style="max-width:580px;">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<p class="font_description">
|
|
|
|
|
<%= desStr %>
|
|
|
|
|
</p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% when 'Changeset' %>
|
|
|
|
|
<tr>
|
|
|
|
|
<% if e.user == User.current %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_i_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
|
|
|
|
|
<%= 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 %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
|
|
|
|
|
<%= 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>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<td colspan="2" class="upload_img" style="max-width:580px;">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<p class="font_description">
|
|
|
|
|
<%= textAreailizable act, :long_comments %>
|
|
|
|
|
</p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= format_time(e.act.committed_on) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span><%= link_to l(:label_find_all_comments),
|
|
|
|
|
{:controller => 'repositories',
|
|
|
|
|
:action => 'revision',
|
|
|
|
|
:id => act.repository.project,
|
|
|
|
|
:repository_id => act.repository.identifier_param,
|
2015-04-21 16:17:51 +08:00
|
|
|
|
:rev => act.identifier} if e.act.count!= 0 %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<a class="font_lighter">
|
|
|
|
|
<%= l(:label_comments_count, :count => e.act.count) %>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% when 'Message' %>
|
|
|
|
|
<tr>
|
|
|
|
|
<% if e.user == User.current %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_i_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
|
|
|
|
|
<%= link_to format_activity_title("#{act.board.name}: #{act.subject}"),
|
2015-05-14 16:59:43 +08:00
|
|
|
|
act.board.project ? project_boards_path(act.board.project,:topic_id => act.id) : course_boards_path(act.board.course,:topic_id => act.id),
|
|
|
|
|
:class => "problem_tit fl fb " %>
|
|
|
|
|
</td>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<% else %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
|
|
|
|
|
<%= 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>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<td colspan="2" class="upload_img" style="max-width:580px;">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<p class="font_description">
|
|
|
|
|
<%= textAreailizable(act, :content) %>
|
|
|
|
|
</p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% 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>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_new_user) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</td>
|
|
|
|
|
<% else %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_new_user) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</td>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<td colspan="2" class="upload_img" style="max-width:580px;">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<p class="font_description"></p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% when 'News' %>
|
|
|
|
|
<tr>
|
|
|
|
|
<% if e.user == User.current %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_i_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
|
2015-07-06 11:42:26 +08:00
|
|
|
|
<%= link_to format_activity_title(" #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</td>
|
|
|
|
|
<% else %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
|
|
|
|
|
<%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
|
|
|
|
</td>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<td colspan="2" class="upload_img" style="max-width:580px;">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<p class="font_description">
|
|
|
|
|
<%= textAreailizable act, :description %>
|
|
|
|
|
</p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} if e.act.comments_count!= 0 %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<a class="font_lighter">
|
|
|
|
|
<%= l(:label_comments_count, :count => e.act.comments_count) %>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% when 'Issue' %>
|
|
|
|
|
<% if e.user == User.current %>
|
|
|
|
|
<tr>
|
2014-12-22 01:29:53 +08:00
|
|
|
|
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_i_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"),
|
|
|
|
|
{:controller => 'issues',
|
|
|
|
|
:action => 'show',
|
|
|
|
|
:id => act.id} %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<td colspan="2" class="upload_img" style="max-width:580px;">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<%= textAreailizable act, :description %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
2014-12-22 01:29:53 +08:00
|
|
|
|
<span class="font_lighter">
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %>
|
2014-12-22 01:29:53 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px">
|
2014-12-22 01:29:53 +08:00
|
|
|
|
<span>
|
2015-04-11 11:52:11 +08:00
|
|
|
|
<%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} if e.act.journals.count!= 0 %>
|
2014-12-22 01:29:53 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<a class="font_lighter">
|
|
|
|
|
<%= l(:label_comments_count, :count => e.act.journals.count) %>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% else %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
2014-12-22 01:29:53 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"),
|
|
|
|
|
{:controller => 'issues',
|
|
|
|
|
:action => 'show',
|
|
|
|
|
:id => act.id} %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<td colspan="2" class="upload_img" style="max-width:580px;">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<%= textAreailizable act, :description %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span>
|
2015-04-11 11:52:11 +08:00
|
|
|
|
<%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} if e.act.journals.count!= 0 %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<a class="font_lighter">
|
|
|
|
|
<%= l(:label_comments_count, :count => e.act.journals.count) %>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2014-12-22 01:29:53 +08:00
|
|
|
|
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<% end %>
|
2014-12-22 01:29:53 +08:00
|
|
|
|
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<% when 'Contest' %>
|
|
|
|
|
<tr>
|
|
|
|
|
<% if e.user == User.current && @show_contest == 1 %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_i_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
|
|
|
|
|
<%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
|
|
|
|
</td>
|
|
|
|
|
<% else %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
|
|
|
|
</strong>
|
|
|
|
|
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= l(:label_new_activity) %>
|
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
|
|
|
|
|
<%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
|
|
|
|
</td>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<td colspan="2" class="upload_img" style="max-width:580px;">
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<p class="font_description">
|
|
|
|
|
<%= textAreailizable act, :description %>
|
|
|
|
|
</p>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
</span>
|
2015-04-21 16:17:51 +08:00
|
|
|
|
</div>
|
|
|
|
|
</tr>
|
|
|
|
|
<% else %>
|
|
|
|
|
<% end %><!-- < % #case end %> -->
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</tr>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
</table>
|
2014-12-22 01:29:53 +08:00
|
|
|
|
|
|
|
|
|
|
2015-04-21 16:17:51 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
<% end %><!-- < % #unless act.nil? end %> -->
|
|
|
|
|
<% end %><!-- < % #@activity.each do |e| end%> -->
|
2014-09-16 11:11:40 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="pagination" style="float:left;">
|
|
|
|
|
<ul> <%= pagination_links_full @activity_pages %> </ul>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %> <!-- < %# unless @activity.empty? %> -->
|
|
|
|
|
<% if @user == User.current %>
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= l(:label_user_activities_no) %>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<% else %>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
<p class="font_description">
|
|
|
|
|
<%= l(:label_user_activities_other) %>
|
|
|
|
|
</p>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<% end %>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
<% end %><!-- < %# unless @activity.empty? end %> -->
|
|
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
<% 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>
|
|
|
|
|
<td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(e.user), :class => "avatar") %></td>
|
|
|
|
|
<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) %>
|
|
|
|
|
<% elsif e.jour_type == 'User' %>
|
|
|
|
|
<%= l(:label_in_users) %><%= link_to(e.jour.firstname, feedback_path(e.jour)) %> <%= l(:label_quote_my_words) %>
|
|
|
|
|
<% elsif e.jour_type == 'Project' %>
|
2015-03-10 09:45:36 +08:00
|
|
|
|
<%= l(:label_in_projects) %><%= link_to(e.jour.name, feedback_path(e.jour)) %> <%= l(:label_reply_plural) %>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
<% 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>
|
2015-06-26 13:54:39 +08:00
|
|
|
|
<td colspan="2" class="upload_img" style="max-width:580px;">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<p class="font_description">
|
|
|
|
|
<%= textAreailizable e.notes %>
|
|
|
|
|
</p>
|
|
|
|
|
</td>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="left"><a class="font_lighter"></a></td>
|
|
|
|
|
<td width="200" align="right" class="a">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<span class="font_lighter">
|
|
|
|
|
<%= format_time e.created_on %>
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
|
2014-09-16 11:11:40 +08:00
|
|
|
|
<div class="pagination" style="float:left;">
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<ul>
|
|
|
|
|
<%= pagination_links_full @info_pages %>
|
|
|
|
|
</ul>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
</div>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
|
2014-09-16 11:11:40 +08:00
|
|
|
|
<% else %>
|
2014-10-23 09:44:06 +08:00
|
|
|
|
<p class="font_description">
|
|
|
|
|
<%= l(:label_no_user_respond_you) %>
|
|
|
|
|
</p>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<% end %>
|
2014-09-16 11:11:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
|
$(document).ready(function ($) {
|
|
|
|
|
$("#content .menu-div:first~ div").first().find("a").attr("target", "_blank");
|
|
|
|
|
$('[mode=all]').click(function (event) {
|
|
|
|
|
window.location.href = '<%=user_url(@user)%>';
|
|
|
|
|
});
|
|
|
|
|
$('[mode=myself]').click(function (event) {
|
|
|
|
|
window.location.href = '<%=user_url(@user, type: 1)%>';
|
|
|
|
|
});
|
|
|
|
|
$('[mode=respond]').click(function (event) {
|
|
|
|
|
window.location.href = '<%=user_url(@user, type: 2)%>';
|
2014-09-15 10:58:14 +08:00
|
|
|
|
});
|
2014-09-16 11:11:40 +08:00
|
|
|
|
});
|
|
|
|
|
</script>
|
2015-05-13 15:33:35 +08:00
|
|
|
|
<% html_title(l(:label_activity)) -%>
|