alchemy_cms 2.1.beta6 → 2.1.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. data/.gitignore +3 -1
  2. data/Gemfile +10 -2
  3. data/Guardfile +16 -0
  4. data/README.md +3 -3
  5. data/Rakefile +0 -5
  6. data/alchemy_cms.gemspec +1 -9
  7. data/app/assets/javascripts/alchemy/alchemy.base.js +5 -4
  8. data/app/assets/javascripts/alchemy/{alchemy.dragndrop.js.erb → alchemy.dragndrop.js} +0 -0
  9. data/app/assets/javascripts/alchemy/alchemy.elements_window.js +96 -0
  10. data/app/assets/javascripts/alchemy/alchemy.image_cropper.js +48 -50
  11. data/app/assets/javascripts/alchemy/alchemy.jquery_loader.js +41 -0
  12. data/app/assets/javascripts/alchemy/alchemy.js +2 -0
  13. data/app/assets/javascripts/alchemy/alchemy.menubar.js +55 -0
  14. data/app/assets/javascripts/alchemy/alchemy.preview.js +94 -139
  15. data/app/assets/javascripts/alchemy/alchemy.preview_window.js +98 -0
  16. data/app/assets/javascripts/alchemy/alchemy.windows.js +1 -174
  17. data/app/assets/javascripts/alchemy/menubar.js +2 -0
  18. data/app/assets/javascripts/alchemy/preview.js +2 -1
  19. data/app/assets/stylesheets/alchemy/_defaults.scss +7 -8
  20. data/app/assets/stylesheets/alchemy/base.css.scss +29 -33
  21. data/app/assets/stylesheets/alchemy/elements.css.scss +4 -4
  22. data/app/assets/stylesheets/alchemy/jquery-ui.alchemy.css.scss +1 -1
  23. data/app/assets/stylesheets/alchemy/jquery.Jcrop.css.scss +1 -1
  24. data/app/assets/stylesheets/alchemy/jquery.sb.css.scss +19 -4
  25. data/app/assets/stylesheets/alchemy/menubar.css.scss +85 -0
  26. data/app/assets/stylesheets/alchemy/standard_set.css +3 -5
  27. data/app/assets/stylesheets/alchemy/tinymce_content.css.scss +1 -1
  28. data/app/assets/stylesheets/alchemy/tinymce_dialog.css.scss +1 -1
  29. data/app/controllers/alchemy/admin/attachments_controller.rb +2 -18
  30. data/app/controllers/alchemy/admin/base_controller.rb +1 -1
  31. data/app/controllers/alchemy/admin/elements_controller.rb +2 -2
  32. data/app/controllers/alchemy/admin/essence_files_controller.rb +4 -2
  33. data/app/controllers/alchemy/admin/pictures_controller.rb +6 -20
  34. data/app/controllers/alchemy/admin/resources_controller.rb +7 -5
  35. data/app/controllers/alchemy/base_controller.rb +14 -4
  36. data/app/controllers/alchemy/messages_controller.rb +4 -4
  37. data/app/controllers/alchemy/pages_controller.rb +51 -32
  38. data/app/controllers/alchemy/pictures_controller.rb +0 -3
  39. data/app/controllers/alchemy/user_sessions_controller.rb +1 -1
  40. data/app/helpers/alchemy/admin/base_helper.rb +6 -4
  41. data/app/helpers/alchemy/base_helper.rb +26 -0
  42. data/app/helpers/alchemy/pages_helper.rb +42 -22
  43. data/app/models/alchemy/attachment.rb +10 -2
  44. data/app/models/alchemy/cell.rb +1 -0
  45. data/app/models/alchemy/content.rb +8 -6
  46. data/app/models/alchemy/element.rb +1 -1
  47. data/app/models/alchemy/essence_audio.rb +1 -8
  48. data/app/models/alchemy/essence_date.rb +2 -9
  49. data/app/models/alchemy/essence_file.rb +1 -8
  50. data/app/models/alchemy/essence_flash.rb +0 -7
  51. data/app/models/alchemy/essence_html.rb +1 -8
  52. data/app/models/alchemy/essence_picture.rb +0 -11
  53. data/app/models/alchemy/essence_richtext.rb +4 -12
  54. data/app/models/alchemy/essence_text.rb +1 -13
  55. data/app/models/alchemy/essence_video.rb +1 -8
  56. data/app/models/alchemy/page.rb +28 -22
  57. data/app/models/alchemy/picture.rb +19 -0
  58. data/app/sweepers/alchemy/pages_sweeper.rb +17 -6
  59. data/app/sweepers/alchemy/pictures_sweeper.rb +1 -3
  60. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +2 -2
  61. data/app/views/alchemy/admin/attachments/_attachment.html.erb +1 -1
  62. data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +2 -2
  63. data/app/views/alchemy/admin/attachments/_files_list.html.erb +13 -11
  64. data/app/views/alchemy/admin/attachments/create.js.erb +1 -1
  65. data/app/views/alchemy/admin/attachments/edit.html.erb +2 -2
  66. data/app/views/alchemy/admin/elements/_new_element_form.html.erb +1 -2
  67. data/app/views/alchemy/admin/elements/new.html.erb +1 -1
  68. data/app/views/alchemy/admin/essence_files/edit.html.erb +32 -32
  69. data/app/views/alchemy/admin/essence_pictures/crop.html.erb +29 -29
  70. data/app/views/alchemy/admin/essence_pictures/update.js.erb +13 -12
  71. data/app/views/alchemy/admin/pages/_create_language_form.html.erb +4 -1
  72. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
  73. data/app/views/alchemy/admin/pages/edit.html.erb +8 -8
  74. data/app/views/alchemy/admin/pages/index.html.erb +1 -1
  75. data/app/views/alchemy/admin/pages/new.html.erb +1 -1
  76. data/app/views/alchemy/admin/pages/update.js.erb +19 -12
  77. data/app/views/alchemy/admin/pictures/_picture.html.erb +1 -1
  78. data/app/views/alchemy/admin/pictures/_pictures_list.html.erb +8 -6
  79. data/app/views/alchemy/admin/pictures/show_in_window.html.erb +6 -1
  80. data/app/views/alchemy/admin/resources/_table.html.erb +1 -1
  81. data/app/views/alchemy/admin/users/_table.html.erb +13 -13
  82. data/app/views/alchemy/admin/users/_user.html.erb +1 -1
  83. data/app/views/alchemy/admin/users/index.html.erb +2 -2
  84. data/app/views/alchemy/elements/_contactform_view.html.erb +78 -78
  85. data/app/views/alchemy/elements/_download_editor.html.erb +1 -0
  86. data/app/views/alchemy/elements/_download_view.html.erb +3 -0
  87. data/app/views/alchemy/essences/_essence_date_editor.html.erb +1 -1
  88. data/app/views/alchemy/essences/_essence_file_editor.html.erb +1 -0
  89. data/app/views/alchemy/essences/_essence_file_view.html.erb +6 -2
  90. data/app/views/alchemy/essences/_essence_picture_editor.html.erb +3 -2
  91. data/app/views/alchemy/essences/_essence_picture_view.html.erb +1 -1
  92. data/app/views/alchemy/navigation/_link.html.erb +1 -2
  93. data/app/views/alchemy/notifications/admin_user_created.text.erb +7 -7
  94. data/app/views/alchemy/notifications/registered_user_created.text.erb +5 -5
  95. data/app/views/alchemy/user_sessions/login.html.erb +34 -35
  96. data/app/views/layouts/alchemy/login.html.erb +3 -8
  97. data/app/views/layouts/alchemy/pages.html.erb +1 -0
  98. data/bin/alchemy +43 -75
  99. data/config/alchemy/config.yml +10 -0
  100. data/config/alchemy/elements.yml +5 -0
  101. data/config/alchemy/page_layouts.yml +1 -1
  102. data/config/locales/alchemy.de.yml +21 -8
  103. data/config/locales/alchemy.en.yml +20 -4
  104. data/config/routes.rb +25 -20
  105. data/db/migrate/{20111116125112_namespace_models.rb → 20111116125112_namespace_alchemy_models.rb} +1 -1
  106. data/lib/alchemy/capistrano.rb +4 -17
  107. data/lib/alchemy/engine.rb +2 -0
  108. data/lib/alchemy/essence.rb +29 -41
  109. data/lib/alchemy/i18n.rb +1 -1
  110. data/lib/alchemy/mount_point.rb +10 -0
  111. data/lib/alchemy/page_layout.rb +7 -7
  112. data/lib/alchemy/seeder.rb +85 -47
  113. data/lib/alchemy/upgrader.rb +115 -0
  114. data/lib/alchemy/version.rb +1 -1
  115. data/lib/alchemy_cms.rb +4 -3
  116. data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +6 -2
  117. data/lib/tasks/ferret.rake +12 -0
  118. data/lib/tasks/install.rake +16 -105
  119. data/lib/tasks/routes.rake +29 -0
  120. data/lib/tasks/upgrade.rake +5 -67
  121. data/spec/controllers/admin/pages_controller_spec.rb +1 -1
  122. data/spec/controllers/pages_controller_spec.rb +31 -0
  123. data/spec/factories.rb +24 -15
  124. data/spec/helpers/admin/base_helper_spec.rb +0 -7
  125. data/spec/helpers/pages_helper_spec.rb +54 -29
  126. data/spec/helpers/url_helpers_spec.rb +40 -0
  127. data/spec/integration/admin/pages_controller_spec.rb +3 -3
  128. data/spec/integration/pages_controller_spec.rb +80 -6
  129. data/spec/integration/security_spec.rb +2 -2
  130. data/spec/models/content_spec.rb +24 -0
  131. data/spec/models/page_spec.rb +174 -47
  132. data/spec/models/picture_spec.rb +54 -0
  133. data/spec/page_layout_spec.rb +2 -2
  134. data/spec/routing_spec.rb +205 -1
  135. data/spec/spec_helper.rb +53 -32
  136. metadata +51 -46
  137. data/lib/alchemy/file_utilz.rb +0 -73
