diff --git a/app/controllers/admin/journal_papers_controller.rb b/app/controllers/admin/journal_papers_controller.rb index 098cff4..941faeb 100644 --- a/app/controllers/admin/journal_papers_controller.rb +++ b/app/controllers/admin/journal_papers_controller.rb @@ -53,7 +53,7 @@ class Admin::JournalPapersController < OrbitMemberController end @writing_journals = @writing_journals.page(params[:page]).per(10) if request.xhr? - render :partial => "writing_journal" + render "index_js", :layout => false end end diff --git a/app/views/admin/journal_papers/index.html.erb b/app/views/admin/journal_papers/index.html.erb index 7572e16..0c876ea 100644 --- a/app/views/admin/journal_papers/index.html.erb +++ b/app/views/admin/journal_papers/index.html.erb @@ -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' %> <% if params[:error] == "1" %> diff --git a/app/views/admin/journal_papers/index.js.erb b/app/views/admin/journal_papers/index.js.erb deleted file mode 100644 index 6218673..0000000 --- a/app/views/admin/journal_papers/index.js.erb +++ /dev/null @@ -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} %>"); \ No newline at end of file diff --git a/app/views/admin/journal_papers/index_js.html.erb b/app/views/admin/journal_papers/index_js.html.erb new file mode 100644 index 0000000..e1d7073 --- /dev/null +++ b/app/views/admin/journal_papers/index_js.html.erb @@ -0,0 +1,4 @@ + \ No newline at end of file