diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 055a00a82..44318c389 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -45,546 +45,547 @@ <% (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'%> + <% 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' %> - - + + + + <% else %> + <% end %> +
- <% if User.current.login == e.user.try(:login) %> - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   - <% if User.current.language == "zh" %> + <%= image_tag(url_to_avatar(e.user), :class => "avatar") %> + + + <% case e.act_type %> + <% when 'JournalsForMessage' %> + + - - - + + + - - - + + + - - <% when 'Bid' %> - - <% if act.reward_type == 3 && @show_course == 1%> - <% if e.user == User.current %> - + + <% when 'Bid' %> + + <% if act.reward_type == 3 && @show_course == 1 %> + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - <% else %> - <% if e.user == User.current %> - + <% end %> + <% else %> + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - <% end %> - - - - - - + <% end %> + <% end %> + + + + + + - - <% when 'Journal' %> - - <% if e.user == User.current %> - + + <% when 'Journal' %> + + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - - - <% if act.notes.nil? %> - <% desStr = '' %> - <% else %> - <% desStr= textAreailizable(act, :notes) %> - <% end %> - - - - + <% end %> + + + <% if act.notes.nil? %> + <% desStr = '' %> + <% else %> + <% desStr= textAreailizable(act, :notes) %> + <% end %> + + + + - - <% when 'Changeset' %> - - <% if e.user == User.current %> - + + <% when 'Changeset' %> + + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - - - - - - + <% end %> + + + + + + - - <% when 'Message' %> - - <% if e.user == User.current %> - + + <% when 'Message' %> + + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - - - - - - + <% end %> + + + + + + - - <% when 'Principal' %> - - <% if e.user == User.current %> - + + <% when 'Principal' %> + + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - - - - - - + <% end %> + + + + + + - - <% when 'News' %> - - <% if e.user == User.current %> - + + <% when 'News' %> + + <% if e.user == User.current %> + - <% else %> - + <% else %> + - <% end %> - - - - - - + <% end %> + + + + + + - - <% when 'Issue' %> - <% if e.user == User.current %> - + + <%= l(:label_comments_count, :count => e.act.comments_count) %> + + + + + <% when 'Issue' %> + <% if e.user == User.current %> + - - - - - - - + + + + + + - - <% else %> - + + <% else %> + - - - - - - + + + + + + - + + <%= l(:label_comments_count, :count => e.act.journals.count) %> + + + + - <% end %> + <% end %> - <% when 'Contest' %> - - <% if e.user == User.current && @show_contest == 1%> - + <% if e.user == User.current && @show_contest == 1 %> + - <% else %> - + <% else %> + - <% end %> - - - - - - + <% end %> + + + + + + - <% else %> - <% end %> -
+ <% if User.current.login == e.user.try(:login) %> + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + +   + <% if User.current.language == "zh" %> <%= l(:label_i_have_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> - <%= l(:label_of_feedback) + l(:label_layouts_feedback) %> - - <% else %> + <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> + <%= l(:label_of_feedback) + l(:label_layouts_feedback) %> + + <% else %> <%= l(:label_i_have_feedback) %> - <%= l(:label_layouts_feedback) + l(:label_of_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> + <%= l(:label_layouts_feedback) + l(:label_of_feedback) %> + <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> - <% end %> - <% else %> - - <%= link_to("#{e.user.name}", user_path(e.user_id)) %> - - <% if User.current.language == "zh" %> + <% end %> + <% else %> + + <%= link_to("#{e.user.name}", user_path(e.user_id)) %> + + <% if User.current.language == "zh" %> <%= 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 %> + <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> + <%= l(:label_of_feedback) + l(:label_layouts_feedback) %> + + <% else %> <%= l(:label_have_feedback) %> - <%= l(:label_layouts_feedback) + l(:label_of_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> + <%= l(:label_layouts_feedback) + l(:label_of_feedback) %> + <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> - <% end %> - <% end %> -
-

- <%= textAreailizable act.notes %> -

-
+ <% end %> + <% end %> +
+

+ <%= textAreailizable act.notes %> +

+ +
- <% puts 11111111111111%> + <% puts 11111111111111 %> <%= user_jour_feed_back_url e %> -
-
-
+
+
+
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
-
-
- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - + +
+
+ + <%= 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}"), course_for_bid_path(e.act_id) %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> -   + <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %> + + + <%= 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}"), course_for_bid_path(e.act_id) %> - - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - + <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %> + + + <%= 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) %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> -   + <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> + + + <%= 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) %> -
-

- <%=textAreailizable act, :description %> -

-
+ <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
+

+ <%= textAreailizable act, :description %> +

+
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
- - - - - - - - -
- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + + + + + + + + + +
+ + <%= 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}"} %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> - -   +   + <%= 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}"} %> + + + <%= 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.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}"} %> -
-

- <%= desStr %> -

-
-
+   + <%= 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}"} %> +
+

+ <%= desStr %> +

+
+
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
-
-
- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + +
+
+ + <%= 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} %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> - -   +   + <%= link_to format_activity_title(act.title), + {:controller => 'repositories', + :action => 'revision', + :id => act.repository.project, + :repository_id => act.repository.identifier_param, + :rev => act.identifier} %> + + + <%= 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 %> -

-
-
+   + <%= 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) %> -
-
+
+
<%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, - :rev => act.identifier} if e.act.count!= 0%> + :rev => act.identifier} if e.act.count!= 0 %> - - <%= l(:label_comments_count, :count => e.act.count) %> - -
-
- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + + <%= l(:label_comments_count, :count => e.act.count) %> + + +
+ + <%= 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}"}) %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> - -   +   + <%= 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}"}) %> + + + <%= 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) %> -

-
-
+   + <%= 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) %> +

+
+
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
-
-
- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + +
+
+ + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + +   <%= l(:label_new_user) %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> - -   + + + <%= 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 %> -
-
-
- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + +
+
+ + <%= 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} %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> - -   +   + <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> + + + <%= 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 %> -

-
-
+   + <%= 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 %> -
-
+
+
- <%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} if e.act.comments_count!= 0%> + <%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} if e.act.comments_count!= 0 %> - - <%= l(:label_comments_count, :count => e.act.comments_count) %> - -
-
- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> + +   <%= 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} %> -
- <%= textAreailizable act, :description %> -
-
+ <%= 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 %> +
+
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
-
+
+
<%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} if e.act.journals.count!= 0 %> - - <%= l(:label_comments_count, :count => e.act.journals.count) %> - -
-
- - <%= link_to(h(e.user), user_path(e.user_id)) %> -   + + <%= l(:label_comments_count, :count => e.act.journals.count) %> + + +
+ + <%= 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 %> -
-
+ <%= 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 %> +
+
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
-
+
+
<%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} if e.act.journals.count!= 0 %> - - <%= l(:label_comments_count, :count => e.act.journals.count) %> - -
-
- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - -   + <% 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} %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> - -   +   + <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> + + + <%= 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 %> -

-
-
+   + <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> +
+

+ <%= textAreailizable act, :description %> +

+
+
<%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> -
-
-
+
- <% end %> - <% end %> - <% end %> + <% end %> + <% end %> + <% end %>