@@ -13,8 +13,7 @@
13
13
  <%= form.select(
14
14
  'name',
15
15
  @page.can_have_cells? ? grouped_elements_for_select(@elements) : elements_for_select(@elements),
16
- {:prompt => t('select_element')},
17
- {:class => 'long'}
16
+ {:prompt => t('select_element')}
18
17
  ) -%>
19
18
  </td>
20
19
  </tr>
@@ -18,7 +18,7 @@
18
18
  <label for="paste_from_clipboard"><%= t("Element") %></label>
19
19
  </td>
20
20
  <td class="select">
21
- <%= clipboard_select_tag(@clipboard_items, :class => 'long') %>
21
+ <%= clipboard_select_tag(@clipboard_items) %>
22
22
  </td>
23
23
  </tr>
24
24
  <tr>
@@ -2,15 +2,15 @@
2
2
  <%- if @content.essence_type == "Alchemy::EssenceFile" -%>
3
3
  <table>
4
4
  <tr>
5
- <td class="label long"><%= f.label "title" %></td>
6
- <td><%= f.text_field "title", :class => 'thin_border long' %></td>
5
+ <td class="label"><%= f.label "title" %></td>
6
+ <td class="input"><%= f.text_field "title", :class => 'thin_border' %></td>
7
7
  </tr>
