alchemy_cms 2.5.3.1 → 2.6.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (331) hide show
  1. data/.gitignore +1 -1
  2. data/.travis.yml +5 -13
  3. data/Gemfile +6 -3
  4. data/README.md +3 -2
  5. data/alchemy_cms.gemspec +22 -22
  6. data/app/assets/fonts/alchemy-icons.eot +0 -0
  7. data/app/assets/fonts/alchemy-icons.svg +54 -0
  8. data/app/assets/fonts/alchemy-icons.ttf +0 -0
  9. data/app/assets/fonts/alchemy-icons.woff +0 -0
  10. data/app/assets/images/alchemy/icons.png +0 -0
  11. data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +151 -0
  12. data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +3 -2
  13. data/app/assets/javascripts/alchemy/alchemy.datepicker.js.coffee +31 -0
  14. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +1 -1
  15. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +98 -0
  16. data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +23 -24
  17. data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +27 -0
  18. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +11 -8
  19. data/app/assets/javascripts/alchemy/alchemy.hotkeys.js.coffee +32 -0
  20. data/app/assets/javascripts/alchemy/alchemy.image_cropper.js.coffee +46 -0
  21. data/app/assets/javascripts/alchemy/alchemy.js +8 -2
  22. data/app/assets/javascripts/alchemy/alchemy.link_overlay.js.coffee +5 -4
  23. data/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee +49 -0
  24. data/app/assets/javascripts/alchemy/alchemy.onload.js.coffee +3 -0
  25. data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +71 -0
  26. data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +61 -0
  27. data/app/assets/javascripts/alchemy/alchemy.spinner.js.coffee +35 -0
  28. data/app/assets/javascripts/alchemy/alchemy.string_extension.js.coffee +11 -0
  29. data/app/assets/javascripts/alchemy/alchemy.windows.js.coffee +278 -0
  30. data/app/assets/stylesheets/alchemy/admin.css.scss +2 -0
  31. data/app/assets/stylesheets/alchemy/archive.scss +109 -65
  32. data/app/assets/stylesheets/alchemy/base.scss +16 -188
  33. data/app/assets/stylesheets/alchemy/dashboard.scss +2 -2
  34. data/app/assets/stylesheets/alchemy/defaults.scss +2 -1
  35. data/app/assets/stylesheets/alchemy/elements.scss +58 -94
  36. data/app/assets/stylesheets/alchemy/errors.scss +2 -2
  37. data/app/assets/stylesheets/alchemy/{mixins.scss → extends.scss} +104 -80
  38. data/app/assets/stylesheets/alchemy/flash.scss +4 -6
  39. data/app/assets/stylesheets/alchemy/fonts.scss +46 -0
  40. data/app/assets/stylesheets/alchemy/form_elements.scss +46 -45
  41. data/app/assets/stylesheets/alchemy/frame.scss +20 -15
  42. data/app/assets/stylesheets/alchemy/icons.scss +22 -9
  43. data/app/assets/stylesheets/alchemy/jquery-ui.scss +476 -399
  44. data/app/assets/stylesheets/alchemy/login.scss +1 -1
  45. data/app/assets/stylesheets/alchemy/menubar.css.scss +1 -1
  46. data/app/assets/stylesheets/alchemy/notices.scss +5 -5
  47. data/app/assets/stylesheets/alchemy/pagination.scss +25 -13
  48. data/app/assets/stylesheets/alchemy/search.scss +29 -17
  49. data/app/assets/stylesheets/alchemy/sitemap.scss +41 -36
  50. data/app/assets/stylesheets/alchemy/tables.scss +102 -50
  51. data/app/assets/stylesheets/alchemy/tinymce_dialog.css.scss +18 -16
  52. data/app/assets/stylesheets/alchemy/toolbar.scss +84 -24
  53. data/app/assets/stylesheets/alchemy/upload.scss +14 -9
  54. data/app/assets/stylesheets/alchemy/variables.scss +1 -0
  55. data/app/assets/stylesheets/tiny_mce/plugins/inlinepopups/skins/alchemy/window.css.scss +18 -21
  56. data/app/controllers/alchemy/admin/attachments_controller.rb +29 -39
  57. data/app/controllers/alchemy/admin/base_controller.rb +3 -9
  58. data/app/controllers/alchemy/admin/clipboard_controller.rb +1 -1
  59. data/app/controllers/alchemy/admin/contents_controller.rb +1 -1
  60. data/app/controllers/alchemy/admin/dashboard_controller.rb +1 -1
  61. data/app/controllers/alchemy/admin/elements_controller.rb +3 -3
  62. data/app/controllers/alchemy/admin/essence_files_controller.rb +1 -1
  63. data/app/controllers/alchemy/admin/essence_pictures_controller.rb +5 -5
  64. data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
  65. data/app/controllers/alchemy/admin/pages_controller.rb +18 -16
  66. data/app/controllers/alchemy/admin/pictures_controller.rb +11 -10
  67. data/app/controllers/alchemy/admin/resources_controller.rb +87 -14
  68. data/app/controllers/alchemy/admin/tags_controller.rb +3 -3
  69. data/app/controllers/alchemy/admin/trash_controller.rb +3 -3
  70. data/app/controllers/alchemy/admin/users_controller.rb +6 -11
  71. data/app/controllers/alchemy/attachments_controller.rb +8 -9
  72. data/app/controllers/alchemy/base_controller.rb +17 -10
  73. data/app/controllers/alchemy/pages_controller.rb +7 -19
  74. data/app/controllers/alchemy/passwords_controller.rb +15 -3
  75. data/app/controllers/alchemy/user_sessions_controller.rb +5 -4
  76. data/app/controllers/alchemy/users_controller.rb +1 -1
  77. data/app/helpers/alchemy/admin/attachments_helper.rb +2 -2
  78. data/app/helpers/alchemy/admin/base_helper.rb +62 -90
  79. data/app/helpers/alchemy/admin/elements_helper.rb +13 -5
  80. data/app/helpers/alchemy/admin/essences_helper.rb +3 -5
  81. data/app/helpers/alchemy/admin/pages_helper.rb +6 -3
  82. data/app/helpers/alchemy/admin/tags_helper.rb +60 -0
  83. data/app/helpers/alchemy/base_helper.rb +16 -20
  84. data/app/helpers/alchemy/elements_helper.rb +7 -11
  85. data/app/helpers/alchemy/essences_helper.rb +2 -2
  86. data/app/helpers/alchemy/pages_helper.rb +31 -69
  87. data/app/helpers/alchemy/url_helper.rb +11 -3
  88. data/app/models/alchemy/attachment.rb +73 -45
  89. data/app/models/alchemy/cell.rb +1 -1
  90. data/app/models/alchemy/content.rb +20 -9
  91. data/app/models/alchemy/element.rb +9 -7
  92. data/app/models/alchemy/page.rb +15 -248
  93. data/app/models/alchemy/page/cells.rb +71 -0
  94. data/app/models/alchemy/page/elements.rb +147 -0
  95. data/app/models/alchemy/page/naming.rb +90 -0
  96. data/app/models/alchemy/picture.rb +18 -13
  97. data/app/models/alchemy/tag.rb +1 -1
  98. data/app/models/alchemy/user.rb +38 -6
  99. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +14 -7
  100. data/app/views/alchemy/admin/attachments/_attachment.html.erb +17 -12
  101. data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +3 -8
  102. data/app/views/alchemy/admin/attachments/_files_list.html.erb +20 -12
  103. data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +11 -0
  104. data/app/views/alchemy/admin/attachments/_tag_list.html.erb +31 -0
  105. data/app/views/alchemy/admin/attachments/archive_overlay.js.erb +4 -0
  106. data/app/views/alchemy/admin/attachments/edit.html.erb +8 -7
  107. data/app/views/alchemy/admin/attachments/index.html.erb +19 -12
  108. data/app/views/alchemy/admin/attachments/new.html.erb +2 -2
  109. data/app/views/alchemy/admin/attachments/show.html.erb +3 -0
  110. data/app/views/alchemy/admin/contents/_missing.html.erb +4 -4
  111. data/app/views/alchemy/admin/contents/create.js.erb +1 -1
  112. data/app/views/alchemy/admin/contents/new.html.erb +6 -3
  113. data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +1 -1
  114. data/app/views/alchemy/admin/dashboard/_users.html.erb +1 -1
  115. data/app/views/alchemy/admin/dashboard/index.html.erb +3 -3
  116. data/app/views/alchemy/admin/dashboard/info.html.erb +16 -13
  117. data/app/views/alchemy/admin/elements/_add_picture.html.erb +1 -1
  118. data/app/views/alchemy/admin/elements/_element_foot.html.erb +4 -4
  119. data/app/views/alchemy/admin/elements/_element_head.html.erb +1 -7
  120. data/app/views/alchemy/admin/elements/_elements_select.html.erb +2 -2
  121. data/app/views/alchemy/admin/elements/_new_element_form.html.erb +4 -4
  122. data/app/views/alchemy/admin/elements/_picture_gallery_editor.html.erb +1 -1
  123. data/app/views/alchemy/admin/elements/create.js.erb +2 -2
  124. data/app/views/alchemy/admin/elements/fold.js.erb +3 -6
  125. data/app/views/alchemy/admin/elements/new.html.erb +1 -1
  126. data/app/views/alchemy/admin/elements/order.js.erb +1 -1
  127. data/app/views/alchemy/admin/elements/trash.js.erb +1 -1
  128. data/app/views/alchemy/admin/elements/update.js.erb +2 -2
  129. data/app/views/alchemy/admin/essence_files/edit.html.erb +4 -4
  130. data/app/views/alchemy/admin/essence_pictures/crop.html.erb +17 -18
  131. data/app/views/alchemy/admin/essence_pictures/edit.html.erb +2 -2
  132. data/app/views/alchemy/admin/essence_pictures/update.js.erb +1 -0
  133. data/app/views/alchemy/admin/languages/_form.html.erb +12 -10
  134. data/app/views/alchemy/admin/languages/_language.html.erb +2 -1
  135. data/app/views/alchemy/admin/languages/_table.html.erb +3 -3
  136. data/app/views/alchemy/admin/languages/index.html.erb +15 -15
  137. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +6 -6
  138. data/app/views/alchemy/admin/layoutpages/index.html.erb +41 -40
  139. data/app/views/alchemy/admin/pages/_contactform_links.html.erb +4 -4
  140. data/app/views/alchemy/admin/pages/_create_language_form.html.erb +6 -6
  141. data/app/views/alchemy/admin/pages/_external_link.html.erb +2 -2
  142. data/app/views/alchemy/admin/pages/_file_link.html.erb +3 -3
  143. data/app/views/alchemy/admin/pages/_internal_link.html.erb +1 -1
  144. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
  145. data/app/views/alchemy/admin/pages/_page.html.erb +13 -13
  146. data/app/views/alchemy/admin/pages/_page_for_links.html.erb +2 -4
  147. data/app/views/alchemy/admin/pages/_sitemap.html.erb +5 -0
  148. data/app/views/alchemy/admin/pages/configure.html.erb +7 -7
  149. data/app/views/alchemy/admin/pages/configure_external.html.erb +4 -4
  150. data/app/views/alchemy/admin/pages/edit.html.erb +23 -30
  151. data/app/views/alchemy/admin/pages/index.html.erb +34 -23
  152. data/app/views/alchemy/admin/pages/new.html.erb +1 -1
  153. data/app/views/alchemy/admin/pages/sort.js.erb +1 -1
  154. data/app/views/alchemy/admin/partials/_flash_upload.html.erb +2 -3
  155. data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +2 -2
  156. data/app/views/alchemy/admin/partials/_search_form.html.erb +3 -3
  157. data/app/views/alchemy/admin/partials/_upload_form.html.erb +2 -2
  158. data/app/views/alchemy/admin/pictures/_archive.html.erb +7 -7
  159. data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
  160. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +6 -6
  161. data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +4 -4
  162. data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +1 -1
  163. data/app/views/alchemy/admin/pictures/_picture.html.erb +3 -8
  164. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +9 -14
  165. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +27 -25
  166. data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +3 -1
  167. data/app/views/alchemy/admin/pictures/index.html.erb +49 -42
  168. data/app/views/alchemy/admin/pictures/new.html.erb +2 -2
  169. data/app/views/alchemy/admin/pictures/show.html.erb +11 -0
  170. data/app/views/alchemy/admin/resources/_boolean.html.erb +2 -2
  171. data/app/views/alchemy/admin/resources/_datetime.html.erb +2 -2
  172. data/app/views/alchemy/admin/resources/_form.html.erb +9 -8
  173. data/app/views/alchemy/admin/resources/_resource.html.erb +15 -21
  174. data/app/views/alchemy/admin/resources/_string.html.erb +2 -2
  175. data/app/views/alchemy/admin/resources/_table.html.erb +11 -13
  176. data/app/views/alchemy/admin/resources/_text.html.erb +2 -2
  177. data/app/views/alchemy/admin/resources/index.csv.erb +13 -0
  178. data/app/views/alchemy/admin/resources/index.html.erb +24 -15
  179. data/app/views/alchemy/admin/sites/index.html.erb +23 -0
  180. data/app/views/alchemy/admin/tags/_radio_tag.html.erb +1 -1
  181. data/app/views/alchemy/admin/tags/_tag.html.erb +2 -1
  182. data/app/views/alchemy/admin/tags/edit.html.erb +1 -1
  183. data/app/views/alchemy/admin/tags/index.html.erb +16 -11
  184. data/app/views/alchemy/admin/tags/new.html.erb +3 -3
  185. data/app/views/alchemy/admin/trash/clear.js.coffee +1 -1
  186. data/app/views/alchemy/admin/users/_table.html.erb +12 -5
  187. data/app/views/alchemy/admin/users/_user.html.erb +16 -16
  188. data/app/views/alchemy/admin/users/index.html.erb +28 -16
  189. data/app/views/alchemy/breadcrumb/_page.html.erb +15 -0
  190. data/app/views/alchemy/breadcrumb/_spacer.html.erb +1 -0
  191. data/app/views/alchemy/elements/_editor_not_found.html.erb +1 -1
  192. data/app/views/alchemy/essences/_essence_file_editor.html.erb +16 -16
  193. data/app/views/alchemy/essences/_essence_file_view.html.erb +8 -9
  194. data/app/views/alchemy/essences/_essence_picture_editor.html.erb +3 -6
  195. data/app/views/alchemy/essences/_essence_picture_tools.html.erb +9 -8
  196. data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +0 -5
  197. data/app/views/alchemy/essences/_linkable_essence_tools.html.erb +2 -2
  198. data/app/views/alchemy/navigation/_link.html.erb +7 -7
  199. data/app/views/alchemy/navigation/_renderer.html.erb +29 -36
  200. data/app/views/alchemy/notifications/admin_user_created.de.text.erb +5 -1
  201. data/app/views/alchemy/notifications/admin_user_created.en.text.erb +5 -1
  202. data/app/views/alchemy/notifications/registered_user_created.de.text.erb +13 -0
  203. data/app/views/alchemy/notifications/registered_user_created.en.text.erb +13 -0
  204. data/app/views/alchemy/search/_result.html.erb +4 -6
  205. data/app/views/alchemy/search/_results.html.erb +4 -5
  206. data/app/views/alchemy/user_sessions/leave.html.erb +1 -1
  207. data/app/views/alchemy/user_sessions/new.html.erb +2 -2
  208. data/app/views/kaminari/_first_page.html.erb +11 -0
  209. data/app/views/kaminari/_gap.html.erb +1 -1
  210. data/app/views/kaminari/_last_page.html.erb +11 -0
  211. data/app/views/kaminari/_next_page.html.erb +2 -2
  212. data/app/views/kaminari/_page.html.erb +1 -1
  213. data/app/views/kaminari/_paginator.html.erb +2 -0
  214. data/app/views/kaminari/_prev_page.html.erb +2 -2
  215. data/app/views/layouts/alchemy/admin.html.erb +4 -5
  216. data/config/alchemy/config.yml +8 -12
  217. data/config/authorization_rules.rb +4 -3
  218. data/config/initializers/dragonfly.rb +20 -12
  219. data/config/locales/alchemy.de.yml +20 -15
  220. data/config/locales/alchemy.en.yml +15 -10
  221. data/config/locales/devise.de.yml +1 -0
  222. data/config/routes.rb +3 -3
  223. data/{spec/dummy/db/migrate/20121118000000_alchemy_two_point_four.rb → db/migrate/20130214233001_alchemy_two_point_five.rb} +50 -36
  224. data/db/migrate/20130221200514_migrate_attachments_to_dragonfly.rb +21 -0
  225. data/db/migrate/20130312205327_change_alchemy_users_role_to_roles.rb +11 -0
  226. data/lib/alchemy/capistrano.rb +10 -8
  227. data/lib/alchemy/errors.rb +7 -0
  228. data/lib/alchemy/filetypes.rb +33 -0
  229. data/lib/alchemy/i18n.rb +9 -1
  230. data/lib/alchemy/name_conversions.rb +28 -0
  231. data/lib/alchemy/page_layout.rb +5 -3
  232. data/lib/alchemy/resource.rb +132 -29
  233. data/lib/alchemy/resources_helper.rb +81 -12
  234. data/lib/alchemy/upgrader.rb +14 -276
  235. data/lib/alchemy/version.rb +1 -1
  236. data/lib/alchemy_cms.rb +17 -2
  237. data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +1 -1
  238. data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +1 -1
  239. data/lib/tasks/alchemy/convert.rake +39 -0
  240. data/lib/tasks/alchemy/install.rake +4 -6
  241. data/lib/tasks/alchemy/upgrade.rake +18 -1
  242. data/spec/controllers/admin/clipboard_controller_spec.rb +4 -4
  243. data/spec/controllers/admin/elements_controller_spec.rb +23 -23
  244. data/spec/controllers/admin/pages_controller_spec.rb +15 -0
  245. data/spec/controllers/admin/resources_controller_spec.rb +1 -11
  246. data/spec/controllers/admin/trash_controller_spec.rb +9 -9
  247. data/spec/controllers/attachments_controller_spec.rb +3 -3
  248. data/spec/controllers/elements_controller_spec.rb +2 -2
  249. data/spec/controllers/pages_controller_spec.rb +160 -129
  250. data/spec/controllers/pictures_controller_spec.rb +2 -2
  251. data/spec/controllers/user_sessions_controller_spec.rb +3 -3
  252. data/spec/controllers/users_controller_spec.rb +2 -2
  253. data/spec/dummy/app/models/event.rb +2 -2
  254. data/spec/dummy/app/models/location.rb +4 -0
  255. data/spec/dummy/app/views/layouts/application.html.erb +6 -42
  256. data/spec/dummy/config/routes.rb +1 -1
  257. data/spec/dummy/db/migrate/20121026104128_create_events.rb +0 -1
  258. data/{db/migrate/20121118000000_alchemy_two_point_four.rb → spec/dummy/db/migrate/20130214233001_alchemy_two_point_five.rb} +50 -36
  259. data/spec/dummy/db/migrate/20130221200514_migrate_attachments_to_dragonfly.rb +21 -0
  260. data/spec/dummy/db/migrate/20130312205327_change_alchemy_users_role_to_roles.rb +11 -0
  261. data/spec/dummy/db/migrate/20130328101418_create_locations.rb +9 -0
  262. data/spec/dummy/db/schema.rb +15 -6
  263. data/spec/factories.rb +4 -4
  264. data/spec/{integration → features}/admin/link_overlay_spec.rb +0 -0
  265. data/spec/{integration → features}/admin/modules_integration_spec.rb +1 -1
  266. data/spec/{integration → features}/admin/pages_controller_spec.rb +9 -4
  267. data/spec/{integration → features}/admin/picture_library_integration_spec.rb +5 -5
  268. data/spec/{integration → features}/admin/resources_integration_spec.rb +1 -1
  269. data/spec/{integration → features}/navigation_spec.rb +0 -0
  270. data/spec/{integration → features}/pages_controller_spec.rb +42 -112
  271. data/spec/{integration → features}/picture_security_spec.rb +2 -2
  272. data/spec/{integration → features}/security_spec.rb +7 -7
  273. data/spec/{integration → features}/translation_integration_spec.rb +0 -0
  274. data/spec/helpers/admin/base_helper_spec.rb +0 -50
  275. data/spec/helpers/admin/tags_helper_spec.rb +53 -0
  276. data/spec/helpers/base_helper_spec.rb +19 -3
  277. data/spec/helpers/pages_helper_spec.rb +92 -44
  278. data/spec/{url_helpers_spec.rb → helpers/picture_url_helpers_spec.rb} +7 -7
  279. data/spec/helpers/url_helper_spec.rb +92 -72
  280. data/spec/{config_spec.rb → libraries/config_spec.rb} +0 -0
  281. data/spec/libraries/resource_spec.rb +215 -76
  282. data/spec/libraries/resources_helper_spec.rb +70 -28
  283. data/spec/models/attachment_spec.rb +75 -9
  284. data/spec/models/clipboard_spec.rb +1 -1
  285. data/spec/models/element_spec.rb +7 -0
  286. data/spec/models/page_spec.rb +144 -25
  287. data/spec/models/picture_spec.rb +5 -5
  288. data/spec/models/resource_spec.rb +47 -10
  289. data/spec/models/user_spec.rb +115 -3
  290. data/spec/{routing_spec.rb → routing/routing_spec.rb} +8 -20
  291. data/spec/spec_helper.rb +5 -6
  292. data/spec/support/alchemy/specs_helpers.rb +1 -1
  293. data/spec/support/ci/install_phantomjs +1 -1
  294. data/spec/support/image with spaces.png +0 -0
  295. data/vendor/assets/javascripts/jquery_plugins/jquery.Jcrop.min.js +18 -18
  296. data/vendor/assets/javascripts/jquery_plugins/{jquery.dialogextend.1_0_1.js → jquery.dialogextend.js} +25 -17
  297. data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo.min.js +7 -0
  298. data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +7 -7
  299. data/vendor/assets/javascripts/keymage.min.js +6 -0
  300. data/vendor/assets/javascripts/spin.min.js +1 -0
  301. metadata +122 -124
  302. data/app/assets/images/alchemy/ajax_loader.gif +0 -0
  303. data/app/assets/images/alchemy/gui/toggle.png +0 -0
  304. data/app/assets/images/alchemy/image_loader.gif +0 -0
  305. data/app/assets/images/alchemy/shading.png +0 -0
  306. data/app/assets/images/alchemy/tabs.gif +0 -0
  307. data/app/assets/javascripts/alchemy/alchemy.base.js +0 -172
  308. data/app/assets/javascripts/alchemy/alchemy.datepicker.js +0 -47
  309. data/app/assets/javascripts/alchemy/alchemy.element_editor_selector.js +0 -91
  310. data/app/assets/javascripts/alchemy/alchemy.growler.js +0 -46
  311. data/app/assets/javascripts/alchemy/alchemy.image_cropper.js +0 -60
  312. data/app/assets/javascripts/alchemy/alchemy.js_extensions.js +0 -15
  313. data/app/assets/javascripts/alchemy/alchemy.preview_window.js +0 -97
  314. data/app/assets/javascripts/alchemy/alchemy.windows.js +0 -321
  315. data/app/models/alchemy/clipboard_spec.rb +0 -0
  316. data/app/views/alchemy/admin/pictures/show_in_window.html.erb +0 -8
  317. data/app/views/alchemy/notifications/registered_user_created.text.erb +0 -11
  318. data/db/migrate/20121121162313_switch_from_fleximage_to_dragonfly.rb +0 -21
  319. data/db/migrate/20121205155004_create_alchemy_sites.rb +0 -14
  320. data/db/migrate/20121211163003_add_public_to_alchemy_sites.rb +0 -6
  321. data/db/migrate/20121220102223_add_aliases_to_site.rb +0 -6
  322. data/db/migrate/20130110212411_create_alchemy_legacy_page_urls.rb +0 -11
  323. data/db/migrate/20130121092645_migrate_to_devise.rb +0 -24
  324. data/spec/alchemy_spec.rb +0 -7
  325. data/spec/dummy/db/migrate/20121121162313_switch_from_fleximage_to_dragonfly.rb +0 -21
  326. data/spec/dummy/db/migrate/20121205155004_create_alchemy_sites.rb +0 -14
  327. data/spec/dummy/db/migrate/20121211163003_add_public_to_alchemy_sites.rb +0 -6
  328. data/spec/dummy/db/migrate/20121220102223_add_aliases_to_site.rb +0 -6
  329. data/spec/dummy/db/migrate/20130110212411_create_alchemy_legacy_page_urls.rb +0 -11
  330. data/spec/dummy/db/migrate/20130121092645_migrate_to_devise.rb +0 -24
  331. data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo-1.4.2-min.js +0 -11
