班级资源的删除刷新
This commit is contained in:
parent
1f515d4ec5
commit
70aae10370
|
@ -61,6 +61,7 @@ class FilesController < ApplicationController
|
||||||
@sort = ""
|
@sort = ""
|
||||||
@order = ""
|
@order = ""
|
||||||
@is_remote = true
|
@is_remote = true
|
||||||
|
@curr_page = params[:page] ? params[:page].to_i : 1
|
||||||
@q = params[:name].strip
|
@q = params[:name].strip
|
||||||
if params[:sort]
|
if params[:sort]
|
||||||
order_by = params[:sort].split(":")
|
order_by = params[:sort].split(":")
|
||||||
|
@ -274,6 +275,7 @@ class FilesController < ApplicationController
|
||||||
@sort = ""
|
@sort = ""
|
||||||
@order = ""
|
@order = ""
|
||||||
@is_remote = false
|
@is_remote = false
|
||||||
|
@curr_page = params[:page] ? params[:page].to_i : 1
|
||||||
if params[:project_id]
|
if params[:project_id]
|
||||||
# 更新资源申请消息为已读
|
# 更新资源申请消息为已读
|
||||||
# ar_ids = ApplyResource.where("user_id =? and container_id =? and container_type =?", User.current.id, params[:project_id].to_i, "Project").map{|ar| ar.id}
|
# ar_ids = ApplyResource.where("user_id =? and container_id =? and container_type =?", User.current.id, params[:project_id].to_i, "Project").map{|ar| ar.id}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<script>
|
<script>
|
||||||
function attachment_fresh_for_destroy(){
|
function attachment_fresh_for_destroy(){
|
||||||
hideModal();
|
hideModal();
|
||||||
|
$("#curr_page").val($("#curr_page_span").html());
|
||||||
$(".re_search").submit();
|
$(".re_search").submit();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
<script>
|
<script>
|
||||||
function attachment_fresh_for_destroy(){
|
function attachment_fresh_for_destroy(){
|
||||||
hideModal();
|
hideModal();
|
||||||
|
$("#curr_page").val($("#curr_page_span").html());
|
||||||
$(".re_search").submit();
|
$(".re_search").submit();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -98,6 +98,8 @@
|
||||||
<div class="reTop mb5">
|
<div class="reTop mb5">
|
||||||
<%= form_tag( search_course_files_path(@course), method: 'get',:class => "re_search",:remote=>true) do %>
|
<%= form_tag( search_course_files_path(@course), method: 'get',:class => "re_search",:remote=>true) do %>
|
||||||
<%= text_field_tag 'name', params[:name], name: "name", :class => 'researchBox fl',:style=>"padding: 0px"%>
|
<%= text_field_tag 'name', params[:name], name: "name", :class => 'researchBox fl',:style=>"padding: 0px"%>
|
||||||
|
<input type="hidden" name="page" id="curr_page">
|
||||||
|
<span class="none" id="curr_page_span"><%= @curr_page %></span>
|
||||||
<%= submit_tag "班内搜索", :class => "blueBtn mr5 fl",:name => "incourse",:id => "incourse" %>
|
<%= submit_tag "班内搜索", :class => "blueBtn mr5 fl",:name => "incourse",:id => "incourse" %>
|
||||||
<%#= submit_tag "全站搜索", :class => "blueBtn mr5 fl",:name => "insite",:id => "insite" %>
|
<%#= 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) ) %>
|
<% if is_course_teacher(User.current,@course) || (@course.publish_resource==1 && User.current.member_of_course?(@course) ) %>
|
||||||
|
|
Loading…
Reference in New Issue