trusty-cms 5.0.4 → 5.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +68 -68
  3. data/app/models/asset.rb +8 -2
  4. data/app/views/admin/assets/_asset_table.html.haml +1 -1
  5. data/app/views/admin/assets/_search.html.haml +1 -1
  6. data/app/views/admin/assets/_search_results.html.haml +2 -2
  7. data/app/views/admin/assets/edit.html.haml +5 -5
  8. data/app/views/admin/assets/index.html.haml +1 -1
  9. data/app/views/admin/configuration/_clipped_show.html.haml +1 -1
  10. data/app/views/admin/pages/_asset_popups.html.haml +5 -5
  11. data/app/views/admin/removed/_assets_bucket.html.haml +2 -2
  12. data/app/views/admin/removed/_assets_container.html.haml +6 -6
  13. data/app/views/admin/removed/_bucket.html.haml +1 -1
  14. data/app/views/admin/removed/_upload_to_page.html.haml +1 -1
  15. data/app/views/admin/sites/_form.haml +2 -2
  16. data/app/views/admin/snippets/edit.html.haml +1 -1
  17. data/app/views/admin/snippets/new.html.haml +1 -1
  18. data/lib/generators/extension_controller/templates/view_spec.rb +1 -1
  19. data/lib/generators/generator_base_extension.rb +0 -1
  20. data/lib/generators/instance/instance_generator.rb +1 -1
  21. data/lib/generators/language_extension/language_extension_generator.rb +0 -1
  22. data/lib/generators/language_extension/templates/test_helper.rb +0 -1
  23. data/lib/generators/trusty_cms/trusty_cms_generator.rb +0 -2
  24. data/lib/trusty_cms.rb +1 -1
  25. data/node_modules/ajv/README.md +158 -72
  26. data/node_modules/ajv/dist/ajv.bundle.js +136 -112
  27. data/node_modules/ajv/dist/ajv.min.js +2 -2
  28. data/node_modules/ajv/dist/ajv.min.js.map +1 -1
  29. data/node_modules/ajv/lib/ajv.d.ts +3 -1
  30. data/node_modules/ajv/lib/compile/equal.js +1 -1
  31. data/node_modules/ajv/lib/compile/formats.js +4 -4
  32. data/node_modules/ajv/lib/compile/index.js +1 -1
  33. data/node_modules/ajv/lib/compile/util.js +9 -44
  34. data/node_modules/ajv/lib/data.js +1 -1
  35. data/node_modules/ajv/lib/definition_schema.js +1 -1
  36. data/node_modules/ajv/lib/dot/_limit.jst +9 -0
  37. data/node_modules/ajv/lib/dot/_limitItems.jst +2 -0
  38. data/node_modules/ajv/lib/dot/_limitLength.jst +2 -0
  39. data/node_modules/ajv/lib/dot/_limitProperties.jst +2 -0
  40. data/node_modules/ajv/lib/dot/allOf.jst +0 -2
  41. data/node_modules/ajv/lib/dot/anyOf.jst +0 -2
  42. data/node_modules/ajv/lib/dot/coerce.def +18 -28
  43. data/node_modules/ajv/lib/dot/contains.jst +0 -2
  44. data/node_modules/ajv/lib/dot/definitions.def +9 -7
  45. data/node_modules/ajv/lib/dot/dependencies.jst +1 -2
  46. data/node_modules/ajv/lib/dot/if.jst +0 -2
  47. data/node_modules/ajv/lib/dot/items.jst +0 -2
  48. data/node_modules/ajv/lib/dot/multipleOf.jst +2 -0
  49. data/node_modules/ajv/lib/dot/properties.jst +6 -5
  50. data/node_modules/ajv/lib/dot/propertyNames.jst +0 -2
  51. data/node_modules/ajv/lib/dot/uniqueItems.jst +1 -1
  52. data/node_modules/ajv/lib/dot/validate.jst +3 -9
  53. data/node_modules/ajv/lib/dotjs/_limit.js +6 -0
  54. data/node_modules/ajv/lib/dotjs/_limitItems.js +3 -0
  55. data/node_modules/ajv/lib/dotjs/_limitLength.js +3 -0
  56. data/node_modules/ajv/lib/dotjs/_limitProperties.js +3 -0
  57. data/node_modules/ajv/lib/dotjs/allOf.js +1 -2
  58. data/node_modules/ajv/lib/dotjs/anyOf.js +1 -2
  59. data/node_modules/ajv/lib/dotjs/contains.js +1 -2
  60. data/node_modules/ajv/lib/dotjs/dependencies.js +2 -2
  61. data/node_modules/ajv/lib/dotjs/if.js +2 -3
  62. data/node_modules/ajv/lib/dotjs/items.js +3 -4
  63. data/node_modules/ajv/lib/dotjs/multipleOf.js +3 -0
  64. data/node_modules/ajv/lib/dotjs/not.js +1 -1
  65. data/node_modules/ajv/lib/dotjs/oneOf.js +1 -1
  66. data/node_modules/ajv/lib/dotjs/properties.js +11 -6
  67. data/node_modules/ajv/lib/dotjs/propertyNames.js +1 -2
  68. data/node_modules/ajv/lib/dotjs/required.js +1 -1
  69. data/node_modules/ajv/lib/dotjs/uniqueItems.js +1 -1
  70. data/node_modules/ajv/lib/dotjs/validate.js +13 -25
  71. data/node_modules/ajv/lib/keyword.js +1 -1
  72. data/node_modules/ajv/lib/refs/data.json +1 -1
  73. data/node_modules/ajv/lib/refs/json-schema-secure.json +1 -1
  74. data/node_modules/ajv/package.json +18 -10
  75. data/node_modules/ajv/scripts/info +0 -0
  76. data/node_modules/ajv/scripts/prepare-tests +0 -0
  77. data/node_modules/ajv/scripts/publish-built-version +1 -1
  78. data/node_modules/ajv/scripts/travis-gh-pages +1 -1
  79. data/node_modules/fast-deep-equal/es6/index.d.ts +1 -1
  80. data/node_modules/fast-deep-equal/es6/react.d.ts +1 -1
  81. data/node_modules/fast-deep-equal/package.json +7 -7
  82. data/node_modules/fast-deep-equal/react.d.ts +1 -1
  83. data/node_modules/uri-js/LICENSE +11 -0
  84. data/node_modules/uri-js/README.md +22 -18
  85. data/node_modules/uri-js/dist/es5/uri.all.d.ts +59 -59
  86. data/node_modules/uri-js/dist/es5/uri.all.js +61 -7
  87. data/node_modules/uri-js/dist/es5/uri.all.js.map +1 -1
  88. data/node_modules/uri-js/dist/es5/uri.all.min.d.ts +59 -59
  89. data/node_modules/uri-js/dist/es5/uri.all.min.js +2 -2
  90. data/node_modules/uri-js/dist/es5/uri.all.min.js.map +1 -1
  91. data/node_modules/uri-js/dist/esnext/index.d.ts +1 -1
  92. data/node_modules/uri-js/dist/esnext/index.js +16 -12
  93. data/node_modules/uri-js/dist/esnext/index.js.map +1 -1
  94. data/node_modules/uri-js/dist/esnext/regexps-iri.d.ts +3 -3
  95. data/node_modules/uri-js/dist/esnext/regexps-iri.js +2 -2
  96. data/node_modules/uri-js/dist/esnext/regexps-iri.js.map +0 -0
  97. data/node_modules/uri-js/dist/esnext/regexps-uri.d.ts +4 -4
  98. data/node_modules/uri-js/dist/esnext/regexps-uri.js +41 -41
  99. data/node_modules/uri-js/dist/esnext/regexps-uri.js.map +0 -0
  100. data/node_modules/uri-js/dist/esnext/schemes/http.d.ts +3 -3
  101. data/node_modules/uri-js/dist/esnext/schemes/http.js +27 -26
  102. data/node_modules/uri-js/dist/esnext/schemes/http.js.map +1 -1
  103. data/node_modules/uri-js/dist/esnext/schemes/https.d.ts +3 -3
  104. data/node_modules/uri-js/dist/esnext/schemes/https.js +8 -8
  105. data/node_modules/uri-js/dist/esnext/schemes/https.js.map +0 -0
  106. data/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts +12 -12
  107. data/node_modules/uri-js/dist/esnext/schemes/mailto.js +0 -0
  108. data/node_modules/uri-js/dist/esnext/schemes/mailto.js.map +0 -0
  109. data/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts +7 -7
  110. data/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js +22 -22
  111. data/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map +0 -0
  112. data/node_modules/uri-js/dist/esnext/schemes/urn.d.ts +10 -10
  113. data/node_modules/uri-js/dist/esnext/schemes/urn.js +48 -48
  114. data/node_modules/uri-js/dist/esnext/schemes/urn.js.map +0 -0
  115. data/node_modules/uri-js/dist/esnext/schemes/ws.d.ts +7 -0
  116. data/node_modules/uri-js/dist/esnext/schemes/ws.js +41 -0
  117. data/node_modules/uri-js/dist/esnext/schemes/ws.js.map +1 -0
  118. data/node_modules/uri-js/dist/esnext/schemes/wss.d.ts +3 -0
  119. data/node_modules/uri-js/dist/esnext/schemes/wss.js +9 -0
  120. data/node_modules/uri-js/dist/esnext/schemes/wss.js.map +1 -0
  121. data/node_modules/uri-js/dist/esnext/uri.d.ts +59 -59
  122. data/node_modules/uri-js/dist/esnext/uri.js +2 -2
  123. data/node_modules/uri-js/dist/esnext/uri.js.map +1 -1
  124. data/node_modules/uri-js/dist/esnext/util.d.ts +6 -6
  125. data/node_modules/uri-js/dist/esnext/util.js +35 -35
  126. data/node_modules/uri-js/dist/esnext/util.js.map +0 -0
  127. data/node_modules/uri-js/package.json +19 -7
  128. data/node_modules/uri-js/yarn.lock +1271 -615
  129. data/trusty_cms.gemspec +2 -1
  130. data/yarn.lock +9 -9
  131. metadata +9 -21
  132. data/node_modules/uri-js/bower.json +0 -47
  133. data/node_modules/uri-js/rollup.config.js +0 -32
  134. data/node_modules/uri-js/src/index.ts +0 -18
  135. data/node_modules/uri-js/src/punycode.d.ts +0 -24
  136. data/node_modules/uri-js/src/regexps-iri.ts +0 -4
  137. data/node_modules/uri-js/src/regexps-uri.ts +0 -89
  138. data/node_modules/uri-js/src/schemes/http.ts +0 -36
  139. data/node_modules/uri-js/src/schemes/https.ts +0 -11
  140. data/node_modules/uri-js/src/schemes/mailto.ts +0 -182
  141. data/node_modules/uri-js/src/schemes/urn-uuid.ts +0 -36
  142. data/node_modules/uri-js/src/schemes/urn.ts +0 -69
  143. data/node_modules/uri-js/src/uri.ts +0 -556
  144. data/node_modules/uri-js/src/util.ts +0 -40
  145. data/node_modules/uri-js/tests/qunit.css +0 -118
  146. data/node_modules/uri-js/tests/qunit.js +0 -1042
  147. data/node_modules/uri-js/tests/test-es5-min.html +0 -17
  148. data/node_modules/uri-js/tests/test-es5.html +0 -17
  149. data/node_modules/uri-js/tests/tests.js +0 -774
  150. data/node_modules/uri-js/tsconfig.json +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6273c18914468b1ccc8c9106a175d09e370e92f9273f94b14261f66e4726d9b5
