coalla-cms 0.4.4.3 → 0.5.1.8

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.
Files changed (121) hide show
  1. checksums.yaml +5 -13
  2. data/Gemfile.lock +91 -84
  3. data/Rakefile +2 -2
  4. data/app/assets/javascripts/admin/admin.js +45 -117
  5. data/app/assets/javascripts/admin/photo_uploader.js +1 -10
  6. data/app/assets/javascripts/admin/vendor/jquery-ui-timepicker-addon-ru.js +39 -37
  7. data/app/assets/stylesheets/admin/admin.scss +5 -1
  8. data/app/controllers/admin/image_upload_controller.rb +1 -1
  9. data/app/controllers/admin/lookups_controller.rb +9 -4
  10. data/app/controllers/admin/notifier_controller.rb +7 -0
  11. data/app/controllers/admin/site_meta_tags_controller.rb +43 -0
  12. data/app/controllers/concerns/page_meta_tags.rb +71 -0
  13. data/app/helpers/admin/lookup_helper.rb +23 -0
  14. data/app/helpers/common_helper.rb +6 -0
  15. data/app/helpers/lookup_helper.rb +41 -14
  16. data/app/helpers/twitter_builder_helper.rb +7 -7
  17. data/app/helpers/twitter_form_builder.rb +9 -3
  18. data/app/models/lookup.rb +22 -0
  19. data/app/models/site_meta_tags.rb +16 -0
  20. data/app/uploaders/meta_tags_image_uploader.rb +5 -0
  21. data/app/utils/admin_structure.rb +17 -2
  22. data/app/views/admin/base/_sort.haml +3 -3
  23. data/app/views/admin/common/_file_upload_template.haml +8 -4
  24. data/app/views/admin/common/_header.html.haml +5 -4
  25. data/app/views/admin/common/_image_upload_template.html.haml +1 -1
  26. data/app/views/admin/common/_slides.html.haml +1 -1
  27. data/app/views/admin/home/dashboard.html.haml +1 -1
  28. data/app/views/admin/lookups/_form.html.haml +2 -8
  29. data/app/views/admin/lookups/edit.html.haml +1 -1
  30. data/app/views/admin/lookups/index.html.haml +2 -2
  31. data/app/views/admin/lookups/types/_boolean.haml +1 -0
  32. data/app/views/admin/lookups/types/_enum.haml +1 -0
  33. data/app/views/admin/lookups/types/_file.haml +3 -0
  34. data/app/views/admin/lookups/types/_float.haml +1 -0
  35. data/app/views/admin/lookups/types/_integer.haml +1 -0
  36. data/app/views/admin/lookups/types/_memo.haml +1 -0
  37. data/app/views/admin/lookups/types/_string.haml +1 -0
  38. data/app/views/admin/lookups/types/_wysiwyg.haml +1 -0
  39. data/app/views/admin/site_meta_tags/_form.html.haml +22 -0
  40. data/app/views/admin/site_meta_tags/edit.html.haml +5 -0
  41. data/app/views/admin/site_meta_tags/index.html.haml +5 -0
  42. data/app/views/layouts/admin.html.haml +10 -4
  43. data/app/views/structure/_section.haml +2 -1
  44. data/coalla-cms.gemspec +2 -0
  45. data/lib/coalla/cms/version.rb +1 -1
  46. data/lib/coalla/orm/page_slider.rb +3 -1
  47. data/lib/coalla/orm/relation.rb +7 -4
  48. data/lib/generators/coalla/cms/create_admin_administrators_generator.rb +29 -0
  49. data/lib/generators/coalla/cms/create_markup_generator.rb +30 -0
  50. data/lib/generators/coalla/cms/init_generator.rb +33 -37
  51. data/lib/generators/coalla/cms/lookups/install_generator.rb +17 -6
  52. data/lib/generators/coalla/cms/lookups/templates/migration.rb +4 -0
  53. data/lib/generators/coalla/cms/market/templates/controllers/products_controller.rb +1 -1
  54. data/lib/generators/coalla/cms/market/templates/controllers/properties_controller.rb +1 -1
  55. data/lib/generators/coalla/cms/meta_tags/install_generator.rb +58 -0
  56. data/lib/generators/coalla/cms/meta_tags/templates/migration.rb +23 -0
  57. data/lib/generators/coalla/cms/news/templates/views/new.haml.erb +1 -1
  58. data/lib/generators/coalla/cms/setup_admin_generator.rb +10 -7
  59. data/lib/generators/coalla/cms/setup_routes_generator.rb +1 -0
  60. data/lib/generators/coalla/cms/templates/assets.rb +2 -4
  61. data/lib/generators/coalla/cms/templates/controllers/admin/administrators_controller.rb +55 -0
  62. data/lib/generators/coalla/cms/templates/controllers/admin/base_controller.rb.erb +2 -2
  63. data/lib/generators/coalla/cms/templates/controllers/markup_controller.rb.erb +2 -0
  64. data/lib/generators/coalla/cms/templates/initializers/carrierwave.rb +47 -0
  65. data/lib/generators/coalla/cms/templates/locales/activerecord.en.yml +16 -0
  66. data/lib/generators/coalla/cms/templates/locales/activerecord.ru.yml +29 -0
  67. data/lib/generators/coalla/cms/templates/locales/admin.en.yml +27 -0
  68. data/lib/generators/coalla/cms/templates/locales/admin.ru.yml +27 -0
  69. data/lib/generators/coalla/cms/templates/views/admin/administrators/_form.html.haml +9 -0
  70. data/lib/generators/coalla/cms/templates/views/admin/administrators/edit.html.haml +5 -0
  71. data/lib/generators/coalla/cms/templates/views/admin/administrators/index.html.haml +15 -0
  72. data/lib/generators/coalla/cms/templates/views/admin/administrators/new.html.haml +4 -0
  73. data/lib/generators/coalla/cms/templates/views/admin/scaffold_template/edit.html.haml.erb +1 -1
  74. data/lib/generators/coalla/cms/templates/views/admin/scaffold_template/new.html.haml.erb +1 -1
  75. data/lib/generators/coalla/cms/templates/views/administrators/sessions/new.html.haml +3 -3
  76. metadata +102 -87
  77. data/lib/generators/coalla/cms/templates/activerecord.ru.yml +0 -13
  78. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-blockquote.png +0 -0
  79. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h1.png +0 -0
  80. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h2.png +0 -0
  81. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h3.png +0 -0
  82. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h4.png +0 -0
  83. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h5.png +0 -0
  84. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-h6.png +0 -0
  85. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-p.png +0 -0
  86. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/lbl-pre.png +0 -0
  87. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/wymiframe.css +0 -276
  88. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/iframe/default/wymiframe.html +0 -26
  89. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/jquery.wymeditor.js +0 -4819
  90. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/lang/en.js +0 -45
  91. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/lang/ru.js +0 -55
  92. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/imageupload/icons.png +0 -0
  93. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/imageupload/jquery.wymeditor.imageupload.js +0 -150
  94. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +0 -91
  95. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/plugins/resizable/readme.txt +0 -124
  96. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/compact/icons.png +0 -0
  97. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/compact/skin.css +0 -134
  98. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/compact/skin.js +0 -35
  99. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/default/icons.png +0 -0
  100. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/default/skin.css +0 -341
  101. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/default/skin.js +0 -40
  102. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/bg.header.gif +0 -0
  103. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
  104. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
  105. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
  106. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/skin.css +0 -131
  107. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/minimal/skin.js +0 -30
  108. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/COPYING +0 -674
  109. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/README +0 -27
  110. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/bg.header.gif +0 -0
  111. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
  112. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
  113. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/images/icons.silver.gif +0 -0
  114. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/skin.css +0 -297
  115. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/silver/skin.js +0 -61
  116. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/twopanels/icons.png +0 -0
  117. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/twopanels/skin.css +0 -134
  118. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/twopanels/skin.js +0 -39
  119. data/lib/generators/coalla/cms/wysiwyg/templates/wymeditor/skins/wymeditor_icon.png +0 -0
  120. data/lib/generators/coalla/cms/wysiwyg/wymeditor_generator.rb +0 -17
  121. /data/lib/generators/coalla/cms/templates/{devise.ru.yml → locales/devise.ru.yml} +0 -0
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NzU3MGY1ODZkMTkzODU0ZDk5MzZlN2VhNmQ3NDExMjE2MDcyNjA0Ng==
5
- data.tar.gz: !binary |-
6
- ODAzZDkxNjU3YTk4ZGY0NGJlYTU2ZjUzYWM1NGM4NDFmNWZlNDg5OA==
2
+ SHA1:
3
+ metadata.gz: 3ea912539c00f313d59137bee6720ad2b56226c0
4
+ data.tar.gz: 2b20f789b498be99e49cf3631255f56a3fb5375a
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NWI3NzcyNDQ2NjIxYmM1YjBlZTdjYzMxMDk0YTYzNGZjODBmMTFmMjg5Mzk3
10
- NzcyMTUwMjhlNjAzNDZmM2ZhYTMwN2VjYzgwOTRjODllZjU5OTE1ODBhM2Fj
11
- ZWRlZTcyNGRjMzliZmRjYTc3MTc4YzExNTJiNDNkYmZmNmYwMGI=
12
- data.tar.gz: !binary |-
13
- NDlhOTliOTNlMDEyOTVmZmMzOGQxZWFjZWUxMjY2YjQ0YWE1YjM4ZGJlNzdk
14
- ZmM1MDdmYWEwMTc3MGZlZTExN2Y1NTJkOWRiYjBjZDRhY2MzZDA1YWY1Yjc1
15
- OTNlNThiMGI1YmI2ZGIwYWE4N2QwYzA2NTRiM2M3Y2VmNTg1YzI=
6
+ metadata.gz: f3bd14c67d93811762a1edc5d795bc2751b38621e919cec4414b8b632379276c1d012c64f3feddc829b59a2a10a4989e6c42498d7f60f1a4b9db0413f1e7c75c
7
+ data.tar.gz: 4de587dbe7011f1a380b9f9a45743fbaab1759a7072e42e4bcda34eb18baac4d66b1983b1a11baafa420e2a8bc122f07af988833d9481dfec38f13c71aa22d5e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coalla-cms (0.4.4.2)
4
+ coalla-cms (0.5.1.3)
5
5
  carrierwave
