alchemy_cms 4.0.5 → 4.1.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +1 -0
  3. data/.gitignore +1 -0
  4. data/.localeapp/config.rb +8 -0
  5. data/.rubocop.yml +26 -13
  6. data/.travis.yml +8 -11
  7. data/CHANGELOG.md +5 -20
  8. data/Gemfile +10 -7
  9. data/README.md +16 -14
  10. data/Rakefile +1 -1
  11. data/alchemy_cms.gemspec +6 -7
  12. data/app/assets/images/alchemy/alchemy-logo.png +0 -0
  13. data/app/assets/images/alchemy/alchemy-logo.svg +1 -70
  14. data/app/assets/images/alchemy/favicon.ico +0 -0
  15. data/app/assets/images/alchemy/icon.svg +1 -14
  16. data/app/assets/javascripts/alchemy/admin.js +0 -7
  17. data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +2 -2
  18. data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +1 -1
  19. data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +1 -1
  20. data/app/assets/javascripts/alchemy/alchemy.datepicker.js.coffee +1 -0
  21. data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +19 -6
  22. data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +2 -7
  23. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +36 -26
  24. data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +6 -15
  25. data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +1 -1
  26. data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +8 -11
  27. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +4 -1
  28. data/app/assets/javascripts/alchemy/alchemy.image_overlay.coffee +1 -1
  29. data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +5 -14
  30. data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +54 -75
  31. data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +4 -13
  32. data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +1 -0
  33. data/app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee +12 -6
  34. data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +0 -158
  35. data/app/assets/stylesheets/alchemy/_defaults.scss +0 -2
  36. data/app/assets/stylesheets/alchemy/_extends.scss +13 -18
  37. data/app/assets/stylesheets/alchemy/_mixins.scss +72 -46
  38. data/app/assets/stylesheets/alchemy/_variables.scss +128 -59
  39. data/app/assets/stylesheets/alchemy/admin.scss +7 -1
  40. data/app/assets/stylesheets/alchemy/archive.scss +23 -27
  41. data/app/assets/stylesheets/alchemy/base.scss +5 -355
  42. data/app/assets/stylesheets/alchemy/buttons.scss +23 -60
  43. data/app/assets/stylesheets/alchemy/clipboard.scss +26 -0
  44. data/app/assets/stylesheets/alchemy/dashboard.scss +7 -40
  45. data/app/assets/stylesheets/alchemy/dialogs.scss +23 -36
  46. data/app/assets/stylesheets/alchemy/elements.scss +80 -156
  47. data/app/assets/stylesheets/alchemy/errors.scss +2 -2
  48. data/app/assets/stylesheets/alchemy/flash.scss +19 -10
  49. data/app/assets/stylesheets/alchemy/fonts.scss +13 -0
  50. data/app/assets/stylesheets/alchemy/forms.scss +6 -1
  51. data/app/assets/stylesheets/alchemy/frame.scss +24 -65
  52. data/app/assets/stylesheets/alchemy/hints.scss +2 -2
  53. data/app/assets/stylesheets/alchemy/icons.scss +3 -337
  54. data/app/assets/stylesheets/alchemy/image_library.scss +9 -10
  55. data/app/assets/stylesheets/alchemy/jquery-ui.scss +21 -839
  56. data/app/assets/stylesheets/alchemy/jquery.datetimepicker.scss +32 -57
  57. data/app/assets/stylesheets/alchemy/lists.scss +4 -8
  58. data/app/assets/stylesheets/alchemy/menubar.scss +26 -29
  59. data/app/assets/stylesheets/alchemy/navigation.scss +23 -25
  60. data/app/assets/stylesheets/alchemy/notices.scss +25 -25
  61. data/app/assets/stylesheets/alchemy/pagination.scss +12 -7
  62. data/app/assets/stylesheets/alchemy/preview_window.scss +20 -0
  63. data/app/assets/stylesheets/alchemy/resource_info.scss +1 -1
  64. data/app/assets/stylesheets/alchemy/search.scss +19 -15
  65. data/app/assets/stylesheets/alchemy/selects.scss +63 -32
  66. data/app/assets/stylesheets/alchemy/sitemap.scss +70 -148
  67. data/app/assets/stylesheets/alchemy/tables.scss +16 -59
  68. data/app/assets/stylesheets/alchemy/toolbar.scss +9 -36
  69. data/app/assets/stylesheets/alchemy/trash.scss +8 -0
  70. data/app/assets/stylesheets/alchemy/upload.scss +5 -6
  71. data/app/assets/stylesheets/tinymce/skins/alchemy/content.min.css.scss +1 -0
  72. data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +78 -43
  73. data/app/controllers/alchemy/admin/attachments_controller.rb +6 -6
  74. data/app/controllers/alchemy/admin/base_controller.rb +9 -9
  75. data/app/controllers/alchemy/admin/contents_controller.rb +0 -17
  76. data/app/controllers/alchemy/admin/elements_controller.rb +1 -4
  77. data/app/controllers/alchemy/admin/essence_files_controller.rb +1 -3
  78. data/app/controllers/alchemy/admin/essence_pictures_controller.rb +1 -3
  79. data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
  80. data/app/controllers/alchemy/admin/pictures_controller.rb +5 -5
  81. data/app/controllers/alchemy/admin/resources_controller.rb +10 -10
  82. data/app/controllers/alchemy/admin/tags_controller.rb +7 -7
  83. data/app/controllers/alchemy/api/contents_controller.rb +6 -1
  84. data/app/controllers/alchemy/api/elements_controller.rb +5 -1
  85. data/app/controllers/alchemy/api/pages_controller.rb +6 -1
  86. data/app/controllers/alchemy/base_controller.rb +5 -3
  87. data/app/controllers/alchemy/pages_controller.rb +1 -1
  88. data/app/helpers/alchemy/admin/base_helper.rb +14 -15
  89. data/app/helpers/alchemy/admin/contents_helper.rb +1 -2
  90. data/app/helpers/alchemy/admin/elements_helper.rb +7 -6
  91. data/app/helpers/alchemy/admin/tags_helper.rb +3 -4
  92. data/app/helpers/alchemy/base_helper.rb +35 -5
  93. data/app/helpers/alchemy/elements_helper.rb +2 -2
  94. data/app/helpers/alchemy/pages_helper.rb +4 -2
  95. data/app/models/alchemy/attachment.rb +14 -23
  96. data/app/models/alchemy/base_record.rb +13 -0
  97. data/app/models/alchemy/cell.rb +1 -1
  98. data/app/models/alchemy/content.rb +1 -2
  99. data/app/models/alchemy/content/factory.rb +1 -1
  100. data/app/models/alchemy/element.rb +10 -12
  101. data/app/models/alchemy/essence_boolean.rb +1 -1
  102. data/app/models/alchemy/essence_date.rb +2 -2
  103. data/app/models/alchemy/essence_file.rb +1 -1
  104. data/app/models/alchemy/essence_html.rb +1 -1
  105. data/app/models/alchemy/essence_link.rb +1 -1
  106. data/app/models/alchemy/essence_picture.rb +1 -1
  107. data/app/models/alchemy/essence_richtext.rb +1 -1
  108. data/app/models/alchemy/essence_select.rb +1 -1
  109. data/app/models/alchemy/essence_text.rb +1 -1
  110. data/app/models/alchemy/folded_page.rb +1 -1
  111. data/app/models/alchemy/language.rb +21 -5
  112. data/app/models/alchemy/page.rb +17 -5
  113. data/app/models/alchemy/page/page_elements.rb +14 -2
  114. data/app/models/alchemy/page/page_naming.rb +17 -4
  115. data/app/models/alchemy/picture.rb +4 -7
  116. data/app/models/alchemy/site.rb +3 -3
  117. data/app/models/alchemy/tag.rb +3 -3
  118. data/app/models/concerns/alchemy/content_touching.rb +23 -0
  119. data/app/serializers/alchemy/element_serializer.rb +2 -0
  120. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +1 -1
  121. data/app/views/alchemy/admin/attachments/_attachment.html.erb +11 -21
  122. data/app/views/alchemy/admin/attachments/_files_list.html.erb +26 -29
  123. data/app/views/alchemy/admin/attachments/_filter_bar.html.erb +2 -3
  124. data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +3 -4
  125. data/app/views/alchemy/admin/attachments/_replace_button.html.erb +2 -3
  126. data/app/views/alchemy/admin/attachments/_tag_list.html.erb +3 -3
  127. data/app/views/alchemy/admin/attachments/destroy.js.erb +1 -1
  128. data/app/views/alchemy/admin/attachments/edit.html.erb +2 -2
  129. data/app/views/alchemy/admin/attachments/index.html.erb +3 -2
  130. data/app/views/alchemy/admin/attachments/show.html.erb +7 -8
  131. data/app/views/alchemy/admin/clipboard/clear.js.erb +1 -1
  132. data/app/views/alchemy/admin/clipboard/index.html.erb +23 -7
  133. data/app/views/alchemy/admin/clipboard/insert.js.erb +1 -1
  134. data/app/views/alchemy/admin/clipboard/remove.js.erb +2 -2
  135. data/app/views/alchemy/admin/contents/create.js.erb +1 -1
  136. data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +9 -6
  137. data/app/views/alchemy/admin/dashboard/_recent_pages.html.erb +6 -4
  138. data/app/views/alchemy/admin/dashboard/_sites.html.erb +4 -2
  139. data/app/views/alchemy/admin/dashboard/_users.html.erb +6 -4
  140. data/app/views/alchemy/admin/dashboard/index.html.erb +3 -3
  141. data/app/views/alchemy/admin/dashboard/info.html.erb +6 -7
  142. data/app/views/alchemy/admin/elements/_add_picture.html.erb +1 -1
  143. data/app/views/alchemy/admin/elements/_element.html.erb +1 -1
  144. data/app/views/alchemy/admin/elements/_element_header.html.erb +14 -14
  145. data/app/views/alchemy/admin/elements/_element_toolbar.html.erb +3 -3
  146. data/app/views/alchemy/admin/elements/_new_element_form.html.erb +2 -3
  147. data/app/views/alchemy/admin/elements/index.html.erb +2 -4
  148. data/app/views/alchemy/admin/elements/new.html.erb +1 -2
  149. data/app/views/alchemy/admin/elements/publish.js.erb +5 -5
  150. data/app/views/alchemy/admin/languages/_language.html.erb +4 -9
  151. data/app/views/alchemy/admin/languages/_table.html.erb +1 -1
  152. data/app/views/alchemy/admin/languages/index.html.erb +1 -1
  153. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +5 -5
  154. data/app/views/alchemy/admin/layoutpages/index.html.erb +5 -4
  155. data/app/views/alchemy/admin/leave.html.erb +1 -1
  156. data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +1 -1
  157. data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +1 -1
  158. data/app/views/alchemy/admin/pages/_form.html.erb +1 -1
  159. data/app/views/alchemy/admin/pages/_locked_page.html.erb +1 -1
  160. data/app/views/alchemy/admin/pages/_page.html.erb +31 -23
  161. data/app/views/alchemy/admin/pages/_page_for_links.html.erb +5 -5
  162. data/app/views/alchemy/admin/pages/_page_infos.html.erb +3 -3
  163. data/app/views/alchemy/admin/pages/_publication_fields.html.erb +1 -1
  164. data/app/views/alchemy/admin/pages/edit.html.erb +22 -21
  165. data/app/views/alchemy/admin/pages/index.html.erb +5 -21
  166. data/app/views/alchemy/admin/pages/info.html.erb +5 -5
  167. data/app/views/alchemy/admin/pages/sort.html.erb +1 -1
  168. data/app/views/alchemy/admin/pages/unlock.js.erb +2 -4
  169. data/app/views/alchemy/admin/partials/_flash.html.erb +1 -1
  170. data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +6 -2
  171. data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +2 -2
  172. data/app/views/alchemy/admin/partials/_search_form.html.erb +3 -3
  173. data/app/views/alchemy/admin/pictures/_archive.html.erb +19 -17
  174. data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
  175. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +13 -13
  176. data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +2 -3
  177. data/app/views/alchemy/admin/pictures/_form.html.erb +3 -3
  178. data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +2 -3
  179. data/app/views/alchemy/admin/pictures/_picture.html.erb +7 -7
  180. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +3 -3
  181. data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +6 -7
  182. data/app/views/alchemy/admin/pictures/index.html.erb +12 -12
  183. data/app/views/alchemy/admin/pictures/index.js.erb +0 -1
  184. data/app/views/alchemy/admin/pictures/show.html.erb +9 -9
  185. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +2 -3
  186. data/app/views/alchemy/admin/resources/_form.html.erb +10 -2
  187. data/app/views/alchemy/admin/resources/_resource.html.erb +9 -14
  188. data/app/views/alchemy/admin/resources/_table.html.erb +1 -1
  189. data/app/views/alchemy/admin/resources/_tag_list.html.erb +4 -4
  190. data/app/views/alchemy/admin/resources/index.html.erb +2 -3
  191. data/app/views/alchemy/admin/sites/index.html.erb +1 -1
  192. data/app/views/alchemy/admin/tags/_tag.html.erb +7 -11
  193. data/app/views/alchemy/admin/tags/index.html.erb +4 -4
  194. data/app/views/alchemy/admin/trash/index.html.erb +2 -3
  195. data/app/views/alchemy/admin/uploader/_button.html.erb +1 -2
  196. data/app/views/alchemy/base/500.html.erb +1 -1
  197. data/app/views/alchemy/base/permission_denied.js.erb +1 -1
  198. data/app/views/alchemy/base/redirect.js.erb +1 -2
  199. data/app/views/alchemy/elements/_editor_not_found.html.erb +2 -3
  200. data/app/views/alchemy/essences/_essence_date_editor.html.erb +1 -1
  201. data/app/views/alchemy/essences/_essence_file_editor.html.erb +7 -11
  202. data/app/views/alchemy/essences/_essence_picture_editor.html.erb +9 -7
  203. data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +1 -1
  204. data/app/views/alchemy/pages/_meta_data.html.erb +1 -1
  205. data/app/views/kaminari/alchemy/_first_page.html.erb +7 -3
  206. data/app/views/kaminari/alchemy/_gap.html.erb +1 -1
  207. data/app/views/kaminari/alchemy/_last_page.html.erb +7 -3
  208. data/app/views/kaminari/alchemy/_next_page.html.erb +4 -2
  209. data/app/views/kaminari/alchemy/_page.html.erb +1 -1
  210. data/app/views/kaminari/alchemy/_prev_page.html.erb +4 -2
  211. data/app/views/layouts/alchemy/admin.html.erb +8 -6
  212. data/bin/rails +2 -2
  213. data/bin/rspec +1 -1
  214. data/config/alchemy/config.yml +0 -2
  215. data/config/alchemy/modules.yml +5 -5
  216. data/config/initializers/simple_form.rb +45 -8
  217. data/config/locales/alchemy.en.yml +66 -179
  218. data/config/routes.rb +1 -1
  219. data/db/migrate/20180226123013_alchemy_four_point_zero.rb +392 -0
  220. data/db/migrate/20180227224537_migrate_tags_to_gutentag.rb +41 -0
  221. data/lib/alchemy/config.rb +0 -2
  222. data/lib/alchemy/engine.rb +5 -9
  223. data/lib/alchemy/essence.rb +6 -6
  224. data/lib/alchemy/filetypes.rb +13 -1
  225. data/lib/alchemy/forms/builder.rb +5 -3
  226. data/lib/alchemy/i18n.rb +8 -6
  227. data/lib/alchemy/modules.rb +1 -1
  228. data/lib/alchemy/name_conversions.rb +0 -2
  229. data/lib/alchemy/page_layout.rb +3 -2
  230. data/lib/alchemy/paths.rb +5 -5
  231. data/lib/alchemy/resource.rb +9 -9
  232. data/lib/alchemy/resources_helper.rb +11 -15
  233. data/lib/alchemy/routing_constraints.rb +2 -2
  234. data/lib/alchemy/shell.rb +0 -1
  235. data/lib/alchemy/taggable.rb +40 -0
  236. data/lib/alchemy/tasks/tidy.rb +1 -9
  237. data/lib/alchemy/test_support/factories/content_factory.rb +10 -0
  238. data/lib/alchemy/test_support/factories/element_factory.rb +5 -0
  239. data/lib/alchemy/test_support/shared_contexts.rb +1 -1
  240. data/lib/alchemy/tinymce.rb +2 -2
  241. data/lib/alchemy/upgrader/four_point_one.rb +42 -0
  242. data/lib/alchemy/upgrader/tasks/harden_acts_as_taggable_on_migrations.rb +27 -0
  243. data/lib/alchemy/version.rb +1 -1
  244. data/lib/alchemy_cms.rb +2 -3
  245. data/lib/rails/generators/alchemy/elements/elements_generator.rb +2 -2
  246. data/lib/rails/generators/alchemy/essence/essence_generator.rb +1 -1
  247. data/lib/rails/generators/alchemy/install/install_generator.rb +4 -8
  248. data/lib/rails/generators/alchemy/module/module_generator.rb +1 -1
  249. data/lib/rails/generators/alchemy/page_layouts/page_layouts_generator.rb +2 -2
  250. data/lib/rails/generators/alchemy/site_layouts/site_layouts_generator.rb +2 -2
  251. data/lib/rails/generators/alchemy/views/views_generator.rb +1 -1
  252. data/lib/tasks/alchemy/db.rake +2 -1
  253. data/lib/tasks/alchemy/tidy.rake +0 -6
  254. data/lib/tasks/alchemy/upgrade.rake +11 -144
  255. data/vendor/assets/fonts/fa-regular-400.eot +0 -0
  256. data/vendor/assets/fonts/fa-regular-400.svg +363 -0
  257. data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
  258. data/vendor/assets/fonts/fa-regular-400.woff +0 -0
  259. data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
  260. data/vendor/assets/fonts/fa-solid-900.eot +0 -0
  261. data/vendor/assets/fonts/fa-solid-900.svg +1413 -0
  262. data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
  263. data/vendor/assets/fonts/fa-solid-900.woff +0 -0
  264. data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
  265. data/vendor/assets/javascripts/tinymce/license.txt +6 -6
  266. data/vendor/assets/javascripts/tinymce/tinymce.min.js +2 -15
  267. data/vendor/assets/stylesheets/fontawesome/_animated.scss +20 -0
  268. data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +20 -0
  269. data/vendor/assets/stylesheets/fontawesome/_core.scss +16 -0
  270. data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +6 -0
  271. data/vendor/assets/stylesheets/fontawesome/_icons.scss +792 -0
  272. data/vendor/assets/stylesheets/fontawesome/_larger.scss +23 -0
  273. data/vendor/assets/stylesheets/fontawesome/_list.scss +18 -0
  274. data/vendor/assets/stylesheets/fontawesome/_mixins.scss +57 -0
  275. data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +23 -0
  276. data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +5 -0
  277. data/vendor/assets/stylesheets/fontawesome/_stacked.scss +31 -0
  278. data/vendor/assets/stylesheets/fontawesome/_variables.scss +805 -0
  279. data/vendor/assets/stylesheets/fontawesome/fa-regular.scss +22 -0
  280. data/vendor/assets/stylesheets/fontawesome/fa-solid.scss +23 -0
  281. data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +16 -0
  282. metadata +77 -112
  283. data/app/assets/fonts/alchemy/icons.eot +0 -0
  284. data/app/assets/fonts/alchemy/icons.svg +0 -33
  285. data/app/assets/fonts/alchemy/icons.ttf +0 -0
  286. data/app/assets/fonts/alchemy/icons.woff +0 -0
  287. data/app/assets/images/alchemy/icons.png +0 -0
  288. data/app/assets/images/alchemy/ui-icons_666666_256x240.png +0 -0
  289. data/app/assets/images/sassy-ie-overlay.png +0 -0
  290. data/app/assets/javascripts/alchemy/alchemy.jquery_loader.js +0 -42
  291. data/app/assets/stylesheets/alchemy/icon-font.scss +0 -75
  292. data/app/assets/stylesheets/alchemy/modules.scss +0 -27
  293. data/app/models/alchemy.rb +0 -7
  294. data/app/views/alchemy/admin/contents/destroy.js.erb +0 -4
  295. data/app/views/alchemy/admin/pictures/flush.js.erb +0 -2
  296. data/config/locales/alchemy.de.yml +0 -932
  297. data/config/locales/alchemy.es.yml +0 -960
  298. data/config/locales/alchemy.fr.yml +0 -938
  299. data/config/locales/alchemy.it.yml +0 -938
  300. data/config/locales/alchemy.nl.yml +0 -918
  301. data/config/locales/alchemy.ru.yml +0 -830
  302. data/config/locales/simple_form.de.yml +0 -26
  303. data/config/locales/simple_form.en.yml +0 -25
  304. data/config/locales/simple_form.es.yml +0 -6
  305. data/config/locales/simple_form.fr.yml +0 -26
  306. data/config/locales/simple_form.it.yml +0 -25
  307. data/config/locales/simple_form.nl.yml +0 -25
  308. data/config/locales/simple_form.ru.yml +0 -25
  309. data/db/migrate/20130827094554_alchemy_two_point_six.rb +0 -378
  310. data/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +0 -5
  311. data/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +0 -5
  312. data/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +0 -5
  313. data/db/migrate/20150608204610_add_parent_element_id_to_alchemy_elements.rb +0 -6
  314. data/db/migrate/20150729151825_add_link_text_to_alchemy_essence_files.rb +0 -5
  315. data/db/migrate/20150906195818_add_locale_to_alchemy_languages.rb +0 -7
  316. data/db/migrate/20160108174834_add_timebased_publishing_columns_to_pages.rb +0 -32
  317. data/db/migrate/20160422195310_add_image_file_format_to_alchemy_pictures.rb +0 -9
  318. data/db/migrate/20160617224938_change_alchemy_pages_locked_to_locked_at.rb +0 -22
  319. data/db/migrate/20160912223112_add_index_to_alchemy_pages_rgt.rb +0 -9
  320. data/db/migrate/20160927205604_add_foreign_key_indices_and_null_constraints.rb +0 -20
  321. data/db/migrate/20160928080104_add_foreign_keys.rb +0 -27
  322. data/lib/alchemy/touching.rb +0 -42
  323. data/lib/alchemy/upgrader/tasks/available_contents_upgrader.rb +0 -161
  324. data/lib/alchemy/upgrader/tasks/install_asset_manifests.rb +0 -15
  325. data/lib/alchemy/upgrader/tasks/install_dragonfly_config.rb +0 -14
  326. data/lib/alchemy/upgrader/tasks/nestable_elements_migration.rb +0 -71
  327. data/lib/alchemy/upgrader/tasks/three_point_two_task.rb +0 -31
  328. data/lib/alchemy/upgrader/three_point_five.rb +0 -32
  329. data/lib/alchemy/upgrader/three_point_four.rb +0 -52
  330. data/lib/alchemy/upgrader/three_point_one.rb +0 -54
  331. data/lib/alchemy/upgrader/three_point_three.rb +0 -50
  332. data/lib/alchemy/upgrader/three_point_two.rb +0 -40
  333. data/lib/alchemy/upgrader/three_point_zero.rb +0 -92
  334. data/vendor/assets/javascripts/jquery_plugins/jquery.floatThead.min.js +0 -3
  335. data/vendor/assets/javascripts/tinymce/langs/de.js +0 -219
  336. data/vendor/assets/javascripts/tinymce/langs/es.js +0 -219
  337. data/vendor/assets/javascripts/tinymce/langs/fr.js +0 -219
  338. data/vendor/assets/javascripts/tinymce/langs/it.js +0 -219
  339. data/vendor/assets/javascripts/tinymce/langs/nl.js +0 -219
  340. data/vendor/assets/javascripts/tinymce/langs/ru.js +0 -219
