From 75214f02115e875270f68ddd6f723e2e515a3f24 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 20 Feb 2016 16:45:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=AF=BE=E5=AF=BC=E8=AF=AD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9A=E5=AF=BC=E8=AF=AD=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=98=BE=E7=A4=BAtrustie=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/messages/_course_show.html.erb | 16 ++++++++++++---- app/views/users/_course_message.html.erb | 18 +++++++++++++----- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index 33de21c0f..49207d5c5 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -34,7 +34,11 @@
- <%= link_to image_tag(url_to_avatar(@topic.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@topic.author) %> + <% if @topic.status == 1 %> + <%= image_tag("/images/trustie_logo1.png", width: "50px", height: "50px") %> + <% else %> + <%= link_to image_tag(url_to_avatar(@topic.author), :width => 50, :height => 50,:alt=>'图像' ), user_path(@topic.author) %> + <% end %>
<% if User.current.logged? %> @@ -72,10 +76,14 @@
- <% if @topic.try(:author).try(:realname) == ' ' %> - <%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %> + <% if @topic.status == 1 %> + 确实团队 <% else %> - <%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %> + <% if @topic.try(:author).try(:realname) == ' ' %> + <%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %> + <% else %> + <%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %> + <% end %> <% end %>
<%= format_time( @topic.created_on)%>
diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 4d40f46a1..7e8a24bb2 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -1,15 +1,23 @@
- <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %> - <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %> + <% if activity.status == 1 %> + <%= image_tag("/images/trustie_logo1.png", width: "50px", height: "50px") %> + <% else %> + <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %> + <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %> + <% end %>
- <% if activity.try(:author).try(:realname) == ' ' %> - <%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> + <% if activity.status == 1 %> + 确实团队 <% else %> - <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> + <% if activity.try(:author).try(:realname) == ' ' %> + <%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> + <% else %> + <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> + <% end %> <% end %> TO <%= link_to activity.course.name.to_s+" | 课程讨论区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>