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
@@ -1,3 +1,3 @@
1
1
  <div>
2
- <p><%= t("page_locked") %></p>
2
+ <p><%= _t("page_states.locked.true") %></p>
3
3
  </div>
@@ -3,8 +3,8 @@
3
3
  <%- else -%>
4
4
  <div id="overlay_tabs">
5
5
  <ul>
6
- <li><a href="#create_page_tab"><%= t('New page') %></a></li>
7
- <li><a href="#paste_page_tab"><%= t('Paste from clipboard') %></a></li>
6
+ <li><a href="#create_page_tab"><%= _t('New page') %></a></li>
7
+ <li><a href="#paste_page_tab"><%= _t('Paste from clipboard') %></a></li>
8
8
  </ul>
9
9
  <div id="errors"></div>
10
10
  <div id="create_page_tab">
@@ -16,7 +16,7 @@
16
16
  <table id="paste_page_form">
17
17
  <tr>
18
18
  <td class="label">
19
- <label for="paste_from_clipboard"><%= t("Page") %></label>
19
+ <label for="paste_from_clipboard"><%= _t("Page") %></label>
20
20
  </td>
21
21
  <td class="select">
22
22
  <%= clipboard_select_tag(@clipboard_items) %>
@@ -33,7 +33,7 @@
33
33
  <tr>
34
34
  <td class="label">&nbsp;</td>
35
35
  <td class="submit">
36
- <%= f.button t("paste"), :class => 'button', :name => nil %>
36
+ <%= f.button _t("paste"), :class => 'button', :name => nil %>
37
37
  </td>
38
38
  </tr>
39
39
  </table>
@@ -4,7 +4,7 @@ Alchemy.growl("<%= @notice -%>");
4
4
 
5
5
  <% if @old_page_layout != @page.page_layout %>
6
6
  Alchemy.ElementsWindow.reload();
7
- Alchemy.growl('<%= t(:page_layout_changed_notice) %>');
7
+ Alchemy.growl('<%= _t(:page_layout_changed_notice) %>');
8
8
  <% end %>
9
9
 
10
10
  <% if @while_page_edit %>
@@ -26,7 +26,7 @@ Alchemy.growl("<%= @notice -%>");
26
26
  <% if @page.restricted? %>
27
27
  $('.page_status:nth-child(3)', $page).addClass('restricted', 'not_restricted').removeClass('not_restricted');
28
28
  <% elsif @page.redirects_to_external? %>
29
- $('span.redirect_url', $page).html('&raquo; <%= t("Redirects to") %>: <%= h @page.urlname %>');
29
+ $('span.redirect_url', $page).html('&raquo; <%= _t("Redirects to") %>: <%= h @page.urlname %>');
30
30
  <% else %>
31
31
  $('.page_status:nth-child(3)', $page).addClass('not_restricted').removeClass('restricted');