@@ -1,5 +1,3 @@
1
- # encoding: UTF-8
2
-
3
1
  en:
4
2
 
5
3
  # = Alchemy Translations
@@ -199,7 +197,7 @@ en:
199
197
  "Flush picture cache": "Flush picture cache"
200
198
  "Global shortcuts": "Global shortcuts"
201
199
  "Hide childpages": "Hide childpages"
202
- hide_elements: hide_elements
200
+ hide_elements: Hide Elements
203
201
  hide_element: "Hide element"
204
202
  "Image missing": "Image missing"
205
203
  "Image size": "Image size"
@@ -435,6 +433,8 @@ en:
435
433
  pages: "Pages"
436
434
  tags: "Tags"
437
435
  sites: "Sites"
436
+ user_sessions: "Login"
437
+ users: "Users"
438
438
  name: "Name"
439
439
  names: "Names"
440
440
  navigation_name: "Navigation name"
@@ -590,149 +590,45 @@ en:
590
590
  "Update available": 'Update available'
591
591
  "Update status unavailable": 'Update status unavailable'
592
592
  "Uploading": "Uploading"
593
+ cannot_signup_more_then_once: "You can't signup more then once."
594
+ confirm_to_delete_user: "Do you really want to delete this user?"
595
+ create_user: "Create a new user"
596
+ delete_user: "Delete this user"
597
+ edit_user: "Edit the user´s properties."
598
+ "No users found": "No users found."
599
+
600
+ # Kaminari pagination translations
601
+ pagination:
602
+ first: "First Page"
603
+ previous_page: "Previous Page"
604
+ next_page: "Next Page"
605
+ last: "Last Page"
593
606
 