4
- data.tar.gz: dc3d64711438315a46ac017888025e49f6caa9548c34c59236ec7dacbc12b679
3
+ metadata.gz: 2fc624969ff70829f656ee9b206b64c2748da39a5a5e4269e4c7487d4d83745e
4
+ data.tar.gz: b0a531ee97199d204b90c8b2ec819e51de205df2cbf5a9ad7d822db5d594395a
5
5
  SHA512:
6
- metadata.gz: 6f1785ff2216bb28035aaf251e63e2c948fa98978f4c0196f31700d601417db221f74671b65e45e28b6b7c830d34edd5164d858502a1ca63d1056bf1e259124b
7
- data.tar.gz: 2c17ce6938ed448a1670d5e7fc8b1e4da8febdabbcb0db7aaaca83def3c1b2a53d931a02c22b6616a16b5b53dc167936ea48328ef81dfba94478b5dfb83bd57a
6
+ metadata.gz: 0d33321bc5f5e477b5dac327774f3806505df3f247dca235beb0d5cebdd56c72d592b8f52439b49fb7e65f0b5600bc719bff6476137b043b9448c3ea6a275f84
7
+ data.tar.gz: 5e7b09b40558f82de3d61df8ea41c4a77a4d2f45d47afaacf982226ee801c582c26d2ac9238d5713ded572c7580f4cb98677cf478e5364247c0450355f812afb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-cms (5.0.4)
4
+ trusty-cms (5.0.7)
5
5
  RedCloth (= 4.3.2)
6
6
  activestorage-validator
7
7
  acts_as_list (>= 0.9.5, < 1.1.0)
@@ -35,62 +35,62 @@ GEM
35
35
  remote: https://rubygems.org/
36
36
  specs:
37
37
  RedCloth (4.3.2)
38
- actioncable (6.1.4.4)
39
- actionpack (= 6.1.4.4)
40
- activesupport (= 6.1.4.4)
38
+ actioncable (6.1.4.6)
39
+ actionpack (= 6.1.4.6)
40
+ activesupport (= 6.1.4.6)
41
41
  nio4r (~> 2.0)
42
42
  websocket-driver (>= 0.6.1)
43
- actionmailbox (6.1.4.4)
44
- actionpack (= 6.1.4.4)
45
- activejob (= 6.1.4.4)
46
- activerecord (= 6.1.4.4)
47
- activestorage (= 6.1.4.4)
48
- activesupport (= 6.1.4.4)
43
+ actionmailbox (6.1.4.6)
44
+ actionpack (= 6.1.4.6)
45
+ activejob (= 6.1.4.6)
46
+ activerecord (= 6.1.4.6)
47
+ activestorage (= 6.1.4.6)
48
+ activesupport (= 6.1.4.6)
49
49
  mail (>= 2.7.1)
50
- actionmailer (6.1.4.4)
51
- actionpack (= 6.1.4.4)
52
- actionview (= 6.1.4.4)
53
- activejob (= 6.1.4.4)
54
- activesupport (= 6.1.4.4)
50
+ actionmailer (6.1.4.6)
51
+ actionpack (= 6.1.4.6)
52
+ actionview (= 6.1.4.6)
53
+ activejob (= 6.1.4.6)
54
+ activesupport (= 6.1.4.6)
55
55
  mail (~> 2.5, >= 2.5.4)
56
56
  rails-dom-testing (~> 2.0)
57
- actionpack (6.1.4.4)
58
- actionview (= 6.1.4.4)
59
- activesupport (= 6.1.4.4)
57
+ actionpack (6.1.4.6)
58
+ actionview (= 6.1.4.6)
59
+ activesupport (= 6.1.4.6)
60
60
  rack (~> 2.0, >= 2.0.9)
61
61
  rack-test (>= 0.6.3)
62
62
  rails-dom-testing (~> 2.0)
63
63
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
64
- actiontext (6.1.4.4)
65
- actionpack (= 6.1.4.4)
66
- activerecord (= 6.1.4.4)
67
- activestorage (= 6.1.4.4)
68
- activesupport (= 6.1.4.4)
64
+ actiontext (6.1.4.6)
65
+ actionpack (= 6.1.4.6)
66
+ activerecord (= 6.1.4.6)
67
+ activestorage (= 6.1.4.6)
68
+ activesupport (= 6.1.4.6)
69
69
  nokogiri (>= 1.8.5)
70
- actionview (6.1.4.4)
71
- activesupport (= 6.1.4.4)
70
+ actionview (6.1.4.6)
71
+ activesupport (= 6.1.4.6)
72
72
  builder (~> 3.1)
73
73
  erubi (~> 1.4)
74
74
  rails-dom-testing (~> 2.0)
75
75
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
76
- activejob (6.1.4.4)
77
- activesupport (= 6.1.4.4)
76
+ activejob (6.1.4.6)
77
+ activesupport (= 6.1.4.6)
78
78
  globalid (>= 0.3.6)
79
- activemodel (6.1.4.4)
80
- activesupport (= 6.1.4.4)
81
- activerecord (6.1.4.4)
82
- activemodel (= 6.1.4.4)
83
- activesupport (= 6.1.4.4)
84
- activestorage (6.1.4.4)
85
- actionpack (= 6.1.4.4)
86
- activejob (= 6.1.4.4)
87
- activerecord (= 6.1.4.4)
88
- activesupport (= 6.1.4.4)
79
+ activemodel (6.1.4.6)
80
+ activesupport (= 6.1.4.6)
81
+ activerecord (6.1.4.6)
82
+ activemodel (= 6.1.4.6)
83
+ activesupport (= 6.1.4.6)
84
+ activestorage (6.1.4.6)
85
+ actionpack (= 6.1.4.6)
86
+ activejob (= 6.1.4.6)
87
+ activerecord (= 6.1.4.6)
88
+ activesupport (= 6.1.4.6)
89
89
  marcel (~> 1.0.0)
90
90
  mini_mime (>= 1.1.0)
91
91
  activestorage-validator (0.1.5)
92
92
  rails (>= 5.2.0)
93
- activesupport (6.1.4.4)
93
+ activesupport (6.1.4.6)
94
94
  concurrent-ruby (~> 1.0, >= 1.0.2)
95
95
  i18n (>= 1.6, < 2)
96
96
  minitest (>= 5.1)
@@ -137,7 +137,7 @@ GEM
137
137
  railties (>= 4.1.0)
138
138
  responders
139
139
  warden (~> 1.2.3)
140
- diff-lcs (1.4.4)
140
+ diff-lcs (1.5.0)
141
141
  docile (1.4.0)
142
142
  erubi (1.10.0)
143
143
  erubis (2.7.0)
@@ -171,9 +171,9 @@ GEM
171
171
  httparty (0.20.0)
172
172
  mime-types (~> 3.0)
173
173
  multi_xml (>= 0.5.2)
174
- i18n (1.8.11)
174
+ i18n (1.9.1)
175
175
  concurrent-ruby (~> 1.0)
176
- image_processing (1.12.1)
176
+ image_processing (1.12.2)
177
177
  mini_magick (>= 4.9.5, < 5)
178
178
  ruby-vips (>= 2.0.17, < 3)
179
179
  json (2.6.1)
@@ -187,7 +187,7 @@ GEM
187
187
  libv8-node (16.10.0.0-x86_64-darwin)
188
188
  libv8-node (16.10.0.0-x86_64-linux)
189
189
  libv8-node (16.10.0.0-x86_64-linux-musl)
190
- loofah (2.13.0)
190
+ loofah (2.14.0)
191
191
  crass (~> 1.0.2)
192
192
  nokogiri (>= 1.5.9)
193
193
  mail (2.7.1)
@@ -231,20 +231,20 @@ GEM
231
231
  rack-test (1.1.0)
232
232
  rack (>= 1.0, < 3)
233
233
  radius (0.7.5)
234
- rails (6.1.4.4)
235
- actioncable (= 6.1.4.4)
236
- actionmailbox (= 6.1.4.4)
237
- actionmailer (= 6.1.4.4)
238
- actionpack (= 6.1.4.4)
239
- actiontext (= 6.1.4.4)
240
- actionview (= 6.1.4.4)
241
- activejob (= 6.1.4.4)
242
- activemodel (= 6.1.4.4)
243
- activerecord (= 6.1.4.4)
244
- activestorage (= 6.1.4.4)
245
- activesupport (= 6.1.4.4)
234
+ rails (6.1.4.6)
235
+ actioncable (= 6.1.4.6)
236
+ actionmailbox (= 6.1.4.6)
237
+ actionmailer (= 6.1.4.6)
238
+ actionpack (= 6.1.4.6)
239
+ actiontext (= 6.1.4.6)
240
+ actionview (= 6.1.4.6)
241
+ activejob (= 6.1.4.6)
242
+ activemodel (= 6.1.4.6)
243
+ activerecord (= 6.1.4.6)
244
+ activestorage (= 6.1.4.6)
245
+ activesupport (= 6.1.4.6)
246
246
  bundler (>= 1.15.0)
247
- railties (= 6.1.4.4)
247
+ railties (= 6.1.4.6)
248
248
  sprockets-rails (>= 2.0.0)
249
249
  rails-dom-testing (2.0.3)
250
250
  activesupport (>= 4.2.0)
@@ -253,9 +253,9 @@ GEM
253
253
  loofah (~> 2.3)
254
254
  rails-observers (0.1.5)
255
255
  activemodel (>= 4.0)
256
- railties (6.1.4.4)
257
- actionpack (= 6.1.4.4)
258
- activesupport (= 6.1.4.4)
256
+ railties (6.1.4.6)
257
+ actionpack (= 6.1.4.6)
258
+ activesupport (= 6.1.4.6)
259
259
  method_source
260
260
  rake (>= 0.13)
261
261
  thor (~> 1.0)
@@ -266,21 +266,21 @@ GEM
266
266
  responders (3.0.1)
267
267
  actionpack (>= 5.0)
268
268
  railties (>= 5.0)
269
- roadie (4.0.0)
269
+ roadie (5.0.0)
270
270
  css_parser (~> 1.4)
271
271
  nokogiri (~> 1.8)
272
- roadie-rails (2.3.0)
272
+ roadie-rails (3.0.0)
273
273
  railties (>= 5.1, < 7.1)
274
- roadie (>= 3.1, < 5.0)
275
- rspec-core (3.10.1)
274
+ roadie (~> 5.0)
275
+ rspec-core (3.10.2)
276
276
  rspec-support (~> 3.10.0)
277
- rspec-expectations (3.10.1)
277
+ rspec-expectations (3.10.2)
278
278
  diff-lcs (>= 1.2.0, < 2.0)
279
279
  rspec-support (~> 3.10.0)
280
- rspec-mocks (3.10.2)
280
+ rspec-mocks (3.10.3)
281
281
  diff-lcs (>= 1.2.0, < 2.0)
282
282
  rspec-support (~> 3.10.0)
283
- rspec-rails (5.0.2)
283
+ rspec-rails (5.1.0)
284
284
  actionpack (>= 5.2)
285
285
  activesupport (>= 5.2)
286
286
  railties (>= 5.2)
@@ -288,7 +288,7 @@ GEM
288
288
  rspec-expectations (~> 3.10)
289
289
  rspec-mocks (~> 3.10)
290
290
  rspec-support (~> 3.10)
291
- rspec-support (3.10.2)
291
+ rspec-support (3.10.3)
292
292
  ruby-vips (2.1.4)
293
293
  ffi (~> 1.12)
294
294
  ruby_parser (3.18.1)
@@ -322,7 +322,7 @@ GEM
322
322
  temple (0.8.2)
323
323
  terrapin (0.6.0)
324
324
  climate_control (>= 0.0.3, < 1.0)
325
- thor (1.1.0)
325
+ thor (1.2.1)
326
326
  tilt (2.0.10)
327
327
  trustygems (0.2.1)
328
328
  rake
@@ -339,7 +339,7 @@ GEM
339
339
  will_paginate (3.3.1)
340
340
  xpath (3.2.0)
341
341
  nokogiri (~> 1.8)
342
- zeitwerk (2.5.3)
342
+ zeitwerk (2.5.4)
343
343
 
344
344
  PLATFORMS
345
345
  x86_64-darwin-18
data/app/models/asset.rb CHANGED
@@ -45,16 +45,20 @@ class Asset < ActiveRecord::Base
45
45
  def asset_type
46
46
  AssetType.for(asset)
47
47
  end
48
+
48
49
  delegate :paperclip_processors, :paperclip_styles, :active_storage_styles, :style_dimensions, :style_format,
49
50
  to: :asset_type
50
51
 
51
52
  def thumbnail(style_name = 'original')
52
- return asset.url if style_name.to_s == 'original'
53
+ return asset.url if style_name.to_s == 'original' || render_original(style_name)
53
54
  return asset_variant(style_name.to_s).processed.url if asset.variable?
54
55
 
55
56
  asset_type.icon(style_name.to_s)
56
57
  end
57
58
 
59
+ def render_original(style_name)
60
+ style_name.to_s == 'original' && asset.key.include?('culturaldistrict')
61
+ end
58
62
 
59
63
  def asset_variant(style_name)
60
64
  case style_name
@@ -213,7 +217,9 @@ class Asset < ActiveRecord::Base
213
217
 
214
218
  # returns the return value of class << self block, which is self (as defined within that block)
215
219
  def self.eigenclass
216
- class << self; self; end
220
+ class << self
221
+ self;
222
+ end
217
223
  end
218
224
 
219
225
  # for backwards compatibility
@@ -25,6 +25,6 @@
25
25
  - else
26
26
  %li= link_to t('clipped_extension.edit'), admin_asset_path(asset), :class => 'edit'
27
27
  %li= link_to t("clipped_extension.remove"), remove_admin_asset_path(asset), :class => "delete"
28
-
28
+
29
29
  - if with_pagination && assets.respond_to?(:total_pages) && assets.total_pages > 1
30
30
  = pagination_for(assets, pagination_parameters.merge(:depaginate => false, :param_name => 'p', :params => {:controller => 'admin/assets', :action => 'index', :id => nil, :format => 'js', :page_id => (page && page.id), :pp => assets.per_page }))
@@ -12,7 +12,7 @@
12
12
  .asset_search
13
13
  %i.fas.fa-search
14
14
  %input{:type=>"search", :id => 'filesearchforminput', :class=>"search", :name=>"search", :value=>h(params[:search]), :placeholder=>"Search", :results=>0, :size=>30}
15
-
15
+
16
16
  #type_boxes{:style => "display: none"}
17
17
  - AssetType.all.each do |type|
18
18
  = check_box_tag 'filter[]', type.name.to_s, false, :id => "#{type.name}-check", :class => 'selective'
@@ -1,6 +1,6 @@
1
1
  %ul#search_list
2
2
  - unless @assets.empty?
3
- - @assets.each do |asset|
3
+ - @assets.each do |asset|
4
4
  =# render :partial => 'asset', :locals => { :asset => asset, :page => @page }
5
5
  = render :partial => 'admin/assets/asset', :locals => { :asset_url => asset.asset.url, :asset_id => asset.id, :asset_type => 'image', :asset_title => asset.title, :asset_thumbnail => asset.thumbnail(:thumbnail), :page => @page }
6
6
 
@@ -8,7 +8,7 @@
8
8
  %li
9
9
  %p.note
10
10
  = t("clipped_extension.no_assets_found")
11
-
11
+
12
12
  %script
13
13
  Asset.MakeDroppables();
14
14
  Asset.MakeDraggables();
@@ -1,16 +1,16 @@
1
1
  = stylesheet_link_tag 'admin/assets'
2
2
  = javascript_include_tag 'admin/custom_file_upload'
3
- = render_region :top
3
+ = render_region :top
4
4
 
5
5
  - render_region :main do |main|
6
6
  - main.edit_header do
7
7
  %h1= t("clipped_extension.asset_edit_title")
8
-
8
+
9
9
  - main.edit_form do
10
10
  - form_for :asset, :url => admin_asset_path(@asset), :html => { :method => "put", :multipart => true } do |f|
