mgwidmann / scrivener_html

HTML view helpers for Scrivener
MIT License
125 stars 208 forks source link

Most config options don't work in `config.exs`? #74

Open nickjj opened 6 years ago

nickjj commented 6 years ago

Hi,

If I set the following in my config.exs file, only the view_style takes effect:

config :scrivener_html,
  routes_helper: MyApp.Router.Helpers,
  view_style: :bootstrap_v4,
  distance: 5, next: "Next", previous: "Previous",
  first: true, last: true

I would have expected the other config options to be applied as well.

I wanted to do this because I have pagination on 4 different resources, and I didn't want to have to customize the next, previous, etc. for each one individually but currently that seems to be the only way to do it.

Also on a side note, first / last never show up, even if I set them directly on pagination_links in my eex template.

I'm running 1.7.1 (the latest release at the time of this issue).

mgwidmann commented 5 years ago

Yep, looks like we just pull the application environment config for those values https://github.com/mgwidmann/scrivener_html/blob/master/lib/scrivener/html.ex#L98

I would accept a PR to make this addition.

shulhi commented 5 years ago

@mgwidmann I can definitely help with this once you have the time to review #86 and then I can work on top of that PR.

mgwidmann commented 4 years ago

Ping, going to close this soon if no one wants this feature.

nickjj commented 4 years ago

I think people do want it. I know I still do.