alchemy_cms 2.5.0.b5 → 2.5.0.b9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. data/README.md +1 -1
  2. data/alchemy_cms.gemspec +2 -2
  3. data/app/assets/javascripts/alchemy/alchemy.base.js +0 -24
  4. data/app/assets/javascripts/alchemy/alchemy.growler.js +2 -4
  5. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +0 -1
  6. data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +1 -1
  7. data/app/assets/stylesheets/alchemy/base.scss +4 -20
  8. data/app/assets/stylesheets/alchemy/elements.scss +19 -31
  9. data/app/assets/stylesheets/alchemy/flash.scss +11 -0
  10. data/app/assets/stylesheets/alchemy/form_elements.scss +2 -14
  11. data/app/assets/stylesheets/alchemy/menubar.css.scss +1 -0
  12. data/app/assets/stylesheets/alchemy/mixins.scss +37 -2
  13. data/app/assets/stylesheets/alchemy/notices.scss +1 -0
  14. data/app/assets/stylesheets/alchemy/sitemap.scss +30 -0
  15. data/app/assets/stylesheets/alchemy/tables.scss +20 -27
  16. data/app/controllers/alchemy/admin/attachments_controller.rb +3 -3
  17. data/app/controllers/alchemy/admin/base_controller.rb +1 -1
  18. data/app/controllers/alchemy/admin/contents_controller.rb +2 -2
  19. data/app/controllers/alchemy/admin/elements_controller.rb +3 -3
  20. data/app/controllers/alchemy/admin/essence_pictures_controller.rb +2 -2
  21. data/app/controllers/alchemy/admin/pages_controller.rb +16 -9
  22. data/app/controllers/alchemy/admin/pictures_controller.rb +8 -8
  23. data/app/controllers/alchemy/admin/resources_controller.rb +1 -1
  24. data/app/controllers/alchemy/admin/tags_controller.rb +4 -4
  25. data/app/controllers/alchemy/admin/users_controller.rb +3 -3
  26. data/app/controllers/alchemy/base_controller.rb +10 -12
  27. data/app/controllers/alchemy/messages_controller.rb +2 -2
  28. data/app/controllers/alchemy/pages_controller.rb +4 -1
  29. data/app/controllers/alchemy/pictures_controller.rb +1 -4
  30. data/app/controllers/alchemy/user_sessions_controller.rb +5 -5
  31. data/app/helpers/alchemy/admin/attachments_helper.rb +1 -1
  32. data/app/helpers/alchemy/admin/base_helper.rb +13 -13
  33. data/app/helpers/alchemy/admin/contents_helper.rb +6 -6
  34. data/app/helpers/alchemy/admin/elements_helper.rb +2 -2
  35. data/app/helpers/alchemy/admin/essences_helper.rb +8 -8
  36. data/app/helpers/alchemy/admin/pages_helper.rb +13 -7
  37. data/app/helpers/alchemy/base_helper.rb +20 -5
  38. data/app/helpers/alchemy/elements_helper.rb +2 -2
  39. data/app/helpers/alchemy/essences_helper.rb +2 -2
  40. data/app/helpers/alchemy/pages_helper.rb +2 -3
  41. data/app/models/alchemy/cell.rb +11 -3
  42. data/app/models/alchemy/content.rb +17 -17
  43. data/app/models/alchemy/element.rb +49 -26
  44. data/app/models/alchemy/legacy_page_url.rb +6 -0
  45. data/app/models/alchemy/page.rb +24 -45
  46. data/app/models/alchemy/picture.rb +1 -2
  47. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +3 -3
  48. data/app/views/alchemy/admin/attachments/_attachment.html.erb +6 -6
  49. data/app/views/alchemy/admin/attachments/_files_list.html.erb +2 -2
  50. data/app/views/alchemy/admin/attachments/edit.html.erb +5 -3
  51. data/app/views/alchemy/admin/attachments/index.html.erb +3 -3
  52. data/app/views/alchemy/admin/attachments/new.html.erb +2 -2
  53. data/app/views/alchemy/admin/clipboard/clear.js.erb +1 -1
  54. data/app/views/alchemy/admin/clipboard/index.html.erb +3 -3
  55. data/app/views/alchemy/admin/clipboard/insert.js.erb +2 -2
  56. data/app/views/alchemy/admin/clipboard/remove.js.erb +4 -4
  57. data/app/views/alchemy/admin/contents/_missing.html.erb +2 -2
  58. data/app/views/alchemy/admin/contents/create.js.erb +1 -1
  59. data/app/views/alchemy/admin/contents/new.html.erb +3 -3
  60. data/app/views/alchemy/admin/dashboard/index.html.erb +12 -12
  61. data/app/views/alchemy/admin/elements/_add_picture.html.erb +1 -1
  62. data/app/views/alchemy/admin/elements/_element.html.erb +1 -1
  63. data/app/views/alchemy/admin/elements/_element_foot.html.erb +5 -5
  64. data/app/views/alchemy/admin/elements/_element_head.html.erb +6 -6
  65. data/app/views/alchemy/admin/elements/_elements_select.html.erb +2 -2
  66. data/app/views/alchemy/admin/elements/_new_element_form.html.erb +4 -4
  67. data/app/views/alchemy/admin/elements/_picture_gallery_editor.html.erb +1 -1
  68. data/app/views/alchemy/admin/elements/create.js.erb +2 -2
  69. data/app/views/alchemy/admin/elements/index.html.erb +2 -2
  70. data/app/views/alchemy/admin/elements/list.js.erb +1 -1
  71. data/app/views/alchemy/admin/elements/new.html.erb +4 -4
  72. data/app/views/alchemy/admin/elements/order.js.erb +1 -1
  73. data/app/views/alchemy/admin/elements/trash.js.erb +1 -1
  74. data/app/views/alchemy/admin/elements/update.js.erb +1 -1
  75. data/app/views/alchemy/admin/essence_files/edit.html.erb +5 -5
  76. data/app/views/alchemy/admin/essence_pictures/crop.html.erb +4 -4
  77. data/app/views/alchemy/admin/essence_pictures/edit.html.erb +4 -4
  78. data/app/views/alchemy/admin/languages/_form.html.erb +6 -10
  79. data/app/views/alchemy/admin/languages/_language.html.erb +4 -4
  80. data/app/views/alchemy/admin/languages/_table.html.erb +1 -1
  81. data/app/views/alchemy/admin/languages/index.html.erb +1 -1
  82. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +6 -6
  83. data/app/views/alchemy/admin/layoutpages/index.html.erb +8 -8
  84. data/app/views/alchemy/admin/pages/_contactform_links.html.erb +7 -7
  85. data/app/views/alchemy/admin/pages/_create_language_form.html.erb +10 -9
  86. data/app/views/alchemy/admin/pages/_external_link.html.erb +7 -7
  87. data/app/views/alchemy/admin/pages/_file_link.html.erb +6 -6
  88. data/app/views/alchemy/admin/pages/_internal_link.html.erb +5 -5
  89. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
  90. data/app/views/alchemy/admin/pages/_page.html.erb +28 -28
  91. data/app/views/alchemy/admin/pages/_page_for_links.html.erb +5 -5
  92. data/app/views/alchemy/admin/pages/_page_infos.html.erb +3 -3
  93. data/app/views/alchemy/admin/pages/_page_status.html.erb +3 -3
  94. data/app/views/alchemy/admin/pages/_sitemap.html.erb +1 -1
  95. data/app/views/alchemy/admin/pages/configure.html.erb +11 -11
  96. data/app/views/alchemy/admin/pages/configure_external.html.erb +4 -4
  97. data/app/views/alchemy/admin/pages/destroy.js.erb +0 -1
  98. data/app/views/alchemy/admin/pages/edit.html.erb +35 -35
  99. data/app/views/alchemy/admin/pages/flush.js.erb +1 -1
  100. data/app/views/alchemy/admin/pages/fold.js.erb +0 -1
  101. data/app/views/alchemy/admin/pages/index.html.erb +14 -14
  102. data/app/views/alchemy/admin/pages/link.html.erb +4 -4
  103. data/app/views/alchemy/admin/pages/locked.html.erb +1 -1
  104. data/app/views/alchemy/admin/pages/new.html.erb +4 -4
  105. data/app/views/alchemy/admin/pages/update.js.erb +2 -2
  106. data/app/views/alchemy/admin/partials/_autocomplete_tag_list.html.erb +1 -1
  107. data/app/views/alchemy/admin/partials/_flash_notices.html.erb +3 -3
  108. data/app/views/alchemy/admin/partials/_flash_upload.html.erb +8 -8
  109. data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +1 -1
  110. data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +1 -1
  111. data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +2 -2
  112. data/app/views/alchemy/admin/partials/_search_form.html.erb +2 -2
  113. data/app/views/alchemy/admin/partials/_sub_navigation_tab.html.erb +1 -1
  114. data/app/views/alchemy/admin/partials/_upload_form.html.erb +11 -11
  115. data/app/views/alchemy/admin/pictures/_archive.html.erb +13 -13
  116. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +7 -7
  117. data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +4 -4
  118. data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +1 -1
  119. data/app/views/alchemy/admin/pictures/_picture.html.erb +7 -7
  120. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +1 -1
  121. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +2 -2
  122. data/app/views/alchemy/admin/pictures/edit.html.erb +2 -2
  123. data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +6 -6
  124. data/app/views/alchemy/admin/pictures/index.html.erb +10 -10
  125. data/app/views/alchemy/admin/pictures/info.html.erb +2 -2
  126. data/app/views/alchemy/admin/pictures/new.html.erb +2 -2
  127. data/app/views/alchemy/admin/resources/_boolean.html.erb +5 -0
  128. data/app/views/alchemy/admin/resources/_datetime.html.erb +2 -0
  129. data/app/views/alchemy/admin/resources/_form.html.erb +17 -28
  130. data/app/views/alchemy/admin/resources/_resource.html.erb +4 -4
  131. data/app/views/alchemy/admin/resources/_string.html.erb +5 -0
  132. data/app/views/alchemy/admin/resources/_table.html.erb +1 -1
  133. data/app/views/alchemy/admin/resources/_text.html.erb +5 -0
  134. data/app/views/alchemy/admin/resources/index.html.erb +1 -1
  135. data/app/views/alchemy/admin/tags/_tag.html.erb +4 -4
  136. data/app/views/alchemy/admin/tags/edit.html.erb +4 -4
  137. data/app/views/alchemy/admin/tags/index.html.erb +5 -5
  138. data/app/views/alchemy/admin/tags/new.html.erb +2 -2
  139. data/app/views/alchemy/admin/trash/clear.js.coffee +1 -1
  140. data/app/views/alchemy/admin/trash/index.html.erb +3 -3
  141. data/app/views/alchemy/admin/users/_table.html.erb +3 -3
  142. data/app/views/alchemy/admin/users/_user.html.erb +6 -6
  143. data/app/views/alchemy/admin/users/index.html.erb +4 -4
  144. data/app/views/alchemy/base/error_notice.html.erb +1 -4
  145. data/app/views/alchemy/elements/_editor_not_found.html.erb +2 -2
  146. data/app/views/alchemy/essences/_essence_boolean_view.html.erb +1 -1
  147. data/app/views/alchemy/essences/_essence_file_editor.html.erb +7 -7
  148. data/app/views/alchemy/essences/_essence_picture_editor.html.erb +5 -5
  149. data/app/views/alchemy/essences/_essence_picture_tools.html.erb +8 -8
  150. data/app/views/alchemy/essences/_linkable_essence_tools.html.erb +2 -2
  151. data/app/views/alchemy/search/_form.html.erb +2 -2
  152. data/app/views/alchemy/search/_result.html.erb +1 -1
  153. data/app/views/alchemy/search/_results.html.erb +3 -3
  154. data/app/views/alchemy/user_sessions/leave.html.erb +5 -5
  155. data/app/views/alchemy/user_sessions/login.html.erb +1 -1
  156. data/app/views/alchemy/user_sessions/signup.html.erb +2 -2
  157. data/app/views/kaminari/_gap.html.erb +1 -1
  158. data/app/views/kaminari/_next_page.html.erb +2 -2
  159. data/app/views/kaminari/_prev_page.html.erb +2 -2
  160. data/app/views/layouts/alchemy/admin.html.erb +7 -7
  161. data/bin/alchemy +1 -1
  162. data/config/authorization_rules.rb +1 -3
  163. data/config/locales/alchemy.de.yml +33 -23
  164. data/config/locales/alchemy.en.yml +31 -6
  165. data/db/migrate/{20121026100815_alchemy_two_point_three.rb → 20121118000000_alchemy_two_point_four.rb} +51 -28
  166. data/db/migrate/20130110212411_create_alchemy_legacy_page_urls.rb +11 -0
  167. data/lib/alchemy/capistrano.rb +22 -30
  168. data/lib/alchemy/errors.rb +45 -0
  169. data/lib/alchemy/i18n.rb +7 -5
  170. data/lib/alchemy/logger.rb +16 -0
  171. data/lib/alchemy/page_layout.rb +3 -3
  172. data/lib/alchemy/resource.rb +17 -1
  173. data/lib/alchemy/resources_helper.rb +8 -1
  174. data/lib/alchemy/upgrader.rb +9 -0
  175. data/lib/alchemy/version.rb +1 -1
  176. data/lib/alchemy_cms.rb +1 -6
  177. data/lib/rails/generators/alchemy/scaffold/files/elements.yml +41 -19
  178. data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +13 -0
  179. data/lib/tasks/alchemy/db.rake +5 -11
  180. data/lib/tasks/alchemy/install.rake +7 -7
  181. data/spec/controllers/admin/pages_controller_spec.rb +14 -2
  182. data/spec/controllers/pages_controller_spec.rb +50 -17
  183. data/spec/dummy/config/application.rb +1 -1
  184. data/spec/dummy/db/migrate/{20121026100815_alchemy_two_point_three.rb → 20121118000000_alchemy_two_point_four.rb} +51 -28
  185. data/spec/dummy/db/migrate/20130110212411_create_alchemy_legacy_page_urls.rb +11 -0
  186. data/spec/dummy/db/schema.rb +10 -1
  187. data/spec/factories.rb +1 -0
  188. data/spec/integration/admin/picture_library_integration_spec.rb +8 -2
  189. data/spec/integration/security_spec.rb +2 -2
  190. data/spec/integration/translation_integration_spec.rb +20 -4
  191. data/spec/libraries/resources_helper_spec.rb +1 -1
  192. data/spec/models/cell_spec.rb +45 -0
  193. data/spec/models/page_spec.rb +19 -2
  194. data/spec/models/picture_spec.rb +12 -0
  195. data/spec/routing_spec.rb +115 -115
  196. data/spec/spec_helper.rb +3 -0
  197. data/spec/support/alchemy/specs_helpers.rb +6 -2
  198. data/spec/support/image.png +0 -0
  199. data/spec/support/image2.PNG +0 -0
  200. data/spec/support/image3.jpeg +0 -0
  201. metadata +27 -23
  202. data/db/migrate/20121113115120_create_alchemy_essence_links.rb +0 -13
  203. data/db/migrate/20121115100736_add_cached_tag_list_to_elements_pages_and_users.rb +0 -7
  204. data/db/migrate/20121116140636_add_cached_tag_list_to_alchemy_attachments.rb +0 -5
  205. data/db/migrate/20121116141016_change_alchemy_pictures_tag_list_column.rb +0 -9
  206. data/spec/dummy/db/migrate/20121113115120_create_alchemy_essence_links.rb +0 -13
  207. data/spec/dummy/db/migrate/20121115100736_add_cached_tag_list_to_elements_pages_and_users.rb +0 -7
  208. data/spec/dummy/db/migrate/20121116140636_add_cached_tag_list_to_alchemy_attachments.rb +0 -5
  209. data/spec/dummy/db/migrate/20121116141016_change_alchemy_pictures_tag_list_column.rb +0 -9
