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/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 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的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;
-