11
11
  .form_area
12
12
  = render :partial => "form", :locals => { :f => f }
13
-
13
+
14
14
  %div.content
15
15
  %fieldset
16
16
  %label.filename
@@ -25,13 +25,13 @@
25
25
  = image_tag @asset.thumbnail("normal"), :class => 'preview'
26
26
 
27
27
  = updated_stamp @asset
28
-
28
+
29
29
  %fieldset.upload
30
30
  %label.custom-file-upload.upload
31
31
  = t("clipped_extension.replace_file")
32
32
  = f.file_field :asset, :style => "width: 100%"
33
33
  %span#file-chosen No file chosen
34
-
34
+
35
35
  .buttons
36
36
  = save_model_button(@asset)
37
37
  = save_model_and_continue_editing_button(@asset)
@@ -9,7 +9,7 @@
9
9
  #assets_table.assets
10
10
  = render :partial => 'asset_table', :locals => { assets: @assets, with_pagination: true }
11
11
  %p{style: 'clear: both; height: 2em'} &nbsp;
12
-
12
+
13
13
  - render_region :bottom do |bottom|
14
14
  #actions
15
15
  = link_to new_admin_asset_path, class: 'button' do
@@ -1,4 +1,4 @@
1
- %h4
1
+ %h4
2
2
  = t('clipped_extension.assets')
3
3
  %p.ruled
4
4
  = show_config 'assets.max_asset_size'
@@ -2,7 +2,7 @@
2
2
  - popups.upload_asset do
3
3
  #upload_asset.popup{:style => 'display: none; width: 28em'}
4
4
  #upload_asset_busy.busy{:style => 'display: none'}= image('spinner.gif', :alt => '')
5
-
5
+
6
6
  .popup_title= t('clipped_extension.upload_asset')
7
7
 
8
8
  = form_for([:admin, Asset.new], :html => {:method => 'post', :multipart => true, :class => 'upload_asset'}) do |f|
@@ -20,16 +20,16 @@
20
20
 
21
21
  - popups.attach_asset do
22
22
  #attach_asset.popup{:style=>'display: none;'}
23
-
23
+
24
24
  .popup_title= t('clipped_extension.find_assets')
25
-
25
+
26
26
  .toolbar
27
27
  = render :partial => 'admin/assets/search'
28
-
28
+
29
29
  #assets_table.assets.viewport
30
30
  - assets = Asset.all.paginate(:per_page => 20, page: params[:p])
31
31
  = render :partial => 'admin/assets/asset_table', :locals => {:assets => assets, :with_pagination => true}
32
-
32
+
33
33
  .busy{:style => 'display: none'}= image('spinner.gif', :alt => '')
34
34
  .buttons
35
35
  %a.cancel.close_popup{:href=>'#'}= t('close')
@@ -1,8 +1,8 @@
1
1
  #asset-bucket{ :style => 'display: none' }
2
2
  = render :partial => '/admin/assets/assets_container'
3
-
3
+
4
4
  %p.note
5
5
  = automatic_size_descriptions
6
6
  = t('clipped_extension.images_automatically_created')
7
- #close-link
7
+ #close-link
8
8
  = link_to t('close'), '#'
@@ -4,7 +4,7 @@
4
4
  #assets-container
5
5
  #asset-tabs
6
6
  - render_region :asset_tabs do |asset_tabs|
7
- - if @page && !@page.new_record?
7
+ - if @page && !@page.new_record?
8
8
  - asset_tabs.attachment_tab do
9
9
  %a.asset-tab{ :href => '#page-attachments', :id => 'tab_page-attachments' }
10
10
  = t('clipped_extension.attached_assets')
@@ -14,25 +14,25 @@
14
14
  - asset_tabs.bucket_tab do
15
15
  %a.asset-tab{ :href => '#bucket', :id => 'tab_bucket' }
16
16
  = t('clipped_extension.bucket')
17
- - asset_tabs.search_tab do
17
+ - asset_tabs.search_tab do
18
18
  %a.asset-tab{ :href => '#search-assets' }
19
19
  = t('clipped_extension.search')
20
20
  - else
21
21
  - asset_tabs.bucket_tab do
22
22
  %a.asset-tab.here{ :href => '#' }
23
23
  = t('clipped_extension.bucket')
24
- - if @page && !@page.new_record?
24
+ - if @page && !@page.new_record?
25
25
  - render_region :asset_panes do |asset_panes|
26
26
 
27
- - asset_panes.page_attachments do
27
+ - asset_panes.page_attachments do
28
28
  #page-attachments.pane
29
29
  %p
30
- %span.note
30
+ %span.note
31
31
  != t('clipped_extension.asset_note')
32
32
  %ul#attachments