8
8
  <tr>
9
- <td><%= f.label "css_class" %></td>
10
- <td><%= f.select "css_class", [[t("Layout default"), ""], [t("above"), "no_float"], [t("left"), "left"], [t("right"), "right"]] %></td>
9
+ <td class="label"><%= f.label "css_class" %></td>
10
+ <td class="select"><%= f.select "css_class", [[t("Layout default"), ""], [t("above"), "no_float"], [t("left"), "left"], [t("right"), "right"]], {}, :class => 'long' %></td>
11
11
  </tr>
12
12
  <tr>
13
- <td colspan="2" style="text-align:right">
13
+ <td colspan="2" class="submit">
14
14
  <%= f.button t("save"), :class => 'button' %>
15
15
  </td>
16
16
  </tr>
@@ -18,19 +18,19 @@
18
18
  <%- elsif @content.essence_type == "Alchemy::EssenceFlash" -%>
19
19
  <table>
20
20
  <tr>
21
- <td class="label long"><%= f.label "width" %></td>
22
- <td><%= f.text_field "width", :class => 'thin_border long' %></td>
21
+ <td class="label"><%= f.label "width" %></td>
22
+ <td class="input"><%= f.text_field "width", :class => 'thin_border' %></td>
23
23
  </tr>
24
24
  <tr>
25
- <td><%= f.label "height" %></td>
26
- <td><%= f.text_field "height", :class => 'thin_border long' %></td>
25
+ <td class="label"><%= f.label "height" %></td>
26
+ <td class="input"><%= f.text_field "height", :class => 'thin_border' %></td>
27
27
  </tr>