6
6
  ckeditor
7
7
  coalla-deploy (~> 0.1)
@@ -12,6 +12,7 @@ PATH
12
12
  jquery-timepicker-addon-rails
13
13
  jquery-ui-rails
14
14
  js-routes
15
+ meta-tags (~> 2.1.0)
15
16
  mini_magick
16
17
  rails (~> 4.0)
17
18
  railties (~> 4.0)
@@ -19,47 +20,48 @@ PATH
19
20
  rmagick
20
21
  sanitize
21
22
  sass-rails
23
+ standalone_typograf (~> 3.0.2)
22
24
  will_paginate
23
25
 
24
26
  GEM
25
27
  remote: http://rubygems.org/
26
28
  specs:
27
- actionmailer (4.2.1)
28
- actionpack (= 4.2.1)
29
- actionview (= 4.2.1)
30
- activejob (= 4.2.1)
29
+ actionmailer (4.2.5)
30
+ actionpack (= 4.2.5)
31
+ actionview (= 4.2.5)
32
+ activejob (= 4.2.5)
31
33
  mail (~> 2.5, >= 2.5.4)
32
34
  rails-dom-testing (~> 1.0, >= 1.0.5)
33
- actionpack (4.2.1)
34
- actionview (= 4.2.1)
35
- activesupport (= 4.2.1)
35
+ actionpack (4.2.5)
36
+ actionview (= 4.2.5)
37
+ activesupport (= 4.2.5)
36
38
  rack (~> 1.6)
37
39
  rack-test (~> 0.6.2)
38
40
  rails-dom-testing (~> 1.0, >= 1.0.5)
39
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
40
- actionview (4.2.1)
41
- activesupport (= 4.2.1)
41
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
42
+ actionview (4.2.5)
43
+ activesupport (= 4.2.5)
42
44
  builder (~> 3.1)
43
45
  erubis (~> 2.7.0)
44
46
  rails-dom-testing (~> 1.0, >= 1.0.5)
45
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
46
- activejob (4.2.1)
47
- activesupport (= 4.2.1)
47
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
48
+ activejob (4.2.5)
49
+ activesupport (= 4.2.5)
48
50
  globalid (>= 0.3.0)
49
- activemodel (4.2.1)
50
- activesupport (= 4.2.1)
51
+ activemodel (4.2.5)
52
+ activesupport (= 4.2.5)
51
53
  builder (~> 3.1)
52
- activerecord (4.2.1)
53
- activemodel (= 4.2.1)
54
- activesupport (= 4.2.1)
54
+ activerecord (4.2.5)
55
+ activemodel (= 4.2.5)
56
+ activesupport (= 4.2.5)
55
57
  arel (~> 6.0)
56
- activesupport (4.2.1)
58
+ activesupport (4.2.5)
57
59
  i18n (~> 0.7)
58
60
  json (~> 1.7, >= 1.7.7)
59
61
  minitest (~> 5.1)
60
62
  thread_safe (~> 0.3, >= 0.3.4)
61
63
  tzinfo (~> 1.1)
62
- arel (6.0.0)
64
+ arel (6.0.3)
63
65
  bcrypt (3.1.10)
64
66
  builder (3.2.2)
65
67
  carrierwave (0.10.0)
@@ -67,21 +69,26 @@ GEM
67
69
  activesupport (>= 3.2.0)
68
70
  json (>= 1.7)
69
71
  mime-types (>= 1.16)
70
- ckeditor (4.1.0)
71
- mime-types
72
+ ckeditor (4.1.6)
73
+ cocaine
72
74
  orm_adapter (~> 0.5.0)
73
- coalla-deploy (0.1.10)
75
+ climate_control (0.0.3)
76
+ activesupport (>= 3.0)
77
+ coalla-deploy (0.1.11.2)
74
78
  railties (~> 4.0)
75
79
  thor (~> 0.18)
76
- coffee-rails (4.1.0)
80
+ cocaine (0.5.8)
81
+ climate_control (>= 0.0.3, < 1.0)
82
+ coffee-rails (4.1.1)
77
83
  coffee-script (>= 2.2.0)
78
- railties (>= 4.0.0, < 5.0)
84
+ railties (>= 4.0.0, < 5.1.x)
79
85
  coffee-script (2.4.1)
80
86
  coffee-script-source
81
87
  execjs
82
- coffee-script-source (1.9.1.1)
83
- crass (1.0.1)
84
- devise (3.4.1)
88
+ coffee-script-source (1.10.0)
89
+ concurrent-ruby (1.0.0)
90
+ crass (1.0.2)
91
+ devise (3.5.6)
85
92
  bcrypt (~> 3.0)
86
93
  orm_adapter (~> 0.1)
87
94
  railties (>= 3.2.6, < 5)
@@ -89,99 +96,99 @@ GEM
89
96
  thread_safe (~> 0.1)
90
97
  warden (~> 1.2.3)
91
98
  erubis (2.7.0)
92
- execjs (2.5.2)
93
- globalid (0.3.3)
99
+ execjs (2.6.0)
100
+ globalid (0.3.6)
94
101
  activesupport (>= 4.1.0)
95
- haml (4.0.6)
102
+ haml (4.0.7)
96
103
  tilt
97
- hike (1.2.3)
98
104
  i18n (0.7.0)
99
- jquery-rails (4.0.3)
105
+ jquery-rails (4.1.0)
100
106
  rails-dom-testing (~> 1.0)
101
107
  railties (>= 4.2.0)
102
108
  thor (>= 0.14, < 2.0)
103
109
  jquery-timepicker-addon-rails (1.4.1)
104
110
  railties (>= 3.1)
105
- jquery-ui-rails (4.1.2)
106
- railties (>= 3.1.0)
107
- js-routes (0.9.8)
111
+ jquery-ui-rails (5.0.5)
112
+ railties (>= 3.2.16)
113
+ js-routes (1.2.4)
108
114
  railties (>= 3.2)
109
115
  sprockets-rails
110
- json (1.8.2)
111
- loofah (2.0.1)
116
+ json (1.8.3)
117
+ loofah (2.0.3)
112
118
  nokogiri (>= 1.5.9)
113
119
  mail (2.6.3)
114
120
  mime-types (>= 1.16, < 3)
115
- mime-types (2.4.3)
116
- mini_magick (4.0.4)
117
- mini_portile (0.6.2)
118
- minitest (5.5.1)
119
- multi_json (1.11.0)
120
- nokogiri (1.6.6.2)
121
- mini_portile (~> 0.6.0)
122
- nokogumbo (1.2.0)
121
+ meta-tags (2.1.0)
122
+ actionpack (>= 3.0.0)
123
+ mime-types (2.99)
124
+ mini_magick (4.4.0)
125
+ mini_portile2 (2.0.0)
126
+ minitest (5.8.4)
127
+ nokogiri (1.6.7.2)
128
+ mini_portile2 (~> 2.0.0.rc2)
129
+ nokogumbo (1.4.7)
123
130
  nokogiri
124
131
  orm_adapter (0.5.0)
125
- rack (1.6.0)
132
+ rack (1.6.4)
126
133
  rack-test (0.6.3)
127
134
  rack (>= 1.0)
128
- rails (4.2.1)
129
- actionmailer (= 4.2.1)
130
- actionpack (= 4.2.1)
131
- actionview (= 4.2.1)
132
- activejob (= 4.2.1)
133
- activemodel (= 4.2.1)
134
- activerecord (= 4.2.1)
135
- activesupport (= 4.2.1)
135
+ rails (4.2.5)
136
+ actionmailer (= 4.2.5)
137
+ actionpack (= 4.2.5)
138
+ actionview (= 4.2.5)
139
+ activejob (= 4.2.5)
140
+ activemodel (= 4.2.5)
141
+ activerecord (= 4.2.5)
142
+ activesupport (= 4.2.5)
136
143
  bundler (>= 1.3.0, < 2.0)
137
- railties (= 4.2.1)
144
+ railties (= 4.2.5)
138
145
  sprockets-rails
139
146
  rails-deprecated_sanitizer (1.0.3)
140
147
  activesupport (>= 4.2.0.alpha)
141
- rails-dom-testing (1.0.6)
148
+ rails-dom-testing (1.0.7)
142
149
  activesupport (>= 4.2.0.beta, < 5.0)
143
150
  nokogiri (~> 1.6.0)
144
151
  rails-deprecated_sanitizer (>= 1.0.1)
145
- rails-html-sanitizer (1.0.2)
152
+ rails-html-sanitizer (1.0.3)
146
153
  loofah (~> 2.0)
147
- railties (4.2.1)
148
- actionpack (= 4.2.1)
149
- activesupport (= 4.2.1)
154
+ railties (4.2.5)
155
+ actionpack (= 4.2.5)
156
+ activesupport (= 4.2.5)
150
157
  rake (>= 0.8.7)
151
158
  thor (>= 0.18.1, < 2.0)
152
- rake (10.4.2)
159
+ rake (10.5.0)
153
160
  remotipart (1.2.1)
154
- responders (2.1.0)
155
- railties (>= 4.2.0, < 5)
156
- rmagick (2.13.4)
157
- sanitize (3.1.2)
158
- crass (~> 1.0.1)
161
+ responders (2.1.1)
162
+ railties (>= 4.2.0, < 5.1)
163
+ rmagick (2.15.4)
164
+ sanitize (4.0.1)
165
+ crass (~> 1.0.2)
159
166
  nokogiri (>= 1.4.4)
160
- nokogumbo (= 1.2.0)
161
- sass (3.4.13)
162
- sass-rails (5.0.1)
167
+ nokogumbo (~> 1.4.1)
168
+ sass (3.4.21)
169
+ sass-rails (5.0.4)
163
170
  railties (>= 4.0.0, < 5.0)
164
171
  sass (~> 3.1)
165
172
  sprockets (>= 2.8, < 4.0)
166
173
  sprockets-rails (>= 2.0, < 4.0)
167
- tilt (~> 1.1)
168
- sprockets (2.12.3)
169
- hike (~> 1.2)
170
- multi_json (~> 1.0)
171
- rack (~> 1.0)
172
- tilt (~> 1.1, != 1.3.0)
173
- sprockets-rails (2.2.4)
174
- actionpack (>= 3.0)
175
- activesupport (>= 3.0)
176
- sprockets (>= 2.8, < 4.0)
174
+ tilt (>= 1.1, < 3)
175
+ sprockets (3.5.2)
176
+ concurrent-ruby (~> 1.0)
177
+ rack (> 1, < 3)
178
+ sprockets-rails (3.0.1)
179
+ actionpack (>= 4.0)
180
+ activesupport (>= 4.0)
181
+ sprockets (>= 3.0.0)
182
+ standalone_typograf (3.0.2)
183
+ activesupport
177
184
  thor (0.19.1)
178
185
  thread_safe (0.3.5)
179
- tilt (1.4.1)
186
+ tilt (2.0.2)
180
187
  tzinfo (1.2.2)
181
188
  thread_safe (~> 0.1)
182
- warden (1.2.3)
189
+ warden (1.2.6)
183
190
  rack (>= 1.0)
184
- will_paginate (3.0.7)
191
+ will_paginate (3.1.0)
185
192
 
186
193
  PLATFORMS
187
194
  ruby
data/Rakefile CHANGED
@@ -4,12 +4,12 @@ require 'net/scp'
4
4
  require 'fileutils'
5
5
 
6
6
  task 'build:gem' do
7
- host = '5.9.118.111'
7
+ host = '148.251.43.54'
8
8
  user = 'deployer'
9
9
  Net::SSH.start(host, user, port: 60000) do |ssh|
10
10
  base_dir = "/home/deployer/temp/coalla-gems"
11
11
  project_name = 'coalla-cms'
12
- git_url = "http://git.coalla.ru/#{project_name}.git"
12
+ git_url = "git@bitbucket.org:coalla/#{project_name}.git"
13
13
  gems_dir = '/var/www/virtual-hosts/gems.coalla.ru'
14
14
  output = ssh.exec! <<-SH
15
15
  mkdir --parents #{base_dir}
@@ -28,109 +28,9 @@
28
28
  //= require_self
29
29
  //= require admin/custom_admin
30
30
 
