alchemy_cms 2.6.3 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. checksums.yaml +4 -4
  2. data/.simplecov +14 -0
  3. data/.travis.yml +1 -1
  4. data/Gemfile +7 -6
  5. data/README.md +15 -5
  6. data/alchemy_cms.gemspec +3 -2
  7. data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +9 -17
  8. data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +70 -0
  9. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +80 -0
  10. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +43 -19
  11. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +3 -1
  12. data/app/assets/javascripts/alchemy/alchemy.js +4 -2
  13. data/app/assets/javascripts/alchemy/alchemy.onload.js.coffee +1 -1
  14. data/app/assets/javascripts/alchemy/alchemy.spinner.js.coffee +14 -0
  15. data/app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee.erb +96 -0
  16. data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +22 -0
  17. data/app/assets/javascripts/alchemy/alchemy.windows.js.coffee +28 -17
  18. data/app/assets/stylesheets/alchemy/base.scss +6 -0
  19. data/app/assets/stylesheets/alchemy/elements.scss +2 -28
  20. data/app/assets/stylesheets/alchemy/errors.scss +1 -1
  21. data/app/assets/stylesheets/alchemy/menubar.css.scss +2 -0
  22. data/app/assets/stylesheets/alchemy/sitemap.scss +21 -34
  23. data/app/assets/stylesheets/alchemy/tables.scss +13 -3
  24. data/app/controllers/alchemy/admin/attachments_controller.rb +10 -5
  25. data/app/controllers/alchemy/admin/base_controller.rb +19 -0
  26. data/app/controllers/alchemy/admin/contents_controller.rb +1 -4
  27. data/app/controllers/alchemy/admin/dashboard_controller.rb +2 -1
  28. data/app/controllers/alchemy/admin/elements_controller.rb +1 -1
  29. data/app/controllers/alchemy/admin/essence_files_controller.rb +1 -1
  30. data/app/controllers/alchemy/admin/essence_pictures_controller.rb +70 -56
  31. data/app/controllers/alchemy/admin/pages_controller.rb +37 -114
  32. data/app/controllers/alchemy/admin/pictures_controller.rb +5 -12
  33. data/app/controllers/alchemy/admin/resources_controller.rb +3 -1
  34. data/app/controllers/alchemy/admin/trash_controller.rb +1 -1
  35. data/app/controllers/alchemy/attachments_controller.rb +1 -1
  36. data/app/controllers/alchemy/base_controller.rb +3 -15
  37. data/app/controllers/alchemy/messages_controller.rb +4 -10
  38. data/app/controllers/alchemy/pages_controller.rb +6 -6
  39. data/app/controllers/alchemy/passwords_controller.rb +1 -1
  40. data/app/controllers/alchemy/user_sessions_controller.rb +1 -1
  41. data/app/helpers/alchemy/admin/base_helper.rb +49 -230
  42. data/app/helpers/alchemy/admin/contents_helper.rb +5 -1
  43. data/app/helpers/alchemy/admin/elements_helper.rb +19 -47
  44. data/app/helpers/alchemy/admin/essences_helper.rb +59 -17
  45. data/app/helpers/alchemy/admin/navigation_helper.rb +204 -0
  46. data/app/helpers/alchemy/admin/pages_helper.rb +22 -79
  47. data/app/helpers/alchemy/admin/pictures_helper.rb +1 -1
  48. data/app/helpers/alchemy/admin/tags_helper.rb +42 -0
  49. data/app/helpers/alchemy/base_helper.rb +0 -11
  50. data/app/helpers/alchemy/elements_helper.rb +48 -25
  51. data/app/helpers/alchemy/essences_helper.rb +0 -20
  52. data/app/helpers/alchemy/pages_helper.rb +18 -14
  53. data/app/helpers/alchemy/url_helper.rb +1 -0
  54. data/app/mailers/alchemy/messages.rb +4 -6
  55. data/app/models/alchemy/attachment.rb +3 -0
  56. data/app/models/alchemy/cell.rb +33 -35
  57. data/app/models/alchemy/content.rb +20 -111
  58. data/app/models/alchemy/content/factory.rb +188 -0
  59. data/app/models/alchemy/element.rb +51 -200
  60. data/app/models/alchemy/element/definitions.rb +52 -0
  61. data/app/models/alchemy/element/presenters.rb +87 -0
  62. data/app/models/alchemy/essence_date.rb +1 -1
  63. data/app/models/alchemy/essence_file.rb +6 -7
  64. data/app/models/alchemy/essence_picture.rb +19 -4
  65. data/app/models/alchemy/message.rb +18 -14
  66. data/app/models/alchemy/page.rb +120 -214
  67. data/app/models/alchemy/page/elements.rb +145 -36
  68. data/app/models/alchemy/page/natures.rb +90 -0
  69. data/app/models/alchemy/page/scopes.rb +93 -0
  70. data/app/models/alchemy/page/users.rb +25 -0
  71. data/app/models/alchemy/picture.rb +15 -0
  72. data/app/models/alchemy/site.rb +15 -1
  73. data/app/models/alchemy/site/layout.rb +38 -0
  74. data/app/models/alchemy/user.rb +13 -3
  75. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +7 -7
  76. data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +8 -8
  77. data/app/views/alchemy/admin/attachments/_tag_list.html.erb +1 -16
  78. data/app/views/alchemy/admin/attachments/destroy.js.erb +1 -4
  79. data/app/views/alchemy/admin/contents/create.js.erb +1 -1
  80. data/app/views/alchemy/admin/dashboard/index.html.erb +14 -13
  81. data/app/views/alchemy/admin/elements/_element_head.html.erb +7 -7
  82. data/app/views/alchemy/admin/elements/_refresh_editor.js.erb +10 -0
  83. data/app/views/alchemy/admin/elements/create.js.erb +44 -44
  84. data/app/views/alchemy/admin/elements/fold.js.erb +22 -26
  85. data/app/views/alchemy/admin/elements/trash.js.erb +1 -1
  86. data/app/views/alchemy/admin/elements/update.js.erb +22 -25
  87. data/app/views/alchemy/admin/essence_files/assign.js.erb +8 -3
  88. data/app/views/alchemy/admin/essence_pictures/crop.html.erb +14 -12
  89. data/app/views/alchemy/admin/essence_pictures/edit.html.erb +22 -39
  90. data/app/views/alchemy/admin/pages/_page.html.erb +73 -80
  91. data/app/views/alchemy/admin/pages/destroy.js.erb +2 -2
  92. data/app/views/alchemy/admin/pages/edit.html.erb +21 -18
  93. data/app/views/alchemy/admin/pages/fold.js.erb +1 -0
  94. data/app/views/alchemy/admin/pages/info.html.erb +32 -0
  95. data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +11 -13
  96. data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +20 -20
  97. data/app/views/alchemy/admin/partials/_sub_navigation.html.erb +8 -0
  98. data/app/views/alchemy/admin/partials/_toolbar_button.html.erb +25 -0
  99. data/app/views/alchemy/admin/partials/_upload_form.html.erb +15 -15
  100. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +39 -39
  101. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +10 -10
  102. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -16
  103. data/app/views/alchemy/admin/resources/destroy.js.erb +1 -1
  104. data/app/views/alchemy/base/500.html.erb +1 -1
  105. data/app/views/alchemy/base/permission_denied.js.erb +1 -1
  106. data/app/views/alchemy/base/redirect.js.erb +1 -1
  107. data/app/views/alchemy/essences/_essence_link_editor.html.erb +1 -1
  108. data/app/views/alchemy/essences/_essence_picture_editor.html.erb +1 -1
  109. data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +1 -1
  110. data/app/views/alchemy/essences/_essence_text_editor.html.erb +1 -1
  111. data/app/views/alchemy/essences/{_essence_picture_tools.html.erb → shared/_essence_picture_tools.html.erb} +5 -5
  112. data/app/views/alchemy/essences/{_linkable_essence_tools.html.erb → shared/_linkable_essence_tools.html.erb} +0 -0
  113. data/app/views/alchemy/messages/contact_form_mail.de.text.erb +12 -0
  114. data/app/views/alchemy/messages/contact_form_mail.en.text.erb +12 -0
  115. data/app/views/alchemy/notifications/reset_password_instructions.de.text.erb +1 -1
  116. data/app/views/alchemy/notifications/reset_password_instructions.en.text.erb +2 -2
  117. data/app/views/alchemy/pages/sitemap.xml.erb +3 -5
  118. data/app/views/alchemy/user_sessions/leave.html.erb +1 -1
  119. data/app/views/layouts/alchemy/admin.html.erb +4 -2
  120. data/app/views/layouts/alchemy/sitemap.xml.erb +1 -1
  121. data/bin/alchemy +7 -13
  122. data/config/alchemy/config.yml +1 -0
  123. data/config/authorization_rules.rb +2 -3
  124. data/config/initializers/dragonfly.rb +2 -0
  125. data/config/locales/alchemy.de.yml +8 -9
  126. data/config/locales/alchemy.en.yml +7 -4
  127. data/config/routes.rb +3 -0
  128. data/db/migrate/{20130214233001_alchemy_two_point_five.rb → 20130827094554_alchemy_two_point_six.rb} +29 -6
  129. data/lib/alchemy/auth/engine.rb +9 -0
  130. data/lib/alchemy/capistrano.rb +37 -12
  131. data/lib/alchemy/config.rb +48 -35
  132. data/lib/alchemy/engine.rb +35 -6
  133. data/lib/alchemy/essence.rb +25 -29
  134. data/lib/alchemy/ferret/search.rb +86 -0
  135. data/lib/alchemy/{scoped_pagination_url_helper.rb → kaminari/scoped_pagination_url_helper.rb} +0 -0
  136. data/lib/alchemy/logger.rb +3 -4
  137. data/lib/alchemy/page_layout.rb +124 -55
  138. data/lib/alchemy/resource.rb +0 -10
  139. data/lib/alchemy/resources_helper.rb +0 -5
  140. data/lib/alchemy/seeder.rb +1 -32
  141. data/lib/alchemy/shell.rb +6 -1
  142. data/lib/alchemy/tinymce.rb +41 -32
  143. data/lib/alchemy/upgrader.rb +3 -1
  144. data/lib/alchemy/upgrader/two_point_five.rb +15 -8
  145. data/lib/alchemy/upgrader/two_point_one.rb +10 -10
  146. data/lib/alchemy/upgrader/two_point_two.rb +96 -51
  147. data/lib/alchemy/version.rb +1 -1
  148. data/lib/alchemy_cms.rb +5 -46
  149. data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +1 -1
  150. data/lib/rails/generators/alchemy/devise/devise_generator.rb +9 -4
  151. data/lib/rails/generators/alchemy/essence/essence_generator.rb +7 -6
  152. data/lib/rails/generators/alchemy/essence/templates/editor.html.erb +1 -1
  153. data/lib/rails/generators/alchemy/scaffold/files/_standard.html.erb +1 -0
  154. data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +1 -0
  155. data/lib/rails/generators/alchemy/site_layouts/site_layouts_generator.rb +23 -0
  156. data/lib/rails/generators/alchemy/site_layouts/templates/layout.html.erb +1 -0
  157. data/lib/rails/generators/alchemy/site_layouts/templates/layout.html.haml +1 -0
  158. data/lib/rails/generators/alchemy/site_layouts/templates/layout.html.slim +1 -0
  159. data/lib/rails/templates/alchemy.rb +2 -2
  160. data/lib/tasks/alchemy/db.rake +3 -1
  161. data/lib/tasks/alchemy/tidy.rake +82 -0
  162. data/lib/tasks/alchemy/upgrade.rake +2 -1
  163. data/spec/controllers/admin/attachments_controller_spec.rb +124 -0
  164. data/spec/controllers/admin/base_controller_spec.rb +35 -0
  165. data/spec/controllers/admin/clipboard_controller_spec.rb +1 -1
  166. data/spec/controllers/admin/contents_controller_spec.rb +17 -26
  167. data/spec/controllers/admin/dashboard_controller_spec.rb +121 -0
  168. data/spec/controllers/admin/elements_controller_spec.rb +1 -1
  169. data/spec/controllers/admin/essence_files_controller_spec.rb +67 -0
  170. data/spec/controllers/admin/essence_pictures_controller_spec.rb +161 -0
  171. data/spec/controllers/admin/languages_controller_spec.rb +1 -1
  172. data/spec/controllers/admin/layoutpages_controller_spec.rb +28 -0
  173. data/spec/controllers/admin/pages_controller_spec.rb +164 -118
  174. data/spec/controllers/admin/pictures_controller_spec.rb +89 -0
  175. data/spec/controllers/admin/trash_controller_spec.rb +21 -31
  176. data/spec/controllers/admin/users_controller_spec.rb +114 -85
  177. data/spec/controllers/attachments_controller_spec.rb +6 -2
  178. data/spec/controllers/base_controller_spec.rb +22 -0
  179. data/spec/controllers/elements_controller_spec.rb +1 -1
  180. data/spec/controllers/messages_controller_spec.rb +200 -0
  181. data/spec/controllers/pictures_controller_spec.rb +1 -1
  182. data/spec/controllers/user_sessions_controller_spec.rb +7 -6
  183. data/spec/controllers/users_controller_spec.rb +2 -2
  184. data/spec/dummy/config/alchemy/cells.yml +2 -0
  185. data/spec/dummy/config/application.rb +19 -8
  186. data/spec/dummy/db/migrate/{20130214233001_alchemy_two_point_five.rb → 20130827094554_alchemy_two_point_six.rb} +29 -6
  187. data/spec/dummy/db/schema.rb +1 -1
  188. data/spec/fast_specs.rb +15 -0
  189. data/spec/helpers/admin/base_helper_spec.rb +53 -34
  190. data/spec/helpers/admin/contents_helper_spec.rb +15 -7
  191. data/spec/helpers/admin/elements_helper_spec.rb +79 -34
  192. data/spec/helpers/admin/essences_helper_spec.rb +45 -31
  193. data/spec/helpers/admin/navigation_helper_spec.rb +204 -0
  194. data/spec/helpers/admin/pages_helper_spec.rb +25 -15
  195. data/spec/helpers/admin/tags_helper_spec.rb +62 -2
  196. data/spec/helpers/elements_helper_spec.rb +202 -138
  197. data/spec/helpers/pages_helper_spec.rb +48 -0
  198. data/spec/helpers/url_helper_spec.rb +7 -0
  199. data/spec/libraries/config_spec.rb +110 -3
  200. data/spec/libraries/essence_spec.rb +29 -9
  201. data/spec/libraries/page_layout_spec.rb +134 -0
  202. data/spec/libraries/resource_spec.rb +3 -16
  203. data/spec/libraries/resources_helper_spec.rb +4 -8
  204. data/spec/libraries/shell_spec.rb +1 -0
  205. data/spec/libraries/tinymce_spec.rb +61 -0
  206. data/spec/mailers/messages_spec.rb +23 -0
  207. data/spec/models/attachment_spec.rb +45 -0
  208. data/spec/models/cell_spec.rb +62 -9
  209. data/spec/models/content_spec.rb +110 -28
  210. data/spec/models/element_spec.rb +275 -253
  211. data/spec/models/essence_date_spec.rb +25 -0
  212. data/spec/models/essence_file_spec.rb +23 -0
  213. data/spec/models/essence_html_spec.rb +13 -0
  214. data/spec/models/essence_picture_spec.rb +16 -0
  215. data/spec/models/essence_text_spec.rb +29 -0
  216. data/spec/models/language_spec.rb +34 -0
  217. data/spec/models/message_spec.rb +43 -0
  218. data/spec/models/page_spec.rb +726 -567
  219. data/spec/models/picture_spec.rb +98 -0
  220. data/spec/models/site_spec.rb +60 -2
  221. data/spec/models/tag_spec.rb +31 -0
  222. data/spec/models/user_spec.rb +4 -4
  223. data/spec/spec_helper.rb +49 -58
  224. data/spec/support/alchemy/controller_helpers.rb +35 -0
  225. data/spec/support/alchemy/{specs_helpers.rb → integration_helpers.rb} +4 -8
  226. data/spec/{factories.rb → support/factories.rb} +11 -1
  227. data/vendor/assets/javascripts/jquery_plugins/jquery.ui.nestedSortable.js +2 -8
  228. metadata +166 -106
  229. data/Guardfile +0 -16
  230. data/app/assets/javascripts/alchemy/alchemy.dirty.js +0 -93
  231. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +0 -122
  232. data/app/models/alchemy/tree_node.rb +0 -4
  233. data/app/views/alchemy/admin/pages/_page_infos.html.erb +0 -3
  234. data/app/views/alchemy/admin/partials/_sub_navigation_tab.html.erb +0 -8
  235. data/app/views/alchemy/messages/contact_form_mail.text.erb +0 -12
  236. data/config/initializers/kaminari_config.rb +0 -9
  237. data/db/migrate/20130221200514_migrate_attachments_to_dragonfly.rb +0 -21
  238. data/db/migrate/20130312205327_change_alchemy_users_role_to_roles.rb +0 -11
  239. data/lib/alchemy/auth_engine.rb +0 -7
  240. data/lib/alchemy/authentication_helpers.rb +0 -9
  241. data/lib/alchemy/ferret_search.rb +0 -84
  242. data/lib/extensions/array.rb +0 -25
  243. data/lib/extensions/hash.rb +0 -34
  244. data/spec/dummy/db/migrate/20130221200514_migrate_attachments_to_dragonfly.rb +0 -21
  245. data/spec/dummy/db/migrate/20130312205327_change_alchemy_users_role_to_roles.rb +0 -11
  246. data/spec/models/page_layout_spec.rb +0 -60