@@ -5,9 +5,9 @@
5
5
  <%- if @item.class.to_s == 'Element' -%>
6
6
  $('#element_area .sortable_cell').sortable('refresh');
7
7
  <%- end -%>
8
- Alchemy.growl('<%= escape_javascript t("item moved to clipboard", :name => @item.class.to_s == "Alchemy::Element" ? @item.display_name_with_preview_text : @item.name) -%>');
8
+ Alchemy.growl('<%= escape_javascript _t("item moved to clipboard", :name => @item.class.to_s == "Alchemy::Element" ? @item.display_name_with_preview_text : @item.name) -%>');
9
9
  <%- else -%>
10
- Alchemy.growl('<%= escape_javascript t("item copied to clipboard", :name => @item.class.to_s == "Alchemy::Element" ? @item.display_name_with_preview_text : @item.name) -%>')
10
+ Alchemy.growl('<%= escape_javascript _t("item copied to clipboard", :name => @item.class.to_s == "Alchemy::Element" ? @item.display_name_with_preview_text : @item.name) -%>')
11
11
  <%- end -%>
12
12
  $('#clipboard_button .icon.clipboard').addClass('full');
13
13
 
@@ -1,10 +1,10 @@
1
1
  (function($) {
2
-
2
+
3
3
  $("#clipboard_item_<%= @item.id -%>").remove();
4
- Alchemy.growl('<%= t("item removed from clipboard", :name => @item.class.to_s == "Element" ? @item.display_name_with_preview_text : @item.name) -%>');
4
+ Alchemy.growl('<%= _t("item removed from clipboard", :name => @item.class.to_s == "Element" ? @item.display_name_with_preview_text : @item.name) -%>');
5
5
  <%- if @clipboard.blank? -%>
6
6
  $('#clipboard_button .icon.clipboard').removeClass('full');
7
- $("#clipboard_items").replaceWith("<p><%= t('No items in your clipboard') -%></p>");
7
+ $("#clipboard_items").replaceWith("<p><%= _t('No items in your clipboard') -%></p>");
8
8
  <%- end -%>
9
-
9
+
10
10
  })(jQuery);
