From 6ae7da99be343bac8ad87c2823b9bb359a8f7ebb Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 22 Jan 2016 18:33:43 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E5=B8=96=E5=AD=90=E3=80=81=E5=8D=9A?=
=?UTF-8?q?=E5=AE=A2=E3=80=81=E9=80=9A=E7=9F=A5=E3=80=81=E6=96=87=E7=AB=A0?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=8D=95=E8=AF=8D?=
=?UTF-8?q?=E6=8A=98=E8=A1=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/blog_comments/show.html.erb | 11 +++++++++--
app/views/courses/syllabus.html.erb | 11 +++++++++--
app/views/memos/show.html.erb | 11 +++++++++--
app/views/messages/_course_show.html.erb | 11 +++++++++--
app/views/messages/_org_subfield_show.html.erb | 11 +++++++++--
app/views/messages/_project_show.html.erb | 9 ++++++++-
app/views/news/_course_show.html.erb | 9 ++++++++-
app/views/news/_organization_show.html.erb | 9 ++++++++-
app/views/news/_project_show.html.erb | 9 ++++++++-
app/views/organizations/_show_org_document.html.erb | 11 +++++------
app/views/users/_project_news.html.erb | 3 ---
11 files changed, 82 insertions(+), 23 deletions(-)
diff --git a/app/views/blog_comments/show.html.erb b/app/views/blog_comments/show.html.erb
index 6f4397569..93041e1be 100644
--- a/app/views/blog_comments/show.html.erb
+++ b/app/views/blog_comments/show.html.erb
@@ -94,7 +94,7 @@
<%= format_time( @article.created_on)%>
-
+
<%= @article.content.html_safe%>
@@ -208,4 +208,11 @@
<% end %>
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/views/courses/syllabus.html.erb b/app/views/courses/syllabus.html.erb
index 9d20b5adb..c9d333e6d 100644
--- a/app/views/courses/syllabus.html.erb
+++ b/app/views/courses/syllabus.html.erb
@@ -94,7 +94,7 @@
<%= format_time( @article.created_on)%>
-
+
<%= @article.content.html_safe%>
@@ -214,4 +214,11 @@
<% end %>
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb
index b7cc1a0c2..3028f3369 100644
--- a/app/views/memos/show.html.erb
+++ b/app/views/memos/show.html.erb
@@ -74,7 +74,7 @@
<%= link_to @memo.author.name, user_path(@memo.author), :class => "linkBlue2", :target=> "_blank"%>
<%= format_date( @memo.created_at)%>
-
+
<%= @memo.content.html_safe%>
@@ -136,4 +136,11 @@
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb
index c760e686d..66d4bd0d0 100644
--- a/app/views/messages/_course_show.html.erb
+++ b/app/views/messages/_course_show.html.erb
@@ -80,7 +80,7 @@
<%= format_time( @topic.created_on)%>
-
+
<%= @topic.content.html_safe%>
@@ -168,4 +168,11 @@
<% end %>
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/views/messages/_org_subfield_show.html.erb b/app/views/messages/_org_subfield_show.html.erb
index 6d12fe960..f46e7d5ab 100644
--- a/app/views/messages/_org_subfield_show.html.erb
+++ b/app/views/messages/_org_subfield_show.html.erb
@@ -109,7 +109,7 @@
<%= format_time( @topic.created_on)%>
-
+
<%= @topic.content.html_safe%>
@@ -197,4 +197,11 @@
<% end %>
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb
index c98f2983e..187e1670e 100644
--- a/app/views/messages/_project_show.html.erb
+++ b/app/views/messages/_project_show.html.erb
@@ -135,7 +135,7 @@
<%= format_time( @topic.created_on)%>
-
+
<%= @topic.content.html_safe%>
@@ -225,3 +225,10 @@
+
diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb
index 767c11553..05a430d57 100644
--- a/app/views/news/_course_show.html.erb
+++ b/app/views/news/_course_show.html.erb
@@ -85,7 +85,7 @@
<%= format_time( @news.created_on)%>
-
+
<%= @news.description.html_safe%>
@@ -182,3 +182,10 @@
<% end %>
+
diff --git a/app/views/news/_organization_show.html.erb b/app/views/news/_organization_show.html.erb
index 3e608c177..3189b03bf 100644
--- a/app/views/news/_organization_show.html.erb
+++ b/app/views/news/_organization_show.html.erb
@@ -75,7 +75,7 @@
<%= format_time( @news.created_on)%>
-
+
<%= @news.description.html_safe%>
@@ -172,3 +172,10 @@
<% end %>
+
diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb
index 880bd0885..93fd1f10c 100644
--- a/app/views/news/_project_show.html.erb
+++ b/app/views/news/_project_show.html.erb
@@ -85,7 +85,7 @@
<%= format_time( @news.created_on)%>
-
+
<%= @news.description.html_safe%>
@@ -182,3 +182,10 @@
<% end %>
+
diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb
index d4b44a3d2..b29bac7d1 100644
--- a/app/views/organizations/_show_org_document.html.erb
+++ b/app/views/organizations/_show_org_document.html.erb
@@ -20,10 +20,12 @@
<% unless document.content.blank? %>
-
- <%= document.content.html_safe %>
-
+ <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>document.id, :content=>document.content} %>
<% end %>
+
+
+
+
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => document} %>
@@ -133,9 +135,6 @@
From c4a264f8a6864f5487d7d63945b3fa11dd7ddd98 Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 22 Jan 2016 18:48:50 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BD=9C=E5=93=81?=
=?UTF-8?q?=E6=97=B6=E7=9A=84=E9=99=84=E4=BB=B6=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/student_work/_work_edit_information.html.erb | 10 +++++++++-
app/views/student_work/_work_information.html.erb | 10 +++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/app/views/student_work/_work_edit_information.html.erb b/app/views/student_work/_work_edit_information.html.erb
index 38670d9e4..1934d15eb 100644
--- a/app/views/student_work/_work_edit_information.html.erb
+++ b/app/views/student_work/_work_edit_information.html.erb
@@ -13,7 +13,15 @@
<%= "无附件"%>
<% else %>
- <%= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
+ <% @student_work.attachments.each_with_index do |attachment,i| %>
+
+ <%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
+ <%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
+
(<%= number_to_human_size attachment.filesize %>)
+
+
+ <% end -%>
+ <%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
<% end %>
diff --git a/app/views/student_work/_work_information.html.erb b/app/views/student_work/_work_information.html.erb
index bc728ca71..d23f21c4d 100644
--- a/app/views/student_work/_work_information.html.erb
+++ b/app/views/student_work/_work_information.html.erb
@@ -13,7 +13,15 @@
<%= "无附件"%>
<% else %>
- <%= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
+ <% @student_work.attachments.each_with_index do |attachment,i| %>
+
+ <%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
+ <%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %>
+
(<%= number_to_human_size attachment.filesize %>)
+
+
+ <% end -%>
+ <%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %>
<% end %>
From 3de8687440d825a19086bdf5581298ba2c8ed9ee Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 22 Jan 2016 20:11:49 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E7=95=99=E8=A8=80=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E7=9A=84=E5=8A=A8=E6=80=81=E5=86=85=E5=AE=B9=E4=B8=8D=E7=94=9F?=
=?UTF-8?q?=E6=88=90=E9=93=BE=E6=8E=A5=EF=BC=8C=E7=95=99=E8=A8=80=E5=9B=9E?=
=?UTF-8?q?=E5=A4=8D=E7=9A=84=E6=A0=B7=E5=BC=8F=E6=9B=B4=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/words_controller.rb | 1 +
app/views/users/_user_activities.html.erb | 2 +-
.../users/_user_journalsformessage.html.erb | 26 +++++++++++++------
app/views/users/_user_jours_list.html.erb | 2 +-
app/views/words/create_reply.js.erb | 4 +--
5 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb
index 8115f3f91..d24427a9d 100644
--- a/app/controllers/words_controller.rb
+++ b/app/controllers/words_controller.rb
@@ -76,6 +76,7 @@ class WordsController < ApplicationController
@reply_type = params[:reply_type]
@user_activity_id = params[:user_activity_id]
@activity = JournalsForMessage.find(parent_id)
+ @is_activity = params[:is_activity]
}
end
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb
index 62752bdf5..d4169bc47 100644
--- a/app/views/users/_user_activities.html.erb
+++ b/app/views/users/_user_activities.html.erb
@@ -111,7 +111,7 @@
<% case user_activity.act_type.to_s %>
<% when 'JournalsForMessage' %>
<% unless act.private == 1 && (!User.current || (User.current && act.jour_id != User.current.id && act.user_id != User.current.id)) %>
- <%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
+ <%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_activity=>true} %>
<% end %>
<% end %>
<% end %>
diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb
index 609b1e35b..70cce2374 100644
--- a/app/views/users/_user_journalsformessage.html.erb
+++ b/app/views/users/_user_journalsformessage.html.erb
@@ -16,13 +16,22 @@
<% end %>
<% end %>
-
- <% if activity.parent %>
- <%= link_to activity.parent.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
- <% else %>
- <%= link_to activity.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
- <% end %>
-
+ <% if is_activity %>
+
+ <% if activity.parent %>
+ <%= link_to activity.parent.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
+ <% else %>
+ <%= link_to activity.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
+ <% end %>
+
+ <% else %>
+ <% if activity.parent %>
+ <% content = activity.parent.notes %>
+ <% else %>
+ <% content = activity.notes %>
+ <% end %>
+ <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %>
+ <% end %>
留言时间:<%= format_time(activity.created_on) %>
@@ -85,10 +94,10 @@
<%= comment.notes.html_safe %>
- <% end %>
+ <% end %>
<% end %>
@@ -104,6 +113,7 @@
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
<%= hidden_field_tag 'reply_type',params[:reply_type],:value =>'user' %>
+ <%= hidden_field_tag 'is_activity',params[:is_activity],:value =>is_activity %>
发送
diff --git a/app/views/users/_user_jours_list.html.erb b/app/views/users/_user_jours_list.html.erb
index cc5a589b5..6993a7e91 100644
--- a/app/views/users/_user_jours_list.html.erb
+++ b/app/views/users/_user_jours_list.html.erb
@@ -22,7 +22,7 @@
init_activity_KindEditor_data(<%= jour.id%>, null, "87%", "<%=jour.class.to_s%>");
});
- <%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id} %>
+ <%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id,:is_activity=>false} %>
<%#= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
<% end %>
<%end%>
diff --git a/app/views/words/create_reply.js.erb b/app/views/words/create_reply.js.erb
index ac56b69fc..8d6674845 100644
--- a/app/views/words/create_reply.js.erb
+++ b/app/views/words/create_reply.js.erb
@@ -1,9 +1,9 @@
<% if @save_succ %>
<% if @user_activity_id %>
<% if @reply_type == 'user' %>
- $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
+ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id,:is_activity=>@is_activity}) %>");
<% else %>
- $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
+ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id,:is_activity=>@is_activity}) %>");
<% end %>
init_activity_KindEditor_data('<%= @user_activity_id%>', "", "87%", "UserActivity");
<% else %>