diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index e542d1e1d..403119e20 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -894,12 +894,15 @@ class CoursesController < ApplicationController # return # end #更新创建课程消息状态 - create_course_messages = @course.course_messages.where("user_id =? and course_message_type =? and course_id =? and viewed =?", User.current.id, 'Course', @course.id, 0) - create_course_messages.update_all(:viewed => true) + course_request_messages = CourseMessage.where(:user_id => User.current.id, :course_id => @course.id, :course_message_type => ["CourseRequestDealResult", "Course"], :viewed => false) + course_request_messages.update_all(:viewed => true) + + # create_course_messages = @course.course_messages.where("user_id =? and course_message_type =? and course_id =? and viewed =?", User.current.id, 'Course', @course.id, 0) + # create_course_messages.update_all(:viewed => true) #更新申请结果反馈消息的状态 - course_request_messages = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @course.id, 'CourseRequestDealResult', false) - course_request_messages.update_all(:viewed => true) + # course_request_messages = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @course.id, 'CourseRequestDealResult', false) + # course_request_messages.update_all(:viewed => true) course_activities = @course.course_activities @canShowRealName = User.current.member_of_course? @course diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index d1835408f..7361055b4 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -338,41 +338,17 @@ class StudentWorkController < ApplicationController end def index - # 作业消息状态更新 - @homework.course_messages.each do |homework_message| - if User.current.id == homework_message.user_id && homework_message.viewed == 0 - homework_message.update_attributes(:viewed => true) if homework_message.viewed == 0 - end - end - - #修改作品提示消息更新 - student_work_messages = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @homework.course, StudentWork.name, 0) - student_work_messages.each do |message| - message.update_attribute(:viewed, true) - end - + # 作业消息状态更新? + homeworkcommon_messages = CourseMessage.where(:user_id => User.current.id, :viewed => 0, :course_message_id => @homework.id, :course_message_type => "HomeWorkCommon") + homeworkcommon_messages.update_all(:viewed => true) + studentwork_messages = CourseMessage.where(:user_id => User.current.id, :viewed => 0, :course_id => @homework.course, :course_message_type => "StudentWork") + studentwork_messages.update_all(:viewed => true) # 作品打分消息状态更新 studentworks_scores = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @homework.course, "StudentWorksScore", 0) - studentworks_scores.each do |studentworks_score| - studentworks_score.update_attributes(:viewed => true) if studentworks_score.viewed == 0 - end + studentworks_scores.update_all(:viewed => true) # 作品评论消息状态更新 journals_for_teacher = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =?", User.current.id, @homework.course, "JournalsForMessage", 0) - journals_for_teacher.each do |journal_for_teacher| - journal_for_teacher.update_attributes(:viewed => true) - end - #不能参与作业匿评消息状态更新 - no_evaluation = CourseMessage.where("user_id =? and course_id =? and course_message_type =? and viewed =? and status =?", User.current.id, @homework.course, "StudentWork", 0, 0) - no_evaluation.update_all(:viewed => true) - # 作品留言 - # 消息end - #设置作业对应的forge_messages表的viewed字段 - query_student_work = @homework.course_messages - query_student_work.each do |query| - if User.current.id == query.user_id - query.update_attributes(:viewed => true) - end - end + journals_for_teacher.update_all(:viewed => true) ################################################################################################################## @order,@b_sort,@name,@group = params[:order] || "score",params[:sort] || "desc",params[:name].to_s.strip || "",params[:group] @homework_commons = @course.homework_commons.where("publish_time <= ?",Time.now.strftime("%Y-%m-%d")).order("created_at desc") @@ -480,7 +456,7 @@ class StudentWorkController < ApplicationController elsif @order == 'student_id' @stundet_works = search_homework_member @homework.student_works.no_copy.select("student_works.*,student_works.work_score as score").joins("join user_extensions on student_works.user_id = user_extensions.user_id").order("#{@order} #{@b_sort}"),@name else - @stundet_works = search_homework_member @homework.student_works.no_copy.select("student_works.*,student_works.work_score as score").order("#{@order} #{@b_sort}"),@name + @stundet_works = search_homework_member @homework.student_works.no_copy.select("student_works.*,student_works.work_score as score").includes(:user => {:user_extensions => []}, :project => {}, :student_works_scores => {}).order("#{@order} #{@b_sort}"),@name end @show_all = true elsif User.current.member_of_course?(@course) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7a24c53c7..5fa1bc6ec 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -345,7 +345,11 @@ module ApplicationHelper def link_to_isuue_user(user, options={}) if user.is_a?(User) - name = h(user.name(options[:format])) + if options[:format] + name = h(user.name(options[:format])) + else + name = h(user.show_name) + end link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.host_user}, :class => "pro_info_p" else h(user.to_s) @@ -921,6 +925,12 @@ module ApplicationHelper s.html_safe end + # 计算Pull Request的请求数目 + def pull_request_count project + g = Gitlab.client + g.merge_requests(project.gpid).count + end + #项目成员列表复选框生成 def project_member_check_box_tags_ex name, principals s = '' @@ -978,7 +988,7 @@ module ApplicationHelper groups = '' collection.sort.each do |element| selected_attribute = ' selected="selected"' if option_value_selected?(element, selected) - (element.is_a?(Group) ? groups : s) << %() + (element.is_a?(Group) ? groups : s) << %() end unless groups.empty? s << %(#{groups}) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index b3e946f95..ceff7a0a0 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -14,30 +14,21 @@ module CoursesHelper # 推荐的精品课程 - def excellent_course_recommend new_course - q = "%#{new_course.name.strip}%" - result = find_excelletn_course(q, new_course) - end - - # 查询符合条件的精品课程 - # 用新课程名去匹配精品课程中按课程名和Tag名 - def find_excelletn_course keywords, current_course - # 获取tag匹配结果ID - a_tags = [] - Course.where("is_excellent =? and is_public =?", 1, 1).each do |ec| - if ec.tags.any?{|value| current_course.name.include?(value.to_s)} - a_tags << ec.id - end - end - # 课程本身不能搜索显示自己 - excellent_ids = a_tags.uniq.delete_if{|i| i == current_course.id} - sql = "SELECT distinct c.id FROM course_activities cs, courses c where cs.course_id = c.id + def excellent_course_recommend current_course + q = "%#{current_course.name.strip}%" + recomment_courses = [] + # 推荐过程过滤掉自身 + sql = "SELECT distinct c.* FROM course_activities cs, courses c where cs.course_id = c.id and (c.is_excellent =1 or c.excellent_option =1) and c.is_public = 1 and c.id != #{current_course.id} order by cs.updated_at desc;" - default_ids = Course.find_by_sql(sql).flatten.map { |c| c.id } - excellent_ids << default_ids.flatten - arr_result = excellent_ids.flatten.uniq.first(3) - excellent_courses = Course.find(arr_result) - return excellent_courses + ex_courses = Course.find_by_sql(sql) + # 使用课程的tag去和课程名称进行匹配 + c_courses = ex_courses.select{|ex_course| ex_course.tags.any?{|tag| q.include?(tag.to_s)}} + if c_courses.count < 3 + results = c_courses.length == 0 ? ex_courses.first(3) : (c_courses + ex_courses.first(3 - ex_courses.count)) + else + results = c_courses.first(3) + end + results end # 判断精品课程是否可见,非课程成员无法查看私有课程 @@ -63,6 +54,7 @@ module CoursesHelper # searchTeacherAndAssistant(project).count end + # 统计数目 def show_nav?(count) count == 0 ? true : false end @@ -807,11 +799,12 @@ module CoursesHelper link.html_safe end + # 可以查看到资源库的资源 def visable_attachemnts_incourse course return[] unless course result = [] course.attachments.each do |attachment| - if (attachment.is_public? && attachment.is_publish == 1) ||User.current == attachment.author ||User.current.allowed_to?(:as_teacher,course)|| (User.current.member_of_course?(course) && attachment.is_publish == 1) || User.current.admin? + if attachment.is_public? && attachment.is_publish == 1 || User.current == attachment.author || User.current.allowed_to?(:as_teacher,course) || (User.current.member_of_course?(course) && attachment.is_publish == 1) || User.current.admin? result << attachment end end diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index b161e29e9..5a124849f 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -111,9 +111,9 @@ module IssuesHelper def principals_options_for_isuue_list(project) if User.current.member_of?(project) - project.members.includes(:user).order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["<< #{l(:label_me)} >>", User.current.id]).unshift(["指派给", 0]) + project.members.includes(:user).order("lower(users.login)").map{|c| [User.find(c.user_id).show_name, c.user_id]}.unshift(["<< #{l(:label_me)} >>", User.current.id]).unshift(["指派给", 0]) else - project.members.includes(:user).order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["指派给", 0]) + project.members.includes(:user).order("lower(users.login)").map{|c| [User.find(c.user_id).show_name, c.user_id]}.unshift(["指派给", 0]) end end diff --git a/app/models/news.rb b/app/models/news.rb index 0e83a39f8..58bbc40ac 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -62,7 +62,7 @@ class News < ActiveRecord::Base :author_key => :author_id acts_as_watchable - after_create :act_as_activity,:act_as_forge_activity, :act_as_course_activity, :add_author_as_watcher, :send_mail, :add_news_count, :act_as_student_score, :act_as_system_message, :delay_news_send + after_create :act_as_forge_activity, :act_as_course_activity, :add_author_as_watcher, :send_mail, :add_news_count, :act_as_student_score, :act_as_system_message, :delay_news_send after_update :update_activity after_destroy :delete_kindeditor_assets, :decrease_news_count, :delete_org_activities, :down_course_score @@ -140,19 +140,13 @@ class News < ActiveRecord::Base Watcher.create(:watchable => self, :user => author) end - ## fq - def act_as_activity - self.acts << Activity.new(:user_id => self.author_id) - end - # Time 2015-02-27 15:48:17 # Author lizanle # Description 公用表中也要记录 def act_as_forge_activity # 如果是project为空,那么是课程相关的,不需要保存 if self.project - self.forge_acts << ForgeActivity.new(:user_id => self.author_id, - :project_id => self.project.id) + self.forge_acts << ForgeActivity.new(:user_id => self.author_id, :project_id => self.project.id) end end @@ -198,7 +192,7 @@ class News < ActiveRecord::Base def contain_news_message self.course.members.each do |m| if m.user_id != self.author_id - self.course_messages << CourseMessage.new(:user_id => user_id, :course_id => container_id, :viewed => false) + self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) end end end diff --git a/app/views/attachments/_activity_attach.html.erb b/app/views/attachments/_activity_attach.html.erb index b37c80dad..48c01468a 100644 --- a/app/views/attachments/_activity_attach.html.erb +++ b/app/views/attachments/_activity_attach.html.erb @@ -9,8 +9,9 @@ ( <%= number_to_human_size attachment.filesize %>) - - <%= link_to h(truncate(attachment.author.name, length: 15, omission: '...')),user_path(attachment.author),:class => "c_orange" %>, + <% user_name = attachment.author.show_name.empty? ? attachment.author : attachment.author.show_name %> + + <%= link_to h(truncate(user_name, length: 15, omission: '...')),user_path(attachment.author),:class => "linkBlue2" %>, <%= format_time(attachment.created_on) %> diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index 759a9a735..4d261c5d1 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -91,8 +91,8 @@   <% end %> <% if options[:author] %> - - <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "link-blue" %>, + + <%= link_to h(truncate(attachment.author.show_name, length: 10, omission: '...')),user_path(attachment.author),:class => "link-blue" %>, <%= format_time(attachment.created_on) %> <% end %> diff --git a/app/views/forums/_forum_list.html.erb b/app/views/forums/_forum_list.html.erb index ec9f4f7de..9a52fb410 100644 --- a/app/views/forums/_forum_list.html.erb +++ b/app/views/forums/_forum_list.html.erb @@ -11,7 +11,8 @@ <%#= link_to forum.name.gsub(/(\r\n|\s+)/,'
'), forum_path(forum),:class=>"f16 linkBlue" %>
<%= textAreailizable forum.description%>
- + <% user_name = forum.creator.show_name.empty? ? forum.creator.name : forum.creator.show_name %> +
创建者:<%= user_name %>
diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb index 11b1403cd..c3b8b4dbe 100644 --- a/app/views/forums/_show_topics.html.erb +++ b/app/views/forums/_show_topics.html.erb @@ -27,7 +27,7 @@
<% author = topic.last_reply.try(:author)%> <% if author%> -
最后回复:<%= author.name%>
+
最后回复:<%= author.show_name%>
<%= format_date(topic.last_reply.created_at)%>
<% end%> 更新时间:<%= format_date(topic.updated_at)%> diff --git a/app/views/issues/_detail.html.erb b/app/views/issues/_detail.html.erb index ac912a71c..9ae3dfc43 100644 --- a/app/views/issues/_detail.html.erb +++ b/app/views/issues/_detail.html.erb @@ -20,7 +20,7 @@ <%= get_issue_priority(@issue.priority_id)[1] %>