@@ -8,9 +8,9 @@ end
8
8
  module Alchemy
9
9
  describe PicturesController do
10
10
 
11
- let(:page) { FactoryGirl.create(:public_page, :restricted => false) }
11
+ let(:public_page) { FactoryGirl.create(:public_page, :restricted => false) }
12
12
  let(:restricted_page) { FactoryGirl.create(:public_page, :restricted => true) }
13
- let(:element) { FactoryGirl.create(:element, :page => page, :name => 'bild', :create_contents_after_create => true) }
13
+ let(:element) { FactoryGirl.create(:element, :page => public_page, :name => 'bild', :create_contents_after_create => true) }
14
14
  let(:restricted_element) { FactoryGirl.create(:element, :page => restricted_page, :name => 'bild', :create_contents_after_create => true) }
15
15
  let(:picture) { Picture.create(:image_file => fixture_file_upload(File.expand_path('../../support/image.png', __FILE__), 'image/png')) }
16
16
 
@@ -3,15 +3,15 @@ require 'spec_helper'
3
3
  module Alchemy
4
4
  describe UserSessionsController do
5
5
 
6
- let(:user) { FactoryGirl.create(:admin_user) }
7
- let(:page) { FactoryGirl.create(:page) }
6
+ let(:user) { FactoryGirl.create(:admin_user) }
7
+ let(:alchemy_page) { FactoryGirl.create(:page) }
8
8
 
