blueberry_cms 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6db3094cef3cfe29d122b1597b26310227d535272a59a46763c6433e96bf353
4
- data.tar.gz: d147478782ec92c030cebad5a9e8d75a119d91541225d2c81497bf6b177a8d56
3
+ metadata.gz: 207de3dc57e2728c4e0484cffebc9b9c5d3087f5ee2fbcc6d48aa0924b46a7d1
4
+ data.tar.gz: 630fc7de8be9e2588c99095f7ac28fc447e1a892f24b6c0d1a9bf5301f11ae96
5
5
  SHA512:
6
- metadata.gz: eb69f05efee6b5c245f86728269f92a68a6abd300519658d151d48d1863e97d8dc903c2b2c6914ec538519236945e61dd5a74e9af8a41d7143e66039bb572199
7
- data.tar.gz: b7241b13812db7c96a791ab93d00f8a3c500afadefc36e93db35b7729a09d8a37ab70b1cbc8fb867ce947432329f496d34662b35fab12e17f60d366b1fc709bc
6
+ metadata.gz: de3417e1789a5c6ae7d09572c4998661a0c1083e46802b7e4dfdf0dbd41436a62e024e35e1ec6bdca65ff1383a25793889e9bae3d05b6e546e7d43022d613fee
7
+ data.tar.gz: 4d5691189979f408a1cb388fe199126c13bc80e580407a818fb44ed4ee0e47117d872c8274064a01a6859f98e72a799d82852e9756b058eee07ee545bef40fdf
@@ -3,9 +3,9 @@ module BlueberryCMS
3
3
  include Mongoid::Document
4
4
 
5
5
  field :css_class, type: String
6
- field :title, type: String
7
- field :description, type: String
8
- field :url, type: String
6
+ field :title, type: String, localize: true
7
+ field :description, type: String, localize: true
8
+ field :url, type: String, localize: true
9
9
  field :page_id, type: BSON::ObjectId
10
10
  field :image_tmp, type: String
11
11
 
@@ -2,9 +2,9 @@ module BlueberryCMS
2
2
  class Question
3
3
  include Mongoid::Document
4
4
 
5
- field :answer, type: String
5
+ field :answer, type: String, localize: true
6
6
  field :position, type: Integer
7
- field :question, type: String
7
+ field :question, type: String, localize: true
8
8
 
9
9
  embedded_in :faq, class_name: 'BlueberryCMS::PageBlocks::FAQ'
10
10
  end
@@ -2,9 +2,9 @@ module BlueberryCMS
2
2
  class Tab
3
3
  include Mongoid::Document
4
4
 
5
- field :content, type: String
5
+ field :content, type: String, localize: true
6
6
  field :position, type: Integer
7
- field :title, type: String
7
+ field :title, type: String, localize: true
8
8
 
9
9
  embedded_in :tabs, class_name: 'BlueberryCMS::PageBlocks::Tabs'
10
10
 
@@ -6,7 +6,7 @@ module BlueberryCMS
6
6
  field :job, type: String
7
7
  field :movie_url, type: String
8
8
  field :position, type: Integer
9
- field :title, type: String
9
+ field :title, type: String, localize: true
10
10
  field :video_id, type: String
11
11
 
12
12
  enumerable :channel, %i[youtube vimeo]
@@ -14,8 +14,15 @@ li.nested-fields.question class=('hidden' if f.object.marked_for_destruction?)
14
14
  i.glyphicon.glyphicon-resize-small title=t('blueberry_cms.admin.common.collapse')
15
15
 
16
16
  .panel-body.collapse class=('in' if block_visible?(f.object)) id="toggle-#{f.object_id}"
17
- = f.input :question
18
- = f.input :answer, as: :text, input_html: { class: 'redactor' }
17
+ - I18n.available_locales.each do |locale|
18
+ .tab-content class="#{locale}-content"
19
+ = f.input :question
20
+ = f.simple_fields_for :question_translations do |localized_field|
21
+ = localized_field.input locale, input_html: { value: f.object.question_translations[locale] }, label: false
22
+
23
+ = f.input :answer
24
+ = f.simple_fields_for :answer_translations do |localized_field|
25
+ = localized_field.input locale, input_html: { value: f.object.answer_translations[locale], class: 'redactor' }, as: :text, label: false
19
26
 
20
27
  hr
21
28
  .form-group--no-label
@@ -3,9 +3,21 @@
3
3
  .panel.panel-default
4
4
  .panel-body
5
5
  = f.input :css_class
6
- = f.input :title
7
- = f.input :description, as: :text, input_html: { class: 'redactor' }
8
- = f.input :url
6
+
7
+ - I18n.available_locales.each do |locale|
8
+ .tab-content class="#{locale}-content"
9
+ = f.input :title
10
+ = f.simple_fields_for :title_translations do |localized_field|
11
+ = localized_field.input locale, input_html: { value: f.object.title_translations[locale] }, label: false
12
+
13
+ = f.input :description
14
+ = f.simple_fields_for :description_translations do |localized_field|
15
+ = localized_field.input locale, input_html: { value: f.object.description_translations[locale], class: 'redactor' }, as: :text, label: false
16
+
17
+ = f.input :url
18
+ = f.simple_fields_for :url_translations do |localized_field|
19
+ = localized_field.input locale, input_html: { value: f.object.url_translations[locale] }, label: false
20
+
9
21
  = f.input :page_id, collection: nested_set_options(BlueberryCMS::Page)
10
22
  = f.input :image
11
23
  - if f.object.image.present?
@@ -14,8 +14,15 @@ li.nested-fields.tab class=('hidden' if f.object.marked_for_destruction?)
14
14
  i.glyphicon.glyphicon-resize-small title=t('blueberry_cms.admin.common.collapse')
15
15
 
16
16
  .panel-body.collapse class=('in' if block_visible?(f.object)) id="toggle-#{f.object_id}"
17
- = f.input :title
18
- = f.input :content, as: :text, input_html: { class: 'redactor' }
17
+ - I18n.available_locales.each do |locale|
18
+ .tab-content class="#{locale}-content"
19
+ = f.input :title
20
+ = f.simple_fields_for :title_translations do |localized_field|
21
+ = localized_field.input locale, input_html: { value: f.object.title_translations[locale] }, label: false
22
+
23
+ = f.input :content
24
+ = f.simple_fields_for :content_translations do |localized_field|
25
+ = localized_field.input locale, input_html: { value: f.object.content_translations[locale], class: 'redactor' }, as: :text, label: false
19
26
 
20
27
  hr
21
28
  .form-group--no-label
@@ -6,7 +6,12 @@ li.nested-fields.video class=('hidden' if f.object.marked_for_destruction?)
6
6
  = f.input :position, as: :hidden
7
7
 
8
8
  .panel-body
9
- = f.input :title
9
+ - I18n.available_locales.each do |locale|
10
+ .tab-content class="#{locale}-content"
11
+ = f.input :title
12
+ = f.simple_fields_for :title_translations do |localized_field|
13
+ = localized_field.input locale, input_html: { value: f.object.title_translations[locale] }, label: false
14
+
10
15
  = f.input :job
11
16
  = f.input :movie_url
12
17
 
@@ -20,4 +20,4 @@ ul.navbar-sub
20
20
  - else
21
21
  h3.h3 = link.link_title
22
22
  - if link.description?
23
- p == link.description
23
+ == link.description
@@ -1,3 +1,3 @@
1
1
  module BlueberryCMS
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blueberry_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Magnusek
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-06-25 00:00:00.000000000 Z
12
+ date: 2019-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: carrierwave