- 由<%=link_to @issue.author, user_path(@issue.author), :class => "link-blue" %>添加于 <%= format_time(@issue.created_on).html_safe %> + 由<%=link_to @issue.author.show_name, user_path(@issue.author), :class => "link-blue" %>添加于 <%= format_time(@issue.created_on).html_safe %> diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index ccd37dc91..ea15af42e 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -3,7 +3,7 @@ <%= import_ke(enable_at: true, prettify: false, init_activity: false) %> <% end %> -<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true, :remote => true} do |f| %> +<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %> <%= error_messages_for 'issue', 'time_entry' %> <%= render :partial => 'conflict' if @conflict %> diff --git a/app/views/issues/_jounal_refresh.js.erb b/app/views/issues/_jounal_refresh.js.erb index db5a068bf..5ccbf69d2 100644 --- a/app/views/issues/_jounal_refresh.js.erb +++ b/app/views/issues/_jounal_refresh.js.erb @@ -1,3 +1,8 @@ +/* $("#reply_div_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue}) %>"); +$("#issue_detail_show").html('<%#= escape_javascript(render :partial => 'issues/detail') %>'); +$("#issue_edit_show").html('<%#= escape_javascript(render :partial => 'issues/edit') %>'); +$("#div_issue_attachment_<%#=@issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/issue_attachments', :locals => {:issue => @issue}) %>"); +sd_create_editor_from_data(<%#= @issue.id %>, null, "100%", "<%#= @issue.class.name %>");*/ location.reload(); issue_desc_editor = KindEditor.create('#issue_description', @@ -14,3 +19,5 @@ issue_desc_editor = KindEditor.create('#issue_description', "uploadJson":"/kindeditor/upload", "fileManagerJson":"/kindeditor/filemanager"}); // $("#issue_test_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/edit', :locals => {:issue => Issue.find( @issue_id)}) %>"); +// $(".homepagePostReplyBannerCount").html('<%#= escape_javascript(render :partial => 'issues/issue_reply_banner') %>'); +// sd_create_editor_from_data(<%#= @issue.id%>, null, "100%","<%#= @issue.class.name %>"); \ No newline at end of file diff --git a/app/views/issues/update.js.erb b/app/views/issues/update.js.erb index 733066d38..bcf4c3077 100644 --- a/app/views/issues/update.js.erb +++ b/app/views/issues/update.js.erb @@ -1,4 +1,13 @@ <% if @saved %> +/*$("#issue_detail").replaceWith('<%#= escape_javascript(render :partial => 'issues/detail') %>'); +$("#issue_edit").replaceWith('<%#= escape_javascript(render :partial => 'issues/edit') %>'); + +$("#issue_detail").show(); +$("#issue_edit").hide(); + +$("#reply_div_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue,:replies_all_i=>0}) %>"); +sd_create_editor_from_data(<%#= @issue.id%>, null, "100%","<%#=@issue.class.name%>"); +$(".homepagePostReplyBannerCount").html('<%#= escape_javascript(render :partial => 'issues/issue_reply_banner') %>');*/ location.reload(); //edit里的编辑器貌似显示不出来,所以手动js生成。 issue_desc_editor = KindEditor.create('#issue_description', diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index ea63f680f..2bdb554ce 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -1,41 +1,49 @@ <%= javascript_include_tag "feedback" %> -
+
-
-
- - - - +
+ 问题和建议 + × +
-
-
+
+
<% get_memo %> <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> - <%= f.text_area :subject, :id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %> + <%= f.text_area :subject, :id=>"subject", :class => "opnionText mb5", :placeholder => l(:label_feedback_tips) %> <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %> - - + 还能输入50个字符 + <%= l(:label_submit)%> +
<% end %>
-
+
+
+
- <%#= l(:label_technical_support) %> + <%#= l(:label_technical_support) %> - - - Trustie师姐师兄答疑群 + + + +