9
9
  before { sign_in :user, user }
10
10
 
11
11
  describe "signout" do
12
12
  it "should unlock all pages" do
13
13
  @request.env["devise.mapping"] = Devise.mappings[:user]
14
- page.lock(user)
14
+ alchemy_page.lock(user)
15
15
  delete :destroy
16
16
  user.locked_pages.should be_empty
17
17
  end
@@ -22,11 +22,11 @@ module Alchemy
22
22
  end
23
23
 
24
24
  it "should render hidden field for role" do
25
- response.body.should have_selector('input[type="hidden"]#user_role')
25
+ response.body.should have_selector('input[type="hidden"]#user_roles')
26
26
  end
27
27
 
28
28
  it "should set the role to admin" do
29
- assigns(:user).role.should == "admin"
29
+ assigns(:user).roles.should include("admin")
30
30
  end
31
31
  end
32
32
 
@@ -1,5 +1,5 @@
1
1
  class Event < ActiveRecord::Base
2
- attr_accessible :name, :hidden_name, :starts_at, :ends_at, :description, :published, :entrance_fee, :location_id, :organizer_id
2
+ attr_accessible :name, :hidden_name, :starts_at, :ends_at, :description, :published, :entrance_fee, :location_id
3
3
  validates_presence_of :name
4
-
4
+ belongs_to :location
5
5
  end