@@ -2,9 +2,9 @@
2
2
  <label><%= Alchemy::I18n.t("content_names.#{element.name}.#{name}", :default => ["content_names.#{name}".to_sym, name.capitalize]) %></label>
3
3
  <p>
4
4
  <%= render_icon('warning') %>
5
- <%= t('content_not_found') %>
5
+ <%= _t('content_not_found') %>
6
6
  <%= link_to(
7
- t('create'),
7
+ _t('create'),
8
8
  alchemy.admin_contents_path(
9
9
  :content => {
10
10
  :element_id => element.id,
@@ -18,7 +18,7 @@
18
18
  )
19
19
  ) %>');
20
20
  Alchemy.Buttons.enable();
21
- Alchemy.growl('<%= t("Successfully added content") % {:content => @content.name_for_label} %>')
21
+ Alchemy.growl('<%= _t("Successfully added content") % {:content => @content.name_for_label} %>')
22
22
 
23
23
  <% end %>
24
24
 
@@ -3,17 +3,17 @@
3
3
  <%= f.hidden_field :element_id %>
4
4
  <table>
5
5
  <tr>
6
- <td class="label"><%= f.label :name, t('name') %></td>
6
+ <td class="label"><%= f.label :name, _t('name') %></td>
7
7
  <td class="select">
8
8
  <%= f.select('name', @contents.map { |a|
9
- [t("content_names.#{a['name']}"), a['name']]
9
+ [_t("content_names.#{a['name']}"), a['name']]
10
10
  }, {}, {:class => 'alchemy_selectbox'}) %>
11
11
  </td>
12
12
  </tr>
13
13
  <tr>
14
14
  <td class="submit" colspan="2">
15
15
  <%= hidden_field_tag('options', @options) %>
16
- <%= f.button t(:create), :class => 'button' %>
16
+ <%= f.button _t(:create), :class => 'button' %>
17
17
  </td>
18
18
  </tr>
19
19
  </table>
@@ -2,19 +2,19 @@
2
2
  <div class="with_padding">
3
3
  <h1>
4
4
  <% if @first_time -%>
5
- <%= t('Welcome, %{name}', :name => current_user.firstname.blank? ? current_user.login : current_user.firstname) %>
5
+ <%= _t('Welcome, %{name}', :name => current_user.firstname.blank? ? current_user.login : current_user.firstname) %>
6
6
  <% else -%>
7
- <%= t('Welcome back, %{name}', :name => current_user.firstname.blank? ? current_user.login : current_user.firstname) %>
7
+ <%= _t('Welcome back, %{name}', :name => current_user.firstname.blank? ? current_user.login : current_user.firstname) %>
8
8
  <% end -%>
9
9
  </h1>
10
10
  <p>
11
- <small><%= t('Your last login was on %{time}', :time => l(current_user.last_login_at)) unless current_user.last_login_at.blank? %></small>
11
+ <small><%= _t('Your last login was on %{time}', :time => l(current_user.last_login_at)) unless current_user.last_login_at.blank? %></small>
12
12
  </p>
13
13
  </div>
14
14
  <div class="widget">
15
- <h2><%= t('Your last updated pages') %>:</h2>
15
+ <h2><%= _t('Your last updated pages') %>:</h2>
16
16
  <%- if @last_edited_pages.blank? -%>
17
- <ul><li class="even"><%= t('no pages') %></li></ul>
17
+ <ul><li class="even"><%= _t('no pages') %></li></ul>
18
18
  <%- else -%>
19
19
  <ul>
20
20
  <%- @last_edited_pages.each do |page| -%>
@@ -25,9 +25,9 @@
25
25
  </div>
26
26
  <%- reset_cycle('edited_pages') -%>
27
27
  <div class="widget">
28
- <h2><%= t('Currently locked pages') %>:</h2>
28
+ <h2><%= _t('Currently locked pages') %>:</h2>
29
29
  <%- if @locked_pages.blank? -%>
30
- <ul><li class="even"><%= t('no pages') %></li></ul>
30
+ <ul><li class="even"><%= _t('no pages') %></li></ul>
31
31
  <%- else -%>
32
32
  <ul>
33
33
  <%- @locked_pages.each do |page| -%>
@@ -35,7 +35,7 @@
35
35
  <%- if current_user.id == page.locked_by -%>
36
36
  <%= link_to(page.name, alchemy.edit_admin_page_path(page)) %> <small>(<%= page.locker.name %>)</small>
37
37
  <%= form_tag(alchemy.unlock_admin_page_path(page, :redirect_to => alchemy.admin_dashboard_url)) do %>
38
- <button class="icon_button small" title="<%= t('explain_unlocking') %>">
38
+ <button class="icon_button small" title="<%= _t('explain_unlocking') %>">
39
39
  <%= render_icon('close small') %>
40
40
  </button>
41
41
  <% end %>
@@ -49,9 +49,9 @@
49
49
  </div>
50
50
  <%- reset_cycle('locked_pages') -%>
51
51
  <div class="widget">
52
- <h2><%= t('Who else is online') %>:</h2>
52
+ <h2><%= _t('Who else is online') %>:</h2>
53
53
  <%- if @online_users.blank? -%>
54
- <ul><li class="even"><%= t('no users') %></li></ul>
54
+ <ul><li class="even"><%= _t('no users') %></li></ul>
55
55
  <%- else -%>
56
56
  <ul>
57
57
  <%- @online_users.each do |user| -%>
@@ -63,9 +63,9 @@
63
63
  </div>
64
64
  <div id="sideboard">
65
65
  <%= image_tag("alchemy/alchemy-logo.png", :style => "width: 240px; height: 70px") %>
66
- <p><%= t("Version") %>: <%= @alchemy_version %></p>
66
+ <p><%= _t("Version") %>: <%= @alchemy_version %></p>
67
67
  <div class="sideboard_body" style="display: none">
68
- <p><%= t('Alchemy is open software and itself uses open software and free resources:') %></p>
68
+ <p><%= _t('Alchemy is open software and itself uses open software and free resources:') %></p>
69
69
  <ul>
70
70
  <li>
71
71
  <a href="http://rubyonrails.org" target="_blank">RubyOnRails</a>
@@ -6,7 +6,7 @@
6
6
  :options => options
7
7
  ),