32
32
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <div class="autocomplete_tag_list">
2
- <%= f.label :tag_list, render_icon(:tag_label), :for => "autocomplete_tag_list_#{object.id}", :title => t(:tag_list) %>
2
+ <%= f.label :tag_list, render_icon(:tag_label), :for => "autocomplete_tag_list_#{object.id}", :title => _t(:tag_list) %>
3
3
  <%= f.autocomplete_field(
4
4
  :tag_list,
5
5
  alchemy.autocomplete_admin_tags_path,
@@ -1,5 +1,5 @@
1
1
  <div id="flash_notices" style="display: <%= flash.keys.blank? ? "none" : "block" %>">
2
- <%- flash.keys.each do |flash_type| -%>
3
- <%= render :partial => 'alchemy/admin/partials/flash', :locals => {:flash_type => flash_type, :message => flash[flash_type.to_sym]} %>
4
- <%- end -%>
2
+ <% flash.keys.each do |flash_type| %>
3
+ <%= render_flash_notice(flash[flash_type.to_sym], flash_type) if flash[flash_type.to_sym].present? %>
4
+ <% end %>
5
5
  </div>
@@ -2,36 +2,36 @@
2
2
  <div id="spanButtonPlaceHolder">
3
3
  <p>
4
4
  <%= image_tag('alchemy/ajax_loader.gif', :style => 'width: 16px; height: 16px; top: 3px; position: relative') %>
5
- <%= t('Please wait. Flash® is loading...') %>
5
+ <%= _t('Please wait. Flash® is loading...') %>
6
6
  </p>
7
7
  </div>
8
8
  <a href="#" class="button no-spinner" onclick="swfu.cancelQueue(); return false" style="display: none">
9
- <%= t("swfupload.cancel_uploads") %>
9
+ <%= _t("swfupload.cancel_uploads") %>
10
10
  </a>
11
11
  <p style="margin-top: 8px" id="choose_alternative_uploader">
12
12
  <small>
13
- <%= raw t('If you have any problems using the Flash uploader you can switch to', :link => t('<a href="#" id="uploadswitcher">%{value}</a>', :value => t('regular method'))) %>
13
+ <%= raw _t('If you have any problems using the Flash uploader you can switch to', :link => _t('<a href="#" id="uploadswitcher">%{value}</a>', :value => _t('regular method'))) %>
14
14
  </small>
15
15
  </p>
16
16
  </div>
17
17
 
18
- <h2 id="swfUploadFlashError" style="display: none"><%= t('Could not load Adobe Flash® Plugin!') %></h2>
18
+ <h2 id="swfUploadFlashError" style="display: none"><%= _t('Could not load Adobe Flash® Plugin!') %></h2>
19
19
 
20
20
  <div id="alternativeUpload" style="display: none">
21
21
  <h2 id="flash_upload_error_explanation" style="display: none">
22
- <%= t('Error with the Flash® Uploader!') %>
22
+ <%= _t('Error with the Flash® Uploader!') %>
23
23
  </h2>
24
- <p><%= t('use_alternative_uploader_instead') %></p>
24
+ <p><%= _t('use_alternative_uploader_instead') %></p>
25
25
  <p>
26
26
  <%= file_field_tag('Filedata') %>
27
27
  </p>
28
28
  <p>
29
- <%= submit_tag t('upload'), :class => 'button' %>
29
+ <%= submit_tag _t('upload'), :class => 'button' %>
30
30
  </p>
31
31
  <p>
32
32
  <small>
33
33
  <a href="#" id="switch_to_flash_uploader" class="underline">
34
- <%= t('Switch to Flash® Uploader') %>
34
+ <%= _t('Switch to Flash® Uploader') %>
35
35
  </a>
36
36
  </small>
37
37
  </p>
@@ -5,7 +5,7 @@
5
5
  :id => 'language_tree_select',
6
6
  :class => 'alchemy_selectbox short'
7
7
  ) %>
8
- <label><%= t("Language tree") %></label>
8
+ <label><%= _t("Language tree") %></label>
9
9
  </div>
10
10
 
11
11
  <% content_for :javascripts do %>
@@ -8,7 +8,7 @@
8
8
  <%- else -%>
9
9
  <span class="module icon"></span>
10
10
  <%- end -%>
11
- <label><%= truncate t(navigation["name"]), :length => 10 -%></label>
11
+ <label><%= truncate _t(navigation["name"]), :length => 10 -%></label>
12
12
  <% end %>
13
13
 
14
14
  <%- end -%>
@@ -30,9 +30,9 @@
30
30
  :remote => true,
31
31
  :class => "search_field_clear",
32
32
  :id => "search_field_clear",
33
- :title => t("click_to_show_all"),
33
+ :title => _t("click_to_show_all"),
34
34
  :style => (params[:query].nil? ? "display: none" : "display: block")
35
35
  ) %>
36
36
  </div>
37
- <%= submit_tag t('search'), :name => nil, :class => 'button' %>
37
+ <%= submit_tag _t('search'), :name => nil, :class => 'button' %>
38
38
  <% end %>
@@ -14,9 +14,9 @@
14
14
  url,
15
15
  :class => "search_field_clear",
16
16
  :id => "search_field_clear",
17
- :title => t("click_to_show_all"),
17
+ :title => _t("click_to_show_all"),
18
18
  :style => (params[:query].nil? ? "display: none" : "display: block")
19
19
  ) %>
20
20
  </div>
21
- <label><%= t('search') %></label>
21
+ <label><%= _t('search') %></label>
22
22
  <% end %>
@@ -2,7 +2,7 @@
2
2
  <% entry.stringify_keys! %>
3
3
  <% permitted_to?(*navigate_module(entry)) do %>
4
4
  <div class="subnavi_tab<%= admin_sub_navigation_entry_active?(entry) ? ' active' : nil %>">
5
- <%= link_to t(entry["name"]), url_for_module_sub_navigation(entry) %>
5
+ <%= link_to _t(entry["name"]), url_for_module_sub_navigation(entry) %>
6
6
  </div>
