diff --git a/app/views/cms/resource/_pagination.html.haml b/app/views/cms/resource/_pagination.html.haml new file mode 100644 index 0000000..a200156 --- /dev/null +++ b/app/views/cms/resource/_pagination.html.haml @@ -0,0 +1,3 @@ +- begin + .span14.offset1= will_paginate(collection, remote: true) +-rescue \ No newline at end of file diff --git a/app/views/cms/resource/index.html.haml b/app/views/cms/resource/index.html.haml index 0a7d2fa..09f1b66 100644 --- a/app/views/cms/resource/index.html.haml +++ b/app/views/cms/resource/index.html.haml @@ -1,6 +1,3 @@ #index.row = render partial: index_partial, layout: 'panel', locals: { attributes: index_attributes(collection) } - - - begin - .span14.offset1= will_paginate(collection, remote: true) - -rescue \ No newline at end of file + #pagination-partial= render 'pagination' \ No newline at end of file diff --git a/app/views/cms/resource/index.js.erb b/app/views/cms/resource/index.js.erb index 9bc60e4..7e54bcd 100644 --- a/app/views/cms/resource/index.js.erb +++ b/app/views/cms/resource/index.js.erb @@ -1,5 +1,6 @@ // Update Partial $("div#content").html("<%= j render 'index-table', attributes: index_attributes(collection) %>"); +$("div#pagination-partial").html("<%= j render 'pagination' %>"); // Clear Form