@@ -22,7 +22,7 @@
22
22
  <%= hidden_field_tag content.form_field_name(:link_title), content.essence.link_title %>
23
23
  <%= hidden_field_tag content.form_field_name(:link_class_name), content.essence.link_class_name %>
24
24
  <%= hidden_field_tag content.form_field_name(:link_target), content.essence.link_target %>
25
- <%= render 'alchemy/essences/linkable_essence_tools', :content => content %>
25
+ <%= render 'alchemy/essences/shared/linkable_essence_tools', :content => content %>
26
26
 
27
27
  <% end %>
28
28
 
@@ -1,7 +1,7 @@
1
- <% if options[:crop].to_s == 'true' && content.ingredient %>
1
+ <% if options[:crop] && content.ingredient %>
2
2
  <%= link_to_overlay_window(
3
3
  render_icon('crop'),
4
- alchemy.crop_admin_essence_picture_path(content.essence, :options => options),
4
+ alchemy.crop_admin_essence_picture_path(content.essence, :options => options.to_json),
5
5
  {
6
6
  :size => "816x754",
7
7
  :title => _t('Edit Picturemask'),
@@ -19,9 +19,9 @@
19
19
  render_icon('swap_picture'),
20
20
  alchemy.admin_pictures_path(
21
21
  :element_id => content.element,
22
- :content_id => content,
22
+ :content_id => content.id,
23
23
  :swap => true,
24
- :options => options
24
+ :options => options.to_json
25
25
  ),
26
26
  {
27
27
  :title => (content.ingredient ? _t(:swap_image) : _t(:insert_image)),
@@ -50,7 +50,7 @@
50
50
  alchemy.edit_admin_essence_picture_path(
51
51
  :id => content.essence.id,
52
52
  :content_id => content.id,
53
- :options => options
53
+ :options => options.to_json
54
54
  ),
55
55
  {
56
56
  :title => _t(:edit_image_properties),
@@ -0,0 +1,12 @@
1
+ <%= @message.message %>
2
+
3
+ --
4
+
5
+ Absender:
6
+
7
+ <%= Alchemy::I18n.t(@message.salutation, scope: 'contactform.labels') %> <%= @message.firstname %> <%= @message.lastname %>
8
+ <%= @message.address %>
9
+ <%= @message.zip %> <%= @message.city %>
10
+
11
+ Telefon: <%= @message.phone %>
12
+ E-Mail: <%= @message.email %>
@@ -0,0 +1,12 @@
1
+ <%= @message.message %>
2
+
3
+ --
4
+
5
+ Sender:
6
+
7
+ <%= Alchemy::I18n.t(@message.salutation, scope: 'contactform.labels') %> <%= @message.firstname %> <%= @message.lastname %>
8
+ <%= @message.address %>
9
+ <%= @message.zip %> <%= @message.city %>
10
+
11
+ Phone: <%= @message.phone %>
12
+ Email: <%= @message.email %>
@@ -2,7 +2,7 @@ Hallo <%= @user.fullname %>.
2
2
 
3
3
  Sie haben angefordert Ihr Passwort zurückzusetzen. Dies kann durch anklicken des nachfolgenden Links bestätigt werden.
4
4
 
5
- <%= alchemy.edit_password_url(@user, :reset_password_token => @user.reset_password_token) %>
5
+ <%= alchemy.edit_password_url(@user, reset_password_token: @user.reset_password_token) %>
6
6
 
7
7
  Wenn Sie diese Zurücksetzung nicht angefragt haben, dann können Sie diese E-Mail einfach ignorieren.
8
8
  Ihr Passwort wird erst dann zurückgesetzt, wenn Sie den Link anklicken.
@@ -1,8 +1,8 @@
1
- Hello <%= @user.fullname %>.
1
+ Hello <%= @user.name %>.
2
2
 
3
3
  You has requested to change your password. Please confirm this by clicking the link below.
4
4
 
5
- <%= alchemy.edit_password_url(@user, :reset_password_token => @user.reset_password_token) %>
5
+ <%= alchemy.edit_password_url(@user, reset_password_token: @user.reset_password_token) %>
6
6
 
7
7
  If you didn't request this, please ignore this email.
8
8
  Your password won't change until you access the link above and create a new one.
@@ -1,8 +1,6 @@
1
1
  <%- @pages.each do |page| -%>
2
2
  <url>
3
- <loc><%= multi_language? ? show_page_url(:urlname => page.urlname, :lang => page.language) : show_page_url(page.urlname) %></loc>
4
- <lastmod><%= page.updated_at %></lastmod>
5
- <changefreq>weekly</changefreq>
6
- <priority>1</priority>
3
+ <loc><%= show_alchemy_page_url(page) %></loc>
4
+ <lastmod><%= page.updated_at.utc.iso8601 %></lastmod>
7
5
  </url>
8
- <%- end -%>
6
+ <%- end -%>
@@ -6,6 +6,6 @@
6
6
  </p>
7
7
  <%= form_tag alchemy.logout_path, :method => :delete, :class => 'buttons' do %>
8
8
  <label><%= _t('or to completly') %></label>
9
- <%= button _t(:logout) %>
9
+ <%= button _t(:logout), autofocus: true %>
10
10
  <% end %>
11
11
  </div>
@@ -37,7 +37,9 @@
37
37
  </div>
38
38
  <div id="left_menu">
39
39
  <div id="main_navi">
40
- <%= admin_main_navigation %>
40
+ <% alchemy_modules.each do |alchemy_module| %>
41
+ <%= alchemy_main_navigation_entry(alchemy_module) %>
42
+ <% end %>
41
43
  <%= yield(:alchemy_main_navigation) %>
42
44
  </div>
43
45
  <div id="logout">
@@ -47,7 +49,7 @@
47
49
  alchemy.leave_admin_path, {
48
50
  :size => "300x105",
49
51
  :title => _t("Leave Alchemy")
50
- }) %>
52
+ }, {'data-alchemy-hotkey' => 'alt-q'}) %>
51
53
  <% else %>
52
54
  <%= link_to(alchemy.root_path) do %>
53
55
  <span class="module icon exit"></span>
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
3
  <%= yield %>
4
- </urlset>
4
+ </urlset>
@@ -1,16 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: UTF-8
3
+ gem 'rails', '~> 3.2.14'
3
4
 
4
- begin
5
- require "rubygems"
6
- require 'rails/version'
7
- RAILS_VERSION = Rails::VERSION::STRING
8
- if RAILS_VERSION < "3.2"
9
- raise LoadError, "Wrong rails version installed. Please run gem install rails -v'~>3.2.11'"
10
- end
11
- require "thor"
12
- require File.join(File.dirname(__FILE__), '..', 'lib/alchemy/version')
13
- end
5
+ require 'rails/version'
6
+ require "thor"
7
+ require File.expand_path('../../lib/alchemy/version', __FILE__)
14
8
 
15
9
  class AlchemyInstaller < Thor
16
10
  include Thor::Actions
@@ -19,16 +13,16 @@ class AlchemyInstaller < Thor
19
13
  map "--version" => :version
20
14
  desc "version", "Prints current Alchemy CMS version", :hide => true
21
15
  def version
22
- puts Alchemy::VERSION
16
+ puts Alchemy.version
23
17
  end
24
18
 
25
19
  desc "new PROJECT", "Creates a new Alchemy CMS project."
26
20
  method_option :database, :type => :string, :default => 'mysql', :aliases => "-d", :desc => "Type of database to use for this project. Default mysql."
27
21
  def new(project)
28
22
  @application = project.downcase.strip.gsub(/ /, '_')
29
- if system("rails new #{@application} -m #{File.join(File.dirname(__FILE__), '..', 'lib', 'rails', 'templates', 'alchemy.rb')} -d #{options[:database]} -JT")
23
+ if system("rails _#{Rails::VERSION::STRING}_ new #{@application} -m #{File.join(File.dirname(__FILE__), '..', 'lib', 'rails', 'templates', 'alchemy.rb')} -d #{options[:database]} -JT")
30
24
  create_database_yml if options[:database] == 'mysql'
31
- system("cd ./#{@application} && rake alchemy:install")
25
+ system("cd ./#{@application} && bundle exec rake alchemy:install")
32
26
  gitignore = <<-GIT
33
27
  log/*
34
28
  tmp/*
@@ -128,6 +128,7 @@ mailer:
128
128
  mail_success_page: thanks
129
129
  mail_from: your.mail@your-domain.com
130
130
  mail_to: your.mail@your-domain.com
131
+ subject: A new contact form message
131
132
  fields: [salutation, firstname, lastname, address, zip, city, phone, email, message]
132
133
  validate_fields: [lastname, email]
133
134
 
@@ -25,7 +25,6 @@ authorization do
25
25
  end
26
26
  has_permission_on :alchemy_pages, :to => [:show] do
27
27
  if_attribute :public => true, :restricted => true
28
- if_attribute :public => true, :restricted => false
29
28
  end
30
29
  has_permission_on :alchemy_elements, :to => [:show] do
31
30
  if_attribute :public => true
@@ -41,7 +40,7 @@ authorization do
41
40
  includes :registered
42
41
  has_permission_on :alchemy_admin_dashboard, :to => [:index]
43
42
  has_permission_on :alchemy_pictures, :to => [:thumbnail]
44
- has_permission_on :alchemy_admin_pages, :to => [:index, :fold, :edit_page_content, :link]
43
+ has_permission_on :alchemy_admin_pages, :to => [:index, :info, :fold, :edit_page_content, :link]
45
44
  has_permission_on :alchemy_admin_elements, :to => [:manage_elements]
46
45
  has_permission_on :alchemy_admin_pictures, :to => [:read, :archive_overlay, :info]
47
46
  has_permission_on :alchemy_admin_attachments, :to => [:index, :archive_overlay, :show, :download]
@@ -97,7 +96,7 @@ privileges do
97
96
  end
98
97
 
99
98
  privilege :manage_picture_essences, :alchemy_admin_essence_pictures do
100
- includes :manage, :save_link, :assign, :crop
99
+ includes :manage, :assign, :crop
101
100
  end
102
101
 
103
102
  privilege :manage_file_essences, :alchemy_admin_essence_files do
@@ -1,3 +1,5 @@
1
+ require 'dragonfly'
2
+
1
3
  # Alchemy CMS Dragonfly configuration.
2
4
 
3
5
  # Pictures
@@ -241,7 +241,6 @@ de:
241
241
  "New Tag Created": "Neues Tag wurde erstellt"
242
242
  "No": "Nein"
243
243
  "No EssenceType given": ""
244
- "No image found. Did you saved the element?": "Es wurde kein Bild gefunden. Haben Sie das Element auch gespeichert?"
245
244
  "No items in your clipboard": "Ihre Zwischenablage ist leer"
246
245
  "No Tags found": "Keine Tags gefunden"
247
246
  "None": "keine"
@@ -296,9 +295,8 @@ de:
296
295
  "Switch to Flash® Uploader": "Auf den Flash® Uploader wechseln"
297
296
  sitemap_editor_info: "Die Sitemap wird automatisch generiert"
298
297
  searchresults_editor_info: "Dieses Element stellt die Suchergebnisse dar. Es Bedarf keinerlei Anpassung."
299
- element_dirty_notice: "Dieses Element hat nicht gespeicherte Änderungen. Möchten Sie es wirklich einklappen?"
300
298
  "Tags": "Tags"
301
- "These pictures could not be deleted, because they where in use": "Diese Bilder konnten nicht gelöscht werden, da sie in Benutzung sind: %{names}"
299
+ "These pictures could not be deleted, because they were in use": "Diese Bilder konnten nicht gelöscht werden, da sie in Benutzung sind: %{names}"
302
300
  "This page is locked by %{name}": "Diese Seite wird gerade von %{name} blockiert"
303
301
  "Title": "Titel"
304
302
  "Trash": "Papierkorb"
@@ -375,9 +373,7 @@ de:
375
373
  create_language_tree_heading: "Einen leeren Sprachbaum erstellen"
376
374
  create_page: "Eine Unterseite anlegen"
377
375
  create_user: "Einen Benutzer anlegen"
378
- created_at: "Erstellt am"
379
- created_by: "Erstellt von"
380
- currently_edited_by: "Wird momentan bearbeitet von"
376
+ currently_edited_by: "Wird bearbeitet von"
381
377
  cut_element: "Element ausschneiden"
382
378
  delete_file: "Datei vom Server löschen"
383
379
  delete_image: "Bild löschen."
@@ -399,7 +395,6 @@ de:
399
395
  edit_tag: 'Tag bearbeiten'
400
396
  edit_user: "Benutzer bearbeiten"
401
397
  edit_selected_pictures: "Selektierte Bilder:"
402
- element_dirty_page_leave_warning: "Sie haben ungesicherte Elemente auf der Seite. Möchten Sie wirklich fortfahren?"
403
398
  element_editor_not_found: "Bei diesem Element ist ein Fehler aufgetreten"
404
399
  element_of_type: "Element"
405
400
  element_saved: "Element wurde gespeichert."
@@ -421,6 +416,7 @@ de:
421
416
  file: "Datei"
422
417
  file_rename_error: "Datei konnte nicht umbenannt werden."
423
418
  files: "Dateien"
419
+ from_at: "von %{by} am %{at}"
424
420
  height: "Höhe"
425
421
  hide_element_content: "Element einklappen"
426
422
  dashboard: "Dashboard"
@@ -472,6 +468,7 @@ de:
472
468
  name: "Name"
473
469
  names: "Namen"
474
470
  navigation_name: "Navigationsname"
471
+ no_image_for_cropper_found: "Es wurde kein Bild gefunden. Bitte speichern Sie zuerst das Element."
475
472
  no: "Nein"
476
473
  "no pages": "Keine Seiten"
477
474
  "no users": "Keine Benutzer"
@@ -487,6 +484,7 @@ de:
487
484
  "Page created": "Seite '%{name}' wurde erstellt."
488
485
  page_for_links:
489
486
  choose_page: "%{name} wählen"
487
+ page_infos: 'Seiteninformationen'
490
488
  page_layout_changed_notice: "Der Seitentyp wurde verändert. Nicht mehr verwendbare Elemente wurden in den Papierkorb verschoben."
491
489
  page_properties: "Seiteneigenschaften"
492
490
  page_public: "öffentlich"
@@ -509,6 +507,8 @@ de:
509
507
  page_title: "Titel"
510
508
  page_type: "Typ"
511
509
  page_visible_in_navigation: "in der Navigation sichtbar"
510
+ page_was_created: "Wurde erstellt"
511
+ page_was_updated: "Wurde bearbeitet"
512
512
  pages:
513
513
  update:
514
514
  comma_seperated: "Durch Kommata getrennt eingeben"
@@ -579,8 +579,6 @@ de:
579
579
  unlink: "Link entfernen"
580
580
  unlock_page: "Seite verlassen"
581
581
  unlocked_page: "Seite %{name} wurde freigegeben."
582
- updated_at: "Bearbeitet am"
583
- updated_by: "Bearbeitet von"
584
582
  upload: "Datei hochladen"
585
583
  upload_file: "Datei(en) hochladen"
586
584
  upload_image: "Bild(er) hochladen"
@@ -645,6 +643,7 @@ de:
645
643
  default: "%d. %b. %Y, %H:%M Uhr"
646
644
  short: "%d. %B, %H:%Mh"
647
645
  long: "%A, %d. %B %Y um %H:%M Uhr"
646
+ page_status: "%d.%m.%Y um %H:%M Uhr"
648
647
  date: "%d.%m.%Y"
649
648
  datepicker: "%d.%m.%Y"
650
649
  time: "%H:%M"
@@ -211,7 +211,7 @@ en:
211
211
  create_page: "Create a new subpage"
212
212
  create_user: "Create a new user"
213
213
  created_at: "Created at"
214
- currently_edited_by: "This page is currently locked by"
214
+ currently_edited_by: "This page is locked by"
215
215
  cut_element: "Cut this element."
216
216
  delete_file: "Delete this file from server."
217
217
  delete_image: "Remove this image"
@@ -232,9 +232,7 @@ en:
232
232
  edit_selected_pictures: "Edit selected pictures"
233
233
  edit_user: "Edit the user´s properties."
234
234
  element_description_missing: "WARNING! Missing description. Please check your elements.yml file."
235
- element_dirty_notice: "This element has unsaved changes. Do you really want to fold it?"
236
235
  element_dirty_close_window_notice: "You have unsaved elements. Do you really want to close the elements window?"
237
- element_dirty_page_leave_warning: "You have unsaved elements on this page. Do you really want to continue?"
238
236
  element_editor_not_found: "Error within this Element"
239
237
  element_of_type: "Element"
240
238
  element_saved: "Saved element."
@@ -254,6 +252,7 @@ en:
254
252
  female: "Female"
255
253
  file: "File"
256
254
  file_rename_error: "Error renaming file."
255
+ from_at: "from %{by} at %{at}"
257
256
  height: "Height"
258
257
  hide_element_content: "Hide this elements content."
259
258
  dashboard: "Dashboard"
@@ -302,6 +301,7 @@ en:
302
301
  no_default_language_found: "No default language found."
303
302
  no_element_given: "No element given."
304
303
  no_files_in_archive: "You do not have any files in your archive."
304
+ no_image_for_cropper_found: "No image found. Please save the element first."
305
305
  no_images_in_archive: "You don't have any images in your archive."
306
306
  no_more_elements_to_add: "No more elements available."
307
307
  no_search_results: "Your search did not return any results."
@@ -332,6 +332,8 @@ en:
332
332
  page_title: "Title"
333
333
  page_type: "Type"
334
334
  page_visible_in_navigation: "visible in the navigation"
335
+ page_was_created: "Was created"
336
+ page_was_updated: "Was updated"
335
337
  pages:
336
338
  update:
337
339
  comma_seperated: "Separate by comma"
@@ -382,7 +384,7 @@ en:
382
384
  successfully_added_element: "Succesfully added new element."
383
385
  successfully_saved_element_position: "Element position updated succesfully."
384
386
  swap_image: "Change image"
385
- "These pictures could not be deleted, because they where in use": "These pictures could not be deleted, because they where in use: %{names}"
387
+ "These pictures could not be deleted, because they were in use": "These pictures could not be deleted, because they were in use: %{names}"
386
388
  insert_image: "Insert image"
387
389
  swfupload:
388
390
  cancel_uploads: "Cancel uploads"
@@ -435,6 +437,7 @@ en:
435
437
  formats:
436
438
  default: "%a, %d %b %Y %H:%M:%S %z"
437
439
  short: "%d %b %H:%M"
440
+ page_status: "%m.%d.%Y %H:%M"
438
441
  long: "%B %d, %Y %H:%M"
439
442
  date: "%Y-%m-%d"
440
443
  datepicker: "%Y-%m-%d"
@@ -2,6 +2,8 @@ Alchemy::Engine.routes.draw do
2
2
 
3
3
  root :to => 'pages#show'
4
4
 
5
+ get '/sitemap.xml' => 'pages#sitemap', format: 'xml'
6
+
5
7
  get '/admin' => redirect(
6
8
  "#{Alchemy::MountPoint.get}/admin/dashboard"
7
9
  )
@@ -86,6 +88,7 @@ Alchemy::Engine.routes.draw do
86
88
  post :visit
87
89
  get :configure
88
90
  get :preview
91
+ get :info
89
92
  end
90
93
  end
91
94
 
@@ -1,27 +1,30 @@
1
- # This is a compressed migration for creating all Alchemy 2.5 tables at once.
1
+ # This is a compressed migration for creating all Alchemy 2.6 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 AlchemyTwoPointFive < ActiveRecord::Migration
8
+ class AlchemyTwoPointSix < 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)
12
12
 
13
13
  create_table "alchemy_attachments", :force => true do |t|
14
14
  t.string "name"
15
- t.string "filename"
16
- t.string "content_type"
17
- t.integer "size"
15
+ t.string "file_name"
16
+ t.string "file_mime_type"
17
+ t.integer "file_size"
18
18
  t.integer "creator_id"
19
19
  t.integer "updater_id"
20
20
  t.datetime "created_at", :null => false
21
21
  t.datetime "updated_at", :null => false
22
22
  t.text "cached_tag_list"
23
+ t.string "file_uid"
23
24
  end
24
25
 
26
+ add_index "alchemy_attachments", ["file_uid"], :name => "index_alchemy_attachments_on_file_uid"
27
+
25
28
  create_table "alchemy_cells", :force => true do |t|
26
29
  t.integer "page_id"
27
30
  t.string "name"
@@ -268,7 +271,7 @@ class AlchemyTwoPointFive < ActiveRecord::Migration
268
271
  t.string "login"
269
272
  t.string "email"
270
273
  t.string "gender"
271
- t.string "role", :default => "registered"
274
+ t.string "roles", :default => "registered"
272
275
  t.string "language"
273
276
  t.string "encrypted_password", :limit => 128, :default => "", :null => false
274
277
  t.string "password_salt", :limit => 128, :default => "", :null => false
@@ -291,6 +294,26 @@ class AlchemyTwoPointFive < ActiveRecord::Migration
291
294
  add_index "alchemy_users", ["email"], :name => "index_alchemy_users_on_email", :unique => true
292
295
  add_index "alchemy_users", ["login"], :name => "index_alchemy_users_on_login", :unique => true
293
296
  add_index "alchemy_users", ["reset_password_token"], :name => "index_alchemy_users_on_reset_password_token", :unique => true
297
+ add_index "alchemy_users", ["roles"], :name => "index_alchemy_users_on_roles"
298
+
299
+ create_table "events", :force => true do |t|
300
+ t.string "name"
301
+ t.string "hidden_name"
302
+ t.datetime "starts_at"
303
+ t.datetime "ends_at"
304
+ t.text "description"
305
+ t.decimal "entrance_fee", :precision => 6, :scale => 2
306
+ t.boolean "published"
307
+ t.integer "location_id"
308
+ t.datetime "created_at", :null => false
309
+ t.datetime "updated_at", :null => false
310
+ end
311
+
312
+ create_table "locations", :force => true do |t|
313
+ t.string "name"
314
+ t.datetime "created_at", :null => false
315
+ t.datetime "updated_at", :null => false
316
+ end
294
317
 
295
318
  create_table "taggings", :force => true do |t|
296
319
  t.integer "tag_id"