7
7
  <% end %>
8
8
  <% end %>
@@ -1,29 +1,29 @@
1
1
  <div class="info">
2
2
  <%= render_icon('info') %>
3
- <p><%= t('explain_upload.intro', :name => item_type) %>:</p>
3
+ <p><%= _t('explain_upload.intro', :name => item_type) %>:</p>
4
4
  <ol>
5
- <li><%= t('explain_upload.step1', :name => item_type) %></li>
6
- <li><%= t('explain_upload.step2', :name => item_type) %>*</li>
7
- <li id="explain_step3"><%= t('explain_upload.step3') %></li>
8
- <li id="explain_drag_n_drop"><%= t('explain_upload.dragndrop', :name => item_type) %></li>
5
+ <li><%= _t('explain_upload.step1', :name => item_type) %></li>
6
+ <li><%= _t('explain_upload.step2', :name => item_type) %>*</li>
7
+ <li id="explain_step3"><%= _t('explain_upload.step3') %></li>
8
+ <li id="explain_drag_n_drop"><%= _t('explain_upload.dragndrop', :name => item_type) %></li>
9
9
  </ol>
10
10
  <%- unless file_types.first == '*' -%>
11
- <p><%= t('You may upload files with following extensions', :file_types_description => file_types_description, :file_types => file_types.to_sentence) %>.</p>
11
+ <p><%= _t('You may upload files with following extensions', :file_types_description => file_types_description, :file_types => file_types.to_sentence) %>.</p>
12
12
  <%- end -%>
13
- <small>*<%= t('explain_upload.footnote', :name => item_type) %></small>
13
+ <small>*<%= _t('explain_upload.footnote', :name => item_type) %></small>
14
14
  </div>
15
15
 
16
16
  <%= render 'alchemy/admin/partials/flash_upload' %>
17
17
 
18
18
  <div class="browse">
19
- <%= label_tag :multiple, t('browse'), :style => 'display:none;' %>
20
- <input name="Filedata" id="multiple" type="file" multiple value="<%= t('browse') %>">
19
+ <%= label_tag :multiple, _t('browse'), :style => 'display:none;' %>
20
+ <input name="Filedata" id="multiple" type="file" multiple value="<%= _t('browse') %>">
21
21
  <a href="#" class="button no-spinner" id="cancelHTML5Queue" style="display: none">
22
- <%= t("swfupload.cancel_uploads") %>
22
+ <%= _t("swfupload.cancel_uploads") %>
23
23
  </a>
24
24
  </div>
25
25
 
26
- <div id="dropbox"><%= t('Or drag files over here') %></div>
26
+ <div id="dropbox"><%= _t('Or drag files over here') %></div>
27
27
 
28
28
  <div class="flash notice" style="display: none; margin: 8px 0" id="upload_info_container">
29
29
  <%= render_icon('tick') %>
@@ -6,24 +6,24 @@
6
6
  </div>
7
7
  <%= form_tag delete_multiple_admin_pictures_path, :method => :delete do %>
8
8
  <div class="selected_item_tools">
9
- <h2><%= t("edit_selected_pictures") %></h2>
9
+ <h2><%= _t("edit_selected_pictures") %></h2>
10
10
  <%= link_to(
11
- render_icon('edit') + t("Edit"),
11
+ render_icon('edit') + _t("Edit"),
12
12
  edit_multiple_admin_pictures_path,
13
13
  :class => 'button with_icon',
14
- :title => t('Edit multiple pictures'),
14
+ :title => _t('Edit multiple pictures'),
15
15
  :id => 'edit_multiple_pictures',
16
16
  :style => 'float: none'
17
17
  ) %>
