kaminari 0.17.0 → 1.0.0.beta2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of kaminari might be problematic. Click here for more details.

Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/.travis.yml +20 -39
  4. data/CHANGELOG.md +560 -0
  5. data/CONTRIBUTING.md +16 -0
  6. data/Gemfile +1 -0
  7. data/README.md +545 -0
  8. data/Rakefile +21 -24
  9. data/gemfiles/active_record_41.gemfile +2 -4
  10. data/gemfiles/active_record_42.gemfile +2 -4
  11. data/gemfiles/active_record_50.gemfile +20 -0
  12. data/gemfiles/active_record_edge.gemfile +5 -6
  13. data/kaminari.gemspec +11 -17
  14. data/lib/kaminari.rb +4 -39
  15. data/lib/kaminari/version.rb +2 -1
  16. metadata +44 -186
  17. data/.gemtest +0 -0
  18. data/.rspec +0 -2
  19. data/CHANGELOG.rdoc +0 -480
  20. data/README.rdoc +0 -336
  21. data/app/views/kaminari/_first_page.html.erb +0 -11
  22. data/app/views/kaminari/_first_page.html.haml +0 -9
  23. data/app/views/kaminari/_first_page.html.slim +0 -10
  24. data/app/views/kaminari/_gap.html.erb +0 -8
  25. data/app/views/kaminari/_gap.html.haml +0 -8
  26. data/app/views/kaminari/_gap.html.slim +0 -9
  27. data/app/views/kaminari/_last_page.html.erb +0 -11
  28. data/app/views/kaminari/_last_page.html.haml +0 -9
  29. data/app/views/kaminari/_last_page.html.slim +0 -10
  30. data/app/views/kaminari/_next_page.html.erb +0 -11
  31. data/app/views/kaminari/_next_page.html.haml +0 -9
  32. data/app/views/kaminari/_next_page.html.slim +0 -10
  33. data/app/views/kaminari/_page.html.erb +0 -12
  34. data/app/views/kaminari/_page.html.haml +0 -10
  35. data/app/views/kaminari/_page.html.slim +0 -11
  36. data/app/views/kaminari/_paginator.html.erb +0 -23
  37. data/app/views/kaminari/_paginator.html.haml +0 -18
  38. data/app/views/kaminari/_paginator.html.slim +0 -19
  39. data/app/views/kaminari/_prev_page.html.erb +0 -11
  40. data/app/views/kaminari/_prev_page.html.haml +0 -9
  41. data/app/views/kaminari/_prev_page.html.slim +0 -10
  42. data/config/locales/kaminari.yml +0 -19
  43. data/gemfiles/active_record_30.gemfile +0 -28
  44. data/gemfiles/active_record_31.gemfile +0 -26
  45. data/gemfiles/active_record_32.gemfile +0 -25
  46. data/gemfiles/active_record_40.gemfile +0 -26
  47. data/gemfiles/data_mapper_12.gemfile +0 -32
  48. data/gemfiles/mongo_mapper.gemfile +0 -25
  49. data/gemfiles/mongoid_30.gemfile +0 -22
  50. data/gemfiles/mongoid_31.gemfile +0 -21
  51. data/gemfiles/mongoid_40.gemfile +0 -19
  52. data/gemfiles/mongoid_50.gemfile +0 -23
  53. data/gemfiles/sinatra_13.gemfile +0 -36
  54. data/gemfiles/sinatra_14.gemfile +0 -33
  55. data/lib/generators/kaminari/config_generator.rb +0 -16
  56. data/lib/generators/kaminari/templates/kaminari_config.rb +0 -10
  57. data/lib/generators/kaminari/views_generator.rb +0 -119
  58. data/lib/kaminari/config.rb +0 -51
  59. data/lib/kaminari/engine.rb +0 -4
  60. data/lib/kaminari/grape.rb +0 -4
  61. data/lib/kaminari/helpers/action_view_extension.rb +0 -132
  62. data/lib/kaminari/helpers/paginator.rb +0 -195
  63. data/lib/kaminari/helpers/sinatra_helpers.rb +0 -176
  64. data/lib/kaminari/helpers/tags.rb +0 -108
  65. data/lib/kaminari/hooks.rb +0 -53
  66. data/lib/kaminari/models/active_record_extension.rb +0 -22
  67. data/lib/kaminari/models/active_record_model_extension.rb +0 -22
  68. data/lib/kaminari/models/active_record_relation_methods.rb +0 -42
  69. data/lib/kaminari/models/array_extension.rb +0 -66
  70. data/lib/kaminari/models/configuration_methods.rb +0 -48
  71. data/lib/kaminari/models/data_mapper_collection_methods.rb +0 -19
  72. data/lib/kaminari/models/data_mapper_extension.rb +0 -51
  73. data/lib/kaminari/models/mongo_mapper_extension.rb +0 -18
  74. data/lib/kaminari/models/mongoid_criteria_methods.rb +0 -40
  75. data/lib/kaminari/models/mongoid_extension.rb +0 -26
  76. data/lib/kaminari/models/page_scope_methods.rb +0 -73
  77. data/lib/kaminari/models/plucky_criteria_methods.rb +0 -23
  78. data/lib/kaminari/railtie.rb +0 -7
  79. data/lib/kaminari/sinatra.rb +0 -7
  80. data/spec/config/config_spec.rb +0 -91
  81. data/spec/fake_app/active_record/config.rb +0 -3
  82. data/spec/fake_app/active_record/models.rb +0 -65
  83. data/spec/fake_app/data_mapper/config.rb +0 -1
  84. data/spec/fake_app/data_mapper/models.rb +0 -27
  85. data/spec/fake_app/mongo_mapper/config.rb +0 -2
  86. data/spec/fake_app/mongo_mapper/models.rb +0 -9
  87. data/spec/fake_app/mongoid/config.rb +0 -20
  88. data/spec/fake_app/mongoid/models.rb +0 -38
  89. data/spec/fake_app/rails_app.rb +0 -56
  90. data/spec/fake_app/sinatra_app.rb +0 -22
  91. data/spec/fake_app/views/alternative/kaminari/_first_page.html.erb +0 -1
  92. data/spec/fake_app/views/alternative/kaminari/_paginator.html.erb +0 -3
  93. data/spec/fake_app/views/kaminari/bootstrap/_page.html.erb +0 -1
  94. data/spec/fake_app/views/kaminari/bootstrap/_paginator.html.erb +0 -7
  95. data/spec/fake_gem.rb +0 -20
  96. data/spec/generators/views_generator_spec.rb +0 -18
  97. data/spec/helpers/action_view_extension_spec.rb +0 -318
  98. data/spec/helpers/helpers_spec.rb +0 -144
  99. data/spec/helpers/sinatra_helpers_spec.rb +0 -223
  100. data/spec/helpers/tags_spec.rb +0 -140
  101. data/spec/models/active_record/active_record_relation_methods_spec.rb +0 -77
  102. data/spec/models/active_record/inherited_spec.rb +0 -9
  103. data/spec/models/active_record/scopes_spec.rb +0 -265
  104. data/spec/models/array_spec.rb +0 -172
  105. data/spec/models/configuration_methods_spec.rb +0 -125
  106. data/spec/models/data_mapper/data_mapper_spec.rb +0 -205
  107. data/spec/models/mongo_mapper/mongo_mapper_spec.rb +0 -84
  108. data/spec/models/mongoid/mongoid_spec.rb +0 -228
  109. data/spec/requests/users_spec.rb +0 -53
  110. data/spec/spec_helper.rb +0 -34
  111. data/spec/spec_helper_for_sinatra.rb +0 -34
  112. data/spec/support/database_cleaner.rb +0 -19
  113. data/spec/support/matchers.rb +0 -52
