From d940f957ecd88e19a45aa39a6544a1f8a8637147 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 26 Aug 2016 18:36:59 +0800 Subject: [PATCH 1/4] =?UTF-8?q?css=E9=97=AE=E9=A2=98=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/css/public.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/stylesheets/css/public.css b/public/stylesheets/css/public.css index daae81b56..378fb3ba9 100644 --- a/public/stylesheets/css/public.css +++ b/public/stylesheets/css/public.css @@ -100,7 +100,7 @@ a.sendButtonBlue:hover {color:#ffffff;} a.resourcesTypeAll {background:url(../images/homepage_icon.png) -180px -89px no-repeat; padding-left:23px;} a.resourcesTypeAtt {background:url(../images/homepage_icon.png) -180px -49px no-repeat; padding-left:23px;} a.resourcesTypeUser {background:url(../images/homepage_icon.png) -178px -453px no-repeat; padding-left:23px;} -.resourcesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-90px; font-size:12px; color:#888888; display:none; line-height:2;} +.resourcesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-90px; font-size:12px; color:#888888; display:none; line-height:2; z-index:999;} /*.resourcesUploadBox {float:right; width:103px; height:34px; background-color:#64bdd9; line-height:34px; vertical-align:middle; text-align:center; margin-left:12px;}*/ /*.resourcesUploadBox:hover {background-color:#0781b4;}*/ @@ -1416,9 +1416,9 @@ a:hover.comment_ding_link{ color:#269ac9;} border:1px solid #fcd9b4; height:34px; } -a.syllabusbox_a_blue{ - color:#3b94d6 !important; - +a.syllabusbox_a_blue { + color: #3b94d6 !important; +} .icons_tishi{ width: 110px; From 16dfae44153952352ae1ed2d404dce4d4ee7023b Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 26 Aug 2016 18:47:17 +0800 Subject: [PATCH 2/4] 0 --- app/controllers/attachments_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index fa2c87f8c..7ec532d79 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -202,6 +202,11 @@ class AttachmentsController < ApplicationController end @attachment.save @newfiledense = filedense + end + if @project + + elsif @course + end respond_to do |format| format.js From 5237d9664fb8e5e95269bb68852d079b4e5d9623 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 26 Aug 2016 18:52:20 +0800 Subject: [PATCH 3/4] css for avatar --- app/views/quality_analysis/_show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/quality_analysis/_show.html.erb b/app/views/quality_analysis/_show.html.erb index 2fda1e727..0ec0873ce 100644 --- a/app/views/quality_analysis/_show.html.erb +++ b/app/views/quality_analysis/_show.html.erb @@ -144,7 +144,7 @@
  • - <%=link_to image_tag(url_to_avatar(user), :width => "50", :height => "30"), user_path(user), :class => "image-cir", :target => '_blank' %> + <%=link_to image_tag(url_to_avatar(user), :width => "50", :height => "50", :class => "image-cir"), user_path(user), :target => '_blank' %>
  • From 8c4f943f83bde0db42c2c2d2ec95fd2bf5f66922 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 26 Aug 2016 19:33:18 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=8E=89=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/files_controller.rb | 4 ++-- app/views/files/_course_file.html.erb | 23 ++++++++++---------- app/views/files/_project_file.html.erb | 23 ++++++++++---------- app/views/files/search_tag_attachment.js.erb | 2 +- app/views/layouts/base_courses.html.erb | 4 ++-- 5 files changed, 29 insertions(+), 27 deletions(-) diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 70bce9566..988768414 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -325,7 +325,7 @@ class FilesController < ApplicationController @containers = [ Project.includes(:attachments).reorder(sort).find(@project.id)] show_attachments @containers - get_attachment_for_tip(@all_attachments) + # get_attachment_for_tip(@all_attachments) @tag_list = attachment_tag_list @all_attachments @@ -378,7 +378,7 @@ class FilesController < ApplicationController @containers = [ Course.includes(:attachments).reorder(sort).find(@course.id)] show_attachments @containers - get_attachment_for_tip(@all_attachments) + # get_attachment_for_tip(@all_attachments) @tag_list = attachment_tag_list @all_attachments diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index 5291c2d06..b5a15bc1f 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -115,21 +115,22 @@
    -

    - <%= render :partial => "files/tip_attachment_count" %> + + + +

    共有 <%= @all_attachments.count%> 个资源

    +

    + <%= render :partial => 'course_file_filter_order', :locals => {:remote => @is_remote, :sort => @sort, :order => @order} %>

    -

    - <%= render :partial => 'course_file_filter_order', :locals => {:remote => @is_remote, :sort => @sort, :order => @order} %> -

    -
    - - -

    私有资源:
    仅对本班级成员可见

    -

    公共资源:
    对所有用户可见

    -
    + + + + + +
    <%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %> diff --git a/app/views/files/_project_file.html.erb b/app/views/files/_project_file.html.erb index ebda40e6e..7504fbecb 100644 --- a/app/views/files/_project_file.html.erb +++ b/app/views/files/_project_file.html.erb @@ -85,9 +85,10 @@
    -

    - <%= render :partial => "files/tip_attachment_count" %> -

    + + + +

    共有 <%= @all_attachments.count%> 个资源

    <% if @order == "asc" %> 按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /  @@ -102,14 +103,14 @@

    - <% if !User.current.member_of?(@project) && show_attachment_tip(@project.id, "Project") %> -
    - - -

    私有资源:
    仅对本项目成员可见

    -

    公共资源:
    对所有用户可见

    -
    - <% end %> + <%# if !User.current.member_of?(@project) && show_attachment_tip(@project.id, "Project") %> + + + + + + + <%# end %>
    <%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %> diff --git a/app/views/files/search_tag_attachment.js.erb b/app/views/files/search_tag_attachment.js.erb index 8aaff5aa5..11d4ad297 100644 --- a/app/views/files/search_tag_attachment.js.erb +++ b/app/views/files/search_tag_attachment.js.erb @@ -3,6 +3,6 @@ $("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>'); <% else %> $("#resource_list").html("<%= escape_javascript( render :partial => 'files/project_file',:locals => {project:@project, all_attachments:@all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments}) %>"); - $("#tip_attachment_count").html("<%= escape_javascript( render :partial => 'files/tip_attachment_count') %>"); +// $("#tip_attachment_count").html("<%#= escape_javascript( render :partial => 'files/tip_attachment_count') %>"); $("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>'); <% end %> diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index ed54fcdce..472a18b02 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -1,6 +1,6 @@ <%# course_model %> -<%# course_file_num = visable_attachemnts_incourse(@course).count%> -<% course_file_num = Attachment.where(:container_type => "Course", :container_id => @course.id).count %> +<% course_file_num = visable_attachemnts_incourse(@course).count%> +<%# course_file_num = Attachment.where(:container_type => "Course", :container_id => @course.id).count %> <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %> <% homework_num = visable_course_homework @course %>