qui-pagination 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,20 @@
1
+ All portions Copyright (c) 2007 Tim Harper
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,17 @@
1
+ require 'rake'
2
+
3
+ begin
4
+ require 'jeweler'
5
+ Jeweler::Tasks.new do |gemspec|
6
+ gemspec.name = "qui-pagination"
7
+ gemspec.summary = "qUI: rails helpers for generating nice pagination"
8
+ gemspec.description = "qUI: rails helpers for generating nice pagination"
9
+ gemspec.email = "marcin@saepia.net"
10
+ gemspec.homepage = "http://q.saepia.net"
11
+ gemspec.authors = ["Marcin Lewandowski"]
12
+ gemspec.version = "0.0.2"
13
+ gemspec.files = Rake::FileList.new [ "MIT-LICENSE", "Rakefile", "lib/*", "rails/*" ]
14
+ end
15
+ rescue LoadError
16
+ puts "Jeweler not available. Install it with: sudo gem install jeweler"
17
+ end
@@ -1,9 +1,22 @@
1
1
  module QUI
2
2
  module Pagination
3
3
  module MainHelper
4
- def pagination(x)
5
- will_paginate(x, :previous_label => t(:paginationPrevious), :next_label => t(:paginationNext)).to_s
4
+ def pagination(data)
5
+ will_paginate(data, :previous_label => t(:paginationPrevious), :next_label => t(:paginationNext)).to_s
6
6
  end
7
+
8
+ def pagination_per_page_selector(data)
9
+ content_tag :div, :class => "pagination_per_page_selector" do
10
+ form_tag params, :method => "get" do
11
+ label_tag(:per_page, t(:paginationPerPage)) +
12
+ hidden_field_tag(:page, params[:page]) +
13
+ hidden_field_tag(:sort_by, params[:sort_by]) +
14
+ hidden_field_tag(:sort_order, params[:sort_order]) +
15
+ text_field_tag(:per_page, data.per_page) +
16
+ submit_tag(t(:paginationPerPageSubmit))
17
+ end
18
+ end
19
+ end
7
20
  end
8
21
  end
9
22
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qui-pagination
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marcin Lewandowski
@@ -15,25 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-18 00:00:00 +02:00
18
+ date: 2011-02-07 00:00:00 +01:00
19
19
  default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: will_paginate
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
33
- type: :runtime
34
- version_requirements: *id001
35
- description: "qUI: rails helpers for generating pagination"
36
- email: saepia@saepia.net
20
+ dependencies: []
21
+
22
+ description: "qUI: rails helpers for generating nice pagination"
23
+ email: marcin@saepia.net
37
24
  executables: []
38
25
 
39
26
  extensions: []
@@ -41,12 +28,14 @@ extensions: []
41
28
  extra_rdoc_files:
42
29
  - README.rdoc
43
30
  files:
31
+ - MIT-LICENSE
32
+ - Rakefile
44
33
  - lib/qui-pagination-main-helper.rb
45
34
  - lib/qui-pagination.rb
46
35
  - rails/init.rb
47
36
  - README.rdoc
48
37
  has_rdoc: true
49
- homepage: http://qui.saepia.net
38
+ homepage: http://q.saepia.net
50
39
  licenses: []
51
40
 
52
41
  post_install_message:
@@ -78,6 +67,6 @@ rubyforge_project:
78
67
  rubygems_version: 1.3.7
79
68
  signing_key:
80
69
  specification_version: 3
81
- summary: "qUI: rails helpers for generating pagination"
70
+ summary: "qUI: rails helpers for generating nice pagination"
82
71
  test_files: []
83
72