@@ -0,0 +1,4 @@
1
+ class Location < ActiveRecord::Base
2
+ attr_accessible :name
3
+ has_many :events
4
+ end
@@ -1,51 +1,15 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <!-- Your site title-prefix (That is YourSite in "YourSite - CurrentPage" is taken from a layout-page by default.
5
- Alternatively you can hardcode it here -->
6
- <%= render_meta_data(:title_prefix => sitename_from_header_page, :title_seperator => "-") %>
7
- <!-- Paths here are relative to app/assets/stylesheets.
8
- alchemy/standard_set, though, is located in Alchemy-source and doesn't have to be present in your app,
9
- but you can copy it over and customize it of course. -->
10
- <%= stylesheet_link_tag "alchemy/standard_set", :media => :screen %>
11
- <%= stylesheet_link_tag "alchemy/standard_set", :media => :print %>
12
- <!-- Here is also the place for custom javascripts. Put them in app/assets/javascripts/yourscript.js (or yourscript.js.coffee)
13
- and include them like this (remove the \):
14
- <\%= javascript_include_tag "yourscript" %> -->
4
+ <%= render_meta_data %>
5
+ <%= stylesheet_link_tag 'application' %>
15
6
  </head>
16
7
  <body>
17
- <div id="page">
18
- <div id="language_select">
19
- <!-- Render links with flags for all public languages -->
20
- <%= language_switches(:linkname => :code) %>
21
- </div>
22
- <div id="breadcrump">
23
- <!-- Renders a breadcrumb/ariadne-path. For customizing see docs for render_breadcrumb (link?) -->
24
- <%= render_breadcrumb :seperator => "<span>&nbsp;<&nbsp;</span>" %>
25
- </div>
26
- <div id="navigation">
27
- <!-- Renders main navigation. For customizing see docs for render_navigation (link?)
28
- You can overwrite app/views/navigation/_renderer.html.erb and app/views/navigation/_link.html.erb
29
- if you want to roll out your own markup -->
30
- <%= render_navigation :all_sub_menues => true %>
31
- </div>
32
- <!-- Most important call here!
33
- This yields (=inserts) all content of the current page.
34
- Markup depends on page_layout, elements and essences and can be changed in app/views/alchemy/... -->
35
8
  <%= yield %>
36
- <div class="footer">
37
- <!-- Renders elements that are called "footnote" (name-attribute in elements.yml)
38
- from page_layout "layout_footer" (name-attribute in page_layout.yml) -->
39
- <%= render_elements(
40
- :from_page => 'layout_footer',
41
- :only => ['footnote']
42
- ) %>
9
+ <div id="navigation">
10
+ <%= render_navigation(:all_sub_menues => true) %>
43
11
  </div>
44
- </div>
45
- <!-- This is used in Alchemy's backend to prevent navigating to other pages through the preview window -->
46
- <%= alchemy_preview_mode_code %>
47
- <!-- Renders a menu_bar when a user with sufficient rights visits a page -->
48
- <%= alchemy_menu_bar %>
12
+ <%= alchemy_preview_mode_code %>
13
+ <%= alchemy_menu_bar %>
49
14
  </body>
50
15
  </html>
51
-
@@ -6,6 +6,6 @@ Rails.application.routes.draw do
6
6
  resources :events
7
7
  end
8
8
 
9
- mount Alchemy::Engine => "/alchemy"
9
+ mount Alchemy::Engine => "/"
10
10
 
11
11
  end
@@ -10,7 +10,6 @@ class CreateEvents < ActiveRecord::Migration
10
10
  t.decimal "entrance_fee", :precision => 6, :scale => 2
11
11
  t.boolean "published"
12
12
  t.integer "location_id"
13
- t.integer "organizer_id"
14
13
  t.datetime "created_at", :null => false
15
14
  t.datetime "updated_at", :null => false
16
15
  end
@@ -1,11 +1,11 @@
1
- # This is a compressed migration for creating all Alchemy 2.4 tables at once.
1
+ # This is a compressed migration for creating all Alchemy 2.5 tables at once.
2
2
  #
3
3
  # === Notice
4
4
  #
5
5
  # In order to upgrade from an old version of Alchemy, you have to run all migrations from
6
6
  # each version you missed up to the version you want to upgrade to, before running this migration.
7
7
  #
8
- class AlchemyTwoPointFour < ActiveRecord::Migration
8
+ class AlchemyTwoPointFive < ActiveRecord::Migration
9
9
  def up
10
10
  # Do not run if Alchemy tables are already present
11
11
  return if table_exists?(:alchemy_pages)
@@ -184,10 +184,21 @@ class AlchemyTwoPointFour < ActiveRecord::Migration
184
184
  t.integer "updater_id"
185
185
  t.boolean "default", :default => false
186
186
  t.string "country_code", :default => "", :null => false
187
+ t.integer "site_id"
187
188
  end
188
189
 
189
190
  add_index "alchemy_languages", ["language_code", "country_code"], :name => "index_alchemy_languages_on_language_code_and_country_code"
190
191
  add_index "alchemy_languages", ["language_code"], :name => "index_alchemy_languages_on_language_code"
192
+ add_index "alchemy_languages", ["site_id"], :name => "index_alchemy_languages_on_site_id"
193
+
194
+ create_table "alchemy_legacy_page_urls", :force => true do |t|
195
+ t.string "urlname", :null => false
196
+ t.integer "page_id", :null => false
197
+ t.datetime "created_at", :null => false
198
+ t.datetime "updated_at", :null => false
199
+ end
200
+
201
+ add_index "alchemy_legacy_page_urls", ["urlname"], :name => "index_alchemy_legacy_page_urls_on_urlname"
191
202
 
192
203
  create_table "alchemy_pages", :force => true do |t|
193
204
  t.string "name"
@@ -225,59 +236,61 @@ class AlchemyTwoPointFour < ActiveRecord::Migration
225
236
 
226
237
  create_table "alchemy_pictures", :force => true do |t|
227
238
  t.string "name"
228
- t.string "image_filename"
229
- t.integer "image_width"
230
- t.integer "image_height"
231
- t.datetime "created_at", :null => false
232
- t.datetime "updated_at", :null => false
239
+ t.string "image_file_name"
240
+ t.integer "image_file_width"
241
+ t.integer "image_file_height"
242
+ t.datetime "created_at", :null => false
243
+ t.datetime "updated_at", :null => false
233
244
  t.integer "creator_id"
234
245
  t.integer "updater_id"
235
246
  t.string "upload_hash"
236
247
  t.text "cached_tag_list"
248
+ t.string "image_file_uid"
249
+ t.integer "image_file_size"
237
250
  end
238
251
 
252
+ create_table "alchemy_sites", :force => true do |t|
253
+ t.string "host"
254
+ t.string "name"
255
+ t.datetime "created_at", :null => false
256
+ t.datetime "updated_at", :null => false
257
+ t.boolean "public", :default => false
258
+ t.text "aliases"
259
+ t.boolean "redirect_to_primary_host"
260
+ end
261
+
262
+ add_index "alchemy_sites", ["host", "public"], :name => "alchemy_sites_public_hosts_idx"
263
+ add_index "alchemy_sites", ["host"], :name => "index_alchemy_sites_on_host"
264
+
239
265
  create_table "alchemy_users", :force => true do |t|
240
266
  t.string "firstname"
241
267
  t.string "lastname"
242
268
  t.string "login"
243
269
  t.string "email"
244
270
  t.string "gender"
245
- t.string "role", :default => "registered"
271
+ t.string "role", :default => "registered"
246
272
  t.string "language"
247
- t.string "crypted_password", :limit => 128, :default => "", :null => false
248
- t.string "password_salt", :limit => 128, :default => "", :null => false
249
- t.integer "login_count", :default => 0, :null => false
250
- t.integer "failed_login_count", :default => 0, :null => false
273
+ t.string "encrypted_password", :limit => 128, :default => "", :null => false
274
+ t.string "password_salt", :limit => 128, :default => "", :null => false
275
+ t.integer "sign_in_count", :default => 0, :null => false
276
+ t.integer "failed_attempts", :default => 0, :null => false
251
277
  t.datetime "last_request_at"
252
- t.datetime "current_login_at"
253
- t.datetime "last_login_at"
254
- t.string "current_login_ip"
255
- t.string "last_login_ip"
256
- t.string "persistence_token", :null => false
257
- t.string "single_access_token", :null => false
258
- t.string "perishable_token", :null => false
259
- t.datetime "created_at", :null => false
260
- t.datetime "updated_at", :null => false
278
+ t.datetime "current_sign_in_at"
279
+ t.datetime "last_sign_in_at"
280
+ t.string "current_sign_in_ip"
281
+ t.string "last_sign_in_ip"
282
+ t.datetime "created_at", :null => false
283
+ t.datetime "updated_at", :null => false
261
284
  t.integer "creator_id"
262
285
  t.integer "updater_id"
263
286
  t.text "cached_tag_list"
287
+ t.string "reset_password_token"
288
+ t.datetime "reset_password_sent_at"
264
289
  end
265
290
 
266
- add_index "alchemy_users", ["perishable_token"], :name => "index_users_on_perishable_token"
267
-
268
- create_table "events", :force => true do |t|
269
- t.string "name"
270
- t.string "hidden_name"
271
- t.datetime "starts_at"
272
- t.datetime "ends_at"
273
- t.text "description"
274
- t.decimal "entrance_fee", :precision => 6, :scale => 2
275
- t.boolean "published"
276
- t.integer "location_id"
277
- t.integer "organizer_id"
278
- t.datetime "created_at", :null => false
279
- t.datetime "updated_at", :null => false
280
- end
291
+ add_index "alchemy_users", ["email"], :name => "index_alchemy_users_on_email", :unique => true
292
+ add_index "alchemy_users", ["login"], :name => "index_alchemy_users_on_login", :unique => true
293
+ add_index "alchemy_users", ["reset_password_token"], :name => "index_alchemy_users_on_reset_password_token", :unique => true
281
294
 
282
295
  create_table "taggings", :force => true do |t|
283
296
  t.integer "tag_id"
@@ -295,5 +308,6 @@ class AlchemyTwoPointFour < ActiveRecord::Migration
295
308
  create_table "tags", :force => true do |t|
296
309
  t.string "name"
297
310
  end
311
+
298
312
  end
299
313
  end
@@ -0,0 +1,21 @@
1
+ class MigrateAttachmentsToDragonfly < ActiveRecord::Migration
2
+ def up
3
+ change_table :alchemy_attachments do |t|
4
+ t.string :file_uid
5
+ t.index :file_uid
6
+ t.rename :filename, :file_name
7
+ t.rename :content_type, :file_mime_type
8
+ t.rename :size, :file_size
9
+ end
10
+ end
11
+
12
+ def down
13
+ change_table :alchemy_attachments do |t|
14
+ t.remove :file_uid
15
+ t.rename :file_name, :filename
16
+ t.rename :file_mime_type, :content_type
17
+ t.rename :file_size, :size
18
+ t.remove_index :file_uid
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,11 @@
1
+ class ChangeAlchemyUsersRoleToRoles < ActiveRecord::Migration
2
+ def up
3
+ rename_column :alchemy_users, :role, :roles
4
+ add_index :alchemy_users, :roles
5
+ end
6
+
7
+ def down
8
+ remove_index :alchemy_users, :roles
9
+ rename_column :alchemy_users, :roles, :role
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ class CreateLocations < ActiveRecord::Migration
2
+ def change
3
+ create_table :locations do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+ end
@@ -11,20 +11,23 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20130121092645) do
14
+ ActiveRecord::Schema.define(:version => 20130328101418) do
15
15
 