28
28
  <tr>
29
- <td><%= f.label "player_version" %></td>
30
- <td><%= f.text_field "player_version", :class => 'thin_border long' %></td>
29
+ <td class="label"><%= f.label "player_version" %></td>
30
+ <td class="input"><%= f.text_field "player_version", :class => 'thin_border' %></td>
31
31
  </tr>
32
32
  <tr>
33
- <td colspan="2" style="text-align:right">
33
+ <td colspan="2" class="submit">
34
34
  <%= f.button t("save"), :class => 'button' %>
35
35
  </td>
36
36
  </tr>
@@ -38,27 +38,27 @@
38
38
  <%- elsif @content.essence_type == "Alchemy::EssenceVideo" -%>
39
39
  <table>
40
40
  <tr>
41
- <td class="label long"><%= f.label "width" %></td>
42
- <td><%= f.text_field "width", :class => 'thin_border long' %></td>
41
+ <td class="label"><%= f.label "width" %></td>
42
+ <td class="input"><%= f.text_field "width", :class => 'thin_border' %></td>
43
43
  </tr>
44
44
  <tr>
45
- <td><%= f.label "height" %></td>
46
- <td><%= f.text_field "height", :class => 'thin_border long' %></td>
45
+ <td class="label"><%= f.label "height" %></td>
46
+ <td class="input"><%= f.text_field "height", :class => 'thin_border' %></td>
47
47
  </tr>
48
48
  <tr>
49
- <td><%= f.label "allow_fullscreen" %></td>
50
- <td><%= f.check_box "allow_fullscreen" %></td>
49
+ <td class="label"><%= f.label "allow_fullscreen" %></td>
50
+ <td class="checkbox"><%= f.check_box "allow_fullscreen" %></td>
51
51
  </tr>
52
52
  <tr>
53
- <td><%= f.label "auto_play" %></td>
54
- <td><%= f.check_box "auto_play" %></td>
53
+ <td class="label"><%= f.label "auto_play" %></td>
54
+ <td class="checkbox"><%= f.check_box "auto_play" %></td>
55
55
  </tr>
56
56
  <tr>
57
- <td><%= f.label "show_navigation" %></td>
58
- <td><%= f.check_box "show_navigation" %></td>
57
+ <td class="label"><%= f.label "show_navigation" %></td>
58
+ <td class="check_box"><%= f.check_box "show_navigation" %></td>
59
59
  </tr>
60
60
  <tr>
61
- <td colspan="2" style="text-align:right">
61
+ <td colspan="2" class="submit">
62
62
  <%= f.button t("save"), :class => 'button' %>
63
63
  </td>
64
64
  </tr>
@@ -66,23 +66,23 @@
66
66
  <%- elsif @content.essence_type == "Alchemy::EssenceAudio" -%>
67
67
  <table>
68
68
  <tr>
69
- <td class="label long"><%= f.label "width" %></td>
70
- <td><%= f.text_field "width", :class => 'thin_border long' %></td>
69
+ <td class="label"><%= f.label "width" %></td>
70
+ <td class="input"><%= f.text_field "width", :class => 'thin_border' %></td>
71
71
  </tr>
72
72
  <tr>
73
- <td><%= f.label "height" %></td>
74
- <td><%= f.text_field "height", :class => 'thin_border long' %></td>
73
+ <td class="label"><%= f.label "height" %></td>
74
+ <td class="input"><%= f.text_field "height", :class => 'thin_border' %></td>
75
75
  </tr>
76
76
  <tr>
77
- <td><%= f.label "show_eq" %></td>
78
- <td><%= f.check_box "show_eq" %></td>
77
+ <td class="label"><%= f.label "show_eq" %></td>
78
+ <td class="checkbox"><%= f.check_box "show_eq" %></td>
79
79
  </tr>
80
80
  <tr>
81
- <td><%= f.label "show_navigation" %></td>
82
- <td><%= f.check_box "show_navigation" %></td>
81
+ <td class="label"><%= f.label "show_navigation" %></td>
82
+ <td class="checkbox"><%= f.check_box "show_navigation" %></td>
83
83
  </tr>
84
84
  <tr>
85
- <td colspan="2" style="text-align:right">
85
+ <td colspan="2" class="submit">
86
86
  <%= f.button t("save"), :class => 'button' %>
