1.格式化代码
2.修复进入其他人个人动态页面显示的名字仍是"我"的BUG #1251 解决方案:增加访问用户ID和当前登录Id是不是一致的判断
This commit is contained in:
parent
1b97361ec6
commit
8530abf769
|
@ -1,61 +1,72 @@
|
||||||
<% if User.current.id == @user.id %>
|
<% if User.current.id == @user.id %>
|
||||||
<div class="menu-div">
|
<div class="menu-div">
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<span style="color: #000; font-weight: bold;"><%= "#{@user.name}的动态" %></span>
|
<span style="color: #000; font-weight: bold;"><%= "#{@user.name}的动态" %></span>
|
||||||
<ul><%#链接绑定在页面最下方的jQuery%>
|
<ul><%#链接绑定在页面最下方的jQuery%>
|
||||||
<li mode='all' class="<%= "on" if @state.eql?(0) %>"><%= l :label_user_all_activity %></li>
|
<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='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>
|
<li mode='respond' class="<%= "on" if @state.eql?(2) %>"><%= l :label_user_all_respond %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
</script>
|
||||||
</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>
|
||||||
</div>
|
</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>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% unless @state == 2 %>
|
<% unless @state == 2 %>
|
||||||
<% unless @activity.empty? %>
|
<% unless @activity.empty? %>
|
||||||
<div id="activity">
|
<div id="activity">
|
||||||
<% @activity.each do |e| %>
|
<% @activity.each do |e| %>
|
||||||
<%# 以下一行代码解决有未知的活动无法转换成Model报错%>
|
<%# 以下一行代码解决有未知的活动无法转换成Model报错%>
|
||||||
<% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %>
|
<% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %>
|
||||||
<% act = e.act %>
|
<% act = e.act %>
|
||||||
<% unless act.nil? %>
|
<% unless act.nil? %>
|
||||||
<% if e.act_type == 'JournalsForMessage' || e.act_type == 'Bid' || 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'%>
|
<% if e.act_type == 'JournalsForMessage' || e.act_type == 'Bid' || 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'%>
|
||||||
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(e.user), :class => "avatar") %></td>
|
<td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(e.user), :class => "avatar") %></td>
|
||||||
<td>
|
<td>
|
||||||
<table width="580" border="0" class="info-break">
|
<table width="580" border="0" class="info-break">
|
||||||
<% case e.act_type %>
|
<% case e.act_type %>
|
||||||
<% when 'JournalsForMessage' %>
|
<% when 'JournalsForMessage' %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<td colspan="2" valign="top">
|
||||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %>
|
<% if User.current.login == e.user.try(:login) %>
|
||||||
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span>
|
<strong>
|
||||||
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
||||||
|
</strong>
|
||||||
|
|
||||||
|
<% else %>
|
||||||
|
<strong><%= link_to("#{e.user.name}", user_path(e.user_id)) %></strong>
|
||||||
|
<% end %>
|
||||||
|
<span class="font_lighter">
|
||||||
|
<%= l(:label_have_feedback) %>
|
||||||
|
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %>
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580">
|
<td colspan="2" width="580">
|
||||||
<p class="font_description"> <%= textAreailizable act.notes %> </p>
|
<p class="font_description"> <%= textAreailizable act.notes %> </p>
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||||
<span><%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %></span>
|
<span>
|
||||||
|
<%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -70,13 +81,41 @@
|
||||||
<% when 'Bid' %>
|
<% when 'Bid' %>
|
||||||
<tr>
|
<tr>
|
||||||
<% if act.reward_type == 3 && @show_course == 1%>
|
<% if act.reward_type == 3 && @show_course == 1%>
|
||||||
<td colspan="2" valign="top">
|
<% if e.user == User.current %>
|
||||||
<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 colspan="2" valign="top">
|
||||||
</td>
|
<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>
|
||||||
|
<% 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_activity) %>
|
||||||
|
</span>
|
||||||
|
<%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<td colspan="2" valign="top">
|
<% if e.user == User.current %>
|
||||||
<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 colspan="2" valign="top">
|
||||||
</td>
|
<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>
|
||||||
|
<% 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_activity) %></span>
|
||||||
|
<%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -89,15 +128,30 @@
|
||||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
<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>
|
<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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% when 'Journal' %>
|
<% when 'Journal' %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<% if e.user == User.current %>
|
||||||
<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.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 colspan="2" valign="top">
|
||||||
</td>
|
<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.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>
|
||||||
|
<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>
|
||||||
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<% if act.notes.nil? %>
|
<% if act.notes.nil? %>
|
||||||
|
@ -118,9 +172,29 @@
|
||||||
</tr>
|
</tr>
|
||||||
<% when 'Changeset' %>
|
<% when 'Changeset' %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<% if e.user == User.current %>
|
||||||
<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} %></span>
|
<td colspan="2" valign="top">
|
||||||
</td>
|
<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>
|
||||||
|
<% 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_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>
|
||||||
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580">
|
<td colspan="2" width="580">
|
||||||
|
@ -132,15 +206,38 @@
|
||||||
<span class="font_lighter"> <%= format_time(e.act.committed_on) %></span>
|
<span class="font_lighter"> <%= format_time(e.act.committed_on) %></span>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
<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>
|
<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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% when 'Message' %>
|
<% when 'Message' %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<% if e.user == User.current %>
|
||||||
<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 colspan="2" valign="top">
|
||||||
</td>
|
<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>
|
||||||
|
<% 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_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>
|
||||||
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580">
|
<td colspan="2" width="580">
|
||||||
|
@ -157,9 +254,17 @@
|
||||||
</tr>
|
</tr>
|
||||||
<% when 'Principal' %>
|
<% when 'Principal' %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<% if e.user == User.current %>
|
||||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_user) %></span>
|
<td colspan="2" valign="top">
|
||||||
</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580"><p class="font_description"></p></td>
|
<td colspan="2" width="580"><p class="font_description"></p></td>
|
||||||
|
@ -174,9 +279,19 @@
|
||||||
</tr>
|
</tr>
|
||||||
<% when 'News' %>
|
<% when 'News' %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<% if e.user == User.current %>
|
||||||
<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 colspan="2" valign="top">
|
||||||
</td>
|
<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>
|
||||||
|
<% 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_activity) %></span>
|
||||||
|
<%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580">
|
<td colspan="2" width="580">
|
||||||
|
@ -188,21 +303,44 @@
|
||||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
<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>
|
<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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% when 'Issue' %>
|
<% when 'Issue' %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<% if e.user == User.current %>
|
||||||
<strong>
|
<td colspan="2" valign="top">
|
||||||
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
<strong>
|
||||||
</strong>
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
||||||
<span class="font_lighter">
|
</strong>
|
||||||
<%= l(:label_i_new_activity) %>
|
<span class="font_lighter">
|
||||||
</span>
|
<%= l(:label_i_new_activity) %>
|
||||||
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
</span>
|
||||||
</td>
|
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"),
|
||||||
|
{:controller => 'issues',
|
||||||
|
:action => 'show',
|
||||||
|
:id => act.id} %>
|
||||||
|
</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_activity) %>
|
||||||
|
</span>
|
||||||
|
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"),
|
||||||
|
{:controller => 'issues',
|
||||||
|
:action => 'show',
|
||||||
|
:id => act.id} %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
|
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
|
||||||
|
@ -215,15 +353,26 @@
|
||||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
<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>
|
<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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% when 'Contest' %>
|
<% when 'Contest' %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<% if e.user == User.current && @show_contest == 1%>
|
||||||
<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_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
<td colspan="2" valign="top">
|
||||||
</td>
|
<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_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>
|
||||||
|
<span class="font_lighter"><%= l(:label_new_activity) %></span>
|
||||||
|
<%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
||||||
|
</td>
|
||||||
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" width="580"><p class="font_description"> <%= textAreailizable act, :description %> </p>
|
<td colspan="2" width="580"><p class="font_description"> <%= textAreailizable act, :description %> </p>
|
||||||
|
@ -236,101 +385,98 @@
|
||||||
</div>
|
</div>
|
||||||
</tr>
|
</tr>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%# f=1 %>
|
<% end %><!-- < % #case end %> -->
|
||||||
<% end %><!-- < % #case end %> -->
|
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</table>
|
||||||
|
<% end %>
|
||||||
|
<% end %><!-- < % #unless act.nil? end %> -->
|
||||||
|
<% end %><!-- < % #@activity.each do |e| end%> -->
|
||||||
|
</div>
|
||||||
|
<div class="pagination" style="float:left;">
|
||||||
|
<ul> <%= pagination_links_full @activity_pages %> </ul>
|
||||||
|
</div>
|
||||||
|
<% else %> <!-- < %# unless @activity.empty? %> -->
|
||||||
|
<% if @user == User.current %>
|
||||||
|
<%= l(:label_user_activities) %>
|
||||||
|
<% else %>
|
||||||
|
<p class="font_description">
|
||||||
|
<%= l(:label_user_activities_other) %>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
<% end %><!-- < %# unless @activity.empty? end %> -->
|
||||||
|
|
||||||
</table>
|
<% else %>
|
||||||
<% end %>
|
<% unless @message.empty? %>
|
||||||
<% end %><!-- < % #unless act.nil? end %> -->
|
<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' %>
|
||||||
|
<%= '在'<<l(:field_project) %><%= link_to(e.jour.name, feedback_path(e.jour)) %> <%= l(:label_reply_plural) %>
|
||||||
|
<% 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) %>
|
||||||
|
|
||||||
<% end %><!-- < % #@activity.each do |e| end%> -->
|
<% else %>
|
||||||
</div>
|
<%= l(:label_in_issues) %><%= link_to(e.issue.subject, issue_path(e.issue)) %><%= l(:label_quote_my_words) %>
|
||||||
<div class="pagination" style="float:left;">
|
<% end %>
|
||||||
<ul> <%= pagination_links_full @activity_pages %> </ul>
|
<% end %> </span>
|
||||||
</div>
|
</td>
|
||||||
<% else %> <!-- < %# unless @activity.empty? %> -->
|
</tr>
|
||||||
<% if @user == User.current %>
|
<tr>
|
||||||
<%= l(:label_user_activities) %>
|
<td colspan="2" width="580"><p class="font_description"> <%= textAreailizable e.notes %> </p></td>
|
||||||
<% else %>
|
</tr>
|
||||||
<p class="font_description">
|
<tr>
|
||||||
<%= l(:label_user_activities_other) %>
|
<td align="left"><a class="font_lighter"></a></td>
|
||||||
</p>
|
<td width="200" align="right" class="a">
|
||||||
<% end %>
|
<span class="font_lighter"><%= format_time e.created_on %></span></td>
|
||||||
<% end %><!-- < %# unless @activity.empty? end %> -->
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination" style="float:left;">
|
||||||
|
<ul> <%= pagination_links_full @info_pages %> </ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<% unless @message.empty? %>
|
<p class="font_description"><%= l(:label_no_user_respond_you) %></p>
|
||||||
<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' %>
|
|
||||||
<%= '在'<<l(:field_project) %><%= link_to(e.jour.name, feedback_path(e.jour)) %> <%= l(:label_reply_plural) %>
|
|
||||||
<% 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"> <%= textAreailizable 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>
|
|
||||||
</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 %>
|
<% end %>
|
||||||
<script type="text/javascript" language="javascript">
|
|
||||||
$(document).ready(function ($) {
|
|
||||||
$("#content .menu-div:first~ div").first().find("a").attr("target", "_blank");
|
<% end %>
|
||||||
$('[mode=all]').click(function (event) {
|
<script type="text/javascript" language="javascript">
|
||||||
window.location.href = '<%=user_url(@user)%>';
|
$(document).ready(function ($) {
|
||||||
});
|
$("#content .menu-div:first~ div").first().find("a").attr("target", "_blank");
|
||||||
$('[mode=myself]').click(function (event) {
|
$('[mode=all]').click(function (event) {
|
||||||
window.location.href = '<%=user_url(@user, type: 1)%>';
|
window.location.href = '<%=user_url(@user)%>';
|
||||||
});
|
|
||||||
$('[mode=respond]').click(function (event) {
|
|
||||||
window.location.href = '<%=user_url(@user, type: 2)%>';
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
$('[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)%>';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue