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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d79819fa5e541fd1080c7128384c2004d0d792b
4
- data.tar.gz: d87921eb9e0267d77d0a8d61ba3d201233135628
3
+ metadata.gz: 819c23d0db88c22546e3b511184f505a9c74e644
4
+ data.tar.gz: f719a1bfe376bee28abcf10a719905ded29d3629
5
5
  SHA512:
6
- metadata.gz: 651fc5c6aae7e91ab90942d1afeb75d26ab333d9a8795bb5e4d58238789e5f55c02c5f05006cabbc1d155d11393e32338e0c707858e2da31c6a33508a64d4fb8
7
- data.tar.gz: ce5cd91f00838724652c157609695e7ca169b01b06d1344b329695736146d1ccde003119b418be65e73a4c0f2146e138e41732a52c3caad4c260747cd3977629
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
- %div{id: "tab-content-#{lang}", class: ["tab-pane", ("active" if lang=='')], role: "tabpanel", data: {lang: lang}}
25
- =ftran.input :item_id, as: :hidden, :readonly=>true
26
- =ftran.input :lang, :readonly=>true
27
- -#=ftran.input :content, label: 'Content'
28
- - if @item.has_code?
29
- .form-group
30
- = ftran.input_field :content, as: :text, label: "Content", :rows => 16, :cols => 80, :class=>'form_input_content', :data=>{lang: name}
31
-
32
- %div{id: "content-#{name}", class: '', data: {lang: name}}(style="width:100%; height: 600px; border: 2px #333333 solid;")
33
-
34
- - else
35
- .form-group
36
- .col-sm-12.col-md-12.control
37
- -#= ftran.input :content, as: :text, label: "Content", input_html: {:rows => 16, :cols => 120, :class=>'editor'}
38
- = ftran.input_field :content, as: :text, label: "Content", rows: 16, cols: 120, class: 'editor', style: "min-height: 600px;"
39
-
40
- .clearfix
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"}
@@ -1,3 +1,3 @@
1
1
  module Optimacms
2
- VERSION = "0.2.15"
2
+ VERSION = "0.2.16"
3
3
  end
@@ -1,6 +1,6 @@
1
- include html:
2
-
3
- = block 'temp/h1'
4
-
5
- include haml:
6
- = block 'temp/part1'
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-