From e4f859f71e3b0cb759c9b37c09a4a6980ee98e5e Mon Sep 17 00:00:00 2001
From: Domizio Demichelis
Date: Fri, 23 Nov 2018 11:01:22 +0700
Subject: [PATCH] renamed bootstrap templates and updated docs
---
docs/extras/bootstrap.md | 10 +++++-----
docs/how-to.md | 8 ++++----
.../{nav_bootstrap.html.erb => bootstrap_nav.html.erb} | 2 +-
...nav_bootstrap.html.haml => bootstrap_nav.html.haml} | 2 +-
...nav_bootstrap.html.slim => bootstrap_nav.html.slim} | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
rename lib/templates/{nav_bootstrap.html.erb => bootstrap_nav.html.erb} (96%)
rename lib/templates/{nav_bootstrap.html.haml => bootstrap_nav.html.haml} (92%)
rename lib/templates/{nav_bootstrap.html.slim => bootstrap_nav.html.slim} (93%)
diff --git a/docs/extras/bootstrap.md b/docs/extras/bootstrap.md
index 00bbe6911..c4231226b 100644
--- a/docs/extras/bootstrap.md
+++ b/docs/extras/bootstrap.md
@@ -27,7 +27,7 @@ with a fast helper:
or with a template:
```erb
-<%== render 'pagy/nav_bootstrap', locals: {pagy: @pagy} %>
+<%== render 'pagy/bootstrap_nav', locals: {pagy: @pagy} %>
```
Configure [javascript](../extras.md#javascript) if you use `pagy_bootstrap_responsive_nav` or `pagy_bootstrap_compact_nav`.
@@ -37,9 +37,9 @@ Configure [javascript](../extras.md#javascript) if you use `pagy_bootstrap_respo
This extra is composed of 4 files:
- [bootstrap.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/bootstrap.rb)
-- [nav_bootstrap.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bootstrap.html.erb) (optional template)
-- [nav_bootstrap.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bootstrap.html.haml) (optional template)
-- [nav_bootstrap.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bootstrap.html.slim) (optional template)
+- [bootstrap_nav.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/bootstrap_nav.html.erb) (optional template)
+- [bootstrap_nav.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/bootstrap_nav.html.haml) (optional template)
+- [bootstrap_nav.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/bootstrap_nav.html.slim) (optional template)
## Methods
@@ -49,7 +49,7 @@ This extra adds 3 nav helpers to the `Pagy::Frontend` module. You can customize
This method is the same as the `pagy_nav`, but customized for Bootstrap.
-The `nav_bootstrap.*` templates produce the same output, and can be used as an easier (but slower) starting point to override it.
+The `bootstrap_nav.*` templates produce the same output, and can be used as an easier (but slower) starting point to override it.
### pagy_bootstrap_compact_nav(pagy, ...)
diff --git a/docs/how-to.md b/docs/how-to.md
index f24a08d28..9a8a14dfb 100644
--- a/docs/how-to.md
+++ b/docs/how-to.md
@@ -337,9 +337,9 @@ They produce exactly the same output of the helpers, but since they are slower,
- [nav.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav.html.haml)
- [nav.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav.html.slim)
- `bootstrap`
- - [nav_bootstrap.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bootstrap.html.erb)
- - [nav_bootstrap.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bootstrap.html.haml)
- - [nav_bootstrap.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bootstrap.html.slim)
+ - [bootstrap_nav.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/bootstrap_nav.html.erb)
+ - [bootstrap_nav.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/bootstrap_nav.html.haml)
+ - [bootstrap_nav.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/bootstrap_nav.html.slim)
- `bulma`
- [nav_bulma.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bulma.html.erb)
- [nav_bulma.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bulma.html.haml)
@@ -353,7 +353,7 @@ If you need to try/compare an unmodified built-in template, you can render it ri
```erb
<%== render file: Pagy.root.join('templates', 'nav.html.erb'), locals: {pagy: @pagy} %>
-<%== render file: Pagy.root.join('templates', 'nav_bootstrap.html.erb'), locals: {pagy: @pagy} %>
+<%== render file: Pagy.root.join('templates', 'bootstrap_nav.html.erb'), locals: {pagy: @pagy} %>
```
You may want to read also the [Pagy::Frontend API documentation](api/frontend.md) for complete control over your templates.
diff --git a/lib/templates/nav_bootstrap.html.erb b/lib/templates/bootstrap_nav.html.erb
similarity index 96%
rename from lib/templates/nav_bootstrap.html.erb
rename to lib/templates/bootstrap_nav.html.erb
index 8d6461d05..b0122c8c6 100644
--- a/lib/templates/nav_bootstrap.html.erb
+++ b/lib/templates/bootstrap_nav.html.erb
@@ -6,7 +6,7 @@
Usage: link.call( page_number [, text [, extra_attributes_string ]])
-%>
<% link = pagy_link_proc(pagy, 'class="page-link"') -%>
-<%# -%>