33
33
  = render :partial => 'admin/assets/page_assets'
34
34
  .clear
35
-
35
+
36
36
  - asset_panes.upload do
37
37
  #upload_assets.pane
38
38
  %p
@@ -1,6 +1,6 @@
1
1
  %ul#bucket_list
2
2
  - if session[:bucket]
3
- - session[:bucket].each do |url, info|
3
+ - session[:bucket].each do |url, info|
4
4
  = render :partial => 'admin/assets/bucket_asset', :locals => { :asset_url => url, :asset_id => info[:id], :asset_type => info[:type], :asset_title => info[:title], :asset_thumbnail =>info[:thumbnail], :page => @page }
5
5
  - else
6
6
  %li
@@ -8,5 +8,5 @@
8
8
  .upload-buttons
9
9
  = form.submit t('clipped_extension.save_and_upload'), :class => 'button'
10
10
  %div.spinner
11
-
11
+
12
12
  %iframe{:id => 'ulframe', :name => 'ulframe', :src => 'about:blank'}
@@ -39,10 +39,10 @@
39
39
  A new homepage will be created automatically if none is specified.
40
40
  - else
41
41
  If you change the site homepage ID, be sure it is to a page with no parents.
42
-
42
+
43
43
  - render_region :form_bottom do |form_bottom|
44
44
  - form_bottom.edit_timestamp do
45
- = updated_stamp @site
45
+ = updated_stamp @site
46
46
  - form_bottom.edit_buttons do
47
47
  .buttons
48
48
  = save_model_button(@site)
@@ -2,7 +2,7 @@
2
2
 
3
3
  - render_region :main do |main|
4
4
  - main.edit_header do
5
- %h1= t('edit_snippet')
5
+ %h1= t('edit_snippet')
6
6
  - main.edit_form do
7
7
  = render :partial => 'form'
8
8
  - main.edit_popups do
@@ -1,6 +1,6 @@
1
1
  - render_region :main do |main|
2
2
  - main.edit_header do
3
- %h1= t('new_snippet')
3
+ %h1= t('new_snippet')
4
4
  - main.edit_form do
5
5
  = render :partial => 'form'
6
6
  - main.edit_popups do
@@ -5,7 +5,7 @@ describe "/<%= class_name.underscore %>/<%= action %>" do
5
5
  render '<%= class_name.underscore %>/<%= action %>'
6
6
  end
7
7
 
8
- #Delete this example and add some real ones or delete this file
8
+ # Delete this example and add some real ones or delete this file
9
9
  it "should tell you where to find the file" do
10
10
  response.should have_tag('p', 'Find me in app/views/<%= class_name.underscore %>/<%= action %>.rhtml')
11
11
  end
@@ -11,7 +11,6 @@ module TrustyCms
11
11
  def existing_migrations_with_extensions(file_name)
12
12
  Dir.glob("#{destination_path(@migration_directory)}/[0-9]*_*.rb").grep(/[0-9]+_#{file_name}.rb$/)
13
13
  end
14
-
15
14
  end
16
15
  end
17
16
 
@@ -145,4 +145,4 @@ class InstanceGenerator < Rails::Generator::Base
145
145
  File.join("..", "..", "..", "..", filename)
146
146
  end
147
147
 
148
- end
148
+ end
@@ -23,7 +23,6 @@ class LanguageExtensionGenerator < Rails::Generator::NamedBase
23
23
  m.template 'lib.rb', "#{extension_path}/lib/radiant-#{file_name}_language_pack-extension.rb"
24
24
  m.template 'gemspec.rb', "#{extension_path}/radiant-#{file_name}_language_pack-extension.gemspec"
25
25
  end
26
-
27
26
  end
28
27
 
29
28
  def class_name
@@ -22,5 +22,4 @@ class Test::Unit::TestCase
22
22
  self.fixture_path << File.dirname(__FILE__) + "/fixtures"
23
23
 
24
24
  # Add more helper methods to be used by all extension tests here...
25
-
26
25
  end
@@ -26,7 +26,5 @@ class TrustyCmsGenerator < Rails::Generators::Base
26
26
  remove_file 'app/helpers/application_helper.rb'
27
27
  remove_file 'app/assets/javascripts/application.js'
28
28
  remove_file 'app/views/layouts/application.html.erb'
29
-
30
29
  end
31
-
32
30
  end
data/lib/trusty_cms.rb CHANGED
@@ -2,6 +2,6 @@ TRUSTY_CMS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) unle
2
2
 
3
3
  unless defined? TrustyCms::VERSION
4
4
  module TrustyCms
5
- VERSION = '5.0.4'.freeze
5
+ VERSION = '5.0.7'.freeze
6
6
  end
7
7
  end