16
16
  create_table "alchemy_attachments", :force => true do |t|
17
17
  t.string "name"
18
- t.string "filename"
19
- t.string "content_type"
20
- t.integer "size"
18
+ t.string "file_name"
19
+ t.string "file_mime_type"
20
+ t.integer "file_size"
21
21
  t.integer "creator_id"
22
22
  t.integer "updater_id"
23
23
  t.datetime "created_at", :null => false
24
24
  t.datetime "updated_at", :null => false
25
25
  t.text "cached_tag_list"
26
+ t.string "file_uid"
26
27
  end
27
28
 
29
+ add_index "alchemy_attachments", ["file_uid"], :name => "index_alchemy_attachments_on_file_uid"
30
+
28
31
  create_table "alchemy_cells", :force => true do |t|
29
32
  t.integer "page_id"
30
33
  t.string "name"
@@ -271,7 +274,7 @@ ActiveRecord::Schema.define(:version => 20130121092645) do
271
274
  t.string "login"
272
275
  t.string "email"
273
276
  t.string "gender"
274
- t.string "role", :default => "registered"
277
+ t.string "roles", :default => "registered"
275
278
  t.string "language"
276
279
  t.string "encrypted_password", :limit => 128, :default => "", :null => false
277
280
  t.string "password_salt", :limit => 128, :default => "", :null => false