@@ -1,336 +0,0 @@
1
- = Kaminari {<img src="https://travis-ci.org/amatsuda/kaminari.svg"/>}[http://travis-ci.org/amatsuda/kaminari] {<img src="https://img.shields.io/codeclimate/github/amatsuda/kaminari.svg" />}[https://codeclimate.com/github/amatsuda/kaminari] {<img src="http://inch-ci.org/github/amatsuda/kaminari.svg" alt="Inline docs" />}[http://inch-ci.org/github/amatsuda/kaminari]
2
-
3
- A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for modern web app frameworks and ORMs
4
-
5
-
6
- == Features
7
-
8
- === Clean
9
- Does not globally pollute +Array+, +Hash+, +Object+ or <tt>AR::Base</tt>.
10
-
11
- === Easy to use
12
- Just bundle the gem, then your models are ready to be paginated. No configuration required. Don't have to define anything in your models or helpers.
13
-
14
- === Simple scope-based API
15
- Everything is method chainable with less "Hasheritis". You know, that's the Rails 3 way.
16
- No special collection class or anything for the paginated values, instead using a general <tt>AR::Relation</tt> instance. So, of course you can chain any other conditions before or after the paginator scope.
17
-
18
- === Customizable engine-based I18n-aware helper
19
- As the whole pagination helper is basically just a collection of links and non-links, Kaminari renders each of them through its own partial template inside the Engine. So, you can easily modify their behaviour, style or whatever by overriding partial templates.
20
-
21
- === ORM & template engine agnostic
22
- Kaminari supports multiple ORMs (ActiveRecord, DataMapper, Mongoid, MongoMapper) multiple web frameworks (Rails, Sinatra, Grape), and multiple template engines (ERB, Haml, Slim).
23
-
24
- === Modern
25
- The pagination helper outputs the HTML5 <nav> tag by default. Plus, the helper supports Rails 3 unobtrusive Ajax.
26
-
27
-
28
- == Supported versions
29
-
30
- * Ruby 1.9.2, 1.9.3, 2.0.0, 2.1.x, 2.2.x
31
-
32
- * Rails 3.0, 3.1, 3.2, 4.0, 4.1, 4.2
33
-
34
- * Haml 3+
35
-
36
- * Mongoid 2+
37
-
38
- * MongoMapper 0.9+
39
-
40
- * DataMapper 1.1.0+
41
-
42
- == Install
43
-
44
- Put this line in your Gemfile:
45
- gem 'kaminari'
46
-
47
- Then bundle:
48
- % bundle
49
-
50
-
51
- == Usage
52
-
53
- === Query Basics
54
-
55
- * the +page+ scope
56
-
57
- To fetch the 7th page of users (default +per_page+ is 25)
58
- User.page(7)
59
-
60
- * the +per+ scope
61
-
62
- To show a lot more users per each page (change the +per_page+ value)
63
- User.page(7).per(50)
64
- Note that the +per+ scope is not directly defined on the models but is just a method defined on the page scope. This is absolutely reasonable because you will never actually use +per_page+ without specifying the +page+ number.
65
-
66
- Keep in mind that +per+ utilizes internally +limit+ and so it will override any +limit+ that was set previously
67
- User.count # => 1000
68
- a = User.limit(5).count # => 5
69
- b = a.page(1).per(20).size # => 20
70
-
71
- * the +padding+ scope
72
-
73
- Occasionally you need to pad a number of records that is not a multiple of the page size.
74
- User.page(7).per(50).padding(3)
75
- Note that the +padding+ scope also is not directly defined on the models.
76
-
77
- === General configuration options
78
-
79
- You can configure the following default values by overriding these values using <tt>Kaminari.configure</tt> method.
80
- default_per_page # 25 by default
81
- max_per_page # nil by default
82
- max_pages # nil by default
83
- window # 4 by default
84
- outer_window # 0 by default
85
- left # 0 by default
86
- right # 0 by default
87
- page_method_name # :page by default
88
- param_name # :page by default
89
-
90
- There's a handy generator that generates the default configuration file into config/initializers directory.
91
- Run the following generator command, then edit the generated file.
92
- % rails g kaminari:config
93
-
94
- * changing +page_method_name+
95
-
96
- You can change the method name +page+ to +bonzo+ or +plant+ or whatever you like, in order to play nice with existing +page+ method or association or scope or any other plugin that defines +page+ method on your models.
97
-
98
-
99
- === Configuring default +per_page+ value for each model
100
-
101
- * +paginates_per+
102
-
103
- You can specify default +per_page+ value per each model using the following declarative DSL.
104
- class User < ActiveRecord::Base
105
- paginates_per 50
106
- end
107
-
108
- === Configuring max +per_page+ value for each model
109
-
110
- * +max_paginates_per+
111
-
112
- You can specify max +per_page+ value per each model using the following declarative DSL.
113
- If the variable that specified via +per+ scope is more than this variable, +max_paginates_per+ is used instead of it. Default value is nil, which means you are not imposing any max +per_page+ value.
114
- class User < ActiveRecord::Base
115
- max_paginates_per 100
116
- end
117
-
118
- === Controllers
119
-
120
- * the page parameter is in <tt>params[:page]</tt>
121
-
122
- Typically, your controller code will look like this:
123
- @users = User.order(:name).page params[:page]
124
-
125
- === Views
126
-
127
- * the same old helper method
128
-
129
- Just call the +paginate+ helper:
130
- <%= paginate @users %>
131
-
132
- This will render several <tt>?page=N</tt> pagination links surrounded by an HTML5 <+nav+> tag.
133
-
134
- === Helpers
135
-
136
- * the +paginate+ helper method
137
-
138
- <%= paginate @users %>
139
- This would output several pagination links such as <tt>« First ‹ Prev ... 2 3 4 5 6 7 8 9 10 ... Next › Last »</tt>
140
-
141
- * specifying the "inner window" size (4 by default)
142
-
143
- <%= paginate @users, :window => 2 %>
144
- This would output something like <tt>... 5 6 7 8 9 ...</tt> when 7 is the current page.
145
-
146
- * specifying the "outer window" size (0 by default)
147
-
148
- <%= paginate @users, :outer_window => 3 %>
149
- This would output something like <tt>1 2 3 4 ...(snip)... 17 18 19 20</tt> while having 20 pages in total.
150
-
151
- * outer window can be separately specified by +left+, +right+ (0 by default)
152
-
153
- <%= paginate @users, :left => 1, :right => 3 %>
154
- This would output something like <tt>1 ...(snip)... 18 19 20</tt> while having 20 pages in total.
155
-
156
- * changing the parameter name (:+param_name+) for the links
157
-
158
- <%= paginate @users, :param_name => :pagina %>
159
- This would modify the query parameter name on each links.
160
-
161
- * extra parameters (:+params+) for the links
162
-
163
- <%= paginate @users, :params => {:controller => 'foo', :action => 'bar'} %>
164
- This would modify each link's +url_option+. :+controller+ and :+action+ might be the keys in common.
165
-
166
- * Ajax links (crazy simple, but works perfectly!)
167
-
168
- <%= paginate @users, :remote => true %>
169
- This would add <tt>data-remote="true"</tt> to all the links inside.
170
-
171
- * specifying an alternative views directory (default is <tt>kaminari/</tt>)
172
-
173
- <%= paginate @users, :views_prefix => 'templates/' %>
174
- This would search for partials in <tt>app/views/templates/kaminari</tt>. This option makes it easier to do things like A/B testing pagination templates/themes, using new/old templates at the same time as well as better intergration with other gems sush as {cells}[https://github.com/apotonick/cells].
175
-
176
- * the +link_to_next_page+ and +link_to_previous_page+ helper method
177
-
178
- <%= link_to_next_page @items, 'Next Page' %>
179
- This simply renders a link to the next page. This would be helpful for creating a Twitter-like pagination feature.
180
-
181
- * the +page_entries_info+ helper method
182
-
183
- <%= page_entries_info @users %>
184
- This renders a helpful message with numbers of displayed vs. total entries.
185
-
186
- === I18n and labels
187
-
188
- The default labels for 'first', 'last', 'previous', '...' and 'next' are stored in the I18n yaml inside the engine, and rendered through I18n API. You can switch the label value per I18n.locale for your internationalized application.
189
- Keys and the default values are the following. You can override them by adding to a YAML file in your <tt>Rails.root/config/locales</tt> directory.
190
-
191
- en:
192
- views:
193
- pagination:
194
- first: "&laquo; First"
195
- last: "Last &raquo;"
196
- previous: "&lsaquo; Prev"
197
- next: "Next &rsaquo;"
198
- truncate: "&hellip;"
199
- helpers:
200
- page_entries_info:
201
- one_page:
202
- display_entries:
203
- zero: "No %{entry_name} found"
204
- one: "Displaying <b>1</b> %{entry_name}"
205
- other: "Displaying <b>all %{count}</b> %{entry_name}"
206
- more_pages:
207
- display_entries: "Displaying %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> of <b>%{total}</b> in total"
208
-
209
- === Customizing the pagination helper
210
-
211
- Kaminari includes a handy template generator.
212
-
213
- * to edit your paginator
214
-
215
- Run the generator first,
216
- % rails g kaminari:views default
217
-
218
- then edit the partials in your app's <tt>app/views/kaminari/</tt> directory.
219
-
220
- * for Haml users
221
-
222
- Haml templates generator is also available by adding the <tt>-e haml</tt> option (this is automatically invoked when the default template_engine is set to Haml).
223
-
224
- % rails g kaminari:views default -e haml
225
-
226
- * themes
227
-
228
- The generator has the ability to fetch several sample template themes from
229
- the external repository (https://github.com/amatsuda/kaminari_themes) in
230
- addition to the bundled "default" one, which will help you creating a nice
231
- looking paginator.
232
- % rails g kaminari:views THEME
233
-
234
- To see the full list of avaliable themes, take a look at the themes repository,
235
- or just hit the generator without specifying +THEME+ argument.
236
- % rails g kaminari:views
237
-
238
- * multiple themes
239
-
240
- To utilize multiple themes from within a single application, create a directory within the app/views/kaminari/ and move your custom template files into that directory.
241
- % rails g kaminari:views default (skip if you have existing kaminari views)
242
- % cd app/views/kaminari
243
- % mkdir my_custom_theme
244
- % cp _*.html.* my_custom_theme/
245
-
246
- Next, reference that directory when calling the +paginate+ method:
247
-
248
- <%= paginate @users, :theme => 'my_custom_theme' %>
249
-
250
- Customize away!
251
-
252
- Note: if the theme isn't present or none is specified, kaminari will default back to the views included within the gem.
253
-
254
- === Paginating a generic Array object
255
-
256
- Kaminari provides an Array wrapper class that adapts a generic Array object to the <tt>paginate</tt> view helper.
257
- However, the <tt>paginate</tt> helper doesn't automatically handle your Array object (this is intentional and by design).
258
- <tt>Kaminari::paginate_array</tt> method converts your Array object into a paginatable Array that accepts <tt>page</tt> method.
259
-
260
- @paginatable_array = Kaminari.paginate_array(my_array_object).page(params[:page]).per(10)
261
-
262
- You can specify the +total_count+ value through options Hash. This would be helpful when handling an Array-ish object that has a different +count+ value from actual +count+ such as RSolr search result or when you need to generate a custom pagination. For example:
263
-
264
- @paginatable_array = Kaminari.paginate_array([], total_count: 145).page(params[:page]).per(10)
265
-
266
- == Creating friendly URLs and caching
267
-
268
- Because of the +page+ parameter and Rails 3 routing, you can easily generate SEO and user-friendly URLs. For any resource you'd like to paginate, just add the following to your +routes.rb+:
269
-
270
- resources :my_resources do
271
- get 'page/:page', :action => :index, :on => :collection
272
- end
273
-
274
- This will create URLs like <tt>/my_resources/page/33</tt> instead of <tt>/my_resources?page=33</tt>. This is now a friendly URL, but it also has other added benefits...
275
-
276
- Because the +page+ parameter is now a URL segment, we can leverage on Rails page caching[http://guides.rubyonrails.org/caching_with_rails.html#page-caching]!
277
-
278
- NOTE: In this example, I've pointed the route to my <tt>:index</tt> action. You may have defined a custom pagination action in your controller - you should point <tt>:action => :your_custom_action</tt> instead.
279
-
280
-
281
- == Sinatra/Padrino support
282
-
283
- Since version 0.13.0, kaminari started to support Sinatra or Sinatra-based frameworks experimentally.
284
-
285
- To use kaminari and its helpers with these frameworks,
286
-
287
- require 'kaminari/sinatra'
288
-
289
- or edit gemfile:
290
-
291
- gem 'kaminari', :require => 'kaminari/sinatra'
292
-
293
- This line just enables model-side features, such as <tt>Model#page</tt> and <tt>Model#per</tt>. If you want to use view helpers, please explicitly <tt>register</tt> helpers in your Sinatra or Padrino app:
294
-
295
- register Kaminari::Helpers::SinatraHelpers
296
-
297
- Or, you can implement your own awesome helper :)
298
-
299
- More features are coming, and again, this is still experimental. Please let us know if you found anything wrong with the Sinatra support.
300
-
301
-
302
- == For more information
303
-
304
- Check out Kaminari recipes on the GitHub Wiki for more advanced tips and techniques.
305
- https://github.com/amatsuda/kaminari/wiki/Kaminari-recipes
306
-
307
-
308
- == Questions, Feedback
309
-
310
- Feel free to message me on Github (amatsuda) or Twitter (@a_matsuda) ☇☇☇ :)
311
-
312
-
313
- == Contributing to Kaminari
314
-
315
- Fork, fix, then send a pull request.
316
-
317
- To run the test suite locally against all supported frameworks:
318
-
319
- % bundle install
320
- % rake spec:all
321
-
322
- To target the test suite against one framework:
323
-
324
- % rake spec:active_record_40
325
-
326
- You can find a list of supported spec tasks by running <tt>rake -T</tt>. You may also find it useful to run a specific test
327
- for a specific framework. To do so, you'll have to first make sure you have bundled everything for that configuration,
328
- then you can run the specific test:
329
-
330
- % BUNDLE_GEMFILE='gemfiles/active_record_40.gemfile' bundle install
331
- % BUNDLE_GEMFILE='gemfiles/active_record_40.gemfile' bundle exec rspec ./spec/requests/users_spec.rb
332
-
333
-
334
- == Copyright
335
-
336
- Copyright (c) 2011 Akira Matsuda. See MIT-LICENSE for further details.
@@ -1,11 +0,0 @@
1
- <%# Link to the "First" page
2
- - available local variables
3
- url: url to the first page
4
- current_page: a page object for the currently displayed page
5
- total_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -%>
9
- <span class="first">
10
- <%= link_to_unless current_page.first?, t('views.pagination.first').html_safe, url, :remote => remote %>
11
- </span>
@@ -1,9 +0,0 @@
1
- -# Link to the "First" page
2
- -# available local variables
3
- -# url: url to the first page
4
- -# current_page: a page object for the currently displayed page
5
- -# total_pages: total number of pages
6
- -# per_page: number of items to fetch per page
7
- -# remote: data-remote
8
- %span.first
9
- = link_to_unless current_page.first?, t('views.pagination.first').html_safe, url, :remote => remote
@@ -1,10 +0,0 @@
1
- / Link to the "First" page
2
- - available local variables
3
- url : url to the first page
4
- current_page : a page object for the currently displayed page
5
- total_pages : total number of pages
6
- per_page : number of items to fetch per page
7
- remote : data-remote
8
- span.first
9
- == link_to_unless current_page.first?, t('views.pagination.first').html_safe, url, :remote => remote
10
- '
@@ -1,8 +0,0 @@
1
- <%# Non-link tag that stands for skipped pages...
2
- - available local variables
3
- current_page: a page object for the currently displayed page
4
- total_pages: total number of pages
5
- per_page: number of items to fetch per page
6
- remote: data-remote
7
- -%>
8
- <span class="page gap"><%= t('views.pagination.truncate').html_safe %></span>
@@ -1,8 +0,0 @@
1
- -# Non-link tag that stands for skipped pages...
2
- -# available local variables
3
- -# current_page: a page object for the currently displayed page
4
- -# total_pages: total number of pages
5
- -# per_page: number of items to fetch per page
6
- -# remote: data-remote
7
- %span.page.gap
8
- = t('views.pagination.truncate').html_safe
@@ -1,9 +0,0 @@
1
- / Non-link tag that stands for skipped pages...
2
- - available local variables
3
- current_page : a page object for the currently displayed page
4
- total_pages : total number of pages
5
- per_page : number of items to fetch per page
6
- remote : data-remote
7
- span.page.gap
8
- == t('views.pagination.truncate').html_safe
9
- '
@@ -1,11 +0,0 @@
1
- <%# Link to the "Last" page
2
- - available local variables
3
- url: url to the last page
4
- current_page: a page object for the currently displayed page
5
- total_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -%>
9
- <span class="last">
10
- <%= link_to_unless current_page.last?, t('views.pagination.last').html_safe, url, :remote => remote %>
11
- </span>
@@ -1,9 +0,0 @@
1
- -# Link to the "Last" page
2
- -# available local variables
3
- -# url: url to the last page
4
- -# current_page: a page object for the currently displayed page
5
- -# total_pages: total number of pages
6
- -# per_page: number of items to fetch per page
7
- -# remote: data-remote
8
- %span.last
9
- = link_to_unless current_page.last?, t('views.pagination.last').html_safe, url, :remote => remote
@@ -1,10 +0,0 @@
1
- / Link to the "Last" page
2
- - available local variables
3
- url : url to the last page
4
- current_page : a page object for the currently displayed page
5
- total_pages : total number of pages
6
- per_page : number of items to fetch per page
7
- remote : data-remote
8
- span.last
9
- == link_to_unless current_page.last?, t('views.pagination.last').html_safe, url, :remote => remote
10
- '
@@ -1,11 +0,0 @@
1
- <%# Link to the "Next" page
2
- - available local variables
3
- url: url to the next page
4
- current_page: a page object for the currently displayed page
5
- total_pages: total number of pages
6
- per_page: number of items to fetch per page
7
- remote: data-remote
8
- -%>
9
- <span class="next">
10
- <%= link_to_unless current_page.last?, t('views.pagination.next').html_safe, url, :rel => 'next', :remote => remote %>
11
- </span>