8
8
  {
9
- :title => t('add_image_to_element'),
9
+ :title => _t('add_image_to_element'),
10
10
  :size => '780x580',
11
11
  :resizable => true
12
12
  }
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  <% if element.has_validations? %>
10
10
  <p class="validation_notice">
11
- <span class="validation_indicator">*</span> <%= t('Mandatory') %>
11
+ <span class="validation_indicator">*</span> <%= _t('Mandatory') %>
12
12
  </p>
13
13
  <% end %>
14
14
  <% if element.taggable? %>
@@ -6,7 +6,7 @@
6
6
  alchemy.trash_admin_element_path(element),
7
7
  :method => :delete,
8
8
  :class => "delete_element_button",
9
- :title => t("trash element"),
9
+ :title => _t("trash element"),
10
10
  :remote => true
11
11
  ) -%>
12
12
  <%= link_to(
@@ -15,7 +15,7 @@
15
15
  :remote => true,
16
16
  :method => :post,
17
17
  :class => "element_move_button",
18
- :title => t("cut_element")
18
+ :title => _t("cut_element")
19
19
  ) %>
20
20
  <%= link_to(
21
21
  "",
@@ -23,14 +23,14 @@
23
23
  :remote => true,
24
24
  :method => :post,
25
25
  :class => "element_copy_button",
26
- :title => t("copy_element")
26
+ :title => _t("copy_element")
27
27
  ) %>
