diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index bad7f5e6d..b69250b83 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -40,7 +40,7 @@
<% author = topic.author.to_s %>
- <%= link_to "#{topic.author.show_name}(#{topic.author.login})", user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, + <%= link_to User.current.member_of_course?(@board.course) ? "#{topic.author.show_name}(#{topic.author.login})" : "#{topic.author}" , user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author, :style=>'max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>

  :

@@ -160,9 +160,9 @@ <% replies_all.each do |message| %> <% replies_all_i=replies_all_i+1 %>
  • - <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %> + <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class => 'Msg_pic' %>
    - <%= link_to_user_header message.author.show_name,false,:class => 'fl c_orange f14 ' %> + <%= link_to_user_header User.current.member_of_course?(@board.course) ? (message.author.show_name + "(" +topic.author.login + ")") : message.author, false,:class => 'fl c_orange f14 ' %>
    <%= textAreailizable message,:content,:attachments => message.attachments %> diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index d8e034161..07e9c2b98 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -9,7 +9,7 @@
    - <%= link_to "#{journal.user.show_name}(#{journal.user.login})", user_path(journal.user),:class => 'c_blue fb fl mb10 f14', :target => "_blank"%> + <%= link_to User.current.member_of_course?(@course) ? "#{journal.user.show_name}(#{journal.user.login})" : "#{journal.user.login}", user_path(journal.user),:class => 'c_blue fb fl mb10 f14', :target => "_blank"%> <%= format_time(journal.created_on) %> @@ -24,10 +24,9 @@ <% ids = 'project_respond_form_'+ journal.id.to_s%> <% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %> - <%= link_to(l(:label_bid_respond_delete), - {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, - :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', - :class => "delete", :title => l(:button_delete)) %> + <%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, + :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', + :class => "delete", :title => l(:button_delete)) %> <% end %> <% if reply_allow %> <%#= link_to l(:label_bid_respond_quote),'', @@ -43,9 +42,7 @@
    <% end %>
    - - <%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true, :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %> - + <%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true , :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %>
    diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb index 5e9d6ef46..85712a007 100644 --- a/app/views/words/_journal_reply_items.html.erb +++ b/app/views/words/_journal_reply_items.html.erb @@ -13,14 +13,20 @@
  • <% id = 'project_respond_form_'+ reply.id.to_s %> - <%= link_to "#{reply.user.show_name}(#{reply.user.login})", user_path(reply.user) %> - <%= l(:label_reply_to)%> - <% if show_name %> - <%= link_to "#{parent_jour.user.show_name}(#{parent_jour.user.login})", user_path(parent_jour.user) %> + <% if User.current.member_of_course?(@course) %> + <%= link_to User.current.member_of_course?(@course)? "#{reply.user.show_name}(#{reply.user.login})" : "#{reply.user.login}" , user_path(reply.user) %> + <%= l(:label_reply_to)%> + <% if show_name %> + <%= link_to "#{parent_jour.user.show_name}(#{parent_jour.user.login})", user_path(parent_jour.user) %> + <% else %> + <%#= 之所以改成这样是因为觉得没有真实姓名的用“匿名用户”替换不合理 %> + <%= link_to "#{parent_jour.user}", user_path(parent_jour.user) %> + <% end %> <% else %> - <%= l(:label_anonymous) %> + <%= link_to "#{reply.user}", user_path(reply.user) %> + <%= l(:label_reply_to)%> + <%= link_to "#{parent_jour.user}", user_path(parent_jour.user) %> <% end %> -

    <%= reply.notes.html_safe %>