diff --git a/app/views/layouts/base_library.html.erb b/app/views/layouts/base_library.html.erb
new file mode 100644
index 00000000..3eceefb6
--- /dev/null
+++ b/app/views/layouts/base_library.html.erb
@@ -0,0 +1,71 @@
+
+
+
+
+
+ <%= h html_title %>
+
+
+
+ <%= csrf_meta_tag %>
+ <%= favicon %>
+ <%= javascript_heads %>
+ <%= heads_for_theme %>
+ <%= call_hook :view_layouts_base_html_head %>
+ <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'css/common', 'css/public', 'css/ketang', 'css/structure', 'prettify', 'css/courses', 'css/popup', 'css/syllabus', 'css/moduel', 'css/font-awesome', 'css/contest', 'css/font-awesome', 'css/edu-class', 'css/edu-popup', 'educoder/magic-check', 'css/edu-common', "css/edu-public", 'educoder/edu-main', 'educoder/edu-all' %>
+ <%= javascript_include_tag "avatars", "header", "attachments", 'prettify', "edu/application", 'jquery.datetimepicker.js', 'educoder/edu_application', 'educoder/edu_file' %>
+ <%= javascript_include_tag "/codemirror/lib/codemirror", "/codemirror/mode/javascript/javascript", "/codemirror/addon/hint/show-hint", "/codemirror/addon/hint/javascript-hint", "/codemirror/addon/selection/active-line", "/codemirror/addon/lint/javascript-lint", "/codemirror/addon/lint/css-lint", "/codemirror/addon/lint/lint", "/codemirror/addon/lint/json-lint", "/editormd/lib/codemirror/addon/lint/css-lint" %>
+ <%= stylesheet_link_tag "/codemirror/lib/codemirror" %>
+ <%= stylesheet_link_tag '/editormd/css/editormd' %>
+ <%= javascript_include_tag '/editormd/editormd', '/editormd/lib/marked.min.js', '/editormd/lib/prettify.min.js', '/editormd/lib/raphael.min.js', '/editormd/lib/underscore.min.js', '/editormd/lib/sequence-diagram.min.js',
+ '/editormd/lib/flowchart.min.js', '/editormd/lib/jquery.flowchart.min.js', '/editormd/editormd.js' %>
+ <%= yield :header_tags -%>
+
+
+
+
+
+
+
+
+
+
+ <%= yield %>
+
+ <%= render :partial => 'users/returnTop_btn' %>
+
+
+ <%#= render :partial => 'layouts/public_left_info' %>
+ <%= render :partial => 'layouts/footer' %>
+
+ <%#= render :partial => 'layouts/new_feedback' %>
+
+
+ <%= l(:label_loading) %>
+
+
+
+
+ <%= call_hook :view_layouts_base_body_bottom %>
+
+
+
+
\ No newline at end of file
diff --git a/app/views/libraries/_form.html.erb b/app/views/libraries/_form.html.erb
new file mode 100644
index 00000000..6d4af4b3
--- /dev/null
+++ b/app/views/libraries/_form.html.erb
@@ -0,0 +1,115 @@
+
上传文档
+
+
+
\ No newline at end of file
diff --git a/app/views/libraries/_library_list.html.erb b/app/views/libraries/_library_list.html.erb
new file mode 100644
index 00000000..e147e237
--- /dev/null
+++ b/app/views/libraries/_library_list.html.erb
@@ -0,0 +1,28 @@
+
+ <% if @libraries.present? %>
+ <% @libraries.each do |library| %>
+
+
+
+
<%= link_to library.title, library_path(library) %>
+
+ <%= link_to library.user.show_real_name, user_path(library.user) %>
+ <%= library.visited_count || 0 %> 浏览
+ 发布时间:<%= library.published_at.try(:strftime, '%Y-%m-%d %H:%M') %>
+
+
+
+ <% end %>
+ <% else %>
+ <%= render :partial => "welcome/no_data" %>
+ <% end %>
+
+
+
+
+
+ <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
+
+
+
+
\ No newline at end of file
diff --git a/app/views/libraries/edit.html.erb b/app/views/libraries/edit.html.erb
new file mode 100644
index 00000000..e258e1c1
--- /dev/null
+++ b/app/views/libraries/edit.html.erb
@@ -0,0 +1,8 @@
+
+
+ <%= link_to '文库', libraries_path, class: 'color-grey-9' %> >
+ 编辑
+
+
+ <%= render partial: 'form' %>
+
\ No newline at end of file
diff --git a/app/views/libraries/index.html.erb b/app/views/libraries/index.html.erb
index f79227f6..98e80cb0 100644
--- a/app/views/libraries/index.html.erb
+++ b/app/views/libraries/index.html.erb
@@ -2,60 +2,50 @@
文库
- 新建
+ <%= link_to '新建', new_library_path, class: 'fr color-blue font-16 mt3' %>
- 全部
- 我的
+
+ <%= link_to '全部', libraries_path(search: params[:search]), remote: true %>
+
+
+ <%= link_to '我的', libraries_path(search: params[:search], type: 'mine'), remote: true %>
+
-
-
-
-
-
-
-
-
软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格
-
- 张莉
- 188 浏览
- 发布时间:2018-05-15 15:45
-
-
-
-
-
-
-
软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格
-
- 张莉
- 188 浏览
- 发布时间:2018-05-15 15:45
-
+
-
-
-
-
-
软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格软件项目的开发流程视频及其需求规格
-
- 张莉
- 188 浏览
- 发布时间:2018-05-15 15:45
-
-
-
+
-
-
+
+ <%= render partial: 'library_list' %>
\ No newline at end of file
diff --git a/app/views/libraries/index.js.erb b/app/views/libraries/index.js.erb
new file mode 100644
index 00000000..78d48f8f
--- /dev/null
+++ b/app/views/libraries/index.js.erb
@@ -0,0 +1,3 @@
+$('input[name="type"]').val('<%= params[:type].to_s %>');
+$('#search_name').val('<%= params[:search].to_s %>');
+$('.library-list-container').html('<%= j render(partial: 'library_list') %>')
\ No newline at end of file
diff --git a/app/views/libraries/new.html.erb b/app/views/libraries/new.html.erb
index e5cf8ef9..987951d3 100644
--- a/app/views/libraries/new.html.erb
+++ b/app/views/libraries/new.html.erb
@@ -1,81 +1,8 @@
-<%= javascript_include_tag "/codemirror/lib/codemirror", "/codemirror/mode/javascript/javascript", "/codemirror/addon/hint/show-hint", "/codemirror/addon/hint/javascript-hint", "/codemirror/addon/selection/active-line", "/codemirror/addon/lint/javascript-lint", "/codemirror/addon/lint/css-lint", "/codemirror/addon/lint/lint", "/codemirror/addon/lint/json-lint", "/editormd/lib/codemirror/addon/lint/css-lint" %>
-<%= stylesheet_link_tag "/codemirror/lib/codemirror" %>
-<%= stylesheet_link_tag '/editormd/css/editormd' %>
-<%= javascript_include_tag '/editormd/editormd' %>
- 胡莎莎 >
- 文库 >
+ <%= link_to '文库', libraries_path, class: 'color-grey-9' %> >
新建
-
上传文档
-
-
-
- 标题
-
- 简明扼要介绍文档&视频所包含的主要的内容
-
-
- <%= render :partial => 'attachments/from_libraries', :locals => {:container => @homework} %>
-
-
-
-
-
审核说明
-
- 平台管理员将对每天新上传的文档进行审核,审核通过的文档将公开显示,否则将私有化或移除
-
-
-
-
温馨提示
-
- 1.请勿上传已设置加密或只读的文档资源
- 2.可以上传教学积累和撰写的文档资料,如教学案例、总结、心得等,上传支持的文件最大容量:100MB
- 3.上传涉及侵权内容的文档将会被移除。
- 4.为营造绿色网络环境,严禁上传违反国家关于互联网相关规定的内容
- 5.Chrome,Firefox,Safari,IE11及以上版本浏览器上传!
-
-
-
-
-
\ No newline at end of file
+ <%= render partial: 'form' %>
+
\ No newline at end of file
diff --git a/app/views/libraries/publish.html.erb b/app/views/libraries/publish_success.html.erb
similarity index 63%
rename from app/views/libraries/publish.html.erb
rename to app/views/libraries/publish_success.html.erb
index 1c5a718c..372053e6 100644
--- a/app/views/libraries/publish.html.erb
+++ b/app/views/libraries/publish_success.html.erb
@@ -1,4 +1,3 @@
-