18
- <%= button_tag render_icon('destroy') + t("Delete"), 'data-alchemy-confirm' => {
19
- :title => t("please_confirm"),
20
- :message => t("confirm_to_delete_images_from_server"),
21
- :okLabel => t("Yes"),
22
- :cancelLabel => t("No")
18
+ <%= button_tag render_icon('destroy') + _t("Delete"), 'data-alchemy-confirm' => {
19
+ :title => _t("please_confirm"),
20
+ :message => _t("confirm_to_delete_images_from_server"),
21
+ :okLabel => _t("Yes"),
22
+ :cancelLabel => _t("No")
23
23
  }.to_json, :class => 'button with_icon' %>
24
- &nbsp;<%= t('or') %>&nbsp;
24
+ &nbsp;<%= _t('or') %>&nbsp;
25
25
  <%= link_to(
26
- render_icon('delete-small') + t("Clear selection"),
26
+ render_icon('delete-small') + _t("Clear selection"),
27
27
  admin_pictures_path(
28
28
  :query => params[:query],
29
29
  :tagged_with => params[:tagged_with],
@@ -34,17 +34,17 @@
34
34
  :style => 'float: none'
35
35
  ) %>
36
36
  </div>
37
- <%= content_tag :h3, t("picture_library.filter.#{params[:filter]}") if params[:filter].present? %>
37
+ <%= content_tag :h3, _t("picture_library.filter.#{params[:filter]}") if params[:filter].present? %>
38
38
  <div id="pictures">
39
39
  <% if @pictures.blank? and @recent_pictures.blank? and params[:query].nil? %>
40
40
  <div class="info">
41
41
  <%= render_icon('info') %>
42
- <%= t("no_images_in_archive") %>
42
+ <%= _t("no_images_in_archive") %>
43
43
  </div>
44
44
  <% elsif @pictures.blank? and @recent_pictures.blank? %>
45
45
  <div class="info">
46
46
  <%= render_icon('info') %>
47
- <%= t("no_search_results") %>
47
+ <%= _t("no_search_results") %>
48
48
  </div>
49
49
  <% else %>
50
50
  <%= render :partial => 'picture', :collection => @pictures %>
@@ -11,7 +11,7 @@
11
11
  :options => @options
12
12
  }),
13
13
  :remote => true,
14
- :title => t("small_thumbnails"),
14
+ :title => _t("small_thumbnails"),
15
15
  :class => "icon_button"
16
16
  ) %>
17
17
  <%= link_to(
@@ -25,7 +25,7 @@
25
25
  :options => @options
26
26
  }),
27
27
  :remote => true,
28
- :title => t("medium_thumbnails"),
28
+ :title => _t("medium_thumbnails"),
29
29
  :class => "icon_button"
30
30
  ) %>
31
31
  <%= link_to(
@@ -39,10 +39,10 @@
39
39
  :options => @options
40
40
  }),
41
41
  :remote => true,
42
- :title => t("big_thumbnails"),
42
+ :title => _t("big_thumbnails"),
43
43
  :class => "icon_button"
44
44
  ) %>
45
- <label><%= t('Image size') %></label>
45
+ <label><%= _t('Image size') %></label>
46
46
  <%= hidden_field_tag('size', @size, :id => 'overlay_thumbnails_size') %>
47
47
  </div>
48
48
  <div class="toolbar_spacer"></div>
@@ -59,14 +59,14 @@
59
59
  ),
60
60
  {
61
61
  :size => "540x550",
62
- :title => t('upload_image')
62
+ :title => _t('upload_image')
63
63
  },
64
64
  {
65
65
  :class => 'icon_button',
66
- :title => t('upload_image')
66
+ :title => _t('upload_image')
67
67
  }
68
68
  ) %>
69
- <label><%= t('upload_image') %></label>
69
+ <label><%= _t('upload_image') %></label>
70
70
  </div>
71
71
  <%= render :partial => 'alchemy/admin/partials/remote_search_form' %>
72
72
  </div>
@@ -1,13 +1,13 @@
1
1
  <% params_to_keep = [:size, :tagged_with, :query, :element_id, :content_id, :_] %>
2
2
 
3
3
  <div id="filter_bar">