31
- function setupWymEditor(wrappedSet) {
32
- var upload = wrappedSet.data('upload');
33
- var table = wrappedSet.data('table');
34
- var hStyles = wrappedSet.data('h');
35
- var hideBlockquote = (wrappedSet.data('hide-blockquote') === true);
36
- var html = wrappedSet.data('html');
37
- var preview = wrappedSet.data('preview');
38
-
39
- var toolsItems = [
40
- {'name': 'Bold', 'title': 'Strong', 'css': 'wym_tools_strong'},
41
- {'name': 'Italic', 'title': 'Emphasis', 'css': 'wym_tools_emphasis'},
42
- {'name': 'InsertOrderedList', 'title': 'Ordered_List', 'css': 'wym_tools_ordered_list'},
43
- {'name': 'InsertUnorderedList', 'title': 'Unordered_List', 'css': 'wym_tools_unordered_list'},
44
- {'name': 'CreateLink', 'title': 'Link', 'css': 'wym_tools_link'},
45
- {'name': 'Paste', 'title': 'Paste_From_Word', 'css': 'wym_tools_paste'},
46
- {'name': 'Undo', 'title': 'Undo', 'css': 'wym_tools_undo'},
47
- {'name': 'Redo', 'title': 'Redo', 'css': 'wym_tools_redo'}
48
- ];
49
-
50
- if (table) {
51
- toolsItems.push({'name': 'InsertTable', 'title': 'Table', 'css': 'wym_tools_table'});
52
- }
53
-
54
- if (html) {
55
- toolsItems.push({'name': 'ToggleHtml', 'title': 'HTML', 'css': 'wym_tools_html'});
56
- }
57
-
58
- if (preview) {
59
- toolsItems.push({'name': 'Preview', 'title': 'Preview', 'css': 'wym_tools_preview'});
60
- }
61
-
62
- var wym_options = {
63
- lang: 'ru', rmUnwantedBr: true,
64
- jQueryPath: '/assets/jquery.js',
65
- toolsItems: toolsItems,
66
- logoHtml: "", classesHtml: "", statusHtml: "", containersHtml: "",
67
- postInit: function (wym) {
68
- if (!hideBlockquote) {
69
- var bqClass = 'wym_tools_blockquote';
70
- var bqHtml = buttonHtml("Цитата ", bqClass, '/wysiwyg/skins/default/icons.png');
71
- $(wym._box).find(wym._options.toolsSelector + wym._options.toolsListSelector).prepend(bqHtml);
72
- $(wym._box).find('li.' + bqClass + ' a').click(function () {
73
- wym.container('BLOCKQUOTE');
74
- return(false);
75
- });
76
- }
77
-
78
- // CURRENTLY DOESNT WORK
79
- // if (table) {
80
- // var bqClass = 'wym_tools_th';
81
- // var bqHtml = buttonHtml("Заголовок таблицы ", bqClass, '/wysiwyg/skins/default/icons.png');
82
- // $(wym._box).find(wym._options.toolsSelector + wym._options.toolsListSelector).prepend(bqHtml);
83
- // $(wym._box).find('li.' + bqClass + ' a').click(function () {
84
- // wym.container('TH');
85
- // return(false);
86
- // });
87
- // }
88
-
89
- if (!hStyles) {
90
- hStyles = [1, 2, 3, 4, 5, 6];
91
- }
92
- for (var j = hStyles.length - 1; j >= 0; j--) {
93
- (function (c) {
94
- var cls = 'wym_tools_heading' + c;
95
- var html = buttonHtml("Заголовок " + c, cls, '/wysiwyg/skins/default/icons.png');
96
- $(wym._box).find(wym._options.toolsSelector + wym._options.toolsListSelector).prepend(html);
97
- $(wym._box).find('li.' + cls + ' a').click(function () {
98
- wym.container('H' + c);
99
- return(false);
100
- });
101
- })(hStyles[j]);
102
- }
103
-
104
- var cls = 'wym_tools_paragraph';
105
- var html = buttonHtml("Абзац", cls, '/wysiwyg/skins/default/icons.png');
106
- $(wym._box).find(wym._options.toolsSelector + wym._options.toolsListSelector).prepend(html);
107
- $(wym._box).find('li.' + cls + ' a').click(function () {
108
- wym.container('P');
109
- return(false);
110
- });
111
-
112
- if (upload) {
113
- wym.imageupload_init('/article_images', 'image')
114
- }
115
- $('.wym_buttons').addClass('btn-toolbar').find('li').addClass('btn-group').find('a').addClass('btn');
116
- }
117
-
118
- };
119
- wrappedSet.wymeditor(wym_options);
120
-
121
- function buttonHtml(title, cls, path_to_icon) {
122
- var html = "<li class='" + cls + "'>"
123
- + "<a href='#' title='" + title + "' "
124
- + " style='background-image:"
125
- + " url(" + path_to_icon + ")'>"
126
- + title
127
- + "</a></li>";
128
-
129
-
130
- return html;
131
- }
132
-
133
- }
31
+ var CMS = CMS || {};
32
+ CMS.config = CMS.config || {};
33
+ CMS.config.language = CMS.config.language || 'ru';
134
34
 
