alchemy_cms 2.2.rc8 → 2.2.rc11
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +1 -1
- data/app/assets/stylesheets/alchemy/sitemap.css.scss +14 -13
- data/app/assets/stylesheets/alchemy/standard_set.css +9 -10
- data/app/controllers/alchemy/admin/pages_controller.rb +1 -0
- data/app/controllers/alchemy/base_controller.rb +2 -1
- data/app/helpers/alchemy/admin/essences_helper.rb +1 -0
- data/app/helpers/alchemy/elements_helper.rb +2 -10
- data/app/helpers/alchemy/essences_helper.rb +1 -0
- data/app/helpers/alchemy/pages_helper.rb +31 -13
- data/app/models/alchemy/attachment.rb +1 -1
- data/app/models/alchemy/content.rb +8 -8
- data/app/models/alchemy/element.rb +14 -10
- data/app/models/alchemy/essence_file.rb +1 -1
- data/app/models/alchemy/message.rb +9 -9
- data/app/models/alchemy/page.rb +4 -3
- data/app/models/alchemy/picture.rb +1 -1
- data/app/models/alchemy/user.rb +1 -1
- data/app/sweepers/alchemy/content_sweeper.rb +29 -6
- data/app/views/alchemy/admin/attachments/new.html.erb +1 -1
- data/app/views/alchemy/admin/pages/index.html.erb +7 -7
- data/app/views/alchemy/admin/pages/sort.js.erb +2 -1
- data/app/views/alchemy/admin/partials/_upload_form.html.erb +2 -2
- data/app/views/alchemy/admin/pictures/new.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_picture_tools.html.erb +2 -2
- data/app/views/alchemy/essences/_essence_text_editor.html.erb +11 -11
- data/app/views/alchemy/navigation/_link.html.erb +20 -20
- data/app/views/alchemy/navigation/_renderer.html.erb +37 -23
- data/config/alchemy/config.yml +107 -65
- data/config/alchemy/elements.yml +12 -1
- data/config/locales/alchemy.de.yml +1 -0
- data/config/locales/alchemy.en.yml +1 -0
- data/lib/alchemy/essence.rb +1 -1
- data/lib/alchemy/page_layout.rb +3 -9
- data/lib/alchemy/resource.rb +5 -5
- data/lib/alchemy/version.rb +1 -1
- data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +2 -2
- data/lib/rails/generators/alchemy/scaffold/{files/page_layouts.yml → templates/page_layouts.yml.tt} +4 -0
- data/spec/config_spec.rb +1 -1
- data/spec/dummy/db/schema.rb +1 -1
- data/spec/helpers/admin/contents_helper_spec.rb +4 -3
- data/spec/helpers/admin/essences_helper_spec.rb +4 -8
- data/spec/helpers/essences_helper_spec.rb +0 -4
- data/spec/helpers/pages_helper_spec.rb +10 -1
- data/spec/integration/admin/modules_integration_spec.rb +25 -21
- data/spec/integration/admin/pages_controller_spec.rb +16 -19
- data/spec/integration/admin/resources_integration_spec.rb +58 -64
- data/spec/integration/pages_controller_spec.rb +24 -3
- data/spec/integration/security_spec.rb +12 -12
- data/spec/libraries/resource_spec.rb +16 -18
- data/spec/models/page_spec.rb +352 -326
- data/spec/page_layout_spec.rb +2 -2
- data/spec/support/alchemy/specs_helpers.rb +16 -1
- metadata +116 -38
- data/spec/support/integration_spec_helper.rb +0 -24
data/app/models/alchemy/user.rb
CHANGED
@@ -2,7 +2,7 @@ module Alchemy
|
|
2
2
|
class User < ActiveRecord::Base
|
3
3
|
|
4
4
|
model_stamper
|
5
|
-
stampable
|
5
|
+
stampable(:stamper_class_name => 'Alchemy::User')
|
6
6
|
acts_as_authentic do |c|
|
7
7
|
c.transition_from_restful_authentication = true
|
8
8
|
c.logged_in_timeout = Config.get(:auto_logout_time).minutes
|
@@ -1,16 +1,31 @@
|
|
1
1
|
module Alchemy
|
2
2
|
class ContentSweeper < ActionController::Caching::Sweeper
|
3
|
-
observe Element
|
4
3
|
|
5
|
-
|
6
|
-
|
4
|
+
observe Element, Page
|
5
|
+
|
6
|
+
def after_create(object)
|
7
|
+
if object.class.to_s == "Alchemy::Page"
|
8
|
+
expire_contents_displayed_as_select(object)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def after_update(object)
|
13
|
+
if object.class.to_s == "Alchemy::Element"
|
14
|
+
expire_cache_for(object.contents)
|
15
|
+
elsif object.class.to_s == "Alchemy::Page"
|
16
|
+
expire_contents_displayed_as_select(object)
|
17
|
+
end
|
7
18
|
end
|
8
19
|
|
9
|
-
def after_destroy(
|
10
|
-
|
20
|
+
def after_destroy(object)
|
21
|
+
if object.class.to_s == "Alchemy::Element"
|
22
|
+
expire_cache_for(object.contents)
|
23
|
+
elsif object.class.to_s == "Alchemy::Page"
|
24
|
+
expire_contents_displayed_as_select(object)
|
25
|
+
end
|
11
26
|
end
|
12
27
|
|
13
|
-
|
28
|
+
private
|
14
29
|
|
15
30
|
def expire_cache_for(contents)
|
16
31
|
contents.each do |content|
|
@@ -18,5 +33,13 @@ module Alchemy
|
|
18
33
|
end
|
19
34
|
end
|
20
35
|
|
36
|
+
# Expires all content editor cache fragments that have a :display_as => :select setting
|
37
|
+
def expire_contents_displayed_as_select(page)
|
38
|
+
return unless page.urlname_changed? || page.name_changed?
|
39
|
+
Content.essence_texts.all.select { |c| c.settings[:display_as] == 'select'}.each do |content|
|
40
|
+
expire_fragment(content)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
21
44
|
end
|
22
45
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= render(
|
3
3
|
:partial => "alchemy/admin/partials/upload_form",
|
4
4
|
:locals => {
|
5
|
-
:file_types => configuration(:uploader)[
|
5
|
+
:file_types => configuration(:uploader)['allowed_filetypes']['attachments'],
|
6
6
|
:file_types_description => t('documents'),
|
7
7
|
:model_name => 'attachment',
|
8
8
|
:item_type => t('files')
|
@@ -66,22 +66,22 @@
|
|
66
66
|
|
67
67
|
<%- if @page_root -%>
|
68
68
|
|
69
|
-
<
|
70
|
-
<span class="page_name"><%= t('Name') %></span>
|
71
|
-
<span class="page_infos"><%= t('Status') %></span>
|
72
|
-
</h2>
|
73
|
-
|
74
|
-
<div id="bottom_panel" style="display: none">
|
69
|
+
<div id="sort_panel" style="display: none">
|
75
70
|
<div class="info">
|
76
71
|
<%= render_icon('info') %>
|
77
72
|
<%= t('explain_sitemap_dragndrop_sorting') %>
|
78
73
|
</div>
|
79
|
-
<div
|
74
|
+
<div class="buttons">
|
80
75
|
<%= link_to( t('cancel'), alchemy.admin_pages_path, :class => 'button' ) %>
|
81
76
|
<%= submit_tag( t('save order'), :id => 'save_page_order', :class => 'button' ) %>
|
82
77
|
</div>
|
83
78
|
</div>
|
84
79
|
|
80
|
+
<h2 id="sitemap_heading">
|
81
|
+
<span class="page_name"><%= t('Name') %></span>
|
82
|
+
<span class="page_infos"><%= t('Status') %></span>
|
83
|
+
</h2>
|
84
|
+
|
85
85
|
<%= render :partial => 'sitemap' %>
|
86
86
|
|
87
87
|
<%- else -%>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
(function($) {
|
2
2
|
$('#sitemap').replaceWith('<%= escape_javascript(render(:partial => "sitemap")) -%>');
|
3
|
-
$('#
|
3
|
+
$('#sort_panel').show();
|
4
|
+
$('#sitemap_heading').css({'padding-top': 82});
|
4
5
|
Alchemy.PageSorter.init();
|
5
6
|
Alchemy.pleaseWaitOverlay(false);
|
6
7
|
})(jQuery);
|
@@ -44,10 +44,10 @@
|
|
44
44
|
Alchemy.Uploader.init({
|
45
45
|
upload_url: '<%= new_asset_path_with_session_information(model_name) %>',
|
46
46
|
post_params: <%= post_params.html_safe %>,
|
47
|
-
file_size_limit: <%= configuration(:uploader)[
|
47
|
+
file_size_limit: <%= configuration(:uploader)['file_size_limit'] || 100 -%>,
|
48
48
|
file_types: '<%= file_types.map{ |f| "*.#{f}" }.join(";") %>',
|
49
49
|
file_types_description: "<%= file_types_description %>",
|
50
|
-
file_upload_limit: <%= configuration(:uploader)[
|
50
|
+
file_upload_limit: <%= configuration(:uploader)['upload_limit'] || 50 -%>,
|
51
51
|
locale: "<%= ::I18n.locale || 'en' %>"
|
52
52
|
});
|
53
53
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= render(
|
3
3
|
:partial => "alchemy/admin/partials/upload_form",
|
4
4
|
:locals => {
|
5
|
-
:file_types => configuration(:uploader)[
|
5
|
+
:file_types => configuration(:uploader)['allowed_filetypes']['pictures'],
|
6
6
|
:file_types_description => t('images'),
|
7
7
|
:model_name => 'picture',
|
8
8
|
:item_type => t('images')
|
@@ -23,11 +23,11 @@
|
|
23
23
|
:options => options
|
24
24
|
),
|
25
25
|
{
|
26
|
-
:title => t('swap_image'),
|
26
|
+
:title => (content.ingredient ? t('swap_image') : t('insert_image')),
|
27
27
|
:size => '720x580',
|
28
28
|
:resizable => "true"
|
29
29
|
},
|
30
|
-
:title => t('swap_image')
|
30
|
+
:title => (content.ingredient ? t('swap_image') : t('insert_image'))
|
31
31
|
) %>
|
32
32
|
|
33
33
|
<%= link_to_function(
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%- cache(content) do -%>
|
2
2
|
<div class="content_editor<%= options[:display_inline].to_s == 'true' ? ' display_inline' : '' %>" id="<%= content_dom_id(content) %>">
|
3
|
-
|
3
|
+
|
4
4
|
<%- if content.settings[:display_as] == "checkbox" -%>
|
5
|
-
|
5
|
+
|
6
6
|
<%= check_box_tag(
|
7
7
|
content.form_field_name,
|
8
8
|
"1",
|
@@ -14,9 +14,9 @@
|
|
14
14
|
<label for="<%= content.form_field_id %>" style="display: inline">
|
15
15
|
<%= render_content_name(content) %>
|
16
16
|
</label>
|
17
|
-
|
17
|
+
|
18
18
|
<%- elsif content.settings[:display_as] == "select" -%>
|
19
|
-
|
19
|
+
|
20
20
|
<label><%= render_content_name(content) %></label>
|
21
21
|
|
22
22
|
<%- if options[:select_values].nil? -%>
|
@@ -44,9 +44,9 @@
|
|
44
44
|
}
|
45
45
|
) %>
|
46
46
|
<%- end -%>
|
47
|
-
|
47
|
+
|
48
48
|
<%- else -%>
|
49
|
-
|
49
|
+
|
50
50
|
<label>
|
51
51
|
<%= render_content_name(content) %>
|
52
52
|
<%= link_to_confirmation_window(
|
@@ -63,14 +63,14 @@
|
|
63
63
|
:class => ["thin_border #{content.settings[:linkable] ? ' text_with_icon' : ''}", html_options[:class]].join(' '),
|
64
64
|
:style => html_options[:style]
|
65
65
|
) %>
|
66
|
-
|
66
|
+
|
67
67
|
<%- if content.settings[:linkable] -%>
|
68
|
-
|
68
|
+
|
69
69
|
<%= hidden_field_tag content.form_field_name(:link), content.essence.link %>
|
70
70
|
<%= hidden_field_tag content.form_field_name(:link_title), content.essence.link_title %>
|
71
71
|
<%= hidden_field_tag content.form_field_name(:link_class_name), content.essence.link_class_name %>
|
72
72
|
<%= hidden_field_tag content.form_field_name(:link_target), content.essence.link_target %>
|
73
|
-
|
73
|
+
|
74
74
|
<span class="linkable_text_essence_tools">
|
75
75
|
<a href="#" onclick="Alchemy.LinkOverlay.open(this, 420); return false;" title="<%= t('place_link') -%>" class="icon_button <%= content.linked? ? ' linked' : '' -%>" name="essence_text_<%= content.id -%>" id="edit_link_<%= content.id -%>">
|
76
76
|
<span class="icon link"></span>
|
@@ -79,9 +79,9 @@
|
|
79
79
|
<span class="icon unlink"></span>
|
80
80
|
</a>
|
81
81
|
</span>
|
82
|
-
|
82
|
+
|
83
83
|
<%- end -%>
|
84
|
-
|
84
|
+
|
85
85
|
<%- end -%>
|
86
86
|
|
87
87
|
</div>
|
@@ -1,20 +1,20 @@
|
|
1
|
-
|
2
|
-
<%= link_to(
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
)
|
8
|
-
|
9
|
-
|
10
|
-
<%= link_to(
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
) -%>
|
20
|
-
|
1
|
+
<% if page.redirects_to_external? -%>
|
2
|
+
<%= link_to(
|
3
|
+
h(page.name),
|
4
|
+
page.urlname,
|
5
|
+
:title => options[:show_title] == true ? page.title : nil,
|
6
|
+
:target => configuration(:open_external_links_in_new_tab) ? '_blank' : nil,
|
7
|
+
:class => external_page_css_class(page)
|
8
|
+
) -%>
|
9
|
+
<% else -%>
|
10
|
+
<%= link_to(
|
11
|
+
h(page.name),
|
12
|
+
@preview_mode ? 'javascript:void(0)' : show_alchemy_page_path(page),
|
13
|
+
{
|
14
|
+
:class => (page_active?(page) ? 'active' : nil),
|
15
|
+
:title => (options[:show_title] ? page.title : nil),
|
16
|
+
:lang => page.language_code,
|
17
|
+
'data-page-id' => page.id
|
18
|
+
}
|
19
|
+
) -%>
|
20
|
+
<% end -%>
|
@@ -1,23 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
1
|
+
<% unless pages.blank? -%>
|
2
|
+
<%= content_tag(
|
3
|
+
'ul',
|
4
|
+
:class => html_options[:class] || "navigation level_#{pages.first.level - 1}",
|
5
|
+
:id => html_options[:id]
|
6
|
+
) do %>
|
7
|
+
<% pages.each do |page| -%>
|
8
|
+
<% position = 'first' if page == pages.to_a.first -%>
|
9
|
+
<% position = 'last' if page == pages.to_a.last -%>
|
10
|
+
<%= content_tag(
|
11
|
+
'li',
|
12
|
+
:class => [page.urlname, position, page_active?(page) ? 'active' : nil].compact.join(' ')
|
13
|
+
) do %>
|
14
|
+
<%= render(
|
15
|
+
:partial => options[:navigation_link_partial],
|
16
|
+
:object => page,
|
17
|
+
:locals => {
|
18
|
+
:page => page,
|
19
|
+
:options => options
|
20
|
+
}
|
21
|
+
) -%>
|
22
|
+
<% options[:from_page] = page -%>
|
23
|
+
<% if options[:reverse_children] -%>
|
24
|
+
<%- options[:reverse] = true -%>
|
25
|
+
<% end -%>
|
26
|
+
<% if options[:show_nonactive] -%>
|
27
|
+
<%= render_navigation(options) if options[:submenu] -%>
|
28
|
+
<% else -%>
|
29
|
+
<%= render_navigation(options) if (options[:submenu] && page_active?(page)) || options[:all_sub_menues] -%>
|
30
|
+
<% end -%>
|
31
|
+
<% end -%>
|
32
|
+
<% unless options[:spacer].empty? -%>
|
33
|
+
<%= raw "<li class=\"navigation_spacer\">#{options[:spacer]}</li>" unless page == pages.to_a.last -%>
|
34
|
+
<% end -%>
|
35
|
+
<% end -%>
|
36
|
+
<% end %>
|
37
|
+
<% end -%>
|
data/config/alchemy/config.yml
CHANGED
@@ -1,69 +1,101 @@
|
|
1
1
|
# encoding: UTF-8
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# = Configuration
|
4
4
|
#
|
5
5
|
# == This is the global Alchemy configuration file
|
6
|
+
#
|
6
7
|
# Please override your apps settings in your config/alchemy/config.yml file.
|
7
8
|
# You can use a handy rake task to generate it.
|
8
9
|
#
|
9
10
|
# rake alchemy:app_structure:create:config
|
10
11
|
|
12
|
+
# === Auto Log Out Time
|
13
|
+
#
|
11
14
|
# The amount of time of inactivity in minutes after which the user is kicked out of his current session.
|
12
|
-
#
|
13
|
-
:
|
15
|
+
#
|
16
|
+
# INFO: This is only active in production environments
|
17
|
+
#
|
18
|
+
auto_logout_time: 30
|
14
19
|
|
15
|
-
# === Redirect
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
|
20
|
-
:
|
20
|
+
# === Redirect Options
|
21
|
+
#
|
22
|
+
# redirect_index [Boolean] # You can disable the redirect to first child page for not public pages.
|
23
|
+
# redirect_to_public_child [Boolean] # Alchemy redirects to the first public child page found, if a page is not visible.
|
24
|
+
#
|
25
|
+
redirect_index: true
|
26
|
+
redirect_to_public_child: true
|
21
27
|
|
22
|
-
#
|
28
|
+
# === Enable the Ferret fulltext search engine
|
29
|
+
#
|
23
30
|
# Tip! For best performance and stability install a crontab that reindexes ferrets search index periodly.
|
24
|
-
#
|
25
|
-
:
|
31
|
+
#
|
32
|
+
# ==== Example:
|
33
|
+
#
|
34
|
+
# cd ~/html/alchemy/current && RAILS_ENV=production rake ferret:rebuild_index
|
35
|
+
#
|
36
|
+
ferret: true
|
26
37
|
|
27
|
-
# ===
|
38
|
+
# === Page caching
|
39
|
+
#
|
28
40
|
# Enable/Disable pagecaching globally.
|
41
|
+
#
|
29
42
|
# Hint: You can enable/disable page caching for single Alchemy::PageLayouts in the page_layout.yml file.
|
30
|
-
|
43
|
+
#
|
44
|
+
cache_pages: true
|
31
45
|
|
32
46
|
# === Sitemap
|
47
|
+
#
|
33
48
|
# Alchemy renders a nice HTML (<ul><li> style) and XML (Google conform!) Sitemap for you.
|
49
|
+
#
|
34
50
|
# Just place a sitemap element for a page layout in your page_layouts.yml file. Alchemy does the rest.
|
51
|
+
#
|
35
52
|
# ==== Options:
|
36
|
-
#
|
37
|
-
#
|
38
|
-
|
39
|
-
|
40
|
-
|
53
|
+
#
|
54
|
+
# show_root [Boolean] # Show language root page in sitemap?
|
55
|
+
# show_flag [Boolean] # Enables the Checkbox in Page#update overlay. So your customer can set the visibilit of pages in the sitemap.
|
56
|
+
#
|
57
|
+
sitemap:
|
58
|
+
show_root: true
|
59
|
+
show_flag: false
|
41
60
|
|
42
61
|
# === URL nesting
|
62
|
+
#
|
43
63
|
# By default Alchemy does not nest page urls respectivley to their page tree position.
|
64
|
+
#
|
44
65
|
# Enable +url_nesting+ to get nested urls.
|
66
|
+
#
|
45
67
|
# ==== Example of a nested url:
|
68
|
+
#
|
46
69
|
# +http://homepage.com/company/history/the-early-years+
|
70
|
+
#
|
47
71
|
# Alchemy supports url nesting up to three levels deep. We think that's more then enough,
|
48
72
|
# because URLs like this are possible:
|
73
|
+
#
|
49
74
|
# +http://homepage.com/en/2011/12/08/my-post
|
75
|
+
#
|
50
76
|
url_nesting: false
|
51
77
|
|
52
78
|
# === Picture rendering settings
|
79
|
+
#
|
53
80
|
# Alchemy uses Fleximage and RMagick to render images. Use {:image_size => "XXXxYYY", :crop => BOOLEAN [true]} to resize images.
|
81
|
+
#
|
54
82
|
# See https://github.com/Squeegy/fleximage for further infos.
|
83
|
+
#
|
55
84
|
# ==== Options:
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
|
62
|
-
:
|
63
|
-
|
64
|
-
:
|
85
|
+
#
|
86
|
+
# output_image_jpg_quality [Integer] # If image gets rendered as JPG this is the quality setting for it. (Default 85)
|
87
|
+
# preprocess_image_resize [String] # I.E.: 1000x1000. If you are limited on diskspace use this option to downsize large images to that value. (Default nil)
|
88
|
+
# image_store_format [String] # The storage format of the master image. All images get rendered from this master image, so a lossless format (png) is strongly recommended. (Default png)
|
89
|
+
# image_output_format [String] # The global image output format setting.
|
90
|
+
#
|
91
|
+
# TIP: You can always override the output format in the options of your Essence. I.E. {:format => :gif}
|
92
|
+
#
|
93
|
+
output_image_jpg_quality: 85
|
94
|
+
preprocess_image_resize:
|
95
|
+
image_store_format: png
|
96
|
+
image_output_format: jpg
|
65
97
|
|
66
|
-
#
|
98
|
+
# This is the default language for the seeder.
|
67
99
|
default_language:
|
68
100
|
code: de
|
69
101
|
name: Deutsch
|
@@ -71,73 +103,83 @@ default_language:
|
|
71
103
|
frontpage_name: Intro
|
72
104
|
|
73
105
|
# === Mailer Settings:
|
74
|
-
#
|
106
|
+
#
|
75
107
|
# To send Mails via contact forms you can create your form fields here and set which fields are to be validated.
|
76
|
-
#
|
108
|
+
#
|
77
109
|
# === Validating fields:
|
78
|
-
#
|
110
|
+
#
|
79
111
|
# Pass the field name as symbol and a message_id (will be translated) to :validate_fields:
|
80
|
-
#
|
112
|
+
#
|
81
113
|
# ==== Options:
|
82
|
-
#
|
114
|
+
#
|
83
115
|
# page_layout_name: [String] # A +Alchemy::PageLayout+ name. Used to render the contactform on a page with this layout.
|
84
116
|
# fields: [Array] # An Array of fieldnames.
|
85
117
|
# validate_fields: [Array] # An Array of fieldnames to be validated on presence.
|
86
|
-
#
|
118
|
+
#
|
87
119
|
# ==== Translating validation messages:
|
88
|
-
#
|
120
|
+
#
|
89
121
|
# The validation messages are passed through ::I18n.t so you can translate it in your language yml file.
|
90
|
-
#
|
122
|
+
#
|
91
123
|
# ==== Example:
|
92
|
-
#
|
93
|
-
# de:
|
124
|
+
#
|
125
|
+
# de:
|
94
126
|
# activemodel:
|
95
127
|
# attributes:
|
96
128
|
# alchemy/message:
|
97
129
|
# firstname: Vorname
|
98
|
-
#
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
130
|
+
#
|
131
|
+
mailer:
|
132
|
+
page_layout_name: contact
|
133
|
+
forward_to_page: false
|
134
|
+
mail_success_page: thanks
|
135
|
+
mail_from: your.mail@your-domain.com
|
136
|
+
mail_to: your.mail@your-domain.com
|
137
|
+
fields: [salutation, firstname, lastname, address, zip, city, phone, email, message]
|
138
|
+
validate_fields: [lastname, email]
|
107
139
|
|
108
140
|
# === User roles
|
141
|
+
#
|
109
142
|
# You can add own user roles. To set permissions for this roles please add an authorization_rules.rb file in your config folder.
|
110
143
|
# Further documentation for the auth system used please visit:
|
144
|
+
#
|
111
145
|
# https://github.com/stffn/declarative_authorization/blob/master/README.rdoc
|
112
|
-
#
|
113
|
-
# ==== Translating
|
146
|
+
#
|
147
|
+
# ==== Translating User roles
|
148
|
+
#
|
114
149
|
# Userroles can be translated inside your the language yml file under:
|
150
|
+
#
|
115
151
|
# alchemy:
|
116
152
|
# user_roles:
|
117
153
|
# rolename: Name of the role
|
118
|
-
|
154
|
+
#
|
155
|
+
user_roles: [registered, author, editor, admin]
|
119
156
|
|
120
157
|
# === Uploader Settings
|
121
|
-
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
:
|
129
|
-
|
130
|
-
|
158
|
+
#
|
159
|
+
# upload_limit [Integer] # Set an amount of files upload limit of files which can be uploaded at once. Set 0 for unlimited.
|
160
|
+
# file_size_limit* [Integer] # Set a file size limit in mega bytes for a per file limit.
|
161
|
+
#
|
162
|
+
# *) Allow filetypes to upload. Pass * to allow all kind of files.
|
163
|
+
#
|
164
|
+
uploader:
|
165
|
+
upload_limit: 50
|
166
|
+
file_size_limit: 100
|
167
|
+
allowed_filetypes:
|
168
|
+
pictures: [jpg, jpeg, gif, png, psd, pdf]
|
169
|
+
attachments: ['*']
|
131
170
|
|
132
171
|
# === Link Target Options
|
172
|
+
#
|
133
173
|
# Values for the link target selectbox inside the page link overlay.
|
134
174
|
# The value gets attached as a data-link-target attribute to the link.
|
135
|
-
#
|
175
|
+
#
|
136
176
|
# == Example:
|
177
|
+
#
|
137
178
|
# Open all links set to overlay inside an jQuery UI Dialog Window.
|
138
|
-
#
|
179
|
+
#
|
139
180
|
# jQuery(a[data-link-target="overlay"]).dialog();
|
140
|
-
|
181
|
+
#
|
182
|
+
link_target_options: [blank]
|
141
183
|
|
142
184
|
# Should pages that redirect to an external url open the link in a new tab/window?
|
143
|
-
|
185
|
+
open_external_links_in_new_tab: true
|