From 37e5bdee22ee0caf350e63fd4cf8cc3e93d02a21 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 4 Aug 2014 17:36:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=90=E4=BA=9B=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84BUG=20#1128?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/show.html.erb | 569 +++++++++++++++++----------------- config/locales/en.yml | 1 + 2 files changed, 287 insertions(+), 283 deletions(-) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index a12627792..20f64dc3f 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -43,292 +43,295 @@ <% (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? %> - - - - - -
<%= 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 %> + <% 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'%> +
- + + - <%# else %> - - <%# end %> - <% else %> - - - - <% end %> - - - - - - - - <% when 'Bid' %> - - <% if act.reward_type == 3 && @show_course == 1%> - <% if e.user == User.current %> - - <% else %> - - <% end %> - <% else %> - <% if e.user == User.current %> - - <% else %> - - <% end %> - <% end %> - - - - - - - - <% when 'Journal' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - <% if act.notes.nil? %> - <% desStr = '' %> - <% else %> - <% desStr=act.notes.html_safe %> - <% end %> - - - - - - <% when 'Changeset' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Message' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Principal' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'News' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Issue' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Contest' %> - - <% if e.user == User.current && @show_contest == 1%> - - <% else %> - - <% end %> - - - - - - - <% else %> - <% f=1 %> - <% end %> -
- <%= 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) %> - <%= 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 %> + + + + <%# else %> + + <%# end %> + <% else %> + + + + <% end %> + + + + + + + + <% when 'Bid' %> + + <% if act.reward_type == 3 && @show_course == 1%> + <% if e.user == User.current %> + + <% else %> + + <% end %> + <% else %> + <% if e.user == User.current %> + + <% else %> + + <% end %> + <% end %> + + + + + + + + <% when 'Journal' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + <% if act.notes.nil? %> + <% desStr = '' %> + <% else %> + <% desStr=act.notes.html_safe %> + <% end %> + + + + + + <% when 'Changeset' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Message' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Principal' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'News' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Issue' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Contest' %> + + <% if e.user == User.current && @show_contest == 1%> + + <% else %> + + <% end %> + + + + + + + <% else %> + <%# f=1 %> + <% end %> +
+ <%= 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) %> +
+ <%= 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) %> +
+

<%= textilizable 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 %> +
+
+
+ <%= 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) %> + + <%= 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) %> + + <%= 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)) %> <%= l(:label_new_activity) %>  <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
+

<%= act.description.html_safe %>

+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
+
+ <%= link_to l(:label_find_all_comments), respond_path(e.act_id) %><%= l(:label_comments_count, :count => e.act.commit) %> +
+
+ <%= 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.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}"} %> + + <%= 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}"} %> +

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

<%= act.long_comments.html_safe %>

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

<%= h act.content.truncate(240, omission: '...') %>

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

<%= act.description.html_safe %>

+
+ <%= (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} %><%= l(:label_comments_count, :count => e.act.comments_count) %> +
+
+ + <%= 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} %> + + + <%= 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} %> +
+ + <%= textilizable 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} %><%= l(:label_comments_count, :count => e.act.journals.count) %> +
+
+ <%= 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)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> +

<%= h act.description %>

+
+
+ <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
+
+
- <%= 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) %> -
-

<%= textilizable 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 %> -
-
-
- <%= 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) %> - - <%= 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) %> - - <%= 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)) %> <%= l(:label_new_activity) %>  <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> -
-

<%= act.description.html_safe %>

-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
-
- <%= link_to l(:label_find_all_comments), respond_path(e.act_id) %><%= l(:label_comments_count, :count => e.act.commit) %> -
-
- <%= 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.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}"} %> - - <%= 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}"} %> -

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

<%= act.long_comments.html_safe %>

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

<%= h act.content.truncate(240, omission: '...') %>

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

<%= act.description.html_safe %>

-
- <%= (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} %><%= l(:label_comments_count, :count => e.act.comments_count) %> -
-
- - <%= 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} %> - - - <%= 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} %> -
- - <%= textilizable 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} %><%= l(:label_comments_count, :count => e.act.journals.count) %> -
-
- <%= 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)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> -

<%= h act.description %>

-
-
- <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
-
-
+ + <% end %> <% end %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index d8ebfb9f1..8e3b8d0f0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1801,3 +1801,4 @@ en: modal_valid_passing: can be used. label_company_name: Company Name + notice_account_invalid_creditentials_new: You have not to the mailbox activation