加入QQ群

+
+
+

关注官方微信

+
-
-
- <%= l(:label_submit)%> - +
+
+ +
+ × +
diff --git a/app/views/layouts/_user_courses.html.erb b/app/views/layouts/_user_courses.html.erb index 754cfd10b..60db07db0 100644 --- a/app/views/layouts/_user_courses.html.erb +++ b/app/views/layouts/_user_courses.html.erb @@ -2,10 +2,17 @@
  • <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %> -

    - <%= link_to course.syllabus.title, syllabus_path(course.syllabus_id), :target => '_blank', :class => 'hidden', :style => "max-width:85px; display:inline-block;"%> +

    + <% title = "#{course.syllabus.title}".html_safe %> + <%= link_to title, syllabus_path(course.syllabus_id), :target => '_blank', :class => 'hidden', :style => "max-width:91px; display:inline-block;"%> · - <%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :target => '_blank', :class => 'hidden', :style => "max-width:85px; display:inline-block;"%> + <% classes = "#{course.name}".html_safe %> + <%= link_to classes, course_path(course.id,:host=>Setting.host_course), :target => '_blank', :class => 'hidden', :style => "max-width:91px; display:inline-block;"%> + + 课程名称:<%= course.syllabus.title %>
    + 班级名称:<%= course.name+'('+current_time_and_term(course)+')' %>
    + 班级属性:<%= course.is_public? ? '公开' : '私有' %> +

    <%#= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course), :id => "show_course_#{course.id}", :class => 'course_list_menu hidden', :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级:")+course.name+"("+current_time_and_term(course)+")"%> @@ -106,11 +113,25 @@ } $(".course_list_menu").each(function(){ - var courseWidth = $(this).children().eq(0).width(); - var classWidth = 170 -courseWidth; + var courseWidth = $(this).children().eq(0).children().width(); + var classWidth = $(this).children().eq(2).children().width(); + var newClassWidth = 182 - courseWidth; + var newCourseWidth = 182 - classWidth; console.log(courseWidth, classWidth); - if(courseWidth < 80){ - $(this).children().eq(2).css("max-width",classWidth + "px"); + if(courseWidth < 91 && classWidth > 91){ + $(this).children().eq(2).css("max-width",newClassWidth + "px"); + } + if(classWidth < 91 && courseWidth > 91){ + $(this).children().eq(0).css("max-width",newCourseWidth + "px"); } }) + + $(".course-name").each(function(){ + $(this).mouseenter(function(){ + $(this).parent().parent().children().eq(3).show(); + }); + $(this).mouseleave(function(){ + $(this).parent().parent().children().eq(3).hide(); + }); + }) diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index fab9f61ad..f0a7eff6f 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -1,6 +1,7 @@ <%# course_model %> -<%# course_file_num = visable_attachemnts_incourse(@course).count%> -<% course_file_num = Attachment.where(:container_type => "Course", :container_id => @course.id).count %> +<%# course_file_num = Attachment.where(:container_type => "Course", :container_id => @course.id).count %> + +<% course_file_num = visable_attachemnts_incourse(@course).count%> <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %> <% homework_num = visable_course_homework @course %> diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index 021b281d9..b57feb5bd 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -187,7 +187,8 @@
  • <%= @forum.name%>
    - + <% user_name = @forum.creator.show_name.empty? ? @forum.creator.name : @forum.creator.show_name %> +
    diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index d684b4297..4145ee25f 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -58,7 +58,7 @@
    - <%= link_to @memo.author.name, user_path(@memo.author), :class => "linkBlue2", :target=> "_blank"%>
    + <%= link_to @memo.author.show_name, user_path(@memo.author), :class => "linkBlue2", :target=> "_blank"%>
    <%= format_date( @memo.created_at)%>
    @@ -90,7 +90,7 @@
    <%= reply.author.name%><%= format_date(reply.created_at) %>
    -
    <%= h reply.content.html_safe%>
    +
    <%= h reply.content.html_safe.gsub(/\/, "