|
|
|
@ -36,8 +36,7 @@ class JournalsController < ApplicationController
|
|
|
|
|
sort_update(@query.sortable_columns)
|
|
|
|
|
|
|
|
|
|
if @query.valid?
|
|
|
|
|
@journals = @query.journals(:order => "#{Journal.table_name}.created_on DESC",
|
|
|
|
|
:limit => 25)
|
|
|
|
|
@journals = @query.journals(:order => "#{Journal.table_name}.created_on DESC", :limit => 25)
|
|
|
|
|
end
|
|
|
|
|
@title = (@project ? @project.name : Setting.app_title) + ": " + (@query.new_record? ? l(:label_changes_details) : @query.name)
|
|
|
|
|
render :layout => false, :content_type => 'application/atom+xml'
|
|
|
|
@ -72,9 +71,9 @@ class JournalsController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
# Replaces pre blocks with [...]
|
|
|
|
|
text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
|
|
|
|
|
@content = "> #{ll(Setting.default_language, :text_user_wrote, user)}\n> "
|
|
|
|
|
@content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
|
|
|
|
# @content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content
|
|
|
|
|
@content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n"
|
|
|
|
|
@content << text.gsub(/(\r?\n|\r\n?)/, "\n ") + "\n"
|
|
|
|
|
@content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content << "</blockquote>"
|
|
|
|
|
@id = user.id
|
|
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
|
render_404
|
|
|
|
|