fix for pagination and revoke and grant buttons
This commit is contained in:
parent
5b02e54f17
commit
dbc9e5a931
|
@ -53,3 +53,9 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%=
|
||||
content_tag :div, class: "bottomnav clearfix" do
|
||||
content_tag :div, paginate(@registeredsites), class: "pagination pagination-centered"
|
||||
end
|
||||
%>
|
|
@ -1 +1,16 @@
|
|||
$("#index_table").html("<%= j render 'index' %>")
|
||||
$("#index_table").html("<%= j render 'index' %>");
|
||||
var atags = $(".pagination a");
|
||||
if (atags.length > 0){
|
||||
atags.each(function(){
|
||||
var el = $(this);
|
||||
if(el.attr("href")){
|
||||
var url = "http://" + window.location.host + el.attr("href");
|
||||
uri = new URL(url);
|
||||
if(uri.searchParams.get("page")){
|
||||
$(this).attr("href","/<%= locale.to_s %>/admin/registered_sites?page=" + uri.searchParams.get("page"));
|
||||
}else{
|
||||
$(this).attr("href","/<%= locale.to_s %>/admin/registered_sites");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
|
@ -2,8 +2,3 @@
|
|||
<span id="index_table">
|
||||
<%= render 'index'%>
|
||||
</span>
|
||||
<%=
|
||||
content_tag :div, class: "bottomnav clearfix" do
|
||||
content_tag :div, paginate(@registeredsites), class: "pagination pagination-centered"
|
||||
end
|
||||
%>
|
Loading…
Reference in New Issue