alchemy_cms 2.6.3 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.simplecov +14 -0
- data/.travis.yml +1 -1
- data/Gemfile +7 -6
- data/README.md +15 -5
- data/alchemy_cms.gemspec +3 -2
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +9 -17
- data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +70 -0
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +80 -0
- data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +43 -19
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +3 -1
- data/app/assets/javascripts/alchemy/alchemy.js +4 -2
- data/app/assets/javascripts/alchemy/alchemy.onload.js.coffee +1 -1
- data/app/assets/javascripts/alchemy/alchemy.spinner.js.coffee +14 -0
- data/app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee.erb +96 -0
- data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +22 -0
- data/app/assets/javascripts/alchemy/alchemy.windows.js.coffee +28 -17
- data/app/assets/stylesheets/alchemy/base.scss +6 -0
- data/app/assets/stylesheets/alchemy/elements.scss +2 -28
- data/app/assets/stylesheets/alchemy/errors.scss +1 -1
- data/app/assets/stylesheets/alchemy/menubar.css.scss +2 -0
- data/app/assets/stylesheets/alchemy/sitemap.scss +21 -34
- data/app/assets/stylesheets/alchemy/tables.scss +13 -3
- data/app/controllers/alchemy/admin/attachments_controller.rb +10 -5
- data/app/controllers/alchemy/admin/base_controller.rb +19 -0
- data/app/controllers/alchemy/admin/contents_controller.rb +1 -4
- data/app/controllers/alchemy/admin/dashboard_controller.rb +2 -1
- data/app/controllers/alchemy/admin/elements_controller.rb +1 -1
- data/app/controllers/alchemy/admin/essence_files_controller.rb +1 -1
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +70 -56
- data/app/controllers/alchemy/admin/pages_controller.rb +37 -114
- data/app/controllers/alchemy/admin/pictures_controller.rb +5 -12
- data/app/controllers/alchemy/admin/resources_controller.rb +3 -1
- data/app/controllers/alchemy/admin/trash_controller.rb +1 -1
- data/app/controllers/alchemy/attachments_controller.rb +1 -1
- data/app/controllers/alchemy/base_controller.rb +3 -15
- data/app/controllers/alchemy/messages_controller.rb +4 -10
- data/app/controllers/alchemy/pages_controller.rb +6 -6
- data/app/controllers/alchemy/passwords_controller.rb +1 -1
- data/app/controllers/alchemy/user_sessions_controller.rb +1 -1
- data/app/helpers/alchemy/admin/base_helper.rb +49 -230
- data/app/helpers/alchemy/admin/contents_helper.rb +5 -1
- data/app/helpers/alchemy/admin/elements_helper.rb +19 -47
- data/app/helpers/alchemy/admin/essences_helper.rb +59 -17
- data/app/helpers/alchemy/admin/navigation_helper.rb +204 -0
- data/app/helpers/alchemy/admin/pages_helper.rb +22 -79
- data/app/helpers/alchemy/admin/pictures_helper.rb +1 -1
- data/app/helpers/alchemy/admin/tags_helper.rb +42 -0
- data/app/helpers/alchemy/base_helper.rb +0 -11
- data/app/helpers/alchemy/elements_helper.rb +48 -25
- data/app/helpers/alchemy/essences_helper.rb +0 -20
- data/app/helpers/alchemy/pages_helper.rb +18 -14
- data/app/helpers/alchemy/url_helper.rb +1 -0
- data/app/mailers/alchemy/messages.rb +4 -6
- data/app/models/alchemy/attachment.rb +3 -0
- data/app/models/alchemy/cell.rb +33 -35
- data/app/models/alchemy/content.rb +20 -111
- data/app/models/alchemy/content/factory.rb +188 -0
- data/app/models/alchemy/element.rb +51 -200
- data/app/models/alchemy/element/definitions.rb +52 -0
- data/app/models/alchemy/element/presenters.rb +87 -0
- data/app/models/alchemy/essence_date.rb +1 -1
- data/app/models/alchemy/essence_file.rb +6 -7
- data/app/models/alchemy/essence_picture.rb +19 -4
- data/app/models/alchemy/message.rb +18 -14
- data/app/models/alchemy/page.rb +120 -214
- data/app/models/alchemy/page/elements.rb +145 -36
- data/app/models/alchemy/page/natures.rb +90 -0
- data/app/models/alchemy/page/scopes.rb +93 -0
- data/app/models/alchemy/page/users.rb +25 -0
- data/app/models/alchemy/picture.rb +15 -0
- data/app/models/alchemy/site.rb +15 -1
- data/app/models/alchemy/site/layout.rb +38 -0
- data/app/models/alchemy/user.rb +13 -3
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +7 -7
- data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +8 -8
- data/app/views/alchemy/admin/attachments/_tag_list.html.erb +1 -16
- data/app/views/alchemy/admin/attachments/destroy.js.erb +1 -4
- data/app/views/alchemy/admin/contents/create.js.erb +1 -1
- data/app/views/alchemy/admin/dashboard/index.html.erb +14 -13
- data/app/views/alchemy/admin/elements/_element_head.html.erb +7 -7
- data/app/views/alchemy/admin/elements/_refresh_editor.js.erb +10 -0
- data/app/views/alchemy/admin/elements/create.js.erb +44 -44
- data/app/views/alchemy/admin/elements/fold.js.erb +22 -26
- data/app/views/alchemy/admin/elements/trash.js.erb +1 -1
- data/app/views/alchemy/admin/elements/update.js.erb +22 -25
- data/app/views/alchemy/admin/essence_files/assign.js.erb +8 -3
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +14 -12
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +22 -39
- data/app/views/alchemy/admin/pages/_page.html.erb +73 -80
- data/app/views/alchemy/admin/pages/destroy.js.erb +2 -2
- data/app/views/alchemy/admin/pages/edit.html.erb +21 -18
- data/app/views/alchemy/admin/pages/fold.js.erb +1 -0
- data/app/views/alchemy/admin/pages/info.html.erb +32 -0
- data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +11 -13
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +20 -20
- data/app/views/alchemy/admin/partials/_sub_navigation.html.erb +8 -0
- data/app/views/alchemy/admin/partials/_toolbar_button.html.erb +25 -0
- data/app/views/alchemy/admin/partials/_upload_form.html.erb +15 -15
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +39 -39
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +10 -10
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -16
- data/app/views/alchemy/admin/resources/destroy.js.erb +1 -1
- data/app/views/alchemy/base/500.html.erb +1 -1
- data/app/views/alchemy/base/permission_denied.js.erb +1 -1
- data/app/views/alchemy/base/redirect.js.erb +1 -1
- data/app/views/alchemy/essences/_essence_link_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_text_editor.html.erb +1 -1
- data/app/views/alchemy/essences/{_essence_picture_tools.html.erb → shared/_essence_picture_tools.html.erb} +5 -5
- data/app/views/alchemy/essences/{_linkable_essence_tools.html.erb → shared/_linkable_essence_tools.html.erb} +0 -0
- data/app/views/alchemy/messages/contact_form_mail.de.text.erb +12 -0
- data/app/views/alchemy/messages/contact_form_mail.en.text.erb +12 -0
- data/app/views/alchemy/notifications/reset_password_instructions.de.text.erb +1 -1
- data/app/views/alchemy/notifications/reset_password_instructions.en.text.erb +2 -2
- data/app/views/alchemy/pages/sitemap.xml.erb +3 -5
- data/app/views/alchemy/user_sessions/leave.html.erb +1 -1
- data/app/views/layouts/alchemy/admin.html.erb +4 -2
- data/app/views/layouts/alchemy/sitemap.xml.erb +1 -1
- data/bin/alchemy +7 -13
- data/config/alchemy/config.yml +1 -0
- data/config/authorization_rules.rb +2 -3
- data/config/initializers/dragonfly.rb +2 -0
- data/config/locales/alchemy.de.yml +8 -9
- data/config/locales/alchemy.en.yml +7 -4
- data/config/routes.rb +3 -0
- data/db/migrate/{20130214233001_alchemy_two_point_five.rb → 20130827094554_alchemy_two_point_six.rb} +29 -6
- data/lib/alchemy/auth/engine.rb +9 -0
- data/lib/alchemy/capistrano.rb +37 -12
- data/lib/alchemy/config.rb +48 -35
- data/lib/alchemy/engine.rb +35 -6
- data/lib/alchemy/essence.rb +25 -29
- data/lib/alchemy/ferret/search.rb +86 -0
- data/lib/alchemy/{scoped_pagination_url_helper.rb → kaminari/scoped_pagination_url_helper.rb} +0 -0
- data/lib/alchemy/logger.rb +3 -4
- data/lib/alchemy/page_layout.rb +124 -55
- data/lib/alchemy/resource.rb +0 -10
- data/lib/alchemy/resources_helper.rb +0 -5
- data/lib/alchemy/seeder.rb +1 -32
- data/lib/alchemy/shell.rb +6 -1
- data/lib/alchemy/tinymce.rb +41 -32
- data/lib/alchemy/upgrader.rb +3 -1
- data/lib/alchemy/upgrader/two_point_five.rb +15 -8
- data/lib/alchemy/upgrader/two_point_one.rb +10 -10
- data/lib/alchemy/upgrader/two_point_two.rb +96 -51
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +5 -46
- data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +1 -1
- data/lib/rails/generators/alchemy/devise/devise_generator.rb +9 -4
- data/lib/rails/generators/alchemy/essence/essence_generator.rb +7 -6
- data/lib/rails/generators/alchemy/essence/templates/editor.html.erb +1 -1
- data/lib/rails/generators/alchemy/scaffold/files/_standard.html.erb +1 -0
- data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +1 -0
- data/lib/rails/generators/alchemy/site_layouts/site_layouts_generator.rb +23 -0
- data/lib/rails/generators/alchemy/site_layouts/templates/layout.html.erb +1 -0
- data/lib/rails/generators/alchemy/site_layouts/templates/layout.html.haml +1 -0
- data/lib/rails/generators/alchemy/site_layouts/templates/layout.html.slim +1 -0
- data/lib/rails/templates/alchemy.rb +2 -2
- data/lib/tasks/alchemy/db.rake +3 -1
- data/lib/tasks/alchemy/tidy.rake +82 -0
- data/lib/tasks/alchemy/upgrade.rake +2 -1
- data/spec/controllers/admin/attachments_controller_spec.rb +124 -0
- data/spec/controllers/admin/base_controller_spec.rb +35 -0
- data/spec/controllers/admin/clipboard_controller_spec.rb +1 -1
- data/spec/controllers/admin/contents_controller_spec.rb +17 -26
- data/spec/controllers/admin/dashboard_controller_spec.rb +121 -0
- data/spec/controllers/admin/elements_controller_spec.rb +1 -1
- data/spec/controllers/admin/essence_files_controller_spec.rb +67 -0
- data/spec/controllers/admin/essence_pictures_controller_spec.rb +161 -0
- data/spec/controllers/admin/languages_controller_spec.rb +1 -1
- data/spec/controllers/admin/layoutpages_controller_spec.rb +28 -0
- data/spec/controllers/admin/pages_controller_spec.rb +164 -118
- data/spec/controllers/admin/pictures_controller_spec.rb +89 -0
- data/spec/controllers/admin/trash_controller_spec.rb +21 -31
- data/spec/controllers/admin/users_controller_spec.rb +114 -85
- data/spec/controllers/attachments_controller_spec.rb +6 -2
- data/spec/controllers/base_controller_spec.rb +22 -0
- data/spec/controllers/elements_controller_spec.rb +1 -1
- data/spec/controllers/messages_controller_spec.rb +200 -0
- data/spec/controllers/pictures_controller_spec.rb +1 -1
- data/spec/controllers/user_sessions_controller_spec.rb +7 -6
- data/spec/controllers/users_controller_spec.rb +2 -2
- data/spec/dummy/config/alchemy/cells.yml +2 -0
- data/spec/dummy/config/application.rb +19 -8
- data/spec/dummy/db/migrate/{20130214233001_alchemy_two_point_five.rb → 20130827094554_alchemy_two_point_six.rb} +29 -6
- data/spec/dummy/db/schema.rb +1 -1
- data/spec/fast_specs.rb +15 -0
- data/spec/helpers/admin/base_helper_spec.rb +53 -34
- data/spec/helpers/admin/contents_helper_spec.rb +15 -7
- data/spec/helpers/admin/elements_helper_spec.rb +79 -34
- data/spec/helpers/admin/essences_helper_spec.rb +45 -31
- data/spec/helpers/admin/navigation_helper_spec.rb +204 -0
- data/spec/helpers/admin/pages_helper_spec.rb +25 -15
- data/spec/helpers/admin/tags_helper_spec.rb +62 -2
- data/spec/helpers/elements_helper_spec.rb +202 -138
- data/spec/helpers/pages_helper_spec.rb +48 -0
- data/spec/helpers/url_helper_spec.rb +7 -0
- data/spec/libraries/config_spec.rb +110 -3
- data/spec/libraries/essence_spec.rb +29 -9
- data/spec/libraries/page_layout_spec.rb +134 -0
- data/spec/libraries/resource_spec.rb +3 -16
- data/spec/libraries/resources_helper_spec.rb +4 -8
- data/spec/libraries/shell_spec.rb +1 -0
- data/spec/libraries/tinymce_spec.rb +61 -0
- data/spec/mailers/messages_spec.rb +23 -0
- data/spec/models/attachment_spec.rb +45 -0
- data/spec/models/cell_spec.rb +62 -9
- data/spec/models/content_spec.rb +110 -28
- data/spec/models/element_spec.rb +275 -253
- data/spec/models/essence_date_spec.rb +25 -0
- data/spec/models/essence_file_spec.rb +23 -0
- data/spec/models/essence_html_spec.rb +13 -0
- data/spec/models/essence_picture_spec.rb +16 -0
- data/spec/models/essence_text_spec.rb +29 -0
- data/spec/models/language_spec.rb +34 -0
- data/spec/models/message_spec.rb +43 -0
- data/spec/models/page_spec.rb +726 -567
- data/spec/models/picture_spec.rb +98 -0
- data/spec/models/site_spec.rb +60 -2
- data/spec/models/tag_spec.rb +31 -0
- data/spec/models/user_spec.rb +4 -4
- data/spec/spec_helper.rb +49 -58
- data/spec/support/alchemy/controller_helpers.rb +35 -0
- data/spec/support/alchemy/{specs_helpers.rb → integration_helpers.rb} +4 -8
- data/spec/{factories.rb → support/factories.rb} +11 -1
- data/vendor/assets/javascripts/jquery_plugins/jquery.ui.nestedSortable.js +2 -8
- metadata +166 -106
- data/Guardfile +0 -16
- data/app/assets/javascripts/alchemy/alchemy.dirty.js +0 -93
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +0 -122
- data/app/models/alchemy/tree_node.rb +0 -4
- data/app/views/alchemy/admin/pages/_page_infos.html.erb +0 -3
- data/app/views/alchemy/admin/partials/_sub_navigation_tab.html.erb +0 -8
- data/app/views/alchemy/messages/contact_form_mail.text.erb +0 -12
- data/config/initializers/kaminari_config.rb +0 -9
- data/db/migrate/20130221200514_migrate_attachments_to_dragonfly.rb +0 -21
- data/db/migrate/20130312205327_change_alchemy_users_role_to_roles.rb +0 -11
- data/lib/alchemy/auth_engine.rb +0 -7
- data/lib/alchemy/authentication_helpers.rb +0 -9
- data/lib/alchemy/ferret_search.rb +0 -84
- data/lib/extensions/array.rb +0 -25
- data/lib/extensions/hash.rb +0 -34
- data/spec/dummy/db/migrate/20130221200514_migrate_attachments_to_dragonfly.rb +0 -21
- data/spec/dummy/db/migrate/20130312205327_change_alchemy_users_role_to_roles.rb +0 -11
- data/spec/models/page_layout_spec.rb +0 -60
@@ -0,0 +1,32 @@
|
|
1
|
+
<div class="with_padding">
|
2
|
+
<table>
|
3
|
+
<tr>
|
4
|
+
<td class="label"><label><%= _t(:page_type) %></label></td>
|
5
|
+
<td class="value"><p><%= @page.layout_display_name %></p></td>
|
6
|
+
</tr>
|
7
|
+
<tr>
|
8
|
+
<td class="label"><label><%= _t(:page_status) %></label></td>
|
9
|
+
<td class="value">
|
10
|
+
<p><%= combined_page_status(@page) %></p>
|
11
|
+
</td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td class="label"><label><%= _t(:page_was_created) %></label></td>
|
15
|
+
<td class="value">
|
16
|
+
<p><%= _t(:from_at) % {by: @page.creator_name, at: l(@page.created_at, format: :page_status)} %></p>
|
17
|
+
</td>
|
18
|
+
</tr>
|
19
|
+
<tr>
|
20
|
+
<td class="label"><label><%= _t(:page_was_updated) %></label></td>
|
21
|
+
<td class="value">
|
22
|
+
<p><%= _t(:from_at) % {by: @page.updater_name, at: l(@page.updated_at, format: :page_status)} %></p>
|
23
|
+
</td>
|
24
|
+
</tr>
|
25
|
+
<%- if @page.locked? -%>
|
26
|
+
<tr>
|
27
|
+
<td class="label"><label><%= _t(:currently_edited_by) %></label></td>
|
28
|
+
<td class="value"><p><%= @page.locker_name %></p></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</table>
|
32
|
+
</div>
|
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
<% if permitted_to? *navigate_module(navigation) %>
|
2
|
+
<%= link_to url_for_module(alchemy_module), class: main_navigation_css_classes(navigation) do %>
|
3
|
+
<% if navigation["image"] %>
|
4
|
+
<%= image_tag(navigation["image"]) %>
|
5
|
+
<% elsif navigation["icon"] %>
|
6
|
+
<span class="module icon <%= navigation["icon"] %>"></span>
|
7
|
+
<% else %>
|
8
|
+
<span class="module icon"></span>
|
9
|
+
<% end %>
|
10
|
+
<label><%= truncate _t(navigation["name"]), length: 10 %></label>
|
11
|
+
<% end %>
|
12
12
|
<% end %>
|
13
|
-
|
14
|
-
<%- end -%>
|
@@ -1,38 +1,38 @@
|
|
1
1
|
<%= form_tag(
|
2
2
|
url_for({
|
3
|
-
:
|
4
|
-
:
|
5
|
-
:
|
3
|
+
action: 'index',
|
4
|
+
options: @options.to_json,
|
5
|
+
size: @size
|
6
6
|
}),
|
7
|
-
:
|
8
|
-
:
|
7
|
+
remote: true,
|
8
|
+
method: 'get'
|
9
9
|
) do %>
|
10
10
|
<%= hidden_field_tag("element_id", @element.blank? ? "" : @element.id) %>
|
11
11
|
<%= hidden_field_tag("content_id", @content.blank? ? "" : @content.id) %>
|
12
12
|
<div class="search_field">
|
13
13
|
<%= render_icon('search') %>
|
14
14
|
<%= text_field_tag(
|
15
|
-
|
15
|
+
:query,
|
16
16
|
params['query'],
|
17
|
-
:
|
18
|
-
:
|
17
|
+
class: 'thin_border',
|
18
|
+
id: "search_input_field"
|
19
19
|
) %>
|
20
20
|
<%= link_to(
|
21
21
|
"",
|
22
22
|
url_for({
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
26
|
-
:
|
27
|
-
:
|
28
|
-
:
|
23
|
+
action: 'index',
|
24
|
+
element_id: @element.blank? ? "" : @element.id,
|
25
|
+
content_id: @content.blank? ? "" : @content.id,
|
26
|
+
options: @options.to_json,
|
27
|
+
size: @size,
|
28
|
+
overlay: true
|
29
29
|
}),
|
30
|
-
:
|
31
|
-
:
|
32
|
-
:
|
33
|
-
:
|
34
|
-
:
|
30
|
+
remote: true,
|
31
|
+
class: 'search_field_clear',
|
32
|
+
id: 'search_field_clear',
|
33
|
+
title: _t(:click_to_show_all),
|
34
|
+
style: (params[:query].nil? ? 'display: none' : 'display: block')
|
35
35
|
) %>
|
36
36
|
</div>
|
37
|
-
<%= submit_tag _t(:search), :
|
37
|
+
<%= submit_tag _t(:search), name: nil, class: 'button' %>
|
38
38
|
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% entries.each do |entry| %>
|
2
|
+
<% entry.stringify_keys! %>
|
3
|
+
<% if permitted_to? *navigate_module(entry) %>
|
4
|
+
<div class="subnavi_tab<%= entry_active?(entry) ? ' active' : nil %>">
|
5
|
+
<%= link_to _t(entry['name']), url_for_module_sub_navigation(entry) %>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
8
|
+
<% end %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<div class="button_with_label<%= options[:active] ? ' active' : '' %>">
|
2
|
+
<% if options[:overlay] %>
|
3
|
+
<%= link_to_overlay_window(
|
4
|
+
render_icon(options[:icon]),
|
5
|
+
options[:url],
|
6
|
+
options[:overlay_options],
|
7
|
+
{
|
8
|
+
class: 'icon_button',
|
9
|
+
title: options[:title],
|
10
|
+
'data-alchemy-hotkey' => options[:hotkey]
|
11
|
+
}.merge(options[:link_options])
|
12
|
+
) %>
|
13
|
+
<% else %>
|
14
|
+
<%= link_to(
|
15
|
+
options[:url], {
|
16
|
+
class: "icon_button#{options[:loading_indicator] ? ' please_wait' : ''}",
|
17
|
+
title: options[:title],
|
18
|
+
'data-alchemy-hotkey' => options[:hotkey]
|
19
|
+
}.merge(options[:link_options])
|
20
|
+
) do %>
|
21
|
+
<%= render_icon(options[:icon]) %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<label><%= options[:label] %></label>
|
25
|
+
</div>
|
@@ -1,22 +1,22 @@
|
|
1
1
|
<div class="info">
|
2
2
|
<%= render_icon('info') %>
|
3
|
-
<p><%= _t('explain_upload.intro', :
|
3
|
+
<p><%= _t('explain_upload.intro', name: item_type) %>:</p>
|
4
4
|
<ol>
|
5
|
-
<li><%= _t('explain_upload.step1', :
|
6
|
-
<li><%= _t('explain_upload.step2', :
|
5
|
+
<li><%= _t('explain_upload.step1', name: item_type) %></li>
|
6
|
+
<li><%= _t('explain_upload.step2', name: item_type) %>*</li>
|
7
7
|
<li id="explain_step3"><%= _t('explain_upload.step3') %></li>
|
8
|
-
<li id="explain_drag_n_drop"><%= _t('explain_upload.dragndrop', :
|
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', :
|
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', :
|
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), :
|
19
|
+
<%= label_tag :multiple, _t(:browse), style: 'display:none;' %>
|
20
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
22
|
<%= _t("swfupload.cancel_uploads") %>
|
@@ -33,12 +33,12 @@
|
|
33
33
|
<div id="uploadProgressContainer"></div>
|
34
34
|
|
35
35
|
<%- post_params = {
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
40
|
-
:
|
41
|
-
:
|
36
|
+
while_assigning: @while_assigning ? "true" : "false",
|
37
|
+
content_id: @content.blank? ? nil : @content.id,
|
38
|
+
element_id: @element.blank? ? nil : @element.id,
|
39
|
+
size: @size,
|
40
|
+
upload_hash: Time.now.hash,
|
41
|
+
options: @options.to_json
|
42
42
|
}.delete_if { |k, v| v.nil? }.to_json -%>
|
43
43
|
|
44
44
|
<script type='text/javascript'>
|
@@ -55,11 +55,11 @@
|
|
55
55
|
onQueueComplete: function() {
|
56
56
|
// While assigning picture in page edit mode
|
57
57
|
<% if @while_assigning && model_name == 'picture' %>
|
58
|
-
var url = '<%= alchemy.admin_pictures_path(:
|
58
|
+
var url = '<%= alchemy.admin_pictures_path(size: params[:size], filter: "last_upload", element_id: @element.id, content_id: @content ? @content.id : nil, options: @options.to_json).html_safe %>';
|
59
59
|
$.get(url, null, null, 'script');
|
60
60
|
// While uploading picture in library
|
61
61
|
<% elsif controller.class.name == 'Alchemy::Admin::PicturesController' %>
|
62
|
-
var url = '<%= alchemy.admin_pictures_path(:
|
62
|
+
var url = '<%= alchemy.admin_pictures_path(size: params[:size], filter: "last_upload").html_safe %>';
|
63
63
|
Alchemy.pleaseWaitOverlay();
|
64
64
|
window.location = url;
|
65
65
|
<% end %>
|
@@ -3,70 +3,70 @@
|
|
3
3
|
<%= link_to(
|
4
4
|
render_icon('zoom-out'),
|
5
5
|
alchemy.admin_pictures_path({
|
6
|
-
:
|
7
|
-
:
|
8
|
-
:
|
9
|
-
:
|
10
|
-
:
|
11
|
-
:
|
6
|
+
size: "small",
|
7
|
+
content_id: @content,
|
8
|
+
element_id: @element,
|
9
|
+
swap: @swap,
|
10
|
+
query: params[:query],
|
11
|
+
options: @options.to_json
|
12
12
|
}),
|
13
|
-
:
|
14
|
-
:
|
15
|
-
:
|
13
|
+
remote: true,
|
14
|
+
title: _t(:small_thumbnails),
|
15
|
+
class: "icon_button"
|
16
16
|
) %>
|
17
17
|
<%= link_to(
|
18
18
|
render_icon('zoom-equal'),
|
19
19
|
alchemy.admin_pictures_path({
|
20
|
-
:
|
21
|
-
:
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
20
|
+
size: "medium",
|
21
|
+
content_id: @content,
|
22
|
+
element_id: @element,
|
23
|
+
swap: @swap,
|
24
|
+
query: params[:query],
|
25
|
+
options: @options.to_json
|
26
26
|
}),
|
27
|
-
:
|
28
|
-
:
|
29
|
-
:
|
27
|
+
remote: true,
|
28
|
+
title: _t(:medium_thumbnails),
|
29
|
+
class: "icon_button"
|
30
30
|
) %>
|
31
31
|
<%= link_to(
|
32
32
|
render_icon('zoom-in'),
|
33
33
|
alchemy.admin_pictures_path({
|
34
|
-
:
|
35
|
-
:
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
34
|
+
size: "large",
|
35
|
+
content_id: @content,
|
36
|
+
element_id: @element,
|
37
|
+
swap: @swap,
|
38
|
+
query: params[:query],
|
39
|
+
options: @options.to_json
|
40
40
|
}),
|
41
|
-
:
|
42
|
-
:
|
43
|
-
:
|
41
|
+
remote: true,
|
42
|
+
title: _t(:big_thumbnails),
|
43
|
+
class: "icon_button"
|
44
44
|
) %>
|
45
45
|
<label><%= _t('Image size') %></label>
|
46
|
-
<%= hidden_field_tag('size', @size, :
|
46
|
+
<%= hidden_field_tag('size', @size, id: 'overlay_thumbnails_size') %>
|
47
47
|
</div>
|
48
48
|
<div class="toolbar_spacer"></div>
|
49
49
|
<div class="button_with_label">
|
50
50
|
<%= link_to_overlay_window(
|
51
51
|
render_icon('upload'),
|
52
52
|
alchemy.new_admin_picture_path(
|
53
|
-
:
|
54
|
-
:
|
55
|
-
:
|
56
|
-
:
|
57
|
-
:
|
58
|
-
:
|
53
|
+
element_id: @element.blank? ? nil : @element.id,
|
54
|
+
content_id: @content.blank? ? nil : @content.id,
|
55
|
+
swap: @swap,
|
56
|
+
page: params[:page],
|
57
|
+
size: @size,
|
58
|
+
options: @options.to_json
|
59
59
|
),
|
60
60
|
{
|
61
|
-
:
|
62
|
-
:
|
61
|
+
size: "540x550",
|
62
|
+
title: _t(:upload_image)
|
63
63
|
},
|
64
64
|
{
|
65
|
-
:
|
66
|
-
:
|
65
|
+
class: 'icon_button',
|
66
|
+
title: _t(:upload_image)
|
67
67
|
}
|
68
68
|
) %>
|
69
69
|
<label><%= _t(:upload_image) %></label>
|
70
70
|
</div>
|
71
|
-
<%= render :
|
71
|
+
<%= render partial: 'alchemy/admin/partials/remote_search_form' %>
|
72
72
|
</div>
|
@@ -3,24 +3,24 @@
|
|
3
3
|
<% action_url = params[:image_assign_url] + "?picture_id=#{picture_to_assign.id}" %>
|
4
4
|
<% action_method = params[:image_assign_method] %>
|
5
5
|
<% else %>
|
6
|
-
<% action_url = create_or_assign_url(picture_to_assign, @options) %>
|
6
|
+
<% action_url = create_or_assign_url(picture_to_assign, @options.to_json) %>
|
7
7
|
<% action_method = @content.blank? ? 'post' : 'put' %>
|
8
8
|
<% end %>
|
9
9
|
<%= link_to(
|
10
10
|
image_tag(
|
11
11
|
alchemy.thumbnail_path(
|
12
|
-
:
|
13
|
-
:
|
14
|
-
:
|
12
|
+
id: picture_to_assign,
|
13
|
+
size: size,
|
14
|
+
sh: picture_to_assign.security_token(size: size)
|
15
15
|
),
|
16
|
-
:
|
16
|
+
alt: picture_to_assign.name
|
17
17
|
),
|
18
18
|
action_url,
|
19
|
-
:
|
20
|
-
:
|
21
|
-
:
|
22
|
-
:
|
23
|
-
:
|
19
|
+
remote: true,
|
20
|
+
onclick: '$(self).attr("href", "#").off("click")',
|
21
|
+
method: action_method,
|
22
|
+
title: _t(:assign_image),
|
23
|
+
class: 'thumbnail_background'
|
24
24
|
) %>
|
25
25
|
<div class="picture_name" title="<%= picture_to_assign.name %>">
|
26
26
|
<%= picture_to_assign.name.empty? ? " " : picture_to_assign.name %>
|
@@ -3,22 +3,7 @@
|
|
3
3
|
<h2><%= _t("Filter by tag") %></h2>
|
4
4
|
<%= js_filter_field '#tag_list li' %>
|
5
5
|
<ul>
|
6
|
-
|
7
|
-
<% picture_tags = filtered_by_tag?(t) ? tag_filter(remove: t) : tag_filter(add: t) %>
|
8
|
-
<%= content_tag 'li', name: t.name, class: p[:tagged_with].try(:split, ',').try(:include?, t.name) ? 'active' : nil do %>
|
9
|
-
<%= link_to(
|
10
|
-
"#{t.name} (#{t.count})",
|
11
|
-
url_for(
|
12
|
-
p.delete_if { |k, v| k == "page" }.merge(
|
13
|
-
action: 'index',
|
14
|
-
tagged_with: picture_tags
|
15
|
-
)
|
16
|
-
),
|
17
|
-
remote: request.xhr?,
|
18
|
-
class: 'please_wait'
|
19
|
-
) %>
|
20
|
-
<% end %>
|
21
|
-
<% end %>
|
6
|
+
<%= render_tag_list('Alchemy::Picture', p) %>
|
22
7
|
</ul>
|
23
8
|
<% if p[:tagged_with].present? %>
|
24
9
|
<%= link_to(
|
@@ -1 +1 @@
|
|
1
|
-
window.location.
|
1
|
+
window.location.href = "<%= resource_url_proxy.url_for(action: 'index') %>";
|
@@ -1,2 +1,2 @@
|
|
1
1
|
Alchemy.closeCurrentWindow();
|
2
|
-
window.location.
|
2
|
+
window.location.href = '<%= alchemy.login_path %>';
|
@@ -1 +1 @@
|
|
1
|
-
window.location.
|
1
|
+
window.location.href = '<%= url_for(@redirect_url) %>';
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= hidden_field_tag content.form_field_name(:link_title), content.essence.link_title %>
|
14
14
|
<%= hidden_field_tag content.form_field_name(:link_class_name), content.essence.link_class_name %>
|
15
15
|
<%= hidden_field_tag content.form_field_name(:link_target), content.essence.link_target %>
|
16
|
-
<%= render 'alchemy/essences/linkable_essence_tools', :content => content %>
|
16
|
+
<%= render 'alchemy/essences/shared/linkable_essence_tools', :content => content %>
|
17
17
|
</div>
|
18
18
|
<script type="text/javascript" charset="utf-8">
|
19
19
|
$('#<%= content.form_field_id(:link) %>').on('change', function() {
|