28
28
  </span>
29
29
  <span class="element_public">
30
30
  <%= f.check_box :public, :id => "element_#{element.id}_public" -%>
31
- <%= label_tag "element_#{element.id}_public", t("visible") -%>
31
+ <%= label_tag "element_#{element.id}_public", _t("visible") -%>
32
32
  </span>
33
33
  <button type="submit" class="button">
34
- <%= t('save') %>
34
+ <%= _t('save') %>
35
35
  </button>
36
36
  </div>
@@ -1,11 +1,11 @@
1
1
  <div class="element_head">
2
2
  <div class="element_handle">
3
3
  <span class="element_icon"></span>
4
- <%- if element.description.nil? -%>
5
- <span class="warning icon" title="<%= t("Warning: Element '%{elementname}' is missing its description.", :elementname => element.name) %>"></span>
6
- <%- else -%>
4
+ <% if element.description.blank? %>
5
+ <span class="warning icon" title="<%= _t(:element_description_missing) %>"></span>
6
+ <% else %>
7
7
  <%= render_icon("element_#{element.public? ? 'public' : 'draft'}") %>
8
- <%- end -%>
8
+ <% end %>
9
9
  </div>
10
10
  <span class="element_heading">
11
11
  <span class="preview_text_element_name"><%= element.display_name %></span>