594
- # END of Alchemy translation
595
-
596
- # == Rails translations
597
- # Below are Rails specific translations for date, time, number, currency, error messages and so on.
598
- date:
599
- formats:
600
- default: "%Y-%m-%d"
601
- datepicker: "%Y-%m-%d"
602
- short: "%b %d"
603
- long: "%B %d, %Y"
604
- only_day: "%e"
605
- day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
606
- abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
607
- month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December]
608
- abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
609
- order:
610
- - :year
611
- - :month
612
- - :day
607
+ # Simple form translations
608
+ forms:
609
+ "yes": 'Yes'
610
+ "no": 'No'
611
+ required:
612
+ text: 'required'
613
+ mark: '*'
614
+ error_notification:
615
+ default_message: "Please review the problems below:"
616
+
617
+ # Alchemy time formats
613
618
  time:
614
619
  formats:
615
- default: "%a, %d %b %Y %H:%M:%S %z"
616
- short: "%d %b %H:%M"
617
- long: "%B %d, %Y %H:%M"
618
- page_status: "%m.%d.%Y %H:%M"
619
- date: "%Y-%m-%d"
620
- datepicker: "%Y-%m-%d"
621
- timepicker: "%H:%M"
622
- datetimepicker: "%Y-%m-%d %H:%M"
623
- am: "am"
624
- pm: "pm"
625
- support:
626
- array:
627
- sentence_connector: "and"
628
-
629
- number:
630
- # Used in number_with_delimiter()
631
- # These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
632
- format:
633
- # Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
634
- separator: "."
635
- # Delimets thousands (e.g. 1,000,000 is a million) (always in groups of three)
636
- delimiter: ","
637
- # Number of decimals, behind the separator (1 with a precision of 2 gives: 1.00)
638
- precision: 3
639
-
640
- # Used in number_to_currency()
641
- currency:
642
- format:
643
- # Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
644
- format: "%u%n"
645
- unit: "$"
646
- # These three are to override number.format and are optional
647
- separator: "."
648
- delimiter: ","
649
- precision: 2
650
-
651
- # Used in number_to_percentage()
652
- percentage:
653
- format:
654
- # These three are to override number.format and are optional
655
- # separator:
656
- delimiter: ""
657
- # precision:
658
-
659
- # Used in number_to_precision()
660
- precision:
661
- format:
662
- # These three are to override number.format and are optional
663
- # separator:
664
- delimiter: ""
665
- # precision:
666
-
667
- # Used in number_to_human_size()
668
- human:
669
- format:
670
- # These three are to override number.format and are optional
671
- # separator:
672
- delimiter: ""
673
- precision: 1
674
-
675
- # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
676
- datetime:
677
- distance_in_words:
678
- half_a_minute: "half a minute"
679
- less_than_x_seconds:
680
- one: "less than 1 second"
681
- many: "less than %{count} seconds"
682
- x_seconds:
683
- one: "1 second"
684
- many: "%{count} seconds"
685
- less_than_x_minutes:
686
- one: "less than a minute"
687
- many: "less than %{count} minutes"
688
- x_minutes:
689
- one: "1 minute"
690
- many: "%{count} minutes"
691
- about_x_hours:
692
- one: "about 1 hour"
693
- many: "about %{count} hours"
694
- x_days:
695
- one: "1 day"
696
- many: "%{count} days"
697
- about_x_months:
698
- one: "about 1 month"
699
- many: "about %{count} months"
700
- x_months:
701
- one: "1 month"
702
- many: "%{count} months"
703
- about_x_years:
704
- one: "about 1 year"
705
- many: "about %{count} years"
706
- over_x_years:
707
- one: "over 1 year"
708
- many: "over %{count} years"
709
-
710
- errors: &errors
711
- template:
712
- header: "Validation failed"
713
- body: "Please review the form and check the errors."
714
-
715
- messages:
716
- inclusion: "is not included in the list"
717
- exclusion: "is reserved"
718
- invalid: "is invalid"
719
- record_invalid: 'Validation of %{errors} failed'
720
- confirmation: "doesn't match confirmation"
721
- accepted: "must be accepted"
722
- empty: "can't be empty"
723
- blank: "can't be blank"
724
- too_long: "is too long (maximum is %{count} characters)"
725
- too_short: "is too short (minimum is %{count} characters)"
726
- wrong_length: "is the wrong length (should be %{count} characters)"
727
- taken: "has already been taken"
728
- not_a_number: "is not a number"
729
- greater_than: "must be greater than %{count}"
730
- greater_than_or_equal_to: "must be greater than or equal to %{count}"
731
- equal_to: "must be equal to %{count}"
732
- less_than: "must be less than %{count}"
733
- less_than_or_equal_to: "must be less than or equal to %{count}"
734
- odd: "must be odd"
735
- even: "must be even"
620
+ alchemy:
621
+ datepicker: "%Y-%m-%d"
622
+ datetimepicker: "%Y-%m-%d %H:%M"
623
+ default: "%a, %d %b %Y %H:%M:%S %z"
624
+ essence_date: "%Y-%m-%d"
625
+ page_status: "%m.%d.%Y %H:%M"
626
+ short_datetime: "%d %b %H:%M"
627
+ time: "%H:%M"
628
+ timepicker: "%H:%M"
629
+
630
+ # Translations for error messages.
631
+ errors:
736
632
  models:
737
633
  alchemy/content:
738
634
  attributes:
@@ -765,13 +661,19 @@ en:
765
661
  attributes:
766
662
  image_file:
767
663
  blank: "Please attach a picture."
664
+ alchemy/user:
665
+ attributes:
666
+ email:
667
+ invalid: "is not a valid email address"
668
+ alchemy_roles:
669
+ blank: "at least one role must be given"
768
670
 
671
+ # Translations for Alchemy models
769
672
  activemodel:
770
673
  models:
771
674
  alchemy/message:
772
675
  one: Message
773
676
  other: Messages
774
-
775
677
  attributes:
776
678
  alchemy/message:
777
679
  salutation: 'Salutation'
@@ -784,51 +686,40 @@ en:
784
686
  email: 'Email'
785
687
  message: 'Message'
786
688
 
787
- errors:
788
- <<: *errors
789
-
790
- # Translations for active record database models and error messages.
689
+ # Translations for Alchemy database models
791
690
  activerecord:
792
-
793
691
  models:
794
- acts_as_taggable_on/tag:
692
+ gutentag/tag:
795
693
  one: Tag
796
694
  other: Tags
797
-
798
695
  alchemy/attachment:
799
696
  one: File
800
697
  other: Files
801
-
802
698
  alchemy/element:
