#1097 讨论区的回帖引用解析和缺陷等模块一致 解决:修改课程、项目讨论区引用的解析方式与缺陷一致由使用<blockquote>改回至“> >”,以上为两种不同编辑器的解析方式
This commit is contained in:
parent
4c58b6a50c
commit
c2020a9535
|
@ -156,17 +156,17 @@ class MessagesController < ApplicationController
|
|||
@subject = @message.subject
|
||||
@subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
|
||||
|
||||
#@content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
|
||||
#@temp = Message.new
|
||||
##@temp.content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}> "
|
||||
#@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||
#@content_html = textilizable(@content)
|
||||
#@temp.content = @content_html
|
||||
@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)} <br/> "
|
||||
@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
|
||||
@content = "<blockquote>" << @content
|
||||
@content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
|
||||
@temp = Message.new
|
||||
@temp.content = @content
|
||||
#@temp.content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}> "
|
||||
@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||
@content_html = textilizable(@content)
|
||||
@temp.content = @content_html
|
||||
#@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)} <br/> "
|
||||
#@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
|
||||
#@content = "<blockquote>" << @content
|
||||
#@temp = Message.new
|
||||
#@temp.content = @content
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
|
||||
<td class="comments">
|
||||
<div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||
<%= textAreailizable message,:content,:attachments => message.attachments %>
|
||||
<%= textilizable message,:content,:attachments => message.attachments %>
|
||||
<%#= message.content.html_safe %>
|
||||
</div>
|
||||
<%= link_to_attachments message, :author => false %> </td>
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
</p>
|
||||
<% end %>
|
||||
<p><label for="message_subject"><%= l(:field_description) %><span class="required"> * </span></label>
|
||||
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
||||
<%= text_area :quote,:quote,:style => 'display:none' %>
|
||||
</p>
|
||||
<p>
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
<tr>
|
||||
<td class="comments">
|
||||
<div class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;">
|
||||
<%= textAreailizable message,:content,:attachments => message.attachments %>
|
||||
<%= textilizable message,:content,:attachments => message.attachments %>
|
||||
<%#= message.content.html_safe %>
|
||||
</div>
|
||||
<%= link_to_attachments message, :author => false %> </td>
|
||||
|
|
26
db/schema.rb
26
db/schema.rb
|
@ -437,14 +437,14 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
|
|||
t.string "web_title"
|
||||
t.string "title"
|
||||
t.text "description"
|
||||
t.string "page_type"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "page_type"
|
||||
t.integer "sort_type"
|
||||
t.integer "show_course", :default => 1
|
||||
t.integer "show_contest", :default => 1
|
||||
t.integer "image_width", :default => 107
|
||||
t.integer "image_height", :default => 63
|
||||
t.integer "show_course", :default => 1
|
||||
t.integer "show_contest", :default => 1
|
||||
end
|
||||
|
||||
create_table "forums", :force => true do |t|
|
||||
|
@ -458,26 +458,6 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
|
|||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "gitlab_projects", :force => true do |t|
|
||||
t.integer "gitlab_project_id"
|
||||
t.integer "project_id"
|
||||
t.string "repository_url"
|
||||
t.string "web_url"
|
||||
t.string "localfile_url"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "gitlab_users", :force => true do |t|
|
||||
t.integer "gitlab_user_id"
|
||||
t.integer "user_id"
|
||||
t.string "email"
|
||||
t.string "password"
|
||||
t.string "login", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "groups_users", :id => false, :force => true do |t|
|
||||
t.integer "group_id", :null => false
|
||||
t.integer "user_id", :null => false
|
||||
|
|
Loading…
Reference in New Issue