radiant-globalize2-extension 0.2.8 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.8
1
+ 0.3.0
@@ -0,0 +1,12 @@
1
+ %tr
2
+ %th.label
3
+ %label{:for=>"page_#{page_field.name}"}= page_field.name
4
+ %td.field
5
+ = hidden_field_tag "page[fields_attributes][#{page_field_counter}][id]", page_field.id, :id => "page_fields_attributes_#{page_field_counter}_id" unless page_field.new_record?
6
+ = hidden_field_tag "page[fields_attributes][#{page_field_counter}][name]", page_field.name, :id => "page_fields_attributes_#{page_field_counter}_name", :class => "page_field_name"
7
+ = hidden_field_tag "page[fields_attributes][#{page_field_counter}][_destroy]", page_field._destroy, :class => 'delete_input'
8
+ ~ text_field_tag "page[fields_attributes][#{page_field_counter}][content]", I18n.with_locale(Globalize2Extension.content_locale){page_field.content}, :id => "page_fields_attributes_#{page_field_counter}_content", :class => "textbox", :maxlength => 200
9
+ %td.actions
10
+ - link_to '#add_field_popup', :class=>'popup', :alt => t('add_field') do
11
+ = image 'plus_grey'
12
+ = link_to_function image('minus_grey', :alt => t('remove_field')), "event.stop(); window.removeField(this)", :title => t('remove_field')
@@ -0,0 +1,11 @@
1
+ class AddPageFieldTranslations < ActiveRecord::Migration
2
+ def self.up
3
+ globalize_columns = {}
4
+ globalize_columns[:content] = :text
5
+ PageField.create_translation_table! globalize_columns
6
+ end
7
+
8
+ def self.down
9
+ PageField.drop_translation_table!
10
+ end
11
+ end
@@ -3,7 +3,7 @@
3
3
  require 'globalize2/form_builder_extensions'
4
4
 
5
5
  class Globalize2Extension < Radiant::Extension
6
- version "0.2.8"
6
+ version "0.3.0"
7
7
  description "Translate content in Radiant CMS using the Globalize2 Rails plugin."
8
8
  url "http://blog.aissac.ro/radiant/globalize2-extension/"
9
9
 
@@ -12,7 +12,8 @@ class Globalize2Extension < Radiant::Extension
12
12
  Page => [:title, :slug, :breadcrumb],
13
13
  PagePart => [:content],
14
14
  Layout => [:content],
15
- Snippet => [:content]
15
+ Snippet => [:content],
16
+ PageField => [:content]
16
17
  }
17
18
 
18
19
  def self.default_language