87
87
  </td>
88
88
  </tr>
@@ -7,39 +7,39 @@
7
7
  </div>
8
8
  <%- else -%>
9
9
  <div id="overlay_toolbar">
10
- <%= form_for(@essence_picture, :url => alchemy.admin_essence_picture_path(@essence_picture, :options => @options), :id => 'image_cropper_form', :remote => true) do |f| %>
11
- <%= f.hidden_field :crop_from %>
12
- <%= f.hidden_field :crop_size %>
13
- <%= hidden_field_tag 'content_id', @content.id %>
14
- <%= f.button t("save"), :class => 'button' %>
15
- <% end %>
16
- <div class="toolbar_spacer"></div>
17
- <div class="button_with_label">
18
- <%= link_to_function(
19
- render_icon('delete-small'),
20
- 'Alchemy.ImageCropper.reset()',
21
- :class => 'icon_button',
22
- :title => t('Reset Imagemask')
23
- ) %>
24
- <label><%= t("Reset Imagemask") %></label>
25
- </div>
10
+ <%= form_for(@essence_picture, :url => alchemy.admin_essence_picture_path(@essence_picture, :options => @options), :id => 'image_cropper_form', :remote => true) do |f| %>
11
+ <%= f.hidden_field :crop_from %>
12
+ <%= f.hidden_field :crop_size %>
13
+ <%= hidden_field_tag 'content_id', @content.id %>
14
+ <%= f.button t("save"), :class => 'button' %>
15
+ <% end %>
16
+ <div class="toolbar_spacer"></div>
17
+ <div class="button_with_label">
18
+ <%= link_to_function(
19
+ render_icon('delete-small'),
20
+ 'Alchemy.ImageCropper.reset()',
21
+ :class => 'icon_button',
22
+ :title => t('Reset Imagemask')
23
+ ) %>
24
+ <label><%= t("Reset Imagemask") %></label>
25
+ </div>
26
26
  </div>
27
27
 
28
28
  <div id="crop_explain" class="tip">
29
- <%= t('explain cropping') %>
29
+ <%= t('explain cropping') %>
30
30
  </div>
31
31
 
32
32
  <div id="jscropper">