@@ -294,6 +297,7 @@ ActiveRecord::Schema.define(:version => 20130121092645) do
294
297
  add_index "alchemy_users", ["email"], :name => "index_alchemy_users_on_email", :unique => true
295
298
  add_index "alchemy_users", ["login"], :name => "index_alchemy_users_on_login", :unique => true
296
299
  add_index "alchemy_users", ["reset_password_token"], :name => "index_alchemy_users_on_reset_password_token", :unique => true
300
+ add_index "alchemy_users", ["roles"], :name => "index_alchemy_users_on_roles"
297
301
 
298
302
  create_table "events", :force => true do |t|
299
303
  t.string "name"
@@ -304,11 +308,16 @@ ActiveRecord::Schema.define(:version => 20130121092645) do
304
308
  t.decimal "entrance_fee", :precision => 6, :scale => 2
305
309
  t.boolean "published"
306
310
  t.integer "location_id"
307
- t.integer "organizer_id"
308
311
  t.datetime "created_at", :null => false
309
312
  t.datetime "updated_at", :null => false
310
313
  end
311
314
 
315
+ create_table "locations", :force => true do |t|
316
+ t.string "name"
317
+ t.datetime "created_at", :null => false
318
+ t.datetime "updated_at", :null => false
319
+ end
320
+
312
321
  create_table "taggings", :force => true do |t|