@@ -0,0 +1,368 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{radiant-globalize2-extension}
8
+ s.version = "0.3.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Cristi Duma", "Istvan Hoka", "Edmund Haselwanter", "Benny Degezelle", "Jerrod Blavos", "Simo Niemel\303\244", "Jan De Poorter"]
12
+ s.date = %q{2011-05-04}
13
+ s.description = %q{This extension allows you to translate your Radiant content}
14
+ s.email = %q{benny@gorilla-webdesign.be}
15
+ s.files = [
16
+ "Rakefile",
17
+ "VERSION",
18
+ "app/views/admin/page_fields/page_field.html.haml",
19
+ "app/views/admin/shared/_change_locale.html.haml",
20
+ "app/views/admin/shared/_change_locale_admin.html.haml",
21
+ "app/views/admin/shared/_globalize_td.html.haml",
22
+ "app/views/admin/shared/_globalize_th.html.haml",
23
+ "config/routes.rb",
24
+ "cucumber.yml",
25
+ "db/migrate/20090728084238_create_translation_tables.rb",
26
+ "db/migrate/20090728114627_populate_translations.rb",
27
+ "db/migrate/20090729085422_remove_translated_attributes.rb",
28
+ "db/migrate/20110504101407_add_page_field_translations.rb",
29
+ "features/globalize_layouts.feature",
30
+ "features/globalize_pages.feature",
31
+ "features/globalize_snippets.feature",
32
+ "features/step_definitions/admin_steps.rb",
33
+ "features/step_definitions/webrat_steps.rb",
34
+ "features/support/env.rb",
35
+ "features/support/paths.rb",
36
+ "globalize2_extension.rb",
37
+ "lib/globalize2/compatibility/archive/archive_page_extensions.rb",
38
+ "lib/globalize2/compatibility/copy_move/copy_move_model_extensions.rb",
39
+ "lib/globalize2/compatibility/paginate/globalize_tags.rb",
40
+ "lib/globalize2/compatibility/paginate/page_extensions.rb",
41
+ "lib/globalize2/compatibility/vhost/page_extensions.rb",
42
+ "lib/globalize2/form_builder_extensions.rb",
43
+ "lib/globalize2/globalize_tags.rb",
44
+ "lib/globalize2/globalized_fields_controller_extension.rb",
45
+ "lib/globalize2/localized_content.rb",
46
+ "lib/globalize2/page_extensions.rb",
47
+ "lib/globalize2/page_part_extensions.rb",
48
+ "lib/globalize2/pages_controller_extensions.rb",
49
+ "lib/globalize2/site_controller_extensions.rb",
50
+ "lib/tasks/globalize2_extension_tasks.rake",
51
+ "public/images/admin/ad.gif",
52
+ "public/images/admin/ae.gif",
53
+ "public/images/admin/af.gif",
54
+ "public/images/admin/ag.gif",
55
+ "public/images/admin/ai.gif",
56
+ "public/images/admin/al.gif",
57
+ "public/images/admin/am.gif",
58
+ "public/images/admin/an.gif",
59
+ "public/images/admin/ao.gif",
60
+ "public/images/admin/ar.gif",
61
+ "public/images/admin/as.gif",
62
+ "public/images/admin/at.gif",
63
+ "public/images/admin/au.gif",
64
+ "public/images/admin/aw.gif",
65
+ "public/images/admin/ax.gif",
66
+ "public/images/admin/az.gif",
67
+ "public/images/admin/ba.gif",
68
+ "public/images/admin/bb.gif",
69
+ "public/images/admin/bd.gif",
70
+ "public/images/admin/be.gif",
71
+ "public/images/admin/bf.gif",
72
+ "public/images/admin/bg.gif",
73
+ "public/images/admin/bh.gif",
74
+ "public/images/admin/bi.gif",
75
+ "public/images/admin/bj.gif",
76
+ "public/images/admin/bm.gif",
77
+ "public/images/admin/bn.gif",
78
+ "public/images/admin/bo.gif",
79
+ "public/images/admin/br.gif",
80
+ "public/images/admin/bs.gif",
81
+ "public/images/admin/bt.gif",
82
+ "public/images/admin/bv.gif",
83
+ "public/images/admin/bw.gif",
84
+ "public/images/admin/by.gif",
85
+ "public/images/admin/bz.gif",
86
+ "public/images/admin/ca.gif",
87
+ "public/images/admin/catalonia.gif",
88
+ "public/images/admin/cc.gif",
89
+ "public/images/admin/cd.gif",
90
+ "public/images/admin/cf.gif",
91
+ "public/images/admin/cg.gif",
92
+ "public/images/admin/ch.gif",
93
+ "public/images/admin/ci.gif",
94
+ "public/images/admin/ck.gif",
95
+ "public/images/admin/cl.gif",
96
+ "public/images/admin/cm.gif",
97
+ "public/images/admin/cn.gif",
98
+ "public/images/admin/co.gif",
99
+ "public/images/admin/cr.gif",
100
+ "public/images/admin/cs.gif",
101
+ "public/images/admin/cu.gif",
102
+ "public/images/admin/cv.gif",
103
+ "public/images/admin/cx.gif",
104
+ "public/images/admin/cy.gif",
105
+ "public/images/admin/cz.gif",
106
+ "public/images/admin/de.gif",
107
+ "public/images/admin/dj.gif",
108
+ "public/images/admin/dk.gif",
109
+ "public/images/admin/dm.gif",
110
+ "public/images/admin/do.gif",
111
+ "public/images/admin/dz.gif",
112
+ "public/images/admin/ec.gif",
113
+ "public/images/admin/ee.gif",
114
+ "public/images/admin/eg.gif",
115
+ "public/images/admin/eh.gif",
116
+ "public/images/admin/en.gif",
117
+ "public/images/admin/england.gif",
118
+ "public/images/admin/er.gif",
119
+ "public/images/admin/es.gif",
120
+ "public/images/admin/et.gif",
121
+ "public/images/admin/europeanunion.gif",
122
+ "public/images/admin/fam.gif",
123
+ "public/images/admin/fi.gif",
124
+ "public/images/admin/fj.gif",
125
+ "public/images/admin/fk.gif",
126
+ "public/images/admin/fm.gif",
127
+ "public/images/admin/fo.gif",
128
+ "public/images/admin/fr.gif",
129
+ "public/images/admin/ga.gif",
130
+ "public/images/admin/gb.gif",
131
+ "public/images/admin/gd.gif",
132
+ "public/images/admin/ge.gif",
133
+ "public/images/admin/gf.gif",
134
+ "public/images/admin/gh.gif",
135
+ "public/images/admin/gi.gif",
136
+ "public/images/admin/gl.gif",
137
+ "public/images/admin/gm.gif",
138
+ "public/images/admin/gn.gif",
139
+ "public/images/admin/gp.gif",
140
+ "public/images/admin/gq.gif",
141
+ "public/images/admin/gr.gif",
142
+ "public/images/admin/gs.gif",
143
+ "public/images/admin/gt.gif",
144
+ "public/images/admin/gu.gif",
145
+ "public/images/admin/gw.gif",
146
+ "public/images/admin/gy.gif",
147
+ "public/images/admin/hk.gif",
148
+ "public/images/admin/hm.gif",
149
+ "public/images/admin/hn.gif",
150
+ "public/images/admin/hr.gif",
151
+ "public/images/admin/ht.gif",
152
+ "public/images/admin/hu.gif",
153
+ "public/images/admin/id.gif",
154
+ "public/images/admin/ie.gif",
155
+ "public/images/admin/il.gif",
156
+ "public/images/admin/in.gif",
157
+ "public/images/admin/io.gif",
158
+ "public/images/admin/iq.gif",
159
+ "public/images/admin/ir.gif",
160
+ "public/images/admin/is.gif",
161
+ "public/images/admin/it.gif",
162
+ "public/images/admin/jm.gif",
163
+ "public/images/admin/jo.gif",
164
+ "public/images/admin/jp.gif",
165
+ "public/images/admin/ke.gif",
166
+ "public/images/admin/kg.gif",
167
+ "public/images/admin/kh.gif",
168
+ "public/images/admin/ki.gif",
169
+ "public/images/admin/km.gif",
170
+ "public/images/admin/kn.gif",
171
+ "public/images/admin/kp.gif",
172
+ "public/images/admin/kr.gif",
173
+ "public/images/admin/kw.gif",
174
+ "public/images/admin/ky.gif",
175
+ "public/images/admin/kz.gif",
176
+ "public/images/admin/la.gif",
177
+ "public/images/admin/lb.gif",
178
+ "public/images/admin/lc.gif",
179
+ "public/images/admin/li.gif",
180
+ "public/images/admin/lk.gif",
181
+ "public/images/admin/lr.gif",
182
+ "public/images/admin/ls.gif",
183
+ "public/images/admin/lt.gif",
184
+ "public/images/admin/lu.gif",
185
+ "public/images/admin/lv.gif",
186
+ "public/images/admin/ly.gif",
187
+ "public/images/admin/ma.gif",
188
+ "public/images/admin/mc.gif",
189
+ "public/images/admin/md.gif",
190
+ "public/images/admin/me.gif",
191
+ "public/images/admin/mg.gif",
192
+ "public/images/admin/mh.gif",
193
+ "public/images/admin/mk.gif",
194
+ "public/images/admin/ml.gif",
195
+ "public/images/admin/mm.gif",
196
+ "public/images/admin/mn.gif",
197
+ "public/images/admin/mo.gif",
198
+ "public/images/admin/mp.gif",
199
+ "public/images/admin/mq.gif",
200
+ "public/images/admin/mr.gif",
201
+ "public/images/admin/ms.gif",
202
+ "public/images/admin/mt.gif",
203
+ "public/images/admin/mu.gif",
204
+ "public/images/admin/mv.gif",
205
+ "public/images/admin/mw.gif",
206
+ "public/images/admin/mx.gif",
207
+ "public/images/admin/my.gif",
208
+ "public/images/admin/mz.gif",
209
+ "public/images/admin/na.gif",
210
+ "public/images/admin/nc.gif",
211
+ "public/images/admin/ne.gif",
212
+ "public/images/admin/nf.gif",
213
+ "public/images/admin/ng.gif",
214
+ "public/images/admin/ni.gif",
215
+ "public/images/admin/nl.gif",
216
+ "public/images/admin/no.gif",
217
+ "public/images/admin/np.gif",
218
+ "public/images/admin/nr.gif",
219
+ "public/images/admin/nu.gif",
220
+ "public/images/admin/nz.gif",
221
+ "public/images/admin/om.gif",
222
+ "public/images/admin/pa.gif",
223
+ "public/images/admin/pe.gif",
224
+ "public/images/admin/pf.gif",
225
+ "public/images/admin/pg.gif",
226
+ "public/images/admin/ph.gif",
227
+ "public/images/admin/pk.gif",
228
+ "public/images/admin/pl.gif",
229
+ "public/images/admin/pm.gif",
230
+ "public/images/admin/pn.gif",
231
+ "public/images/admin/pr.gif",
232
+ "public/images/admin/ps.gif",
233
+ "public/images/admin/pt.gif",
234
+ "public/images/admin/pw.gif",
235
+ "public/images/admin/py.gif",
236
+ "public/images/admin/qa.gif",
237
+ "public/images/admin/re.gif",
238
+ "public/images/admin/ro.gif",
239
+ "public/images/admin/rs.gif",
240
+ "public/images/admin/ru.gif",
241
+ "public/images/admin/rw.gif",
242
+ "public/images/admin/sa.gif",
243
+ "public/images/admin/sb.gif",
244
+ "public/images/admin/sc.gif",
245
+ "public/images/admin/scotland.gif",
246
+ "public/images/admin/sd.gif",
247
+ "public/images/admin/se.gif",
248
+ "public/images/admin/sg.gif",
249
+ "public/images/admin/sh.gif",
250
+ "public/images/admin/si.gif",
251
+ "public/images/admin/sj.gif",
252
+ "public/images/admin/sk.gif",
253
+ "public/images/admin/sl.gif",
254
+ "public/images/admin/sm.gif",
255
+ "public/images/admin/sn.gif",
256
+ "public/images/admin/so.gif",
257
+ "public/images/admin/sr.gif",
258
+ "public/images/admin/st.gif",
259
+ "public/images/admin/sv.gif",
260
+ "public/images/admin/sy.gif",
261
+ "public/images/admin/sz.gif",
262
+ "public/images/admin/tc.gif",
263
+ "public/images/admin/td.gif",
264
+ "public/images/admin/tf.gif",
265
+ "public/images/admin/tg.gif",
266
+ "public/images/admin/th.gif",
267
+ "public/images/admin/tj.gif",
268
+ "public/images/admin/tk.gif",
269
+ "public/images/admin/tl.gif",
270
+ "public/images/admin/tm.gif",
271
+ "public/images/admin/tn.gif",
272
+ "public/images/admin/to.gif",
273
+ "public/images/admin/tr.gif",
274
+ "public/images/admin/tt.gif",
275
+ "public/images/admin/tv.gif",
276
+ "public/images/admin/tw.gif",
277
+ "public/images/admin/tz.gif",
278
+ "public/images/admin/ua.gif",
279
+ "public/images/admin/ug.gif",
280
+ "public/images/admin/um.gif",
281
+ "public/images/admin/us.gif",
282
+ "public/images/admin/uy.gif",
283
+ "public/images/admin/uz.gif",
284
+ "public/images/admin/va.gif",
285
+ "public/images/admin/vc.gif",
286
+ "public/images/admin/ve.gif",
287
+ "public/images/admin/vg.gif",
288
+ "public/images/admin/vi.gif",
289
+ "public/images/admin/vn.gif",
290
+ "public/images/admin/vu.gif",
291
+ "public/images/admin/wales.gif",
292
+ "public/images/admin/wf.gif",
293
+ "public/images/admin/ws.gif",
294
+ "public/images/admin/ye.gif",
295
+ "public/images/admin/yt.gif",
296
+ "public/images/admin/za.gif",
297
+ "public/images/admin/zm.gif",
298
+ "public/images/admin/zw.gif",
299
+ "public/stylesheets/sass/admin/globalize2.sass",
300
+ "radiant-globalize2-extension.gemspec",
301
+ "readme.md",
302
+ "spec/controllers/admin/pages_controller_spec.rb",
303
+ "spec/controllers/site_controller_spec.rb",
304
+ "spec/factories.rb",
305
+ "spec/models/globalize_tags_spec.rb",
306
+ "spec/models/page_spec.rb",
307
+ "spec/spec.opts",
308
+ "spec/spec_helper.rb",
309
+ "vendor/plugins/globalize2/.gitignore",
310
+ "vendor/plugins/globalize2/LICENSE",
311
+ "vendor/plugins/globalize2/README.textile",
312
+ "vendor/plugins/globalize2/Rakefile",
313
+ "vendor/plugins/globalize2/VERSION",
314
+ "vendor/plugins/globalize2/generators/db_backend.rb",
315
+ "vendor/plugins/globalize2/generators/templates/db_backend_migration.rb",
316
+ "vendor/plugins/globalize2/globalize2.gemspec",
317
+ "vendor/plugins/globalize2/init.rb",
318
+ "vendor/plugins/globalize2/lib/globalize.rb",
319
+ "vendor/plugins/globalize2/lib/globalize/active_record.rb",
320
+ "vendor/plugins/globalize2/lib/globalize/active_record/adapter.rb",
321
+ "vendor/plugins/globalize2/lib/globalize/active_record/attributes.rb",
322
+ "vendor/plugins/globalize2/lib/globalize/active_record/migration.rb",
323
+ "vendor/plugins/globalize2/lib/i18n/missing_translations_log_handler.rb",
324
+ "vendor/plugins/globalize2/lib/i18n/missing_translations_raise_handler.rb",
325
+ "vendor/plugins/globalize2/test/active_record/fallbacks_test.rb",
326
+ "vendor/plugins/globalize2/test/active_record/migration_test.rb",
327
+ "vendor/plugins/globalize2/test/active_record/sti_translated_test.rb",
328
+ "vendor/plugins/globalize2/test/active_record/translates_test.rb",
329
+ "vendor/plugins/globalize2/test/active_record/translation_class_test.rb",
330
+ "vendor/plugins/globalize2/test/active_record/validation_tests.rb",
331
+ "vendor/plugins/globalize2/test/active_record_test.rb",
332
+ "vendor/plugins/globalize2/test/all.rb",
333
+ "vendor/plugins/globalize2/test/data/models.rb",
334
+ "vendor/plugins/globalize2/test/data/no_globalize_schema.rb",
335
+ "vendor/plugins/globalize2/test/data/schema.rb",
336
+ "vendor/plugins/globalize2/test/i18n/missing_translations_test.rb",
337
+ "vendor/plugins/globalize2/test/test_helper.rb"
338
+ ]
339
+ s.homepage = %q{https://github.com/jomz/radiant-globalize2-extension}
340
+ s.require_paths = ["lib"]
341
+ s.rubygems_version = %q{1.3.7}
342
+ s.summary = %q{Globalize2 extension for Radiant CMS}
343
+ s.test_files = [
344
+ "spec/controllers/admin/pages_controller_spec.rb",
345
+ "spec/controllers/site_controller_spec.rb",
346
+ "spec/factories.rb",
347
+ "spec/models/globalize_tags_spec.rb",
348
+ "spec/models/page_spec.rb",
349
+ "spec/spec_helper.rb"
350
+ ]
351
+
352
+ if s.respond_to? :specification_version then
353
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
354
+ s.specification_version = 3
355
+
356
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
357
+ s.add_runtime_dependency(%q<radiant>, [">= 0.9.1"])
358
+ s.add_runtime_dependency(%q<i18n>, [">= 0.4.1"])
359
+ else
360
+ s.add_dependency(%q<radiant>, [">= 0.9.1"])
361
+ s.add_dependency(%q<i18n>, [">= 0.4.1"])
362
+ end
363
+ else
364
+ s.add_dependency(%q<radiant>, [">= 0.9.1"])
365
+ s.add_dependency(%q<i18n>, [">= 0.4.1"])
366
+ end
367
+ end
368
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-globalize2-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 8
10
- version: 0.2.8
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Cristi Duma
@@ -21,7 +21,7 @@ autorequire:
21
21
  bindir: bin
22
22
  cert_chain: []
23
23
 
24
- date: 2011-04-04 00:00:00 +02:00
24
+ date: 2011-05-04 00:00:00 +02:00
25
25
  default_executable:
26
26
  dependencies:
27
27
  - !ruby/object:Gem::Dependency
@@ -40,6 +40,22 @@ dependencies:
40
40
  version: 0.9.1
41
41
  type: :runtime
42
42
  version_requirements: *id001
43
+ - !ruby/object:Gem::Dependency
44
+ name: i18n
45
+ prerelease: false
46
+ requirement: &id002 !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ hash: 13
52
+ segments:
53
+ - 0
54
+ - 4
55
+ - 1
56
+ version: 0.4.1
57
+ type: :runtime
58
+ version_requirements: *id002
43
59
  description: This extension allows you to translate your Radiant content
44
60
  email: benny@gorilla-webdesign.be
45
61
  executables: []
@@ -51,6 +67,7 @@ extra_rdoc_files: []
51
67
  files:
52
68
  - Rakefile
53
69
  - VERSION
70
+ - app/views/admin/page_fields/page_field.html.haml
54
71
  - app/views/admin/shared/_change_locale.html.haml
55
72
  - app/views/admin/shared/_change_locale_admin.html.haml
56
73
  - app/views/admin/shared/_globalize_td.html.haml
@@ -60,6 +77,7 @@ files:
60
77
  - db/migrate/20090728084238_create_translation_tables.rb
61
78
  - db/migrate/20090728114627_populate_translations.rb
62
79
  - db/migrate/20090729085422_remove_translated_attributes.rb
80
+ - db/migrate/20110504101407_add_page_field_translations.rb
63
81
  - features/globalize_layouts.feature
64
82
  - features/globalize_pages.feature
65
83
  - features/globalize_snippets.feature
@@ -331,6 +349,7 @@ files:
331
349
  - public/images/admin/zm.gif
332
350
  - public/images/admin/zw.gif
333
351
  - public/stylesheets/sass/admin/globalize2.sass
352
+ - radiant-globalize2-extension.gemspec
334
353
  - readme.md
335
354
  - spec/controllers/admin/pages_controller_spec.rb
336
355
  - spec/controllers/site_controller_spec.rb