33
- <%= image_tag(
34
- alchemy.zoom_picture_path(@essence_picture.picture, :format => :png),
35
- :id => 'imageToCrop',
36
- :onload => "Alchemy.ImageCropper.init(
37
- [#{@initial_box[:x1]}, #{@initial_box[:y1]}, #{@initial_box[:x2]}, #{@initial_box[:y2]}],
38
- #{@size_x},
39
- #{@size_y},
40
- [#{@default_box[:x1]}, #{@default_box[:y1]}, #{@default_box[:x2]}, #{@default_box[:y2]}],
41
- #{@ratio}
42
- );"
43
- ) %>
33
+ <%= image_tag(
34
+ alchemy.zoom_picture_path(:id => @essence_picture.picture.id, :name => @essence_picture.picture.urlname),
35
+ :id => 'imageToCrop',
36
+ :onload => "Alchemy.ImageCropper.init(
37
+ [#{@initial_box[:x1]}, #{@initial_box[:y1]}, #{@initial_box[:x2]}, #{@initial_box[:y2]}],
38
+ #{@size_x},
39
+ #{@size_y},
40
+ [#{@default_box[:x1]}, #{@default_box[:y1]}, #{@default_box[:x2]}, #{@default_box[:y2]}],
41
+ #{@ratio}
42
+ );"
43
+ ) %>
44
44
  </div>
45
- <%- end -%>
45
+ <%- end -%>
@@ -1,16 +1,17 @@
1
1
  (function($) {
2
-
3
- $('#<%= content_dom_id(@content) -%>').replaceWith('<%= escape_javascript(
4
- render(
5
- :partial => "alchemy/essences/essence_picture_editor",
6
- :locals => {:content => @content, :options => params[:options]}
7
- )
8
- ) -%>');
9
- Alchemy.growl('<%= t("Image updated successfully") -%>');
10
- Alchemy.closeCurrentWindow();
11
- Alchemy.reloadPreview();
2
+
3
+ $('#<%= content_dom_id(@content) -%>').replaceWith('<%= escape_javascript(
4
+ render(
5
+ :partial => "alchemy/essences/essence_picture_editor",
6
+ :locals => {:content => @content, :options => params[:options]}
7
+ )
8
+ ) -%>');
9
+ Alchemy.growl('<%= t("Image updated successfully") -%>');
10
+ Alchemy.ImageCropper.destroy();
11
+ Alchemy.closeCurrentWindow();
12
+ Alchemy.reloadPreview();
12
13
  <%- if @content.element.contents.find_all_by_essence_type("Alchemy::EssencePicture").size > 1 -%>
13
- Alchemy.SortableContents('<%= form_authenticity_token -%>');
14
+ Alchemy.SortableContents('<%= form_authenticity_token -%>');
14
15
  <%- end -%>
15
-
16
+
16
17
  })(jQuery);
@@ -1,4 +1,7 @@
1
- <h1><%= t("language_does_not_exist") %></h1>
1
+ <div class="info">
2
+ <%= render_icon('info') %>
3
+ <%= t("language_does_not_exist") %>
4
+ </div>
2
5
  <%- if @language -%>
3
6
  <%- if @languages_with_page_tree.size >= 1 -%>
4
7
  <p><%= t("want_to_make_copy_of_existing_language") %></p>
@@ -8,7 +8,7 @@
8
8
  <%= f.label :page_layout %>
9
9
  </td>
10
10
  <td class="select">
11
- <%= f.select('page_layout', @page_layouts, {}, :class => 'long') %>
11
+ <%= f.select('page_layout', @page_layouts) %>
12
12
  </td>
13
13
  </tr>
14
14
  <tr>
@@ -67,7 +67,7 @@
67
67
  <div class="button_with_label" id="show_preview_window">
68
68
  <%= link_to_function(
69
69
  render_icon('preview_window'),
70
- "openPreviewWindow()",
70
+ "Alchemy.openPreviewWindow()",
71
71
  {
72
72
  :title => t('Show Preview Window'),
73
73
  :class => 'icon_button'
@@ -78,7 +78,7 @@
78
78
  <div class="button_with_label" id="show_element_window">
79
79
  <%= link_to_function(
80
80
  render_icon('element_window'),
81
- "openElementsWindow()",
81
+ "Alchemy.openElementsWindow()",
82
82
  {
83
83
  :title => t('Show Elements Window'),
84
84
  :class => 'icon_button'
@@ -93,12 +93,12 @@
93
93
  <%= tinymce_javascript_tags %>
94
94
  <script type="text/javascript" charset="utf-8">
95
95
 
96
- function openPreviewWindow() {
97
- Alchemy.openPreviewWindow('<%= admin_page_url(@page) %>', '<%= t("Page Preview") -%>');
96
+ Alchemy.openPreviewWindow = function() {
97
+ Alchemy.PreviewWindow.init('<%= admin_page_url(@page) %>', '<%= t("Page Preview") -%>');
98
98
  }
99
99
 
100
- function openElementsWindow() {
101
- Alchemy.openElementsWindow('<%= alchemy.admin_elements_path(:page_id => @page.id) -%>', {
100
+ Alchemy.openElementsWindow = function() {
101
+ Alchemy.ElementsWindow.init('<%= alchemy.admin_elements_path(:page_id => @page.id) -%>', {
102
102
  texts: {
103
103
  title: '<%= t("Elements") -%>',
104
104
  dirtyTitle: '<%= t("Warning!") -%>',
@@ -173,8 +173,8 @@
173
173
  return Alchemy.checkPageDirtyness(this, texts);
174
174
  });
175
175
  Alchemy.PageLeaveObserver(texts);
176
- openElementsWindow();
177
- openPreviewWindow();
176
+ Alchemy.openElementsWindow();
177
+ Alchemy.openPreviewWindow();
178
178
  });
179
179
 
180
180
  </script>
@@ -74,7 +74,7 @@
74
74
  <div id="bottom_panel" style="display: none">
75
75
  <div class="info">
76
76
  <%= render_icon('info') %>
77
- <%= t('Explain|Sitemap|Dragndrop sorting') %>
77
+ <%= t('explain_sitemap_dragndrop_sorting') %>
78
78
  </div>
79
79
  <div id="bottom_buttons">
80
80
  <%= link_to( t('cancel'), alchemy.admin_pages_path, :class => 'button' ) %>&nbsp;
@@ -19,7 +19,7 @@
19
19
  <label for="paste_from_clipboard"><%= t("Page") %></label>
20
20
  </td>
21
21
  <td class="select">
22
- <%= clipboard_select_tag(@clipboard_items, :class => 'long') %>
22
+ <%= clipboard_select_tag(@clipboard_items) %>
23
23
  </td>
24
24
  </tr>
25
25
  <tr>
@@ -1,33 +1,40 @@
1
1
  (function($) {
2
-
2
+
3
3
  Alchemy.closeCurrentWindow();
4
4
 
5
5
  <%- if @while_page_edit -%>
6
-
6
+
7
7
  Alchemy.reloadPreview();
8
8
  $('#page_<%= @page.id -%>_status').replaceWith('<%= escape_javascript(render(:partial => "page_status")) -%>');
9
-
9
+
10
10
  <%- else -%>
11
11
 
12
12
  $('#page_<%= @page.id -%> > .sitemap_page > .sitemap_sitename .sitemap_pagename_link').text('<%= @page.name -%>');
13
-
13
+
14
14
  <%- if @page.locked? && @page.locker == current_user -%>
15
+
15
16
  $('#locked_page_<%= @page.id -%> > a').text('<%= @page.name -%>');
17
+
16
18
  <%- end -%>
17
-
19
+
18
20
  $('#page_<%= @page.id -%>_infos').html('<%= escape_javascript(render(:partial => "page_infos", :locals => {:page => @page})) -%>');
19
-
21
+
20
22
  <%- if @page.restricted? -%>
21
-
23
+
22
24
  $('#page_<%= @page.id -%> .page_status:nth-child(3)').addClass('restricted', 'not_restricted').removeClass('not_restricted');
23
-
25
+
26
+ <%- elsif @page.redirects_to_external? -%>
27
+
28
+ $('#page_<%= @page.id -%> span.redirect_url').html('&raquo; <%= t("Redirects to") %>: <%= h @page.urlname %>');
29
+
24
30
  <%- else -%>
25
-
31
+
26
32
  $('#page_<%= @page.id -%> .page_status:nth-child(3)').addClass('not_restricted').removeClass('restricted');
33
+
27
34
  <%- end -%>
28
-
35
+
29
36
  <%- end -%>
30
-
37
+
31
38
  Alchemy.growl("<%= @notice -%>");
32
-
39
+
33
40
  })(jQuery);
@@ -27,7 +27,7 @@
27
27
  :onload => "Alchemy.fadeImage(this, '#picture_#{picture.id} .image_spinner');",
28
28
  :style => "display: none;"
29
29
  ),
30
- "Alchemy.zoomImage('/admin/pictures/#{picture.id}/show_in_window', '#{picture.name}', #{picture.image_width || 320}, #{picture.image_height || 240})",
30
+ "Alchemy.zoomImage('#{show_in_window_admin_picture_path(picture.id)}', '#{picture.name}', #{picture.image_width || 320}, #{picture.image_height || 240})",
31
31
  :class => 'thumbnail_background'
32
32
  ) %>
33
33
  <span class="picture_name<%= ' rename' if permitted_to?(:edit, :alchemy_admin_pictures) -%>" title="<%= permitted_to?(:edit, :alchemy_admin_pictures) ? picture.name + ' (' + t('Click to rename') + ')' : picture.name %>" id="image_picture_<%= picture.id %>_name"><%= picture.name %></span>
@@ -1,14 +1,16 @@
1
1
  <%- if @pictures.blank? && params[:query].nil? -%>
2
- <p class="padding_left_right">
2
+ <div class="info">
3
+ <%= render_icon('info') %>
3
4
  <%= t("no_images_in_archive") %>
4
- </p>
5
+ </div>
5
6
  <%- elsif @pictures.blank? -%>
6
- <p class="padding_left_right">
7
+ <div class="info">
8
+ <%= render_icon('info') %>
7
9
  <%= t("no_search_results") %>
8
- </p>
10
+ </div>
9
11
  <%- else -%>
10
12
  <div id="pictures">
11
- <%= render(:partial => 'picture', :collection => @pictures) %>
13
+ <%= render :partial => 'picture', :collection => @pictures %>
14
+ <%= render 'alchemy/admin/partials/pagination_links', :items => @pictures %>
12
15
  </div>
13
- <%= render :partial => 'alchemy/admin/partials/pagination_links', :locals => {:items => @pictures} %>
14
16
  <%- end -%>
@@ -1 +1,6 @@
1
- <%= image_tag(alchemy.zoom_picture_path(@picture, :format => 'png')) %>
1
+ <%= image_tag(
2
+ alchemy.zoom_picture_path(
3
+ :id => @picture.id,
4
+ :name => @picture.urlname
5
+ )
6
+ ) %>
@@ -17,7 +17,7 @@
17
17
  <%= render_resources %>
18
18
  </table>
19
19
  <%- elsif params[:query] -%>
20
- <p><%= t('Nothing found.') %></p>
20
+ <p><%= t('Nothing found') %></p>
21
21
  <%- end -%>
22
22
 
23
23
  <%= render 'alchemy/admin/partials/pagination_links', :items => resources_instance_variable %>
@@ -1,40 +1,40 @@
1
1
  <table>
2
2
  <tr>
3
3
  <td class="label"><%= f.label 'gender' %></td>
4
- <td class="select"><%= f.select 'gender', options_for_select(@user_genders, @user.gender), {:prompt => t('Please choose')}, {:class => 'long'} -%></td>
4
+ <td class="select"><%= f.select 'gender', options_for_select(@user_genders, @user.gender), {:prompt => t('Please choose')} -%></td>
5
5
  </tr>
6
6
  <tr>
7
7
  <td class="label"><%= f.label 'firstname' %></td>
8
- <td class="input"><%= f.text_field 'firstname', :class => 'thin_border' -%></td>
8
+ <td class="input"><%= f.text_field 'firstname', :class => 'thin_border' %></td>
9
9
  </tr>
10
10
  <tr>
11
11
  <td class="label"><%= f.label 'lastname' %></td>
12
- <td class="input"><%= f.text_field 'lastname', :class => 'thin_border' -%></td>
12
+ <td class="input"><%= f.text_field 'lastname', :class => 'thin_border' %></td>
13
13
  </tr>
14
14
  <tr>
15
- <td class="label"><%= f.label 'login' %></td>
16
- <td class="input"><%= f.text_field 'login', :class => 'thin_border' -%></td>
15
+ <td class="label mandatory"><%= f.label 'login' %></td>
16
+ <td class="input"><%= f.text_field 'login', :class => 'thin_border', :required => true %></td>
17
17
  </tr>
18
18
  <tr>
19
- <td class="label"><%= f.label 'email' %></td>
20
- <td class="input"><%= f.text_field 'email', :class => 'thin_border' -%></td>
19
+ <td class="label mandatory"><%= f.label 'email' %></td>
20
+ <td class="input"><%= f.email_field 'email', :class => 'thin_border', :required => true %></td>
21
21
  </tr>
22
22
  <tr>
23
23
  <td class="label"><%= f.label 'language' %></td>
24
- <td class="select"><%= f.select 'language', translations_for_select, {}, :class => 'long' -%></td>
24
+ <td class="select"><%= f.select 'language', translations_for_select %></td>
25
25
  </tr>
26
26
  <tr>
27
- <td class="label"><%= f.label 'password' %></td>
28
- <td class="input"><%= f.password_field 'password', :class => 'thin_border', :autocomplete => "off" -%></td>
27
+ <td class="label mandatory"><%= f.label 'password' %></td>
28
+ <td class="input mandatory"><%= f.password_field 'password', :class => 'thin_border', :autocomplete => "off", :required => action_name == 'signup' %></td>
29
29
  </tr>
30
30
  <tr>
31
- <td class="label"><%= f.label 'password_confirmation' %></td>
32
- <td class="input"><%= f.password_field 'password_confirmation', :class => 'thin_border', :autocomplete => "off" -%></td>
31
+ <td class="label mandatory"><%= f.label 'password_confirmation' %></td>
32
+ <td class="input"><%= f.password_field 'password_confirmation', :class => 'thin_border', :autocomplete => "off", :required => action_name == 'signup' %></td>
33
33
  </tr>
34
34
  <%- unless action_name == 'signup' -%>
35
35
  <tr>
36
36
  <td class="label"><%= f.label 'role' %></td>
37
- <td class="select"><%= f.select :role, options_for_select(@user_roles, @user.role), {}, :class => 'long' -%></td>
37
+ <td class="select"><%= f.select :role, options_for_select(@user_roles, @user.role) %></td>
38
38
  </tr>
39
39
  <%- else -%>
40
40
  <%= f.hidden_field :role %>