rocket_cms 0.6.3 → 0.6.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b90cdc30b2a084cb396c127cf4f3d47200b0bfa
4
- data.tar.gz: cc892187a3721397de7c1d11665b0dd773a65248
3
+ metadata.gz: e5353eebe00fca900bbae6b353137de684e512a6
4
+ data.tar.gz: c34c7fbbcecc3a777f8472e0bd2afa37ce27a224
5
5
  SHA512:
6
- metadata.gz: 460d06d8f3af815e54eeeabf17edb9126ecc77b2e1958d510131ce9ccd4cadb0188d3b3a7c13847ef426b852db57cd732a0f17b72900499d41c0f7180404dbd5
7
- data.tar.gz: 7e3ce3ccb91730b55176c66a8f8bf16195a6f8caa401659fddae8735da95ebc99666ecad0624f7aa8f2e1c81555c236e6973d36309906ecd3ff6eb25142b7a04
6
+ metadata.gz: af8f6ab7d941bf58a482ddea75b1c7d716e9bee7b719355bffed940d95bd5d0e4a87fe2412beda58744468fb91c54e36b655c2433de968da402fc411c287d13e
7
+ data.tar.gz: 5b9148db5dcfd0cc23d142b52e05f190c8ec42321a6f67aa1ba8f4b4ba702717fe135ef3cbda203a46f1a307b31cc4104a1a12c1a0569284b6e5ffaddbcbd478
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.6.3)
4
+ rocket_cms (0.6.4)
5
5
  addressable
6
6
  coffee-rails
7
7
  devise
@@ -95,7 +95,7 @@ GEM
95
95
  haml (4.0.6)
96
96
  tilt
97
97
  hike (1.2.3)
98
- htmlentities (4.3.2)
98
+ htmlentities (4.3.3)
99
99
  i18n (0.7.0)
100
100
  jquery-rails (4.0.2)
101
101
  rails-dom-testing (~> 1.0)
@@ -13,20 +13,22 @@ module Mappable
13
13
 
14
14
  field :lat, type: Float
15
15
  field :lon, type: Float
16
- else
17
- def coordinates
18
- if latitude.nil? || longitude.nil?
19
- nil
20
- else
21
- [longitude, latitude]
22
- end
23
- end
24
16
  end
25
17
 
26
18
  geocoded_by :geo_address
27
19
  after_validation :do_geocode
28
20
  end
29
21
 
22
+ if RocketCMS.active_record?
23
+ def coordinates
24
+ if latitude.nil? || longitude.nil?
25
+ nil
26
+ else
27
+ [longitude, latitude]
28
+ end
29
+ end
30
+ end
31
+
30
32
  def do_geocode
31
33
  if geo_address.blank?
32
34
  if RocketCMS.mongoid?
@@ -1,5 +1,5 @@
1
1
  - if params[:associations].nil?
2
- = form.collection_check_boxes field.method_name, form.object.class.send(field.method_name).values.map { |v| [t("enumerize.#{form.object.class.name.downcase}.#{field.method_name}.#{v}"), v] }, :last, :first, {}, {} { |i| i.label( class: 'checkbox' ) { i.check_box + i.text } }
2
+ = render 'rails_admin/main/enum_check_boxes', field: field, form: form
3
3
  - else
4
4
  :ruby
5
5
  related_id = params[:associations] && params[:associations][field.name.to_s]
@@ -0,0 +1,2 @@
1
+ - values = form.object.class.send(field.method_name).values.map { |v| [t("enumerize.#{form.object.class.name.downcase}.#{field.method_name}.#{v}", default: t("enumerize.defaults.#{field.method_name}.#{v}")), v] }
2
+ = form.collection_check_boxes field.method_name, values, :last, :first, {}, {} { |i| i.label( class: 'checkbox' ) { i.check_box + i.text } }
@@ -0,0 +1,2 @@
1
+ - values = form.object.class.send(field.method_name).values.map { |v| [t("enumerize.#{form.object.class.name.downcase}.#{field.method_name}.#{v}", default: t("enumerize.defaults.#{field.method_name}.#{v}")), v] }
2
+ = form.collection_radio_buttons field.method_name, values, :last, :first, {}, {} { |i| i.label(class: 'radio') { i.radio_button + i.text } }
@@ -1,23 +1,24 @@
1
1
  module RocketCMS
2
2
  class << self
3
- def map_config
3
+ def map_config(is_active = true)
4
4
  Proc.new {
5
- active true
5
+ active is_active
6
6
  label I18n.t('rs.map')
7
7
  field :address, :string
8
8
  field :map_address, :string
9
9
  field :map_hint, :string
10
10
  field :coordinates, :string do
11
11
  read_only true
12
+ formatted_value{ bindings[:object].coordinates.to_json }
12
13
  end
13
14
  field :lat
14
15
  field :lon
15
16
  }
16
17
  end
17
18
 
18
- def seo_config
19
+ def seo_config(is_active = false)
19
20
  Proc.new {
20
- active false
21
+ active is_active
21
22
  label "SEO"
22
23
  field :h1, :string
23
24
  field :title, :string
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-23 00:00:00.000000000 Z
11
+ date: 2014-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -399,6 +399,8 @@ files:
399
399
  - app/views/news/show.html.haml
400
400
  - app/views/pages/show.html.haml
401
401
  - app/views/rails_admin/main/_check_boxes.html.haml
402
+ - app/views/rails_admin/main/_enum_check_boxes.html.haml
403
+ - app/views/rails_admin/main/_enum_radio_buttons.html.haml
402
404
  - app/views/rails_admin/main/_form_raw.html.haml
403
405
  - app/views/search/index.html.haml
404
406
  - app/views/shared/_admin_link.html.haml