gridion 0.0.27 → 0.0.28

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,8 +11,13 @@ grid(@patents, :object_class=>Patent, :columns=>%w(coverage_countries_serial pat
11
11
  </pre>
12
12
 
13
13
  h2. Parameters
14
- h3. render__empty__grid
14
+
15
+ h3. render_empty_grid
15
16
 
16
17
  Render grid even if there is no data, you need to use that with :object__class as there is no model the grid could use to extract metadata against.
17
18
 
19
+ h3. paginate
20
+
21
+ Turns on pagination (Kaminari required)
22
+
18
23
 
@@ -93,6 +93,7 @@ module Gridion
93
93
  table_header_tag=options[:table_header_tag]||"th"
94
94
  table_header_wrapper_tag=options[:table_header_wrapper_tag]||"thead"
95
95
  table_body_wrapper_tag=options[:table_body_wrapper_tag]||"tbody"
96
+ skip_field_class=options[:skip_field_class]||false
96
97
  table_classes=[options[:class]].flatten.compact
97
98
  safe_concat("<#{table_tag} class=\"#{klass.name.downcase} #{table_classes.join(' ')}\">")
98
99
 
@@ -103,7 +104,7 @@ module Gridion
103
104
  (columns).each do |col|
104
105
  col_label=klass.human_attribute_name(col)
105
106
  col_label = sort_link(options[:q], col, col_label) if defined?(:sort_link) && options.has_key?(:q) && options[:q].present?
106
- safe_concat("<#{table_header_tag} class=\"header_cell #{col.to_s.parameterize.underscore}\">#{col_label}</#{table_header_tag}>")
107
+ safe_concat("<#{table_header_tag} class=\"header_cell #{col.to_s.parameterize.underscore unless skip_field_class}\">#{col_label}</#{table_header_tag}>")
107
108
  end
108
109
  safe_concat("<#{table_header_tag} class=\"actions\">#{I18n.t("gridion.headers.actions", "Actions")}</#{table_header_tag}>") unless options[:actions].blank?
109
110
  safe_concat("<#{table_header_tag} class=\"children\"></#{table_header_tag}>") if options.has_key?(:children)
@@ -116,6 +117,7 @@ module Gridion
116
117
  table_tag = options[:table_tag]||"table"
117
118
  table_row_tag=options[:table_row_tag]||"tr"
118
119
  table_cell_tag=options[:table_cell_tag]||"td"
120
+ skip_field_class=options[:skip_field_class]||false
119
121
 
120
122
  object_list=
121
123
  if options.has_key?(:parent)
@@ -161,7 +163,7 @@ module Gridion
161
163
  end
162
164
  end
163
165
  end
164
- result << "<#{table_cell_tag} class=\"#{col}\">#{value}</#{table_cell_tag}>"
166
+ result << "<#{table_cell_tag} #{"class=\"#{col}\"" unless skip_field_class}>#{value}</#{table_cell_tag}>"
165
167
  end
166
168
 
167
169
 
@@ -1,3 +1,3 @@
1
1
  module Gridion
2
- VERSION = "0.0.27"
2
+ VERSION = "0.0.28"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.27
4
+ version: 0.0.28
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-31 00:00:00.000000000 Z
12
+ date: 2013-06-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  segments:
120
120
  - 0
121
- hash: 2906328453226057396
121
+ hash: -3342746818202623455
122
122
  required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  none: false
124
124
  requirements:
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  segments:
129
129
  - 0
130
- hash: 2906328453226057396
130
+ hash: -3342746818202623455
131
131
  requirements: []
132
132
  rubyforge_project:
133
133
  rubygems_version: 1.8.24