803
699
  one: "Element"
804
700
  other: "Elements"
805
-
806
701
  alchemy/legacy_page_url:
807
702
  one: "Link"
808
703
  other: "Links"
809
-
810
704
  alchemy/language:
811
705
  one: "Language"
812
706
  other: "Languages"
813
-
814
707
  alchemy/page:
815
708
  one: "Page"
816
709
  other: "Pages"
817
-
818
710
  alchemy/site:
819
711
  one: Website
820
712
  other: Websites
821
-
822
713
  alchemy/picture:
823
714
  one: Picture
824
715
  other: Pictures
825
-
716
+ alchemy/user:
717
+ one: User
718
+ other: User
826
719
  attributes:
827
-
828
- acts_as_taggable_on/tag:
720
+ gutentag/tag:
829
721
  taggings_types: Used for
830
722
  taggings_count: Usage count
831
-
832
723
  alchemy/attachment:
833
724
  file_mime_type: Filetype
834
725
  created_at: "Created at"
@@ -838,16 +729,13 @@ en:
838
729
  tag_list: Tags
839
730
  url: "URL"
840
731
  download_url: "Download-URL"
841
-
842
732
  alchemy/element:
843
733
  display_name: "Name"
844
734
  name: "Name"
845
735
  public: "visible"
846
736
  tag_list: Tags
847
-
848
737
  alchemy/essence_file:
849
738
  css_class: Style
850
-
851
739
  alchemy/essence_picture:
