optimacms 0.2.15 → 0.2.16
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 +4 -4
- data/app/models/optimacms/template.rb +7 -0
- data/app/views/optimacms/admin/templates/_form_content_translation.html.haml +20 -18
- data/lib/optimacms/version.rb +1 -1
- data/spec/dummy/app/views/temp/p1.html.haml +6 -6
- data/spec/dummy/app/views/temp/t2.en.html.haml +1 -0
- data/spec/dummy/app/views/temp/t2.html.haml +1 -0
- data/spec/dummy/app/views/temp/t2.ru.html.haml +1 -0
- data/spec/dummy/log/development.log +3955 -0
- data/spec/dummy/tmp/pids/server.pid +1 -1
- metadata +49 -43
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 819c23d0db88c22546e3b511184f505a9c74e644
|
|
4
|
+
data.tar.gz: f719a1bfe376bee28abcf10a719905ded29d3629
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6100425840df06842ea2ed3fccdfd78a774d0b84b6c6d594df1a2c6f139d8a018fdf8e1de85790b5cca276449d995c1f64406279fce6fe91f1d8cefea096dc9
|
|
7
|
+
data.tar.gz: d4491d189ce00626fd191c8bf56b2d2af208c42aae92dd7dafdf60c739870cb43eb08795813e811db16fb674ba7ba775e1465893b5397937e73a26b8f03f6e3b
|
|
@@ -307,6 +307,7 @@ module Optimacms
|
|
|
307
307
|
self.parent = Template.create_folders_tree(self.basedirpath)
|
|
308
308
|
end
|
|
309
309
|
|
|
310
|
+
|
|
310
311
|
end
|
|
311
312
|
|
|
312
313
|
end
|
|
@@ -341,6 +342,12 @@ module Optimacms
|
|
|
341
342
|
# TODO: rename file
|
|
342
343
|
#self.make_basepath
|
|
343
344
|
|
|
345
|
+
# remove translations if needed
|
|
346
|
+
if !self.is_translated
|
|
347
|
+
self.translations = self.translations.reject{|r| r.lang!=''}
|
|
348
|
+
#self.translations.clear
|
|
349
|
+
|
|
350
|
+
end
|
|
344
351
|
end
|
|
345
352
|
|
|
346
353
|
end
|
|
@@ -20,24 +20,26 @@
|
|
|
20
20
|
- lang = tran.lang
|
|
21
21
|
- name = lang=='' ? 'def' : lang
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
- lang_ok = lang=='' || lang=='def' || @languages.include?(lang)
|
|
24
|
+
|
|
25
|
+
- if lang_ok
|
|
26
|
+
%div{id: "tab-content-#{lang}", class: ["tab-pane", ("active" if lang=='')], role: "tabpanel", data: {lang: lang}}
|
|
27
|
+
=ftran.input :item_id, as: :hidden, :readonly=>true
|
|
28
|
+
=ftran.input :lang, :readonly=>true
|
|
29
|
+
-#=ftran.input :content, label: 'Content'
|
|
30
|
+
- if @item.has_code?
|
|
31
|
+
.form-group
|
|
32
|
+
= ftran.input_field :content, as: :text, label: "Content", :rows => 16, :cols => 80, :class=>'form_input_content', :data=>{lang: name}
|
|
33
|
+
|
|
34
|
+
%div{id: "content-#{name}", class: '', data: {lang: name}}(style="width:100%; height: 600px; border: 2px #333333 solid;")
|
|
35
|
+
|
|
36
|
+
- else
|
|
37
|
+
.form-group
|
|
38
|
+
.col-sm-12.col-md-12.control
|
|
39
|
+
-#= ftran.input :content, as: :text, label: "Content", input_html: {:rows => 16, :cols => 120, :class=>'editor'}
|
|
40
|
+
= ftran.input_field :content, as: :text, label: "Content", rows: 16, cols: 120, class: 'editor', style: "min-height: 600px;"
|
|
41
|
+
|
|
42
|
+
.clearfix
|
|
41
43
|
|
|
42
44
|
-# @languages.each do |lang|
|
|
43
45
|
%div{id: "content-#{lang}", class: "tab-pane", role: "tabpanel"}
|
data/lib/optimacms/version.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
= block 'temp/
|
|
1
|
+
a1
|
|
2
|
+
|
|
3
|
+
%hr
|
|
4
|
+
%hr
|
|
5
|
+
|
|
6
|
+
= block 'temp/t2'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
en-en-en
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
def def def def def
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ru-ru-ru-
|