diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 8b1e344ed..67d47dc26 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -2223,13 +2223,13 @@ class UsersController < ApplicationController
@attachments = get_public_resources(user_course_ids, user_project_ids)
end
@type = params[:type]
- @limit = 25
+ @limit = 10
@is_remote = true
@atta_count = @attachments.count
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
@offset ||= @atta_pages.offset
#@curse_attachments_all = @all_attachments[@offset, @limit]
- @attachments = paginateHelper @attachments,25
+ @attachments = paginateHelper @attachments,10
respond_to do |format|
format.js
format.html {render :layout => 'new_base'}
diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb
index cf91b7814..545680505 100644
--- a/app/views/files/_course_file.html.erb
+++ b/app/views/files/_course_file.html.erb
@@ -93,7 +93,8 @@
<%= submit_tag "课内搜索", :class => "blueBtn mr5 fl",:name => "incourse",:id => "incourse" %>
<%= submit_tag "全站搜索", :class => "blueBtn mr5 fl",:name => "insite",:id => "insite" %>
<% if is_course_teacher(User.current,@course) || (@course.publish_resource==1 && User.current.member_of_course?(@course) ) %>
-
+
+ <%= link_to("导入资源", import_resources_user_path(User.current, :type => 6, :course => true), :class => "blue-btn fr mr5", :remote => true) %>
<% end %>
<% end %>
diff --git a/app/views/files/_project_file.html.erb b/app/views/files/_project_file.html.erb
index 49f31355d..0725d9270 100644
--- a/app/views/files/_project_file.html.erb
+++ b/app/views/files/_project_file.html.erb
@@ -66,7 +66,7 @@
<% if User.current.member_of?(@project) %>
- <%= link_to("导入资源", import_resources_user_path(User.current), :class => "blue-btn fr mr5", :remote => true) %>
+ <%= link_to("导入资源", import_resources_user_path(User.current, :type => 6, :project => true), :class => "blue-btn fr mr5", :remote => true) %>
<% end %>
<% end %>
diff --git a/app/views/files/_subfield_files.html.erb b/app/views/files/_subfield_files.html.erb
index 1de0e8dc2..3e98b2ee5 100644
--- a/app/views/files/_subfield_files.html.erb
+++ b/app/views/files/_subfield_files.html.erb
@@ -42,6 +42,7 @@
<%= submit_tag "栏目内搜索", :class => "blueBtn mr5 fl",:style => 'width:72px;',:name => "inorg_subfield",:id => "inorg_subfield", :onmouseover => "presscss('inorg_subfield')",:onmouseout =>"buttoncss()" %>
<%= submit_tag "全站搜索", :class => "blueBtn mr5 fl",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %>
+ <%= link_to("导入资源", import_resources_user_path(User.current, :type => 6, :subfield_file => true), :class => "blue-btn fr mr5", :remote => true) %>
<%#= link_to "上传资源",subfield_upload_file_org_subfield_files_path(@org_subfield.id, :in_org => 1),:method => "post",:class=>"blueBtn fr mr5",:remote => true %>
<% end %>
diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb
index 0ab5c2876..be8c4bbba 100644
--- a/app/views/layouts/_logined_header.html.erb
+++ b/app/views/layouts/_logined_header.html.erb
@@ -8,7 +8,7 @@
<%= link_to "首页",user_activities_path(User.current.id), :class => "c_white f16 db p10", :title => "回到个人首页"%>
+ 资源库
diff --git a/app/views/users/_import_resource_info.html.erb b/app/views/users/_import_resource_info.html.erb
index 63a411acb..dd82e9485 100644
--- a/app/views/users/_import_resource_info.html.erb
+++ b/app/views/users/_import_resource_info.html.erb
@@ -1,271 +1,55 @@
-<%#= javascript_include_tag 'bootstrap'%>
-<%#= stylesheet_link_tag 'project' %>
-<%#= stylesheet_link_tag 'leftside' %>
-<%#= javascript_include_tag 'attachments'%>
-
-
+
+
选用资源库中的资源
+
+
公共资源
+
我的资源
+ <%= form_tag( url_for(:controller => 'users', :action => 'resource_search', :id => User.current.id),
+ :remote => true , :method => 'get', :id => 'resource_search_form') do %>
+
+ <%= hidden_field_tag(:type,type.nil? ? 1 : type) %>
+ <% end %>
+
-
-
- <%= form_tag( url_for(:controller => 'users', :action => 'resource_search', :id => User.current.id),
- :remote => true , :method => 'get', :class => 'resourcesSearchloadBox mt10', :id => 'resource_search_form') do %>
-
- <%= hidden_field_tag(:type,type.nil? ? 1 : type) %>
- <%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :style => 'border-style:none' %>
-
- <% end %>
-
+
+
+ - 资源名称
+ - 类别
+ - 大小
+ - 上传者
+ - 上传时间
+
+ <% @attachments.each do |attach| %>
+
+ <% end %>
-
-
- -
- - 资源名称
- - 上传时间
- - 上传者
- - 类别
- - 大小
- - 资源来源
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/views/users/import_resources.js.erb b/app/views/users/import_resources.js.erb
index ce5362bcb..e3f640931 100644
--- a/app/views/users/import_resources.js.erb
+++ b/app/views/users/import_resources.js.erb
@@ -1,8 +1,12 @@
$('#ajax-modal').html('<%= escape_javascript( render :partial => 'users/import_resource_info', :locals => {:user => User.current, :type => 1} ) %>');
showModal('ajax-modal', '615px');
$('#ajax-modal').siblings().remove();
-$('#ajax-modal').before("

");
-$('#ajax-modal').parent().css("top","10%").css("left","36%").css("border","3px solid #269ac9");
+$('#ajax-modal').before("

");
+<% if params[:project] %>
+$('#ajax-modal').parent().css("top","10%").css("left","34%").css("border","3px solid #269ac9");
+<% else %>
+$('#ajax-modal').parent().css("top","20%").css("left","42%").css("border","3px solid #269ac9");
+<% end %>
$('#ajax-modal').parent().addClass("popbox_polls");
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 3840fd892..a0bca31b0 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -1263,3 +1263,25 @@ div.disable_link {background-color: #c1c1c1 !important;}
.mh18 {max-height: 18px;}
.relatePWrap{max-height: 210px;overflow:hidden;}/*160114课程推荐*/
.courseR {width:220px; padding:10px; background-color:#ffffff; margin-top:10px;}
+
+/*导入题库样式*/
+.popupWrap {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
+.subjectList {width:585px;}
+.subjectDetail {width:385px;}
+a.subjectChoose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
+a.chooseActive {background-color:#269ac9; color:#ffffff;}
+.subjectBanner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
+.subjectBanner li {height:40px; line-height:40px; vertical-align:middle;}
+.subjectName {width:270px; padding-left:10px; padding-right:10px;}
+.subjectPublisher {width:80px; text-align:center;}
+.subjectDate {width:80px; text-align:center;}
+.subjectRow {width:585px; height:40px; color:#7a7a7a; font-size:12px;}
+.subjectRow li {height:40px; line-height:40px; vertical-align:middle;}
+.subjectSearch {border:1px solid #dddddd; height:32px; width:250px;}
+.subjectInfo {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
+.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:460px; overflow-y:auto;}
+.subjectIntro {color:#585858; line-height:18px; font-size:12px;}
+.subjectContent {color:#888888; line-height:18px; font-size:12px;}
+.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
+.subjectType {width:70px; text-align:center;}
+.subjectCount {width:65px; text-align:center;}
diff --git a/public/stylesheets/org.css b/public/stylesheets/org.css
index aa2d0be18..eaabcafa6 100644
--- a/public/stylesheets/org.css
+++ b/public/stylesheets/org.css
@@ -117,4 +117,33 @@ div.flash {margin-top :0px !important}
.maxh360 {max-height: 810px;}
.lh18 { line-height: 18px;}
-a.link_file_a2{ background:url(../images/pic_file.png) 0 -15px no-repeat; padding-left: 20px;}
\ No newline at end of file
+a.link_file_a2{ background:url(../images/pic_file.png) 0 -15px no-repeat; padding-left: 20px;}
+/*导入题库样式*/
+.popupWrap {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
+.subjectList {width:585px;}
+.subjectDetail {width:385px;}
+a.subjectChoose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
+a.chooseActive {background-color:#269ac9; color:#ffffff;}
+.subjectBanner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
+.subjectBanner li {height:40px; line-height:40px; vertical-align:middle;}
+.subjectName {width:270px; padding-left:10px; padding-right:10px;}
+.subjectPublisher {width:80px; text-align:center;}
+.subjectDate {width:80px; text-align:center;}
+.subjectRow {width:585px; height:40px; color:#7a7a7a; font-size:12px;}
+.subjectRow li {height:40px; line-height:40px; vertical-align:middle;}
+.subjectSearch {border:1px solid #dddddd; height:32px; width:250px;}
+.subjectInfo {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
+.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:460px; overflow-y:auto;}
+.subjectIntro {color:#585858; line-height:18px; font-size:12px;}
+.subjectContent {color:#888888; line-height:18px; font-size:12px;}
+.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
+.subjectType {width:70px; text-align:center;}
+.subjectCount {width:65px; text-align:center;}
+a.blue-btn {
+ padding: 4px 7px;
+ color: #FFF;
+ border: none;
+ background-color: #269ac9;
+ cursor: pointer;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index 1dc5556d3..7e1ae654f 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -1177,4 +1177,26 @@ div.disable_link {background-color: #c1c1c1 !important;}
.number-line-old {background-color:#ffdddd; border-color:#f1c0c0;}
.code-line-new {background-color:#eaffea;}
.number-line-new {background-color:#dbffdb; border-color:#c1e9c1;}
-.branch-label {padding-right: 5px; border-radius:2px; color:#888888; display:inline-block; background-color:#f8fafc;}
+.branch-label {padding-right: 5px; border-radius:2px; color:#888888; display:inline-block; background-color:#f8fafc;}
+
+/*导入题库样式*/
+.popupWrap {border:3px solid #269ac9; padding:15px; background-color:#ffffff; position:relative; z-index:1000;}
+.subjectList {width:585px;}
+.subjectDetail {width:385px;}
+a.subjectChoose {padding:8px 20px; background-color:#f1f1f1; color:#888888;}
+a.chooseActive {background-color:#269ac9; color:#ffffff;}
+.subjectBanner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;}
+.subjectBanner li {height:40px; line-height:40px; vertical-align:middle;}
+.subjectName {width:270px; padding-left:10px; padding-right:10px;}
+.subjectPublisher {width:80px; text-align:center;}
+.subjectDate {width:80px; text-align:center;}
+.subjectRow {width:585px; height:40px; color:#7a7a7a; font-size:12px;}
+.subjectRow li {height:40px; line-height:40px; vertical-align:middle;}
+.subjectSearch {border:1px solid #dddddd; height:32px; width:250px;}
+.subjectInfo {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;}
+.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:460px; overflow-y:auto;}
+.subjectIntro {color:#585858; line-height:18px; font-size:12px;}
+.subjectContent {color:#888888; line-height:18px; font-size:12px;}
+.popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}
+.subjectType {width:70px; text-align:center;}
+.subjectCount {width:65px; text-align:center;}