852
740
  caption: "Caption"
853
741
  title: "Title"
@@ -861,7 +749,6 @@ en:
861
749
  crop_from: Crop from
862
750
  crop_size: Crop size
863
751
  picture_id: Bild
864
-
865
752
  alchemy/language:
866
753
  country_code: "Country code"
867
754
  language_code: "Language code"
@@ -872,10 +759,8 @@ en:
872
759
  public: "Public"
873
760
  locale: Localization
874
761
  code: ISO Code
875
-
876
762
  alchemy/legacy_page_url:
877
763
  urlname: "URL path"
878
-
879
764
  alchemy/page:
880
765
  created_at: "Created at"
881
766
  language: "Language"
@@ -895,7 +780,6 @@ en:
895
780
  updated_at: "Updated at"
896
781
  urlname: "Urlname"
897
782
  visible: "visible in navigation"
898
-
899
783
  alchemy/picture:
900
784
  image_file_name: "Filename"
901
785
  image_file_height: "Height"
@@ -904,20 +788,23 @@ en:
904
788
  image_file_size: "Filesize"
905
789
  name: "Name"
906
790
  tag_list: Tags
907
-
908
791
  alchemy/site:
909
792
  name: "Name"
910
793
  host: "Primary Host"
911
794
  public: "Public"
912
795
  aliases: "Domain-Aliases"
913
796
  redirect_to_primary_host: "Redirect to primary Host"
914
-
915
- errors:
916
- <<: *errors
917
-
918
- views:
919
- pagination:
920
- first: "First Page"
921
- previous_page: "Previous Page"
922
- next_page: "Next Page"
923
- last: "Last Page"
797
+ alchemy/user:
798
+ email: "Email"
799
+ firstname: "Firstname"
800
+ gender: "Gender"
801
+ language: "Language"
802
+ lastname: "Lastname"
803
+ last_sign_in_at: "Last Login At"
804
+ login: "Username"
805
+ name: "Name"
806
+ password: "Password"
807
+ password_confirmation: "Password confirmation"
808
+ alchemy_roles: "User roles"
809
+ send_credentials: "Send email with credentials"
810
+ tag_list: Tags
@@ -15,7 +15,7 @@ Alchemy::Engine.routes.draw do
15
15
  end
16
16
 
17
17
  namespace :admin, {path: Alchemy.admin_path, constraints: Alchemy.admin_constraints} do
18
- resources :contents do
18
+ resources :contents, only: [:create] do
19
19
  collection do
20
20
  post :order
21
21
  end