313
322
  t.integer "tag_id"
314
323
  t.integer "taggable_id"
@@ -10,19 +10,19 @@ FactoryGirl.define do
10
10
  language 'en'
11
11
 
12
12
  factory :admin_user do
13
- role "admin"
13
+ roles 'admin'
14
14
  end
15
15
 
16
16
  factory :registered_user do
17
- role "registered"
17
+ roles 'registered'
18
18
  end
19
19
 
20
20
  factory :author_user do
21
- role "author"
21
+ roles 'author'
22
22
  end
23
23
 
24
24
  factory :editor_user do
25
- role "editor"
25
+ roles 'editor'
26
26
  end
27
27
 
28
28
  end
@@ -20,7 +20,7 @@ describe "Modules" do
20
20
  :action => 'index'
21
21
  }
22
22
  })
23
- visit '/alchemy/admin'
23
+ visit '/admin'
24
24
  click_on 'Events'
25
25
  page.should_not have_content('Upps!')
26
26
  end
@@ -16,14 +16,19 @@ module Alchemy
16
16
 
17
17
  context "in a multilangual environment" do
18
18
 
19
- before { klingonian_root }
19
+ before do
20
+ klingonian_root
21
+ Capybara.default_wait_time = 3 # Raising this helps this test to pass, even on travis-ci
22
+ end
20
23
 
21
24
  it "one should be able to switch the language tree" do
22
- visit('/alchemy/admin/pages')
25
+ visit('/admin/pages')
23
26
  page.select 'Klingonian', :from => 'language'
24
27
  page.should have_selector('#sitemap .sitemap_pagename_link', :text => 'Klingonian')
25
28
  end
26
29
 
30
+ after { Capybara.default_wait_time = 2 } # Reset to default
31
+
27
32
  end
28
33
 
29
34
  context "with no language root page" do
@@ -31,7 +36,7 @@ module Alchemy
31
36
  before { klingonian }
32
37
 
33
38
  it "it should display the form for creating language root" do
34
- visit('/alchemy/admin/pages')
39
+ visit('/admin/pages')
35
40
  page.select 'Klingonian', :from => 'language'
36
41
  page.should have_content('This language tree does not exist')
37
42
  end
@@ -43,7 +48,7 @@ module Alchemy
43
48
  describe "flush complete page cache" do
44
49
 
45
50
  it "should remove the cache of all pages" do
46
- visit '/alchemy/admin/pages'
51
+ visit '/admin/pages'
47
52
  click_link 'Flush page cache'
48
53
  page.should have_content('Page cache flushed')
49
54
  end