|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
<% if User.current.id == @user.id %>
|
|
|
|
|
<% if User.current.id == @user.id %>
|
|
|
|
|
<div class="menu-div">
|
|
|
|
|
<div class="menu">
|
|
|
|
|
<span style="color: #000; font-weight: bold;"><%= "#{@user.name}的动态" %></span>
|
|
|
|
@ -12,13 +12,7 @@
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
</div>
|
|
|
|
|
<%#= show_activity @state%>
|
|
|
|
|
<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">
|
|
|
|
@ -33,9 +27,9 @@
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% unless @state == 2 %>
|
|
|
|
|
<% unless @state == 2 %>
|
|
|
|
|
<% unless @activity.empty? %>
|
|
|
|
|
<div id="activity">
|
|
|
|
|
<% @activity.each do |e| %>
|
|
|
|
@ -51,34 +45,20 @@
|
|
|
|
|
<table width="580" border="0" class="info-break">
|
|
|
|
|
<% case e.act_type %>
|
|
|
|
|
<% when 'JournalsForMessage' %>
|
|
|
|
|
<% if User.current.login == e.user.try(:login) %>
|
|
|
|
|
<%# if e.user_id == act.jour.id %>
|
|
|
|
|
<tr>
|
|
|
|
|
<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) %>
|
|
|
|
|
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<%# else %>
|
|
|
|
|
<!-- <tr><td colspan="2" valign="top" class="font_lighter"><strong><%#= link_to("#{e.user.name}", user_path(e.user_id)) %> 给 <%#= link_to("#{act.at_user.name if act.at_user}", user_path(act.jour.id)) %> 留言了</strong> </td></tr> -->
|
|
|
|
|
<%# end %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong><%= link_to("#{e.user.name}", user_path(e.user_id)) %></strong> <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>
|
|
|
|
|
</tr>
|
|
|
|
|
<% end %>
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="2" width="580">
|
|
|
|
|
<p class="font_description"> <%= textAreailizable act.notes %> </p>
|
|
|
|
|
|
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %>
|
|
|
|
|
</span></div>
|
|
|
|
|
<div style="display: inline-block; float: right; margin-top: 0px">
|
|
|
|
|
<span><%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %></span>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
|
|
|
@ -90,25 +70,13 @@
|
|
|
|
|
<% when 'Bid' %>
|
|
|
|
|
<tr>
|
|
|
|
|
<% if act.reward_type == 3 && @show_course == 1%>
|
|
|
|
|
<% 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_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 %>
|
|
|
|
|
<% 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_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 %>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
@ -127,15 +95,9 @@
|
|
|
|
|
</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> <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>
|
|
|
|
|
<% if act.notes.nil? %>
|
|
|
|
@ -156,15 +118,9 @@
|
|
|
|
|
</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> <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>
|
|
|
|
|
<% 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>
|
|
|
|
|
<td colspan="2" width="580">
|
|
|
|
@ -182,15 +138,9 @@
|
|
|
|
|
</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> <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>
|
|
|
|
|
<td colspan="2" width="580">
|
|
|
|
@ -207,15 +157,9 @@
|
|
|
|
|
</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> <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>
|
|
|
|
@ -230,15 +174,9 @@
|
|
|
|
|
</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> <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>
|
|
|
|
|
<td colspan="2" width="580">
|
|
|
|
@ -256,7 +194,6 @@
|
|
|
|
|
</tr>
|
|
|
|
|
<% when 'Issue' %>
|
|
|
|
|
<tr>
|
|
|
|
|
<% if e.user == User.current %>
|
|
|
|
|
<td colspan="2" valign="top">
|
|
|
|
|
<strong>
|
|
|
|
|
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
|
|
|
@ -266,29 +203,10 @@
|
|
|
|
|
</span>
|
|
|
|
|
<%= 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>
|
|
|
|
|
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
|
|
|
|
|
<!--
|
|
|
|
|
<div class="issue-list-description">
|
|
|
|
|
<div class="wiki">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
-->
|
|
|
|
|
<%= textAreailizable act, :description %>
|
|
|
|
|
<!-- <p class="font_description"> <%#= textilizable(act.description) %> </p> -->
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
@ -303,15 +221,9 @@
|
|
|
|
|
</tr>
|
|
|
|
|
<% 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> <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>
|
|
|
|
|
<td colspan="2" width="580"><p class="font_description"> <%= textAreailizable act, :description %> </p>
|
|
|
|
@ -349,7 +261,7 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %><!-- < %# unless @activity.empty? end %> -->
|
|
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<% unless @message.empty? %>
|
|
|
|
|
<div id="activity">
|
|
|
|
|
<% @message.each do |e| -%>
|
|
|
|
@ -407,8 +319,8 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
|
<% 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) {
|
|
|
|
@ -421,4 +333,4 @@
|
|
|
|
|
window.location.href = '<%=user_url(@user, type: 2)%>';
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</script>
|
|
|
|
|