comfortable_mexican_sofa 2.0.14 → 2.0.15

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
  SHA256:
3
- metadata.gz: 7cc4680084f0e38ab3a3e902264eb28487be58a3cfb10abb3722ead0a917e7c4
4
- data.tar.gz: 7fe8523b33056e692bb8f3ee552517adbd994dfcf3e830466ff078e72e646439
3
+ metadata.gz: 25db9cdf110b89242667481c578ed9c4d5f96c7b19f24a191819ffcadab82824
4
+ data.tar.gz: 86ceaa88e1cc238675eace7ebed77d412f85f89ca8ca51c2828eb24138c93c7b
5
5
  SHA512:
6
- metadata.gz: e01f50e27b67203265c0d4683ae78d50644a5f64a8a4ea9898f3e94b163c5990c04b83b4d25133ecc8c531ceadadd87a32d249724211562622d5341ede61bd5b
7
- data.tar.gz: 26695cba7cf37dcc11ce3955d8dca504231bcaf33b62e736c7eff19304ffe0f0ad920fa12d62f3bda92f0bea087bc25e309ca7ce6c2ddc60a43cdedd7dc008f9
6
+ metadata.gz: 193250126535a0cf199006028c257a56175b5eb8dfca6600c9349086e3a62b33d3d343d0ba2933a3b49810ea681b265a5d58acad43cc4c5fd6c7db9ad8ad7b94
7
+ data.tar.gz: dfe68d85008f65ee1ce5f98a34fd2d3c354ed9b92b7e598f63278fa1a42f3cefff1d8930e513e5bcce00c9485538346c4b61615b749c04be47cc63c1e70a6ea2
data/README.md CHANGED
@@ -16,7 +16,7 @@ ComfortableMexicanSofa is a powerful Ruby on Rails 5.2+ CMS (Content Management
16
16
  * CMS stays away from the rest of your application
17
17
  * Powerful page templating capability using [Content Tags](https://github.com/comfy/comfortable-mexican-sofa/wiki/Docs:-Content-Tags)
18
18
  * [Multiple Sites](https://github.com/comfy/comfortable-mexican-sofa/wiki/Docs:-Sites) from a single installation
19
- * Multi-Language Support (i18n) (ca, cs, da, de, en, es, fr, gr, it, ja, nb, nl, pl, pt-BR, ru, sv, tr, uk, zh-CN, zh-TW) and page localization.
19
+ * Multi-Language Support (i18n) (ca, cs, da, de, en, es, fi, fr, gr, it, ja, nb, nl, pl, pt-BR, ru, sv, tr, uk, zh-CN, zh-TW) and page localization.
20
20
  * [CMS Seeds](https://github.com/comfy/comfortable-mexican-sofa/wiki/Docs:-CMS-Seeds) for initial content population
21
21
  * [Revision History](https://github.com/comfy/comfortable-mexican-sofa/wiki/Docs:-Revisions) to revert changes
22
22
  * [Extendable Admin Area](https://github.com/comfy/comfortable-mexican-sofa/wiki/HowTo:-Reusing-Admin-Area) built with [Bootstrap 4](http://getbootstrap.com) (responsive design). Using [CodeMirror](http://codemirror.net) for HTML and Markdown highlighing and [Redactor](http://imperavi.com/redactor) as the WYSIWYG editor.
@@ -63,7 +63,12 @@ class Comfy::Admin::Cms::PagesController < Comfy::Admin::Cms::BaseController
63
63
  def form_fragments
64
64
  @page = @site.pages.find_by(id: params[:id]) || @site.pages.new
65
65
  @page.layout = @site.layouts.find_by(id: params[:layout_id])
66
- render partial: "comfy/admin/cms/fragments/form_fragments", locals: { record: @page, scope: :page }, layout: false
66
+
67
+ render(
68
+ partial: "comfy/admin/cms/fragments/form_fragments",
69
+ locals: { record: @page, scope: :page },
70
+ layout: false
71
+ )
67
72
  end
68
73
 
69
74
  def toggle_branch
@@ -47,9 +47,9 @@ class Comfy::Admin::Cms::TranslationsController < Comfy::Admin::Cms::BaseControl
47
47
  @translation.layout = @site.layouts.find_by(id: params[:layout_id])
48
48
 
49
49
  render(
50
- partial: "comfy/admin/cms/fragments/form_fragments",
51
- locals: { record: @translation, scope: :translation },
52
- layout: false
50
+ partial: "comfy/admin/cms/fragments/form_fragments",
51
+ locals: { record: @translation, scope: :translation },
52
+ layout: false
53
53
  )
54
54
  end
55
55
 
@@ -29,6 +29,7 @@ module Comfy
29
29
  def cms_fragment_render(identifier, page = @cms_page)
30
30
  node = page.fragment_nodes.detect { |n| n.identifier == identifier.to_s }
31
31
  return "" unless node
32
+ node.renderable = true
32
33
  render inline: page.render([node])
33
34
  end
34
35
 
@@ -36,13 +37,7 @@ module Comfy
36
37
  # Example:
37
38
  # cms_snippet_content(:my_snippet)
38
39
  def cms_snippet_content(identifier, cms_site = @cms_site)
39
- unless cms_site
40
- if respond_to?(:request) && request
41
- host = request.host_with_port.downcase
42
- path = request.fullpath
43
- end
44
- cms_site = Comfy::Cms::Site.find_site(host, path)
45
- end
40
+ cms_site ||= cms_site_detect
46
41
  snippet = cms_site&.snippets&.find_by_identifier(identifier)
47
42
  return "" unless snippet
48
43
  snippet.content
@@ -51,9 +46,17 @@ module Comfy
51
46
  # Same as cms_snippet_content but cms tags will be expanded. Note that there
52
47
  # is no page context, so snippet cannot contain fragment tags.
53
48
  def cms_snippet_render(identifier, cms_site = @cms_site)
54
- content = cms_snippet_content(identifier, cms_site)
55
- r = ComfortableMexicanSofa::Content::Renderer.new(Comfy::Cms::Page.new)
56
- render inline: r.render(r.nodes(r.tokenize(content)))
49
+ cms_site ||= cms_site_detect
50
+ snippet = cms_site&.snippets&.find_by_identifier(identifier)
51
+ return "" unless snippet
52
+ r = ComfortableMexicanSofa::Content::Renderer.new(snippet)
53
+ render inline: r.render(r.nodes(r.tokenize(snippet.content)))
54
+ end
55
+
56
+ def cms_site_detect
57
+ host = request.host_with_port.downcase
58
+ path = request.fullpath
59
+ Comfy::Cms::Site.find_site(host, path)
57
60
  end
58
61
 
59
62
  # Wrapper to deal with Kaminari vs WillPaginate
@@ -150,7 +150,7 @@ en:
150
150
  form_fragments:
151
151
  no_tags: |-
152
152
  Layout has no content tags defined.<br/>
153
- Edit the content to include a page or field tag. For example: <code>{{cms:wysiwyg content}}</code>
153
+ Edit Layout content to include a fragment tag. For example: <code>{{cms:wysiwyg content}}</code>
154
154
 
155
155
  translations:
156
156
  created: Translation created
@@ -6,11 +6,11 @@ es:
6
6
  comfy/cms/page: Página
7
7
  comfy/cms/snippet: Fragmento
8
8
  comfy/cms/file: File
9
- comfy/cms/translation: Translation
9
+ comfy/cms/translation: Traducción
10
10
 
11
11
  attributes:
12
12
  comfy/cms/site:
13
- identifier: Identifier
13
+ identifier: Identificador
14
14
  label: Nombre
15
15
  hostname: Dirección
16
16
  path: Ruta
@@ -27,7 +27,7 @@ es:
27
27
  label: Título
28
28
  layout_id: Plantilla
29
29
  slug: Ruta
30
- full_path: Full path
30
+ full_path: Ruta completa
31
31
  parent_id: Padre
32
32
  target_page_id: Redirigir a
33
33
  content: Contenido
@@ -41,10 +41,10 @@ es:
41
41
  identifier: Identifier
42
42
  content: Contenido
43
43
  comfy/cms/translation:
44
- locale: Language
45
- label: Label
46
- layout_id: Layout
47
- is_published: Published
44
+ locale: Lengua
45
+ label: Nombre
46
+ layout_id: Plantilla
47
+ is_published: Publicada
48
48
 
49
49
  comfy:
50
50
  cms:
@@ -144,7 +144,7 @@ es:
144
144
  create: Crear Página
145
145
  cancel: Cancelar
146
146
  update: Actualizar Página
147
- choose_link: Select page...
147
+ choose_link: Seleccione una página...
148
148
 
149
149
  fragments:
150
150
  form_fragments:
@@ -153,25 +153,25 @@ es:
153
153
  Edite el contenido para incluir alguna etiqueta de página o campo, por ejemplo: <code>{{cms:wysiwyg content}}</code>
154
154
 
155
155
  translations:
156
- created: Translation created
157
- creation_failure: Failed to create translation
158
- updated: Translation updated
159
- update_failure: Failed to update translation
160
- deleted: Translation deleted
161
- not_found: Translation not found
156
+ created: Traducción creada
157
+ creation_failure: La traducción no ha podido ser creada
158
+ updated: Traducción actualizada
159
+ update_failure: La traducción no ha podido ser actualizada
160
+ deleted: Traducción eliminada
161
+ not_found: Traducción no encontrada
162
162
 
163
163
  new:
164
- title: New Translation
164
+ title: Nueva Traducción
165
165
  edit:
166
- title: Editing Translation
166
+ title: Editando Traducción
167
167
  form:
168
- preview: Preview
169
- create: Create
170
- update: Update
171
- cancel: Return to Page
168
+ preview: Vista Previa
169
+ create: Crear
170
+ update: Actualizar
171
+ cancel: Regresar a la Página
172
172
  sidebar:
173
- new: New Translation
174
- confirm: Are you sure?
173
+ new: Nueva Traducción
174
+ confirm: ¿Está seguro?
175
175
 
176
176
  snippets:
177
177
  created: Fragmento creado
@@ -206,17 +206,17 @@ es:
206
206
  revision: Revisión
207
207
  update: Actualizar a esta versión
208
208
  cancel: Cancelar
209
- content: Content
210
- changes: Changes
211
- previous: Previous
212
- current: Corriente
209
+ content: Contenido
210
+ changes: Cambios
211
+ previous: Anterior
212
+ current: Actual
213
213
  sidebar:
214
214
  revision:
215
- zero: No Revisions
216
- one: '%{count} Revision'
217
- few: '%{count} Revisions'
218
- many: '%{count} Revisions'
219
- other: '%{count} Revisions'
215
+ zero: Sin Revisiones
216
+ one: '%{count} Revisión'
217
+ few: '%{count} Revisiones'
218
+ many: '%{count} Revisiones'
219
+ other: '%{count} Revisiones'
220
220
 
221
221
  files:
222
222
  created: Archivos subidos
@@ -252,7 +252,7 @@ es:
252
252
  index:
253
253
  edit: Editar
254
254
  done: Listo
255
- all: Todos Categorias
255
+ all: Todas las Categorias
256
256
  add: Agregar
257
257
  add_placeholder: Añadir Categoría
258
258
  show:
@@ -0,0 +1,263 @@
1
+ fi:
2
+ activerecord:
3
+ models:
4
+ comfy/cms/site: Sivusto
5
+ comfy/cms/layout: Ulkoasu
6
+ comfy/cms/page: Sivu
7
+ comfy/cms/snippet: Koodinpätkä
8
+ comfy/cms/file: Tiedosto
9
+ comfy/cms/translation: Käännös
10
+
11
+ attributes:
12
+ comfy/cms/site:
13
+ identifier: Tunniste
14
+ label: Merkintä
15
+ hostname: Isäntänimi
16
+ path: Polku
17
+ locale: Kieli
18
+ comfy/cms/layout:
19
+ identifier: Tunniste
20
+ label: Ulkoasun nimi
21
+ app_layout: Sovelluksen ulkoasu
22
+ parent_id: Edeltäjän ulkoasu
23
+ content: Sisältö
24
+ css: Stylesheet
25
+ js: Javascript
26
+ comfy/cms/page:
27
+ label: Merkintä
28
+ layout_id: Ulkoasu
29
+ slug: URL-osa
30
+ full_path: Koko polku
31
+ parent_id: Edeltäjä
32
+ target_page_id: Ohjaa sivulle
33
+ content: Sisältö
34
+ is_published: Julkaistu
35
+ comfy/cms/file:
36
+ label: Merkintä
37
+ file: Tiedosto
38
+ description: Kuvaus
39
+ comfy/cms/snippet:
40
+ label: Merkintä
41
+ identifier: Tunniste
42
+ content: Sisältö
43
+ comfy/cms/translation:
44
+ locale: Kieli
45
+ label: Merkintä
46
+ layout_id: Ulkoasu
47
+ is_published: Julkaistu
48
+
49
+ comfy:
50
+ cms:
51
+ content:
52
+ site_not_found: Sivustoa ei löydy
53
+ layout_not_found: Ulkoasua ei löydy
54
+ page_not_found: Sivua ei löydy
55
+
56
+ admin:
57
+ cms:
58
+ base:
59
+ site_not_found: Sivustoa ei löydy
60
+ seeds_enabled: CMS Seeds on kytketty päälle. Kaikki tehdyt muutokset hävitetään.
61
+
62
+ sites: Sivustot
63
+ layouts: Ulkoasut
64
+ pages: Sivut
65
+ snippets: Koodinpätkät
66
+ files: Tiedostot
67
+
68
+ sites:
69
+ created: Sivusto on luotu
70
+ creation_failure: Sivustoa ei voitu luoda
71
+ updated: Sivusto on päivitetty
72
+ update_failure: Sivustoa ei voitu päivittää
73
+ deleted: Sivusto on poistettu
74
+ not_found: Sivustoa ei löydy
75
+
76
+ index:
77
+ title: Sivustot
78
+ new_link: Luo uusi sivusto
79
+ select: Sivuston valinta
80
+ edit: Muokkaa
81
+ delete: Poista
82
+ are_you_sure: Oletko varma, että haluat poistaa tämän sivuston?
83
+ new:
84
+ title: Uusi sivusto
85
+ edit:
86
+ title: Sivuston muokkaus
87
+ form:
88
+ create: Luo sivusto
89
+ cancel: Peru
90
+ update: Päivitä sivusto
91
+
92
+ layouts:
93
+ created: Ulkoasu on luotu
94
+ creation_failure: Ulkoasua ei voitu luoda
95
+ updated: Ulkoasu on päivitetty
96
+ update_failure: Ulkoasua ei voitu päivittää
97
+ deleted: Ulkoasu on poistettu
98
+ not_found: Ulkoasua ei löydy
99
+
100
+ index:
101
+ title: Ulkoasut
102
+ new_link: Luo uusi ulkoasu
103
+ index_branch:
104
+ add_child_layout: Lisää periytyvä ulkoasu
105
+ edit: Muokkaa
106
+ delete: Poista
107
+ are_you_sure: Oletko varma?
108
+ new:
109
+ title: Uusi ulkoasu
110
+ edit:
111
+ title: Ulkoasun muokkaus
112
+ form:
113
+ select_parent_layout: Valitse edeltävä ulkoasu
114
+ select_app_layout: Valitse sovelluksen ulkoasu
115
+ create: Luo ulkoasu
116
+ cancel: Peru
117
+ update: Päivitä ulkoasu
118
+
119
+ pages:
120
+ created: Sivu on luotu
121
+ creation_failure: Sivua ei voitu luoda
122
+ updated: Sivu on päivitetty
123
+ update_failure: Sivua ei voitu päivittää
124
+ deleted: Sivu on poistettu
125
+ not_found: Sivua ei löydy
126
+ layout_not_found: Yhtään ulkoasua ei löydy. Ole hyvä ja luo sellainen.
127
+
128
+ index:
129
+ title: Sivut
130
+ new_link: Luo uusi sivu
131
+ index_branch:
132
+ toggle: Valinta
133
+ add_child_page: Lisää periytyvä sivu
134
+ edit: Muokkaa
135
+ delete: Poista
136
+ are_you_sure: Oletko varma?
137
+ new:
138
+ title: Uusi sivu
139
+ edit:
140
+ title: Sivun muokkaus
141
+ form:
142
+ select_target_page: Ei uudelleenohjausta
143
+ preview: Esikatselu
144
+ create: Luo sivu
145
+ cancel: Peru
146
+ update: Päivitä sivu
147
+ choose_link: Valitse sivu...
148
+
149
+ fragments:
150
+ form_fragments:
151
+ no_tags: |-
152
+ Ulkoasulla ei ole määriteltyjä tageja sisällölle.<br/>
153
+ Muokkaa ulkoasun sisältöä niin, että se sisältää koodileikkeen tagin. Esimerkiksi: <code>{{cms:wysiwyg content}}</code>
154
+
155
+ translations:
156
+ created: Käännös on luotu
157
+ creation_failure: Käännöstä ei voitu luoda
158
+ updated: Käännös on päivitetty
159
+ update_failure: Käännöstä ei voitu päivittää
160
+ deleted: Käännös on poistettu
161
+ not_found: Käännöstä ei löydy
162
+
163
+ new:
164
+ title: Uusi käännös
165
+ edit:
166
+ title: Käännöksen muokkaus
167
+ form:
168
+ preview: Esikatselu
169
+ create: Luo käännös
170
+ update: Päivitä käännös
171
+ cancel: Palaa sivulle
172
+ sidebar:
173
+ new: Uusi käännös
174
+ confirm: Oletko varma?
175
+
176
+ snippets:
177
+ created: Koodileike on luotu
178
+ creation_failure: Koodileikettä ei voitu luoda
179
+ updated: Koodileike on päivitetty
180
+ update_failure: Koodileikettä ei voitu päivittää
181
+ deleted: Koodileike on poistettu
182
+ not_found: Koodileikettä ei löydy
183
+
184
+ index:
185
+ title: Koodileikkeet
186
+ new_link: Luo uusi koodileike
187
+ edit: Muokkaa
188
+ delete: Poista
189
+ are_you_sure: Oletko varma?
190
+ new:
191
+ title: Uusi koodileike
192
+ edit:
193
+ title: Koodileikkeen muokkaaminen
194
+ form:
195
+ create: Luo koodileike
196
+ cancel: Peru
197
+ update: Päivitä koodileike
198
+
199
+ revisions:
200
+ reverted: Aiempi sisältö on palautettu
201
+ record_not_found: Tietuetta ei löydy
202
+ not_found: Versiota ei löydy
203
+
204
+ show:
205
+ title: Versiot kohteelle
206
+ revision: Versio
207
+ update: Päivitä tähän versioon
208
+ cancel: Peru
209
+ content: Sisältö
210
+ changes: Muokkaukset
211
+ previous: Edellinen
212
+ current: Nykyinen
213
+ sidebar:
214
+ revision:
215
+ zero: Ei versiohistoriaa
216
+ one: '%{count} aiempi versio'
217
+ few: '%{count} aiempaa versiota'
218
+ many: '%{count} aiempaa versiota'
219
+ other: '%{count} versiota'
220
+
221
+ files:
222
+ created: Tiedostot on ladattu onnistuneesti
223
+ creation_failure: Tiedostojen lataaminen epäonnistui
224
+ updated: Tiedosto on päivitetty
225
+ update_failure: Tiedoston päivittäminen epäonnistui
226
+ deleted: Tiedosto on poistettu
227
+ not_found: Tiedostoa ei löydy
228
+
229
+ index:
230
+ title: Tiedostot
231
+ new_link: Lataa uusi tiedosto
232
+ button: Lataa tiedostoja
233
+ new:
234
+ title: Uusi tiedosto
235
+ edit:
236
+ title: Tiedoston muokkaus
237
+ form:
238
+ current_file: Nykyinen tiedosto
239
+ create: Lataa tiedosto
240
+ cancel: Peru
241
+ update: Päivitä tiedosto
242
+ delete: Poista tiedosto
243
+ are_you_sure: Oletko varma?
244
+ page_form:
245
+ are_you_sure: Oletko varma?
246
+ file:
247
+ edit: Muokkaa
248
+ delete: Poista
249
+ are_you_sure: Oletko varma?
250
+
251
+ categories:
252
+ index:
253
+ edit: Muokkaa
254
+ done: Valmis
255
+ all: Kaikki luokat
256
+ add: Lisää
257
+ add_placeholder: Lisää luokka
258
+ show:
259
+ are_you_sure: Oletko varma?
260
+ edit:
261
+ save: Tallenna
262
+ form:
263
+ label: Luokat
@@ -97,6 +97,7 @@ class ComfortableMexicanSofa::Configuration
97
97
  "de" => "Deutsch",
98
98
  "en" => "English",
99
99
  "es" => "Español",
100
+ "fi" => "Suomi",
100
101
  "fr" => "Français",
101
102
  "gr" => "Ελληνικά",
102
103
  "it" => "Italiano",
@@ -10,7 +10,8 @@
10
10
  #
11
11
  class ComfortableMexicanSofa::Content::Tag::Fragment < ComfortableMexicanSofa::Content::Tag
12
12
 
13
- attr_reader :identifier, :renderable, :namespace
13
+ attr_accessor :renderable
14
+ attr_reader :identifier, :namespace
14
15
 
15
16
  # @type [{String => String}]
16
17
  attr_reader :options
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ComfortableMexicanSofa
4
4
 
5
- VERSION = "2.0.14"
5
+ VERSION = "2.0.15"
6
6
 
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comfortable_mexican_sofa
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.14
4
+ version: 2.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Khabarov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-09 00:00:00.000000000 Z
11
+ date: 2018-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_link_to
@@ -513,6 +513,7 @@ files:
513
513
  - config/locales/de.yml
514
514
  - config/locales/en.yml
515
515
  - config/locales/es.yml
516
+ - config/locales/fi.yml
516
517
  - config/locales/fr.yml
517
518
  - config/locales/gr.yml
518
519
  - config/locales/it.yml