4
- <h2><%= t('Filter') %></h2>
4
+ <h2><%= _t('Filter') %></h2>
5
5
  <%= select_tag(
6
6
  'picture_filter',
7
7
  options_for_select([
8
- [t("all_pictures"), ''],
9
- [t("last_upload_only"), 'last_upload'],
10
- [t("recently_uploaded_only"), 'recent']
8
+ [_t("all_pictures"), ''],
9
+ [_t("last_upload_only"), 'last_upload'],
10
+ [_t("recently_uploaded_only"), 'recent']
11
11
  ], params[:filter]),
12
12
  :data => { :remote => !!request.xhr? },
13
13
  :class => 'alchemy_selectbox'
@@ -1,7 +1,7 @@
1
1
  <% if @pictures.empty? %>
2
2
  <div class="info">
3
3
  <%= render_icon('info') %>
4
- <%= t("no_images_in_archive") %>
4
+ <%= _t("no_images_in_archive") %>
5
5
  </div>
6
6
  <% else %>
7
7
  <%= render :partial => "picture_to_assign", :collection => @pictures, :locals => {:options => @options, :size => @size} %>
@@ -6,7 +6,7 @@
6
6
  <span class="picture_tool delete">
7
7
  <%= link_to_confirmation_window(
8
8
  "",
9
- t("confirm_to_delete_image_from_server"),
9
+ _t("confirm_to_delete_image_from_server"),
10
10
  alchemy.admin_picture_path(
11
11
  :id => picture,
12
12
  :query => params[:query],
@@ -16,7 +16,7 @@
16
16
  :filter => params[:filter]
17
17
  ),
18
18
  {
19
- :title => t('Delete image')
19
+ :title => _t('Delete image')
20
20
  }
21
21
  ) -%>
22
22
  </span>
@@ -34,11 +34,11 @@
34
34
  :filter => params[:filter]
35
35
  ),
36
36
  {
37
- :title => t('Edit image'),
37
+ :title => _t('Edit image'),
38
38
  :size => "400x180"
39
39
  },
40
40
  {
41
- :title => t('Edit image')
41
+ :title => _t('Edit image')
42
42
  }
43
43
  ) -%>
44
44
  </span>
@@ -56,11 +56,11 @@
56
56
  :filter => params[:filter]
57
57
  ),
58
58
  {
59
- :title => t('Picture infos'),
59
+ :title => _t('Picture infos'),
60
60
  :size => "400x300"
61
61
  },
62
62
  {
63
- :title => t('Show picture infos')
63
+ :title => _t('Show picture infos')
64
64
  }
65
65
  ) -%>
66
66
  </span>
@@ -72,7 +72,7 @@
72
72
  image_tag(
73
73
  alchemy.thumbnail_path(:id => picture, :size => @size, :sh => picture.security_token(:size => @size)),
74
74
  :alt => picture.name,
75
- :title => t('zoom_image'),
75
+ :title => _t('zoom_image'),
76
76
  :onload => "Alchemy.fadeImage(this, '#picture_#{picture.id} .image_spinner');",
77
77
  :style => "display: none;"
78
78
  ),
@@ -24,7 +24,7 @@
24
24
  :remote => true,
25
25
  :onclick => '$(self).attr("href", "#").off("click")',
26
26
  :method => action_method,
27
- :title => t("assign_image"),
27
+ :title => _t("assign_image"),
28
28
  :class => 'thumbnail_background'
29
29
  ) %>
30
30
  <div class="picture_name" title="<%= picture_to_assign.name %>">
@@ -1,5 +1,5 @@
1
1
  <% p = params.dup %>
2
- <h2><%= t("Filter by tag") %></h2>
2
+ <h2><%= _t("Filter by tag") %></h2>
3
3
  <%#= js_filter_field :onkeyup => "Alchemy.ListFilter('#tag_list li')", :id => 'tag_list_filter' %>
4
4
  <ul>
5
5
  <% Alchemy::Picture.tag_counts.each do |t| %>
@@ -21,7 +21,7 @@
21
21
  </ul>
22
22
  <% if p[:tagged_with].present? %>
23
23
  <%= link_to(
24
- render_icon('delete-small') + t('Remove tag filter'),
24
+ render_icon('delete-small') + _t('Remove tag filter'),
25
25
  url_for(p.delete_if { |k, v| k == "tagged_with" }.merge(:action => :index)),
26
26
  :remote => request.xhr?,
27
27
  :class => 'button small with_icon please_wait'
@@ -14,13 +14,13 @@
14
14
  <td class="label"><%= f.label :tag_list %>*</td>
15
15
  <td class="input">
16
16
  <%= render 'alchemy/admin/partials/autocomplete_tag_list', :f => f, :object => @picture %>
17
+ <p class="foot_note"><%= _t('Please seperate the tags with commata') %></p>
17
18
  </td>
18
19
  </tr>
19
20
  <tr>
20
21
  <td class="submit" colspan="2">
21
- <%= f.button t(:save), :name => nil, :class => 'button' %>
22
+ <%= f.button _t(:save), :name => nil, :class => 'button' %>
22
23
  </td>
23
24
  </tr>
24
25
  </table>
25
- <p class="foot_note"><%= t('Please seperate the tags with commata') %></p>
26
26
  <% end %>