@@ -0,0 +1,392 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AlchemyFourPointZero < ActiveRecord::Migration[5.0]
4
+ def up
5
+ unless table_exists?(:alchemy_attachments)
6
+ create_table :alchemy_attachments do |t|
7
+ t.string "name"
8
+ t.string "file_name"
9
+ t.string "file_mime_type"
10
+ t.integer "file_size"
11
+ t.integer "creator_id"
12
+ t.integer "updater_id"
13
+ t.datetime "created_at", null: false, precision: 6
14
+ t.datetime "updated_at", null: false, precision: 6
15
+ t.text "cached_tag_list"
16
+ t.string "file_uid"
17
+ t.index ["file_uid"], name: "index_alchemy_attachments_on_file_uid"
18
+ end
19
+ end
20
+
21
+ unless table_exists?(:alchemy_cells)
22
+ create_table :alchemy_cells do |t|
23
+ t.integer "page_id", null: false
24
+ t.string "name"
25
+ t.datetime "created_at", null: false, precision: 6
26
+ t.datetime "updated_at", null: false, precision: 6
27
+ t.index ["page_id"], name: "index_alchemy_cells_on_page_id"
28
+ end
29
+ end
30
+
31
+ unless table_exists?(:alchemy_contents)
32
+ create_table :alchemy_contents do |t|
33
+ t.string "name"
34
+ t.string "essence_type", null: false
35
+ t.integer "essence_id", null: false
36
+ t.integer "element_id", null: false
37
+ t.integer "position"
38
+ t.datetime "created_at", null: false, precision: 6
39
+ t.datetime "updated_at", null: false, precision: 6
40
+ t.integer "creator_id"
41
+ t.integer "updater_id"
42
+ t.index ["element_id", "position"], name: "index_contents_on_element_id_and_position"
43
+ t.index ["essence_id", "essence_type"], name: "index_alchemy_contents_on_essence_id_and_essence_type", unique: true
44
+ end
45
+ end
46
+
47
+ unless table_exists?(:alchemy_elements)
48
+ create_table :alchemy_elements do |t|
49
+ t.string "name"
50
+ t.integer "position"
51
+ t.integer "page_id", null: false
52
+ t.boolean "public", default: true
53
+ t.boolean "folded", default: false
54
+ t.boolean "unique", default: false
55
+ t.datetime "created_at", null: false, precision: 6
56
+ t.datetime "updated_at", null: false, precision: 6
57
+ t.integer "creator_id"
58
+ t.integer "updater_id"
59
+ t.integer "cell_id"
60
+ t.text "cached_tag_list"
61
+ t.integer "parent_element_id"
62
+ t.index ["cell_id"], name: "index_alchemy_elements_on_cell_id"
63
+ t.index ["page_id", "parent_element_id"], name: "index_alchemy_elements_on_page_id_and_parent_element_id"
64
+ t.index ["page_id", "position"], name: "index_elements_on_page_id_and_position"
65
+ end
66
+ end
67
+
68
+ unless table_exists?(:alchemy_elements_alchemy_pages)
69
+ create_table :alchemy_elements_alchemy_pages, id: false do |t|
70
+ t.integer "element_id"
71
+ t.integer "page_id"
72
+ end
73
+ end
74
+
75
+ unless table_exists?(:alchemy_essence_booleans)
76
+ create_table :alchemy_essence_booleans do |t|
77
+ t.boolean "value"
78
+ t.datetime "created_at", null: false, precision: 6
79
+ t.datetime "updated_at", null: false, precision: 6
80
+ t.integer "creator_id"
81
+ t.integer "updater_id"
82
+ t.index ["value"], name: "index_alchemy_essence_booleans_on_value"
83
+ end
84
+ end
85
+
86
+ unless table_exists?(:alchemy_essence_dates)
87
+ create_table :alchemy_essence_dates do |t|
88
+ t.datetime "date"
89
+ t.integer "creator_id"
90
+ t.integer "updater_id"
91
+ t.datetime "created_at", null: false, precision: 6
92
+ t.datetime "updated_at", null: false, precision: 6
93
+ end
94
+ end
95
+
96
+ unless table_exists?(:alchemy_essence_files)
97
+ create_table :alchemy_essence_files do |t|
98
+ t.integer "attachment_id"
99
+ t.string "title"
100
+ t.string "css_class"
101
+ t.integer "creator_id"
102
+ t.integer "updater_id"
103
+ t.datetime "created_at", null: false, precision: 6
104
+ t.datetime "updated_at", null: false, precision: 6
105
+ t.string "link_text"
106
+ t.index ["attachment_id"], name: "index_alchemy_essence_files_on_attachment_id"
107
+ end
108
+ end
109
+
110
+ unless table_exists?(:alchemy_essence_htmls)
111
+ create_table :alchemy_essence_htmls do |t|
112
+ t.text "source"
113
+ t.integer "creator_id"
114
+ t.integer "updater_id"
115
+ t.datetime "created_at", null: false, precision: 6
116
+ t.datetime "updated_at", null: false, precision: 6
117
+ end
118
+ end
119
+
120
+ unless table_exists?(:alchemy_essence_links)
121
+ create_table :alchemy_essence_links do |t|
122
+ t.string "link"
123
+ t.string "link_title"
124
+ t.string "link_target"
125
+ t.string "link_class_name"
126
+ t.datetime "created_at", null: false, precision: 6
127
+ t.datetime "updated_at", null: false, precision: 6
128
+ t.integer "creator_id"
129
+ t.integer "updater_id"
130
+ end
131
+ end
132
+
133
+ unless table_exists?(:alchemy_essence_pictures)
134
+ create_table :alchemy_essence_pictures do |t|
135
+ t.integer "picture_id"
136
+ t.string "caption"
137
+ t.string "title"
138
+ t.string "alt_tag"
139
+ t.string "link"
140
+ t.string "link_class_name"
141
+ t.string "link_title"
142
+ t.string "css_class"
143
+ t.string "link_target"
144
+ t.integer "creator_id"
145
+ t.integer "updater_id"
146
+ t.datetime "created_at", null: false, precision: 6
147
+ t.datetime "updated_at", null: false, precision: 6
148
+ t.string "crop_from"
149
+ t.string "crop_size"
150
+ t.string "render_size"
151
+ t.index ["picture_id"], name: "index_alchemy_essence_pictures_on_picture_id"
152
+ end
153
+ end
154
+
155
+ unless table_exists?(:alchemy_essence_richtexts)
156
+ create_table :alchemy_essence_richtexts do |t|
157
+ t.text "body"
158
+ t.text "stripped_body"
159
+ t.boolean "public"
160
+ t.integer "creator_id"
161
+ t.integer "updater_id"
162
+ t.datetime "created_at", null: false, precision: 6
163
+ t.datetime "updated_at", null: false, precision: 6
164
+ end
165
+ end
166
+
167
+ unless table_exists?(:alchemy_essence_selects)
168
+ create_table :alchemy_essence_selects do |t|
169
+ t.string "value"
170
+ t.datetime "created_at", null: false, precision: 6
171
+ t.datetime "updated_at", null: false, precision: 6
172
+ t.integer "creator_id"
173
+ t.integer "updater_id"
174
+ t.index ["value"], name: "index_alchemy_essence_selects_on_value"
175
+ end
176
+ end
177
+
178
+ unless table_exists?(:alchemy_essence_texts)
179
+ create_table :alchemy_essence_texts do |t|
180
+ t.text "body"
181
+ t.string "link"
182
+ t.string "link_title"
183
+ t.string "link_class_name"
184
+ t.boolean "public", default: false
185
+ t.string "link_target"
186
+ t.integer "creator_id"
187
+ t.integer "updater_id"
188
+ t.datetime "created_at", null: false, precision: 6
189
+ t.datetime "updated_at", null: false, precision: 6
190
+ end
191
+ end
192
+
193
+ unless table_exists?(:alchemy_folded_pages)
194
+ create_table :alchemy_folded_pages do |t|
195
+ t.integer "page_id", null: false
196
+ t.integer "user_id", null: false
197
+ t.boolean "folded", default: false
198
+ t.index ["page_id", "user_id"], name: "index_alchemy_folded_pages_on_page_id_and_user_id", unique: true
199
+ end
200
+ end
201
+
202
+ unless table_exists?(:alchemy_languages)
203
+ create_table :alchemy_languages do |t|
204
+ t.string "name"
205
+ t.string "language_code"
206
+ t.string "frontpage_name"
207
+ t.string "page_layout", default: "intro"
208
+ t.boolean "public", default: false
209
+ t.datetime "created_at", null: false, precision: 6
210
+ t.datetime "updated_at", null: false, precision: 6
211
+ t.integer "creator_id"
212
+ t.integer "updater_id"
213
+ t.boolean "default", default: false
214
+ t.string "country_code", default: "", null: false
215
+ t.integer "site_id", null: false
216
+ t.string "locale"
217
+ t.index ["language_code", "country_code"], name: "index_alchemy_languages_on_language_code_and_country_code"
218
+ t.index ["language_code"], name: "index_alchemy_languages_on_language_code"
219
+ t.index ["site_id"], name: "index_alchemy_languages_on_site_id"
220
+ end
221
+ end
222
+
223
+ unless table_exists?(:alchemy_legacy_page_urls)
224
+ create_table :alchemy_legacy_page_urls do |t|
225
+ t.string "urlname", null: false
226
+ t.integer "page_id", null: false
227
+ t.datetime "created_at", null: false, precision: 6
228
+ t.datetime "updated_at", null: false, precision: 6
229
+ t.index ["page_id"], name: "index_alchemy_legacy_page_urls_on_page_id"
230
+ t.index ["urlname"], name: "index_alchemy_legacy_page_urls_on_urlname"
231
+ end
232
+ end
233
+
234
+ unless table_exists?(:alchemy_pages)
235
+ create_table :alchemy_pages do |t|
236
+ t.string "name"
237
+ t.string "urlname"
238
+ t.string "title"
239
+ t.string "language_code"
240
+ t.boolean "language_root"
241
+ t.string "page_layout"
242
+ t.text "meta_keywords"
243
+ t.text "meta_description"
244
+ t.integer "lft"
245
+ t.integer "rgt"
246
+ t.integer "parent_id"
247
+ t.integer "depth"
248
+ t.boolean "visible", default: false
249
+ t.integer "locked_by"
250
+ t.boolean "restricted", default: false
251
+ t.boolean "robot_index", default: true
252
+ t.boolean "robot_follow", default: true
253
+ t.boolean "sitemap", default: true
254
+ t.boolean "layoutpage", default: false
255
+ t.datetime "created_at", null: false, precision: 6
256
+ t.datetime "updated_at", null: false, precision: 6
257
+ t.integer "creator_id"
258
+ t.integer "updater_id"
259
+ t.integer "language_id"
260
+ t.text "cached_tag_list"
261
+ t.datetime "published_at"
262
+ t.datetime "public_on"
263
+ t.datetime "public_until"
264
+ t.datetime "locked_at"
265
+ t.index ["language_id"], name: "index_pages_on_language_id"
266
+ t.index ["locked_at", "locked_by"], name: "index_alchemy_pages_on_locked_at_and_locked_by"
267
+ t.index ["parent_id", "lft"], name: "index_pages_on_parent_id_and_lft"
268
+ t.index ["public_on", "public_until"], name: "index_alchemy_pages_on_public_on_and_public_until"
269
+ t.index ["rgt"], name: "index_alchemy_pages_on_rgt"
270
+ t.index ["urlname"], name: "index_pages_on_urlname"
271
+ end
272
+ end
273
+
274
+ unless table_exists?(:alchemy_pictures)
275
+ create_table :alchemy_pictures do |t|
276
+ t.string "name"
277
+ t.string "image_file_name"
278
+ t.integer "image_file_width"
279
+ t.integer "image_file_height"
280
+ t.datetime "created_at", null: false, precision: 6
281
+ t.datetime "updated_at", null: false, precision: 6
282
+ t.integer "creator_id"
283
+ t.integer "updater_id"
284
+ t.string "upload_hash"
285
+ t.text "cached_tag_list"
286
+ t.string "image_file_uid"
287
+ t.integer "image_file_size"
288
+ t.string "image_file_format"
289
+ end
290
+ end
291
+
292
+ unless table_exists?(:alchemy_sites)
293
+ create_table :alchemy_sites do |t|
294
+ t.string "host"
295
+ t.string "name"
296
+ t.datetime "created_at", null: false, precision: 6
297
+ t.datetime "updated_at", null: false, precision: 6
298
+ t.boolean "public", default: false
299
+ t.text "aliases"
300
+ t.boolean "redirect_to_primary_host"
301
+ t.index ["host", "public"], name: "alchemy_sites_public_hosts_idx"
302
+ t.index ["host"], name: "index_alchemy_sites_on_host"
303
+ end
304
+ end
305
+
306
+ unless table_exists?(:taggings)
307
+ create_table :taggings do |t|
308
+ t.integer "tag_id"
309
+ t.string "taggable_type"
310
+ t.integer "taggable_id"
311
+ t.string "tagger_type"
312
+ t.integer "tagger_id"
313
+ t.string "context", limit: 128
314
+ t.datetime "created_at", precision: 6
315
+ t.index ["context"], name: "index_taggings_on_context"
316
+ t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
317
+ t.index ["tag_id"], name: "index_taggings_on_tag_id"
318
+ t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
319
+ t.index ["taggable_id", "taggable_type", "tagger_id", "context"], name: "taggings_idy"
320
+ t.index ["taggable_id"], name: "index_taggings_on_taggable_id"
321
+ t.index ["taggable_type"], name: "index_taggings_on_taggable_type"
322
+ t.index ["tagger_id", "tagger_type"], name: "index_taggings_on_tagger_id_and_tagger_type"
323
+ t.index ["tagger_id"], name: "index_taggings_on_tagger_id"
324
+ end
325
+ end
326
+
327
+ unless table_exists?(:tags)
328
+ create_table :tags do |t|
329
+ t.string "name"
330
+ t.integer "taggings_count", default: 0
331
+ t.index ["name"], name: "index_tags_on_name", unique: true
332
+ end
333
+ end
334
+
335
+ unless foreign_key_exists?(:alchemy_cells, column: :page_id)
336
+ add_foreign_key :alchemy_cells, :alchemy_pages,
337
+ column: :page_id,
338
+ on_update: :cascade,
339
+ on_delete: :cascade,
340
+ name: :alchemy_cells_page_id_fkey
341
+ end
342
+
343
+ unless foreign_key_exists?(:alchemy_contents, column: :element_id)
344
+ add_foreign_key :alchemy_contents, :alchemy_elements,
345
+ column: :element_id,
346
+ on_update: :cascade,
347
+ on_delete: :cascade,
348
+ name: :alchemy_contents_element_id_fkey
349
+ end
350
+
351
+ unless foreign_key_exists?(:alchemy_elements, column: :page_id)
352
+ add_foreign_key :alchemy_elements, :alchemy_pages,
353
+ column: :page_id,
354
+ on_update: :cascade,
355
+ on_delete: :cascade,
356
+ name: :alchemy_elements_page_id_fkey
357
+ end
358
+
359
+ unless foreign_key_exists?(:alchemy_elements, column: :cell_id)
360
+ add_foreign_key :alchemy_elements, :alchemy_cells,
361
+ column: :cell_id,
362
+ on_update: :cascade,
363
+ on_delete: :cascade,
364
+ name: :alchemy_elements_cell_id_fkey
365
+ end
366
+ end
367
+
368
+ def down
369
+ drop_table(:alchemy_attachments) if table_exists?(:alchemy_attachments)
370
+ drop_table(:alchemy_cells) if table_exists?(:alchemy_cells)
371
+ drop_table(:alchemy_contents) if table_exists?(:alchemy_contents)
372
+ drop_table(:alchemy_elements) if table_exists?(:alchemy_elements)
373
+ drop_table(:alchemy_elements_alchemy_pages) if table_exists?(:alchemy_elements_alchemy_pages)
374
+ drop_table(:alchemy_essence_booleans) if table_exists?(:alchemy_essence_booleans)
375
+ drop_table(:alchemy_essence_dates) if table_exists?(:alchemy_essence_dates)
376
+ drop_table(:alchemy_essence_files) if table_exists?(:alchemy_essence_files)
377
+ drop_table(:alchemy_essence_htmls) if table_exists?(:alchemy_essence_htmls)
378
+ drop_table(:alchemy_essence_links) if table_exists?(:alchemy_essence_links)
379
+ drop_table(:alchemy_essence_pictures) if table_exists?(:alchemy_essence_pictures)
380
+ drop_table(:alchemy_essence_richtexts) if table_exists?(:alchemy_essence_richtexts)
381
+ drop_table(:alchemy_essence_selects) if table_exists?(:alchemy_essence_selects)
382
+ drop_table(:alchemy_essence_texts) if table_exists?(:alchemy_essence_texts)
383
+ drop_table(:alchemy_folded_pages) if table_exists?(:alchemy_folded_pages)
384
+ drop_table(:alchemy_languages) if table_exists?(:alchemy_languages)
385
+ drop_table(:alchemy_legacy_page_urls) if table_exists?(:alchemy_legacy_page_urls)
386
+ drop_table(:alchemy_pages) if table_exists?(:alchemy_pages)
387
+ drop_table(:alchemy_pictures) if table_exists?(:alchemy_pictures)
388
+ drop_table(:alchemy_sites) if table_exists?(:alchemy_sites)
389
+ drop_table(:taggings) if table_exists?(:taggings)
390
+ drop_table(:tags) if table_exists?(:tags)
391
+ end
392
+ end