administrate icon indicating copy to clipboard operation
administrate copied to clipboard

CSS not being applied to pagination

Open bgvo opened this issue 3 years ago • 3 comments

What were you trying to do?

Everything works fine, except pagination, which is not being shown as expected (sample)

What did you end up with (logs, or, even better, example apps are great!)?

I tried to fix it by:

  1. Adding bootstrap5-kaminari-views gem. However, in order to pick up paginate method must be called with the theme attribute. So I continued to step 2
  2. Modifying administrate source code and substitute correspondent lines in files app/views/fields/has_many/_show.html.erb and app/views/administrate/application/index.html.erb. It didn't work. Still CSS was not being applied correctly.

What versions are you running?

  • Rails 7.0.2.2
  • administrate 0.17.0

bgvo avatar Aug 19 '22 17:08 bgvo

i believed you will need import BS5 css file manually

jubilee2 avatar Aug 20 '22 04:08 jubilee2

This is strange. It should work as installed. Is this on development mode? In both, the linked CSS should have styles on .pagination and elements under it. In development mode it should include comments pointing at SCSS source files. For example:

/* line 1, ../../app/assets/stylesheets/administrate/components/_pagination.scss */
.pagination {
  margin-top: 1.5em;
  padding-left: 1.5em;
  padding-right: 1.5em;
  text-align: center;
}

/* line 7, ../../app/assets/stylesheets/administrate/components/_pagination.scss */
.pagination .first,
.pagination .prev,
...

Do you see any of this?

pablobm avatar Sep 05 '22 16:09 pablobm

can you try add bs5 css and js into manifest.js

Thanks,

jubilee2 avatar Sep 21 '22 16:09 jubilee2

@jubilee2 - Is that comment for me or for @bgvo? :slightly_smiling_face:

pablobm avatar Oct 06 '22 09:10 pablobm

for @bgvo

jubilee2 avatar Oct 06 '22 13:10 jubilee2

Closing due to lack of activity.

pablobm avatar Apr 07 '23 16:04 pablobm