@@ -20,9 +20,9 @@
20
20
  :class => "element_folder_spinner"
21
21
  ) %>
22
22
  <%= link_to('', '#', {
23
- :onclick => "Alchemy.toggleElement(#{element.id}, '#{alchemy.fold_admin_element_path(element)}', '#{form_authenticity_token}', {title: '#{t('Warning!')}', message: '#{t(:element_dirty_notice)}', okLabel: '#{t('Yes')}', cancelLabel: '#{t('No')}'})",
23
+ :onclick => "Alchemy.toggleElement(#{element.id}, '#{alchemy.fold_admin_element_path(element)}', '#{form_authenticity_token}', {title: '#{_t('Warning!')}', message: '#{_t(:element_dirty_notice)}', okLabel: '#{_t('Yes')}', cancelLabel: '#{_t('No')}'})",
24
24
  :class => element.folded? ? 'expand_element' : 'fold_element',
25
- :title => element.folded? ? t(:show_element_content) : t(:hide_element_content),
25
+ :title => element.folded? ? _t(:show_element_content) : _t(:hide_element_content),
26
26
  :id => "element_#{element.id}_folder"
27
27
  }) %>
28
28
  </span>
@@ -1,9 +1,9 @@
1
1
  <%= select_tag(
2
2
  "element_from_page_#{@page_id}_to_link",
3
3
  options_for_select(@elements.collect{ |m| [m.display_name_with_preview_text, "##{m.dom_id}"] }),
4
- :prompt => t("choose_element_to_link"),
4
+ :prompt => _t("choose_element_to_link"),
5
5
  :class => "elements_from_page_selector alchemy_selectbox",
6
6
  :onchange => "jQuery('#page_anchor').val(value)",
7
- :title => t("choose_element_as_target"),
7
+ :title => _t("choose_element_as_target"),
8
8
  :autofocus => true
9
9
  ) %>
@@ -2,7 +2,7 @@
2
2
  <%- if @elements.blank? -%>
3
3
  <div class="info with_margin">
4
4
  <%= render_icon('info') %>
5
- <%= t('no_more_elements_to_add') %>
5
+ <%= _t('no_more_elements_to_add') %>
6
6
  </div>
7
7
  <%- else -%>
8
8
  <%= form_for [:admin, @element], :remote => true, :class => "add_element_content" do |form| %>
@@ -10,13 +10,13 @@
10
10
  <table>
11
11
  <tr>
12
12
  <td class="label">
13
- <%= form.label :name, t("element_of_type") %>
13
+ <%= form.label :name, _t("element_of_type") %>
14
14
  </td>
15
15
  <td class="select">
16
16
  <%= form.select(
17
17
  'name',
18
18
  @page.can_have_cells? ? grouped_elements_for_select(@elements) : elements_for_select(@elements),
19
- { :prompt => t('select_element') },
19
+ { :prompt => _t('select_element') },
20
20
  { :class => "alchemy_selectbox", :autofocus => true }
21
21
  ) -%>
22
22
  </td>
@@ -24,7 +24,7 @@
24
24
  <tr>
