This commit is contained in:
BoHung Chiu 2023-07-14 19:01:34 +08:00
parent becc66f769
commit 0c0e251cd0
4 changed files with 6 additions and 5 deletions

View File

@ -53,7 +53,7 @@ class Admin::JournalPapersController < OrbitMemberController
end end
@writing_journals = @writing_journals.page(params[:page]).per(10) @writing_journals = @writing_journals.page(params[:page]).per(10)
if request.xhr? if request.xhr?
render :partial => "writing_journal" render "index_js", :layout => false
end end
end end

View File

@ -42,7 +42,7 @@ function MergeUrl(){
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), admin_writing_journal_setting_path, :class => 'btn btn-primary pull-right' %> <%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), admin_writing_journal_setting_path, :class => 'btn btn-primary pull-right' %>
</div> </div>
<div class="pagination pagination-centered"> <div class="pagination pagination-centered">
<%= content_tag :div, paginate(@writing_journals), class: "pagination pagination-centered" %> <%= content_tag :div, paginate(@writing_journals), class: "pagination pagination-centered", id: "writing_journal_pagination" %>
</div> </div>
</div> </div>
<% if params[:error] == "1" %> <% if params[:error] == "1" %>

View File

@ -1,3 +0,0 @@
$("#sort_headers").html("<%= j render 'sort_headers' %>");
$("#tbody_writing_journals").html("<%= j render :partial => 'writing_journal', :collection => @writing_journals %>");
$("#writing_journal_pagination").html("<%= j paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>");

View File

@ -0,0 +1,4 @@
<script>
$("#tbody_writing_journals").html("<%= j render :partial => 'writing_journal', :collection => @writing_journals %>");
$("#writing_journal_pagination").html("<%= j paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>");
</script>