Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
cxt 2016-08-26 19:39:47 +08:00
commit 5dab473eb1
8 changed files with 39 additions and 32 deletions

View File

@ -202,6 +202,11 @@ class AttachmentsController < ApplicationController
end
@attachment.save
@newfiledense = filedense
end
if @project
elsif @course
end
respond_to do |format|
format.js

View File

@ -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

View File

@ -115,21 +115,22 @@
</div>
<div class="cl"></div>
<div class="re_con_top">
<p class="f_l fontBlue f_b f_14" id="tip_attachment_count">
<%= render :partial => "files/tip_attachment_count" %>
</p>
<!--<p class="f_l fontBlue f_b f_14" id="tip_attachment_count">-->
<!--<%#= render :partial => "files/tip_attachment_count" %>-->
<!--</p>-->
<p class="f_l fontBlue f_b f_14">共有&nbsp;<span id="attachment_count"><%= @all_attachments.count%></span>&nbsp;个资源</p>
<p class="f_r" style="color: #808080" id="course_filter_order">
<%= render :partial => 'course_file_filter_order', :locals => {:remote => @is_remote, :sort => @sort, :order => @order} %>
</p>
</div>
</div>
<div class="cl"></div>
<div class="resource_tip_box fontGrey2">
<em></em>
<span></span>
<p class="mb5">私有资源:<br/>仅对本班级成员可见</p>
<p>公共资源:<br/>对所有用户可见</p>
</div>
<!--<div class="resource_tip_box fontGrey2">-->
<!--<em></em>-->
<!--<span></span>-->
<!--<p class="mb5">私有资源:<br/>仅对本班级成员可见</p>-->
<!--<p>公共资源:<br/>对所有用户可见</p>-->
<!--</div>-->
</div>
<div id="course_list">
<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %>

View File

@ -85,9 +85,10 @@
</div>
<div class="cl"></div>
<div class="re_con_top">
<p class="f_l fontBlue f_b f_14" id="tip_attachment_count">
<%= render :partial => "files/tip_attachment_count" %>
</p>
<!--<p class="f_l fontBlue f_b f_14" id="tip_attachment_count">-->
<!--<%#= render :partial => "files/tip_attachment_count" %>-->
<!--</p>-->
<p class="f_l fontBlue f_b f_14">共有&nbsp;<span id="attachment_count"><%= @all_attachments.count%></span>&nbsp;个资源</p>
<p class="f_r" style="color: #808080">
<% if @order == "asc" %>
按&nbsp;<%= 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"} %>&nbsp;/&nbsp;
@ -102,14 +103,14 @@
</div>
</div>
<div class="cl"></div>
<% if !User.current.member_of?(@project) && show_attachment_tip(@project.id, "Project") %>
<div class="resource_tip_box fontGrey2">
<em></em>
<span></span>
<p class="mb5">私有资源:<br/>仅对本项目成员可见</p>
<p>公共资源:<br/>对所有用户可见</p>
</div>
<% end %>
<%# if !User.current.member_of?(@project) && show_attachment_tip(@project.id, "Project") %>
<!--<div class="resource_tip_box fontGrey2">-->
<!--<em></em>-->
<!--<span></span>-->
<!--<p class="mb5">私有资源:<br/>仅对本项目成员可见</p>-->
<!--<p>公共资源:<br/>对所有用户可见</p>-->
<!--</div>-->
<%# end %>
</div>
<div id="course_list">
<%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %>

View File

@ -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 %>

View File

@ -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 %>

View File

@ -144,7 +144,7 @@
<ul class="contribute-list">
<li class="fl fontGrey2 contribute-list-avatar contribute-list-height">
<div class="mt8">
<%=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' %>
<p class="fontGrey2 hidden"><%=link_to (user.id == 2 ? author_info[:email] : user.show_name), user_path(user) %></p>
</div>
</li>

View File

@ -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;}*/
@ -1418,7 +1418,7 @@ a:hover.comment_ding_link{ color:#269ac9;}
}
a.syllabusbox_a_blue {
color: #3b94d6 !important;
}
.icons_tishi{
width: 110px;