25
25
  <td colspan="2" class="submit">
26
26
  <%= form.hidden_field 'page_id' %>
27
- <%= form.button t('add'), :class => 'button' %>
27
+ <%= form.button _t('add'), :class => 'button' %>
28
28
  </td>
29
29
  </tr>
30
30
  </table>
@@ -1,6 +1,6 @@
1
1
  <%- max_image_count = options[:maximum_amount_of_images] || options[:max_images] -%>
2
2
  <div class="content_editor picture_gallery_editor">
3
- <label><%= t("picture_gallery_editor.#{element.name}", :default => t('picture_gallery_editor')) %></label>
3
+ <label><%= _t("picture_gallery_editor.#{element.name}", :default => _t('picture_gallery_editor')) %></label>
4
4
  <div class="picture_gallery_images" id="element_<%= element.id %>_contents">
5
5
  <%- pictures.each do |picture| -%>
6
6
  <%= render_essence_editor(picture, {:dragable => (pictures.size > 1)}.merge(options)) %>
@@ -7,7 +7,7 @@ $('.element_editor[data-element-id="<%= @cutted_element_id %>"]').remove();
7
7
  <% end %>
8
8
 
9
9
  <% if @page.can_have_cells? %>
10
- Alchemy.selectOrCreateCellTab('<%= @cell_name -%>', '<%= @cell.nil? ? t("other Elements") : @cell.name_for_label -%>');
10
+ Alchemy.selectOrCreateCellTab('<%= @cell_name -%>', '<%= @cell.nil? ? _t("other Elements") : @cell.name_for_label -%>');
11
11
  <% end %>
12
12
 
13
13
  $element_area = $('#cell_<%= @cell_name -%>');
@@ -24,7 +24,7 @@ if ($element_area.find('.element_editor').length > 0) {
24
24
  $element_area.sortable('refresh');
25
25
  }
26
26
 
27
- Alchemy.growl('<%= t("successfully_added_element") -%>');
27
+ Alchemy.growl('<%= _t("successfully_added_element") -%>');
28
28
  Alchemy.closeCurrentWindow();
29
29
 
30
30
  <% @element.contents.essence_richtexts.each do |content| %>
@@ -2,11 +2,11 @@
2
2
  <% if @cells.any? %>
3
3
  <div id="cells">
4
4
  <ul>
5
- <li><a href="#cell_for_other_elements"><%= t(:main_content) %></a></li>
5
+ <li><a href="#cell_for_other_elements"><%= _t(:main_content) %></a></li>
6
6
  <% @elements.each do |cell, elements| %>
7
7
  <li>
8
8
  <a href="#cell_<%= cell.name %>">
9
- <%= t(cell.name, :scope => :cell_names) %>
9
+ <%= _t(cell.name, :scope => :cell_names) %>
10
10
  </a>
11
11
  </li>
12
12
  <% end %>
