From 795917688c7dfeb44c7415400f40267c15b2ff23 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 17 Jun 2016 09:34:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=99=E8=A8=80=E5=86=85=E5=AE=B9=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=B1=95=E5=BC=80=E3=80=81=E6=94=B6=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/_course_journalsformessage.html.erb | 24 +++++++++++++------ .../users/_user_journalsformessage.html.erb | 24 +++++++++++-------- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb index e04dd3006..b824f36a3 100644 --- a/app/views/users/_course_journalsformessage.html.erb +++ b/app/views/users/_course_journalsformessage.html.erb @@ -14,13 +14,23 @@ <% course=Course.find(activity.jour_id) %> <%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %> -
- <% if activity.parent %> - <%= link_to activity.parent.notes.html_safe, course_feedback_path(course), :class => "postGrey" %> - <% else %> - <%= link_to activity.notes.html_safe, course_feedback_path(course), :class => "postGrey" %> - <% end %> -
+ + <% if activity.parent %> + <% content = activity.parent.notes %> + <% else %> + <% content = activity.notes %> + <% end %> + <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %> +
+ + +
留言时间:<%= format_time(activity.created_on) %>
diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb index e7f42c661..9331839ce 100644 --- a/app/views/users/_user_journalsformessage.html.erb +++ b/app/views/users/_user_journalsformessage.html.erb @@ -16,22 +16,26 @@ <% end %> <% end %> - <% if is_activity.to_i == 1 %> -
- <% if activity.parent %> - <%= link_to activity.parent.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %> - <% else %> - <%= link_to activity.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %> - <% end %> -
- <% else %> + <%# if is_activity.to_i == 1 %> + + <%# else %> <% if activity.parent %> <% content = activity.parent.notes %> <% else %> <% content = activity.notes %> <% end %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %> - <% end %> +
+ + +
+ <%# end %>
留言时间:<%= format_time(activity.created_on) %>