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.
- data/.gitignore +3 -1
- data/Gemfile +10 -2
- data/Guardfile +16 -0
- data/README.md +3 -3
- data/Rakefile +0 -5
- data/alchemy_cms.gemspec +1 -9
- data/app/assets/javascripts/alchemy/alchemy.base.js +5 -4
- data/app/assets/javascripts/alchemy/{alchemy.dragndrop.js.erb → alchemy.dragndrop.js} +0 -0
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js +96 -0
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js +48 -50
- data/app/assets/javascripts/alchemy/alchemy.jquery_loader.js +41 -0
- data/app/assets/javascripts/alchemy/alchemy.js +2 -0
- data/app/assets/javascripts/alchemy/alchemy.menubar.js +55 -0
- data/app/assets/javascripts/alchemy/alchemy.preview.js +94 -139
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js +98 -0
- data/app/assets/javascripts/alchemy/alchemy.windows.js +1 -174
- data/app/assets/javascripts/alchemy/menubar.js +2 -0
- data/app/assets/javascripts/alchemy/preview.js +2 -1
- data/app/assets/stylesheets/alchemy/_defaults.scss +7 -8
- data/app/assets/stylesheets/alchemy/base.css.scss +29 -33
- data/app/assets/stylesheets/alchemy/elements.css.scss +4 -4
- data/app/assets/stylesheets/alchemy/jquery-ui.alchemy.css.scss +1 -1
- data/app/assets/stylesheets/alchemy/jquery.Jcrop.css.scss +1 -1
- data/app/assets/stylesheets/alchemy/jquery.sb.css.scss +19 -4
- data/app/assets/stylesheets/alchemy/menubar.css.scss +85 -0
- data/app/assets/stylesheets/alchemy/standard_set.css +3 -5
- data/app/assets/stylesheets/alchemy/tinymce_content.css.scss +1 -1
- data/app/assets/stylesheets/alchemy/tinymce_dialog.css.scss +1 -1
- data/app/controllers/alchemy/admin/attachments_controller.rb +2 -18
- data/app/controllers/alchemy/admin/base_controller.rb +1 -1
- data/app/controllers/alchemy/admin/elements_controller.rb +2 -2
- data/app/controllers/alchemy/admin/essence_files_controller.rb +4 -2
- data/app/controllers/alchemy/admin/pictures_controller.rb +6 -20
- data/app/controllers/alchemy/admin/resources_controller.rb +7 -5
- data/app/controllers/alchemy/base_controller.rb +14 -4
- data/app/controllers/alchemy/messages_controller.rb +4 -4
- data/app/controllers/alchemy/pages_controller.rb +51 -32
- data/app/controllers/alchemy/pictures_controller.rb +0 -3
- data/app/controllers/alchemy/user_sessions_controller.rb +1 -1
- data/app/helpers/alchemy/admin/base_helper.rb +6 -4
- data/app/helpers/alchemy/base_helper.rb +26 -0
- data/app/helpers/alchemy/pages_helper.rb +42 -22
- data/app/models/alchemy/attachment.rb +10 -2
- data/app/models/alchemy/cell.rb +1 -0
- data/app/models/alchemy/content.rb +8 -6
- data/app/models/alchemy/element.rb +1 -1
- data/app/models/alchemy/essence_audio.rb +1 -8
- data/app/models/alchemy/essence_date.rb +2 -9
- data/app/models/alchemy/essence_file.rb +1 -8
- data/app/models/alchemy/essence_flash.rb +0 -7
- data/app/models/alchemy/essence_html.rb +1 -8
- data/app/models/alchemy/essence_picture.rb +0 -11
- data/app/models/alchemy/essence_richtext.rb +4 -12
- data/app/models/alchemy/essence_text.rb +1 -13
- data/app/models/alchemy/essence_video.rb +1 -8
- data/app/models/alchemy/page.rb +28 -22
- data/app/models/alchemy/picture.rb +19 -0
- data/app/sweepers/alchemy/pages_sweeper.rb +17 -6
- data/app/sweepers/alchemy/pictures_sweeper.rb +1 -3
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +2 -2
- data/app/views/alchemy/admin/attachments/_attachment.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +2 -2
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +13 -11
- data/app/views/alchemy/admin/attachments/create.js.erb +1 -1
- data/app/views/alchemy/admin/attachments/edit.html.erb +2 -2
- data/app/views/alchemy/admin/elements/_new_element_form.html.erb +1 -2
- data/app/views/alchemy/admin/elements/new.html.erb +1 -1
- data/app/views/alchemy/admin/essence_files/edit.html.erb +32 -32
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +29 -29
- data/app/views/alchemy/admin/essence_pictures/update.js.erb +13 -12
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +4 -1
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
- data/app/views/alchemy/admin/pages/edit.html.erb +8 -8
- data/app/views/alchemy/admin/pages/index.html.erb +1 -1
- data/app/views/alchemy/admin/pages/new.html.erb +1 -1
- data/app/views/alchemy/admin/pages/update.js.erb +19 -12
- data/app/views/alchemy/admin/pictures/_picture.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_pictures_list.html.erb +8 -6
- data/app/views/alchemy/admin/pictures/show_in_window.html.erb +6 -1
- data/app/views/alchemy/admin/resources/_table.html.erb +1 -1
- data/app/views/alchemy/admin/users/_table.html.erb +13 -13
- data/app/views/alchemy/admin/users/_user.html.erb +1 -1
- data/app/views/alchemy/admin/users/index.html.erb +2 -2
- data/app/views/alchemy/elements/_contactform_view.html.erb +78 -78
- data/app/views/alchemy/elements/_download_editor.html.erb +1 -0
- data/app/views/alchemy/elements/_download_view.html.erb +3 -0
- data/app/views/alchemy/essences/_essence_date_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +1 -0
- data/app/views/alchemy/essences/_essence_file_view.html.erb +6 -2
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +3 -2
- data/app/views/alchemy/essences/_essence_picture_view.html.erb +1 -1
- data/app/views/alchemy/navigation/_link.html.erb +1 -2
- data/app/views/alchemy/notifications/admin_user_created.text.erb +7 -7
- data/app/views/alchemy/notifications/registered_user_created.text.erb +5 -5
- data/app/views/alchemy/user_sessions/login.html.erb +34 -35
- data/app/views/layouts/alchemy/login.html.erb +3 -8
- data/app/views/layouts/alchemy/pages.html.erb +1 -0
- data/bin/alchemy +43 -75
- data/config/alchemy/config.yml +10 -0
- data/config/alchemy/elements.yml +5 -0
- data/config/alchemy/page_layouts.yml +1 -1
- data/config/locales/alchemy.de.yml +21 -8
- data/config/locales/alchemy.en.yml +20 -4
- data/config/routes.rb +25 -20
- data/db/migrate/{20111116125112_namespace_models.rb → 20111116125112_namespace_alchemy_models.rb} +1 -1
- data/lib/alchemy/capistrano.rb +4 -17
- data/lib/alchemy/engine.rb +2 -0
- data/lib/alchemy/essence.rb +29 -41
- data/lib/alchemy/i18n.rb +1 -1
- data/lib/alchemy/mount_point.rb +10 -0
- data/lib/alchemy/page_layout.rb +7 -7
- data/lib/alchemy/seeder.rb +85 -47
- data/lib/alchemy/upgrader.rb +115 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +4 -3
- data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +6 -2
- data/lib/tasks/ferret.rake +12 -0
- data/lib/tasks/install.rake +16 -105
- data/lib/tasks/routes.rake +29 -0
- data/lib/tasks/upgrade.rake +5 -67
- data/spec/controllers/admin/pages_controller_spec.rb +1 -1
- data/spec/controllers/pages_controller_spec.rb +31 -0
- data/spec/factories.rb +24 -15
- data/spec/helpers/admin/base_helper_spec.rb +0 -7
- data/spec/helpers/pages_helper_spec.rb +54 -29
- data/spec/helpers/url_helpers_spec.rb +40 -0
- data/spec/integration/admin/pages_controller_spec.rb +3 -3
- data/spec/integration/pages_controller_spec.rb +80 -6
- data/spec/integration/security_spec.rb +2 -2
- data/spec/models/content_spec.rb +24 -0
- data/spec/models/page_spec.rb +174 -47
- data/spec/models/picture_spec.rb +54 -0
- data/spec/page_layout_spec.rb +2 -2
- data/spec/routing_spec.rb +205 -1
- data/spec/spec_helper.rb +53 -32
- metadata +51 -46
- data/lib/alchemy/file_utilz.rb +0 -73
@@ -2,15 +2,15 @@
|
|
2
2
|
<%- if @content.essence_type == "Alchemy::EssenceFile" -%>
|
3
3
|
<table>
|
4
4
|
<tr>
|
5
|
-
<td class="label
|
6
|
-
<td><%= f.text_field "title", :class => 'thin_border
|
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"
|
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
|
22
|
-
<td><%= f.text_field "width", :class => 'thin_border
|
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
|
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
|
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"
|
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
|
42
|
-
<td><%= f.text_field "width", :class => 'thin_border
|
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
|
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"
|
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
|
70
|
-
<td><%= f.text_field "width", :class => 'thin_border
|
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
|
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"
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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
|
-
|
29
|
+
<%= t('explain cropping') %>
|
30
30
|
</div>
|
31
31
|
|
32
32
|
<div id="jscropper">
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
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
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
-
|
14
|
+
Alchemy.SortableContents('<%= form_authenticity_token -%>');
|
14
15
|
<%- end -%>
|
15
|
-
|
16
|
+
|
16
17
|
})(jQuery);
|
@@ -1,4 +1,7 @@
|
|
1
|
-
<
|
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>
|
@@ -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
|
97
|
-
Alchemy.
|
96
|
+
Alchemy.openPreviewWindow = function() {
|
97
|
+
Alchemy.PreviewWindow.init('<%= admin_page_url(@page) %>', '<%= t("Page Preview") -%>');
|
98
98
|
}
|
99
99
|
|
100
|
-
function
|
101
|
-
Alchemy.
|
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('
|
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' ) %>
|
@@ -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('» <%= 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('
|
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
|
-
<
|
2
|
+
<div class="info">
|
3
|
+
<%= render_icon('info') %>
|
3
4
|
<%= t("no_images_in_archive") %>
|
4
|
-
</
|
5
|
+
</div>
|
5
6
|
<%- elsif @pictures.blank? -%>
|
6
|
-
<
|
7
|
+
<div class="info">
|
8
|
+
<%= render_icon('info') %>
|
7
9
|
<%= t("no_search_results") %>
|
8
|
-
</
|
10
|
+
</div>
|
9
11
|
<%- else -%>
|
10
12
|
<div id="pictures">
|
11
|
-
<%= render
|
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,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')}
|
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'
|
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'
|
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'
|
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.
|
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
|
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"
|
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"
|
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)
|
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 %>
|