@@ -1,6 +1,6 @@
1
1
  (function($) {
2
2
 
3
- var close = $('<a class="close_elements_from_page_selector" title="<%= t(:remove) -%>">–</a>');
3
+ var close = $('<a class="close_elements_from_page_selector" title="<%= _t(:remove) -%>">–</a>');
4
4
  $('#elements_for_page_<%= @page_id -%>').html('<%= escape_javascript(render("elements_select")) %>');
5
5
  $('#elements_for_page_<%= @page_id -%>').append(close);
6
6
 
@@ -3,8 +3,8 @@
3
3
  <%- else -%>
4
4
  <div id="overlay_tabs">
5
5
  <ul>
6
- <li><a href="#create_element_tab"><%= t('New') %></a></li>
7
- <li><a href="#paste_element_tab"><%= t('Paste from clipboard') %></a></li>
6
+ <li><a href="#create_element_tab"><%= _t('New') %></a></li>
7
+ <li><a href="#paste_element_tab"><%= _t('Paste from clipboard') %></a></li>
8
8
  </ul>
9
9
  <div id="create_element_tab">
10
10
  <%= render :partial => 'new_element_form' %>
@@ -15,7 +15,7 @@
15
15
  <table>
16
16
  <tr>
17
17
  <td class="label">
18
- <label for="paste_from_clipboard"><%= t("Element") %></label>
18
+ <label for="paste_from_clipboard"><%= _t("Element") %></label>
19
19
  </td>
20
20
  <td class="select">
21
21
  <%= clipboard_select_tag(@clipboard_items) %>
@@ -24,7 +24,7 @@
24
24
  <tr>
25
25
  <td colspan="2" class="submit">
26
26
  <%= f.hidden_field(:page_id) %>
27
- <%= f.button t("paste"), :class => 'button' %>
27
+ <%= f.button _t("paste"), :class => 'button' %>
28
28
  </td>
29
29
  </tr>
30
30
  </table>
@@ -1,6 +1,6 @@
1
1
  (function($) {
2
2
 
3
- Alchemy.growl('<%= t("successfully_saved_element_position") -%>');
3
+ Alchemy.growl('<%= _t("successfully_saved_element_position") -%>');
4
4
  $('#element_area .ajax_folder').show();
5
5
  Alchemy.PreviewWindow.refresh();
6
6
 
@@ -1,6 +1,6 @@
1
1
  $('#element_<%= @element.id %>').hide(200, function() {
2
2
  $(this).remove();
3
- Alchemy.growl('<%= escape_javascript(t("Element trashed")) %>');
3
+ Alchemy.growl('<%= escape_javascript(_t("Element trashed")) %>');
4
4
  $('#element_area .sortable_cell').sortable('refresh');
5
5
  Alchemy.refreshTrashWindow(<%= @page.id %>);
6
6
  $('#element_trash_button .icon').addClass('full');
@@ -7,7 +7,7 @@ $('.element_heading .preview_text_quote', $el).html('<%= escape_javascript(@elem
7
7
  $('div.content_editor').removeClass('validation_failed');
8
8
  $("#element_<%= @element.id %>_errors").hide();
9
9
  Alchemy.setElementSaved($el);
10
- Alchemy.growl('<%= t("element_saved") %>');
10
+ Alchemy.growl('<%= _t("element_saved") %>');
11
11
  Alchemy.PreviewWindow.refresh();
12
12
 
13
13
  <%=raw update_elements_with_essence_selects(@page, @element) %>
@@ -9,10 +9,10 @@
9
9
  <td class="select">
10
10
  <%= f.select(
11
11
  "css_class", [
12
- [t("Layout default"), ""],
13
- [t("above"), "no_float"],
14
- [t("left"), "left"],
15
- [t("right"), "right"]
12
+ [_t("Layout default"), ""],
13
+ [_t("above"), "no_float"],
14
+ [_t("left"), "left"],
15
+ [_t("right"), "right"]
16
16
  ],
17
17
  :class => 'alchemy_selectbox'
18
18
  ) %>
@@ -20,7 +20,7 @@
20
20
  </tr>
21
21
  <tr>
22
22
  <td colspan="2" class="submit">
23
- <%= f.button t("save"), :class => 'button' %>
23
+ <%= f.button _t("save"), :class => 'button' %>
24
24
  </td>
25
25
  </tr>
26
26
  </table>
@@ -11,21 +11,21 @@
11
11
  <%= f.hidden_field :crop_from %>
12
12
  <%= f.hidden_field :crop_size %>
13
13
  <%= hidden_field_tag 'content_id', @content.id %>
14
- <%= f.button t("save"), :class => 'button' %>
14
+ <%= f.button _t("save"), :class => 'button' %>
15
15
  <% end %>
16
16
  <div class="toolbar_spacer"></div>
17
17
  <div class="button_with_label">
18
18
  <%= link_to(render_icon('delete-small'), '#', {
19
19
  :onclick => 'Alchemy.ImageCropper.reset()',
20
20
  :class => 'icon_button',
21
- :title => t('Reset Imagemask')
21
+ :title => _t('Reset Imagemask')
22
22
  }) %>
23
- <label><%= t("Reset Imagemask") %></label>
23
+ <label><%= _t("Reset Imagemask") %></label>
24
24
  </div>
25
25
  </div>
26
26
 
27
27
  <div id="crop_explain" class="tip">
28
- <%= t('explain cropping') %>
28
+ <%= _t('explain cropping') %>
29
29
  </div>
30
30
 
31
31
  <div id="jscropper">
@@ -30,7 +30,7 @@
30
30
  <%= f.select(
31
31
  "render_size",
32
32
  options_for_select(
33
- [[t('Layout default'), @options[:image_size]]] + @options[:sizes].sort,
33
+ [[_t('Layout default'), @options[:image_size]]] + @options[:sizes].sort,
34
34
  @essence_picture.render_size
35
35
  ), :class => 'alchemy_selectbox'
36
36
  ) %>
@@ -49,7 +49,7 @@
49
49
  <td class="select">
50
50
  <%= f.select(
51
51
  "css_class",
52
- [[t("Layout default"), ""], [t("above"), "no_float"], [t("left"), "left"], [t("right"), "right"]],
52
+ [[_t("Layout default"), ""], [_t("above"), "no_float"], [_t("left"), "left"], [_t("right"), "right"]],
53
53
  {},
54
54
  {:class => 'alchemy_selectbox'}
55
55
  ) %>
@@ -62,7 +62,7 @@
62
62
  <td class="select">
63
63
  <%= f.select(
64
64
  "css_class",
65
- options_for_select([[t('None'), '']] + @options[:css_classes].sort, @essence_picture.css_class),
65
+ options_for_select([[_t('None'), '']] + @options[:css_classes].sort, @essence_picture.css_class),
66
66
  {},
67
67
  {:class => 'alchemy_selectbox'}
68
68
  ) %>
@@ -78,7 +78,7 @@
78
78
  <tr>
79
79
  <td colspan="2" class="submit">
80
80
  <%= hidden_field_tag 'content_id', @content.id %>
81
- <%= f.button t("apply"), :class => 'button' %>
81
+ <%= f.button _t("apply"), :class => 'button' %>
82
82
  </td>
83
83
  </tr>
84
84
  </table>