From af59cd9ba7757b4630a29a4bbfc7c94c93a0ca0a Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 08:43:41 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E9=A1=B9=E7=9B=AEissue=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E4=B8=BB=E8=B4=B4=E5=92=8C=E5=9B=9E=E5=B8=96=202?= =?UTF-8?q?=E3=80=81=E5=BC=95=E7=94=A8=E6=A8=A1=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/journals_controller.rb | 1 + app/models/mailer.rb | 2 +- app/views/issues/_edit.html.erb | 4 +++- app/views/issues/_history.html.erb | 8 +++++--- app/views/issues/show.html.erb | 3 +++ app/views/journals/new.js.erb | 6 +++--- 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index aa3a7e0ea..d8cd8eeec 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -74,6 +74,7 @@ class JournalsController < ApplicationController text = text.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]') @content = "> #{ll(Setting.default_language, :text_user_wrote, user)}\n> " @content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" + @content = "
" << @content @id = user.id rescue ActiveRecord::RecordNotFound render_404 diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 340559828..0d0b82752 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -186,7 +186,7 @@ class Mailer < ActionMailer::Base @course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT jfm.* from journals_for_messages jfm, members m, courses c where m.user_id = '#{user.id}' and c.id = m.course_id and jfm.jour_id = c.id and jfm.jour_type='Course' and (jfm.created_on between '#{date_from}' and '#{date_to}') order by created_on desc") - + @user_journal_messages = user.journals_for_messages.where("jour_type='Principal' and (created_on between '#{date_from}' and '#{date_to}')").order('created_on DESC') # 查询user在项目中留言(用户反馈) diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index f7594d000..444016db8 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -20,8 +20,10 @@ <%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %> <% end %> +
+
回复 - <%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %> + <%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb index 04c46ed39..a5b1661eb 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/_history.html.erb @@ -3,9 +3,9 @@
-
+
-
+
<%= journal.user %><%= format_time journal.created_on %>
@@ -20,7 +20,9 @@
<%= render_links_easy(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
-

<%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>

+

+ <%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %> +

diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 1bd956074..c008e78f2 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -109,6 +109,9 @@ <%= render :partial => 'edit' %>

+ + + <%= l(:button_submit) %> diff --git a/app/views/journals/new.js.erb b/app/views/journals/new.js.erb index ae2574595..d02568426 100644 --- a/app/views/journals/new.js.erb +++ b/app/views/journals/new.js.erb @@ -1,11 +1,11 @@ -$('#issue_notes').val("<%= raw escape_javascript(@content) %>"); +$('#journal_issue_note').html("<%= raw escape_javascript(@content.html_safe) %>"); +$("input[name='issue_quote_new']").val("<%= raw escape_javascript(@content.html_safe) %>"); <% # when quoting a private journal, check the private checkbox - if @journal && @journal.private_notes? + if @journal && @journal.private_notes? %> $('#issue_private_notes').attr('checked', true); <% end %> - showAndScrollTo("update", "notes"); $('#notes').scrollTop = $('#notes').scrollHeight - $('#notes').clientHeight;