diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb
index 3ab2a10fc..22f88f1b2 100644
--- a/app/views/layouts/base_newcontest.html.erb
+++ b/app/views/layouts/base_newcontest.html.erb
@@ -101,7 +101,9 @@
- <%=link_to "#{@contest.watcher_users.count}",show_project_contest_path(@contest) %>
+
+ <%=link_to "#{@contest.watcher_users.count}",show_project_contest_path(@contest) %>
+
|
@@ -156,13 +158,6 @@
<%= l(:label_create_time) %>:<%= format_time(@contest.created_on) %>
-
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 068390192..9bac6f886 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,424 +1,336 @@
-<% if User.current.id == @user.id %>
-
- <%#= show_activity @state%>
-
-
-
-
-
-
- <%= form_tag(:controller => 'users', :action => "show") do %>
-
-
-
-
-
- <%= text_field_tag 'user', params[:user], :size => 30 %>
- <%= submit_tag l(:label_search_by_user), :class => "small", :name => nil %>
-
- |
-
-
+
+
+ <%= form_tag(:controller => 'users', :action => "show") do %>
+
+
+
+
+
+ <%= text_field_tag 'user', params[:user], :size => 30 %>
+ <%= submit_tag l(:label_search_by_user), :class => "small", :name => nil %>
+
+ |
+
+
+
+ <% end %>
<% end %>
-<% end %>
-<% unless @state == 2 %>
- <% unless @activity.empty? %>
-
- <% @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? %>
- <% 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'%>
-
-
- <%= image_tag(url_to_avatar(e.user), :class => "avatar") %> |
-
-
- <% case e.act_type %>
- <% when 'JournalsForMessage' %>
- <% if User.current.login == e.user.try(:login) %>
- <%# if e.user_id == act.jour.id %>
+ <% unless @state == 2 %>
+ <% unless @activity.empty? %>
+
+ <% @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? %>
+ <% 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'%>
+
+
+ <%= image_tag(url_to_avatar(e.user), :class => "avatar") %> |
+
+
+ <% case e.act_type %>
+ <% when 'JournalsForMessage' %>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_have_feedback) %>
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %>
|
- <%# else %>
-
- <%# end %>
- <% else %>
-
- <%= link_to("#{e.user.name}", user_path(e.user_id)) %> <%= l(:label_have_feedback) %><%=
- link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %>
+ |
+ <%= textAreailizable act.notes %>
+
+ <%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %>
+
|
- <% end %>
-
-
- <%= textAreailizable act.notes %>
-
- <%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %>
-
- |
-
-
-
-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
-
-
- |
-
- <% when 'Bid' %>
-
- <% if act.reward_type == 3 && @show_course == 1%>
- <% if e.user == User.current %>
+
+
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
+
+
+ |
+
+ <% when 'Bid' %>
+
+ <% if act.reward_type == 3 && @show_course == 1%>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
<% else %>
-
- <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
- |
- <% end %>
- <% else %>
- <% if e.user == User.current %>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
- <% else %>
-
- <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
- |
<% end %>
- <% end %>
-
-
-
- <%=textAreailizable act, :description %> |
-
-
-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
-
-
- |
-
- <% when 'Journal' %>
-
- <% if e.user == User.current %>
+
+
+
+ <%=textAreailizable act, :description %> |
+
+
+
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
+
+
+ |
+
+ <% when 'Journal' %>
+
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= 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}"} %>
|
- <% else %>
-
- <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= 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}"} %>
+ |
+
+ <% if act.notes.nil? %>
+ <% desStr = '' %>
+ <% else %>
+ <% desStr= textAreailizable(act, :notes) %>
+ <% end %>
+ <%= desStr %>
|
- <% end %>
-
-
- <% if act.notes.nil? %>
- <% desStr = '' %>
- <% else %>
- <% desStr= textAreailizable(act, :notes) %>
- <% end %>
- <%= desStr %>
- |
-
-
-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
-
-
- |
-
- <% when 'Changeset' %>
-
- <% if e.user == User.current %>
+
+
+
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
+
+
+ |
+
+ <% when 'Changeset' %>
+
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %>
|
- <% else %>
-
- <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %>
+ |
+
+
+ <%= textAreailizable act,:long_comments %> |
+
+
+
+
+ <%= format_time(e.act.committed_on) %>
+
+
|
- <% end %>
-
-
-
- <%= textAreailizable act,:long_comments %> |
-
-
-
-
- <%= format_time(e.act.committed_on) %>
-
-
- |
-
- <% when 'Message' %>
-
- <% if e.user == User.current %>
+
+ <% when 'Message' %>
+
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= 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}"}) %>
|
- <% else %>
-
- <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= 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}"}) %>
+ |
+
+
+ <%= textAreailizable(act,:content) %>
|
- <% end %>
-
-
-
- <%= textAreailizable(act,:content) %>
- |
-
-
-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
-
-
- |
-
- <% when 'Principal' %>
-
- <% if e.user == User.current %>
+
+
+
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
+
+
+ |
+
+ <% when 'Principal' %>
+
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_new_user) %>
|
- <% else %>
-
- <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_user) %>
+ |
+
+ |
+
+
+
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
+
+
|
- <% end %>
-
-
- |
-
-
-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
-
-
- |
-
- <% when 'News' %>
-
- <% if e.user == User.current %>
+
+ <% when 'News' %>
+
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
- <% else %>
-
- <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
+ |
+
+
+ <%= textAreailizable act,:description %> |
+
+
+
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
+
+
|
- <% end %>
-
-
-
- <%= textAreailizable act,:description %> |
-
-
-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
-
-
- |
-
- <% when 'Issue' %>
-
- <% if e.user == User.current %>
+
+ <% when 'Issue' %>
+
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
-
- <%= l(:label_i_new_activity) %>
-
+
+ <%= 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} %>
|
- <% else %>
-
-
- <%= link_to(h(e.user), user_path(e.user_id)) %>
-
-
- <%= l(:label_new_activity) %>
-
- <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
+ |
+
+
+ <%= textAreailizable act, :description %>
|
- <% end %>
-
-
-
-
- <%= textAreailizable act, :description %>
-
- |
-
-
-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
-
-
- |
-
- <% when 'Contest' %>
-
- <% if e.user == User.current && @show_contest == 1%>
+
+
+
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
+
+
+ |
+
+ <% when 'Contest' %>
+
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
- <% else %>
-
- <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
+ |
+
+ <%= textAreailizable act, :description %>
|
- <% end %>
-
-
- <%= textAreailizable act, :description %>
- |
-
-
-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
-
+ |
+
+
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %>
+
+ |
+ <% else %>
+ <%# f=1 %>
+ <% end %>
+
+ |
- <% else %>
- <%# f=1 %>
- <% end %>
-
-
-
-
- <% end %>
- <% end %>
+ |
+ <% end %>
+ <% end %>
- <% end %>
-
-
- <% else %>
- <% if @user == User.current %>
- <%= l(:label_user_activities) %>
- <% else %>
-
- <%= l(:label_user_activities_other) %>
-
- <% end %>
- <% end %>
+ <% end %>
+
+
+ <% else %>
+ <% if @user == User.current %>
+ <%= l(:label_user_activities) %>
+ <% else %>
+
+ <%= l(:label_user_activities_other) %>
+
+ <% end %>
+ <% end %>
-<% else %>
- <% unless @message.empty? %>
-
- <% @message.each do |e| -%>
-
-
- <%= image_tag(url_to_avatar(e.user), :class => "avatar") %> |
-
-
-
-
- <%= link_to(h(e.user), user_path(e.user)) %>
- <% 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' %>
- <%= '在'<<%= 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 %>
+ <% unless @message.empty? %>
+
+ <% @message.each do |e| -%>
+
+
+ <%= image_tag(url_to_avatar(e.user), :class => "avatar") %> |
+
+
+
+
+ <%= link_to(h(e.user), user_path(e.user)) %>
+ <% 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' %>
+ <%= '在'<<%= 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 %>
- |
-
-
- <%= textAreailizable e.notes %> |
-
-
- |
-
- <%= format_time e.created_on %> |
-
-
- |
-
-
- <% end %>
-
+ <% else %>
+ <%= l(:label_in_issues) %><%= link_to(e.issue.subject, issue_path(e.issue)) %><%= l(:label_quote_my_words) %>
+ <% end %>
+ <% end %>
+ |
+
+
+ <%= textAreailizable e.notes %> |
+
+
+ |
+
+ <%= format_time e.created_on %> |
+
+
+ |
+
+
+ <% end %>
+
-
+
- <% else %>
- <%= l(:label_no_user_respond_you) %>
- <% end %>
+ <% else %>
+ <%= l(:label_no_user_respond_you) %>
+ <% end %>
-<% end %>
-
+
|