From 7359081fd23df5e21e57c9c52ca6909661e17b77 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 19 Oct 2015 13:58:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E5=90=8E=E5=AD=A6=E7=94=9F=E4=B8=8D=E5=8F=AF=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=BD=9C=E5=93=81=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_show.html.erb | 2 +- app/views/student_work/_work_attachments_status.html.erb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 app/views/student_work/_work_attachments_status.html.erb diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb index 2aa14be71..cfc4129a8 100644 --- a/app/views/student_work/_show.html.erb +++ b/app/views/student_work/_show.html.erb @@ -45,7 +45,7 @@ 尚未提交附件 <% else%>
- <%= render :partial => 'work_attachments', :locals => {:attachments => @work.attachments} %> + <%= render :partial => 'work_attachments_status', :locals => {:attachments => @work.attachments, :status => @homework.homework_detail_manual.comment_status} %>
<% end%>
diff --git a/app/views/student_work/_work_attachments_status.html.erb b/app/views/student_work/_work_attachments_status.html.erb new file mode 100644 index 000000000..e8d4f144b --- /dev/null +++ b/app/views/student_work/_work_attachments_status.html.erb @@ -0,0 +1,8 @@ +<% 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)) if attachment.id && User.current == attachment.author && status != 2 %> + (<%= number_to_human_size attachment.filesize %>) +
+
+<% end -%> \ No newline at end of file From cf0fd2022d8c85954227e6a83367d80755afb703 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 19 Oct 2015 14:58:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=8A=A8=E6=80=81=20=20=20=E9=A1=B9=E7=9B=AE=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=8A=A8=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 4 +-- app/views/users/_project_create.html.erb | 31 +++++++++++++++-------- app/views/users/_user_activities.html.erb | 10 +++++++- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 90fdbe837..d25dd6fd2 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -881,8 +881,8 @@ class UsersController < ApplicationController @page = params[:page] ? params[:page].to_i + 1 : 0 user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")" user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")" - course_types = "('Message','News','HomeworkCommon','Poll')" - project_types = "('Message','Issue')" + course_types = "('Message','News','HomeworkCommon','Poll','Course')" + project_types = "('Message','Issue','ProjectCreateInfo')" principal_types = "JournalsForMessage" if params[:type].present? case params[:type] diff --git a/app/views/users/_project_create.html.erb b/app/views/users/_project_create.html.erb index d07cb4a2d..8e3b5a5dc 100644 --- a/app/views/users/_project_create.html.erb +++ b/app/views/users/_project_create.html.erb @@ -1,18 +1,27 @@ +<% project = Project.find(activity.act_id) %> +<% user = User.find(project.user_id)%>
-
+
- 用户头像
+ <%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_path(user), :alt => "用户头像" %> +
- - -
- -
截止时间:2015-08-20
+
+ <% if user.try(:realname) == ' ' %> + <%= link_to user, user_path(user), :class => "newsBlue mr15" %> + <% else %> + <%= link_to user.try(:realname), user_path(user), :class => "newsBlue mr15" %> + <% end %> + TO + <%= link_to project.to_s+" | 项目", project_path(project.id,:host=>Setting.host_course), :class => "newsBlue ml15" %> +
+
+ <%= link_to project.name, project_path(project.id,:host=>Setting.host_course), :class => "postGrey" %> +
+
+ 创建时间:<%= format_time(project.created_on) %>
-
(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
-