From af59cd9ba7757b4630a29a4bbfc7c94c93a0ca0a Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 2 Jul 2015 08:43:41 +0800 Subject: [PATCH 1/3] =?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; From 05eeb27de84b8d4a21cbd0f125e266f9c04353e6 Mon Sep 17 00:00:00 2001 From: zhangshenjerry <1375181337@qq.com> Date: Thu, 2 Jul 2015 15:28:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E7=9A=84=E6=94=B6?= =?UTF-8?q?=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/add_score_reply.js.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/student_work/add_score_reply.js.erb b/app/views/student_work/add_score_reply.js.erb index 2c6f1c9bf..28704630f 100644 --- a/app/views/student_work/add_score_reply.js.erb +++ b/app/views/student_work/add_score_reply.js.erb @@ -1,6 +1,7 @@ $("#add_score_reply_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'add_score_reply', :locals => {:score => @score}) %>"); <% if @status && @status == 1%> $("#replay_histroy_<%= @score.id%>").prepend("<%= escape_javascript(render :partial => 'jour_replay', :locals => {:jour => @jour}) %>"); + $("#add_score_reply_<%= @score.id%>").hide(); <% else%> alert("回复内容不能为空"); <% end%> \ No newline at end of file From 448cedc8427481e82a4469d79444dff247b81eef Mon Sep 17 00:00:00 2001 From: zhangshenjerry <1375181337@qq.com> Date: Thu, 2 Jul 2015 15:30:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E7=9A=84=E6=94=B6?= =?UTF-8?q?=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/courses.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 0bd28bea7..f6cb6199b 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -681,7 +681,9 @@ input#score{ width:40px;} a.about_me{text-align:center;font-size:16px; color:#64bdd9; margin:10px 0 0 10px;} a:hover.about_me{ color:#0781b4;} - +.mb5 li{width:200px;word-wrap: break-word; + word-break: normal; +}