135
35
  function injectNewSliderId(s, id) {
136
36
  return s.replace(/NEW_RECORD/g, id);
@@ -138,7 +38,7 @@ function injectNewSliderId(s, id) {
138
38
 
139
39
  (function ($) {
140
40
  $.fn.stickyBar = function () {
141
- if (this.length){
41
+ if (this.length) {
142
42
  var $bar = this,
143
43
  barOffsetTop = $bar.offset().top,
144
44
  barOuterHeight = $bar.outerHeight(),
@@ -189,10 +89,6 @@ $(function () {
189
89
 
190
90
  $('.sortable').sortable();
191
91
 
192
- $('.wymeditor').each(function () {
193
- setupWymEditor($(this));
194
- });
195
-
196
92
  function merge_datepicker_options($element) {
197
93
  var options = {
198
94
  dateFormat: 'yy-mm-dd',
@@ -224,6 +120,15 @@ $(function () {
224
120
 
225
121
  addDateTimePickers();
226
122
 
123
+ function addTimePickers() {
124
+ $('input[data-calendar-time]').each(function () {
125
+ $this = $(this);
126
+ $this.timepicker(merge_datepicker_options($this));
127
+ });
128
+ }
129
+
130
+ addTimePickers();
131
+
227
132
  $(document).on('click', '.close-popover-form', function () {
228
133
  $('.pictograms__button_edit').popover('hide');
229
134
  $('.popover').css('display', 'none');
@@ -254,25 +159,31 @@ $(function () {
254
159
  });
255
160
  addDatePickers();
256
161
  addDateTimePickers();
162
+ addTimePickers();
257
163
  return false
258
164
  });
259
165
 
260
166
  $('[data-multi-field]').each(function () {
261
- var options = { crossDomain: false,
167
+ var options = {
168
+ crossDomain: false,
262
169
  preventDuplicates: true,
263
- hintText: 'Введите строку для поиска',
264
- noResultsText: 'Ничего не найдено',
265
- searchingText: 'Поиск...',
266
170
  theme: 'facebook',
267
171
  showAllOnFocus: $(this).data('show-all-on-focus'),
268
172
  useCache: $(this).data('use-cache')
269
173
  };
270
174
 
175
+ if (CMS.config.language == 'ru') {
176
+ options.hintText = 'Введите строку для поиска';
177
+ options.noResultsText = 'Ничего не найдено';
178
+ options.searchingText = 'Поиск...';
179
+ }
180
+
271
181
  var objectUrlName = $(this).data('object-url-name');
272
182
  if (objectUrlName) {
273
- var formatter_options = {tokenFormatter: function (item) {
274
- return "<li><p><a href='" + "/admin/" + objectUrlName + "/" + item['id'] + "/edit'>" + item[this.propertyToSearch] + "</a></p></li>"
275
- }
183
+ var formatter_options = {
184
+ tokenFormatter: function (item) {
185
+ return "<li><p><a href='" + "/admin/" + objectUrlName + "/" + item['id'] + "/edit'>" + item[this.propertyToSearch] + "</a></p></li>"
186
+ }
276
187
  };
277
188
  options = $.extend(options, formatter_options);
278
189
  }
@@ -283,10 +194,27 @@ $(function () {
283
194
  $('.action-bar').stickyBar();
284
195
 
285
196
  $(document).on('change', '[data-file-upload]', function () {
286
- var filename = $(this).val().replace(/.*(\/|\\)/, '');
287
- $(this).closest('[data-file-upload-container]').find('[data-file-upload-title]').text(filename);
197
+ var filename = $(this).val().replace(/.*(\/|\\)/, ''),
198
+ container = $(this).closest('[data-file-upload-container]');
199
+
200
+ container.find('[data-file-upload-title]').text(filename);
201
+
202
+ if (filename.length > 0) {
203
+ container.find('[data-file-remove-flag]').val(0);
204
+ }
288
205
  });
289
206
 
207
+ $(document).on('click', '[data-file-remove-btn]', function () {
208
+ var container = $(this).closest('[data-file-upload-container]'),
209
+ title = container.find('[data-file-upload-title]');
210
+ title.text(title.data('label'));
211
+ container.find('[data-file-upload]').val('');
212
+ container.find('[data-file-remove-flag]').val(1);
213
+ return false;
214
+ });
215
+
216
+ $('[data-toggle="tooltip"]').tooltip({'trigger':'focus'});
217
+
290
218
  });
291
219
 
292
220
  CKEDITOR.config.extraPlugins = 'slideshow,mediaembed,autogrow';
@@ -55,13 +55,4 @@ function PhotoUploader(formTemplate) {
55
55
  });
56
56
 
57
57
  };
58
- }
59
-
60
- $(function () {
61
- var addUploadListener = function () {
62
- PhotoUploader.addUploadListener();
63
- };
64
- addUploadListener();
65
- window.NestedFormCallbacks = window.NestedFormCallbacks || [];
66
- window.NestedFormCallbacks.push(addUploadListener);
67
- });
58
+ }
@@ -1,40 +1,42 @@
1
- $(function() {
2
- $.datepicker.regional['ru'] = {
3
- closeText: 'Закрыть',
4
- prevText: '<Пред',
5
- nextText: 'След>',
6
- currentText: 'Сегодня',
7
- monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
8
- 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
9
- monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
10
- 'Июл','Авг','Сен','Окт','Ноя','Дек'],
11
- dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
12
- dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
13
- dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
14
- weekHeader: 'Не',
15
- dateFormat: 'dd.mm.yy',
16
- firstDay: 1,
17
- isRTL: false,
18
- showMonthAfterYear: false,
19
- yearSuffix: ''
20
- };
21
- $.datepicker.setDefaults($.datepicker.regional['ru']);
1
+ $(function () {
2
+ if (CMS.config.language == 'ru') {
3
+ $.datepicker.regional['ru'] = {
4
+ closeText: 'Закрыть',
5
+ prevText: '<Пред',
6
+ nextText: 'След>',
7
+ currentText: 'Сегодня',
8
+ monthNames: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь',
9
+ 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'],
10
+ monthNamesShort: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн',
11
+ 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'],
12
+ dayNames: ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'],
13
+ dayNamesShort: ['вск', 'пнд', 'втр', 'срд', 'чтв', 'птн', 'сбт'],
14
+ dayNamesMin: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
15
+ weekHeader: 'Не',
16
+ dateFormat: 'dd.mm.yy',
17
+ firstDay: 1,
18
+ isRTL: false,
19
+ showMonthAfterYear: false,
20
+ yearSuffix: ''
21
+ };
22
+ $.datepicker.setDefaults($.datepicker.regional['ru']);
22
23
 
23
24
 
24
- $.timepicker.regional['ru'] = {
25
- timeOnlyTitle: 'Выберите время',
26
- timeText: 'Время',
27
- hourText: 'Часы',
28
- minuteText: 'Минуты',
29
- secondText: 'Секунды',
30
- millisecText: 'Миллисекунды',
31
- timezoneText: 'Часовой пояс',
32
- currentText: 'Сейчас',
33
- closeText: 'Закрыть',
34
- timeFormat: 'HH:mm',
35
- amNames: ['AM', 'A'],
36
- pmNames: ['PM', 'P'],
37
- isRTL: false
38
- };
39
- $.timepicker.setDefaults($.timepicker.regional['ru']);
25
+ $.timepicker.regional['ru'] = {
26
+ timeOnlyTitle: 'Выберите время',
27
+ timeText: 'Время',
28
+ hourText: 'Часы',
29
+ minuteText: 'Минуты',
30
+ secondText: 'Секунды',
31
+ millisecText: 'Миллисекунды',
32
+ timezoneText: 'Часовой пояс',
33
+ currentText: 'Сейчас',
34
+ closeText: 'Закрыть',
35
+ timeFormat: 'HH:mm',
36
+ amNames: ['AM', 'A'],
37
+ pmNames: ['PM', 'P'],
38
+ isRTL: false
39
+ };
40
+ $.timepicker.setDefaults($.timepicker.regional['ru']);
41
+ }
40
42
  });
@@ -299,4 +299,8 @@ legend { padding-bottom: 10px !important; }
299
299
  }
300
300
 
301
301
  .ui-datepicker {
302
- z-index: 9999 !important; }
302
+ z-index: 9999 !important; }
303
+
304
+ .control-group{
305
+ position: relative;
306
+ }
@@ -3,7 +3,7 @@ module Admin
3
3
  class ImageUploadController < BaseController
4
4
 
5
5
  def upload_image
6
- @image = params[:image_class].classify.constantize.new
6
+ @image = params[:image_class].camelize.constantize.new
7
7
  @image.send("#{params[:field]}=", params[:image])
8
8
  @image.valid?
9
9
  @free_size = params[:free_size] || false