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.
Files changed (55) hide show
  1. data/README.md +1 -1
  2. data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +1 -1
  3. data/app/assets/stylesheets/alchemy/sitemap.css.scss +14 -13
  4. data/app/assets/stylesheets/alchemy/standard_set.css +9 -10
  5. data/app/controllers/alchemy/admin/pages_controller.rb +1 -0
  6. data/app/controllers/alchemy/base_controller.rb +2 -1
  7. data/app/helpers/alchemy/admin/essences_helper.rb +1 -0
  8. data/app/helpers/alchemy/elements_helper.rb +2 -10
  9. data/app/helpers/alchemy/essences_helper.rb +1 -0
  10. data/app/helpers/alchemy/pages_helper.rb +31 -13
  11. data/app/models/alchemy/attachment.rb +1 -1
  12. data/app/models/alchemy/content.rb +8 -8
  13. data/app/models/alchemy/element.rb +14 -10
  14. data/app/models/alchemy/essence_file.rb +1 -1
  15. data/app/models/alchemy/message.rb +9 -9
  16. data/app/models/alchemy/page.rb +4 -3
  17. data/app/models/alchemy/picture.rb +1 -1
  18. data/app/models/alchemy/user.rb +1 -1
  19. data/app/sweepers/alchemy/content_sweeper.rb +29 -6
  20. data/app/views/alchemy/admin/attachments/new.html.erb +1 -1
  21. data/app/views/alchemy/admin/pages/index.html.erb +7 -7
  22. data/app/views/alchemy/admin/pages/sort.js.erb +2 -1
  23. data/app/views/alchemy/admin/partials/_upload_form.html.erb +2 -2
  24. data/app/views/alchemy/admin/pictures/new.html.erb +1 -1
  25. data/app/views/alchemy/essences/_essence_picture_tools.html.erb +2 -2
  26. data/app/views/alchemy/essences/_essence_text_editor.html.erb +11 -11
  27. data/app/views/alchemy/navigation/_link.html.erb +20 -20
  28. data/app/views/alchemy/navigation/_renderer.html.erb +37 -23
  29. data/config/alchemy/config.yml +107 -65
  30. data/config/alchemy/elements.yml +12 -1
  31. data/config/locales/alchemy.de.yml +1 -0
  32. data/config/locales/alchemy.en.yml +1 -0
  33. data/lib/alchemy/essence.rb +1 -1
  34. data/lib/alchemy/page_layout.rb +3 -9
  35. data/lib/alchemy/resource.rb +5 -5
  36. data/lib/alchemy/version.rb +1 -1
  37. data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +2 -2
  38. data/lib/rails/generators/alchemy/scaffold/{files/page_layouts.yml → templates/page_layouts.yml.tt} +4 -0
  39. data/spec/config_spec.rb +1 -1
  40. data/spec/dummy/db/schema.rb +1 -1
  41. data/spec/helpers/admin/contents_helper_spec.rb +4 -3
  42. data/spec/helpers/admin/essences_helper_spec.rb +4 -8
  43. data/spec/helpers/essences_helper_spec.rb +0 -4
  44. data/spec/helpers/pages_helper_spec.rb +10 -1
  45. data/spec/integration/admin/modules_integration_spec.rb +25 -21
  46. data/spec/integration/admin/pages_controller_spec.rb +16 -19
  47. data/spec/integration/admin/resources_integration_spec.rb +58 -64
  48. data/spec/integration/pages_controller_spec.rb +24 -3
  49. data/spec/integration/security_spec.rb +12 -12
  50. data/spec/libraries/resource_spec.rb +16 -18
  51. data/spec/models/page_spec.rb +352 -326
  52. data/spec/page_layout_spec.rb +2 -2
  53. data/spec/support/alchemy/specs_helpers.rb +16 -1
  54. metadata +116 -38
  55. data/spec/support/integration_spec_helper.rb +0 -24
@@ -23,7 +23,7 @@ module Alchemy
23
23
  :name
24
24
  )
25
25
 
26
- stampable
26
+ stampable(:stamper_class_name => 'Alchemy::User')
27
27
 
28
28
  def self.find_paginated(params, per_page)
29
29
  Picture.where("name LIKE '%#{params[:query]}%'").page(params[:page] || 1).per(per_page).order(:name)
@@ -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
- def after_update(element)
6
- expire_cache_for(element.contents)
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(element)
10
- expire_cache_for(element.contents)
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
- private
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)[:allowed_filetypes][:attachments],
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
- <h2 id="sitemap_heading">
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 id="bottom_buttons">
74
+ <div class="buttons">
80
75
  <%= link_to( t('cancel'), alchemy.admin_pages_path, :class => 'button' ) %>&nbsp;
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
- $('#bottom_panel').show();
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)[:file_size_limit] || 100 -%>,
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)[:upload_limit] || 50 -%>,
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)[:allowed_filetypes][:pictures],
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
- <%- 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
- ) -%>
8
- Alchemy::Page.find_
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
+ <% 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
- <%- unless pages.blank? -%>
2
- <ul class="navigation_level_<%= pages.first.level - 1 %>">
3
- <%- pages.each do |page| -%>
4
- <%- position = 'first' if page == pages.to_a.first -%>
5
- <%- position = 'last' if page == pages.to_a.last -%>
6
- <li class="<%= page.urlname -%> <%= position -%><%= " active" if page_active?(page) %>">
7
- <%= render :partial => options[:navigation_link_partial], :object => page, :locals => {:page => page, :options => options} -%>
8
- <%- options[:from_page] = page -%>
9
- <%- if options[:reverse_children] -%>
10
- <%- options[:reverse] = true -%>
11
- <%- end -%>
12
- <%- if options[:show_nonactive] -%>
13
- <%= render_navigation(options) if (options[:submenu]) -%>
14
- <%- else -%>
15
- <%= render_navigation(options) if ((options[:submenu] && page_active?(page)) || options[:all_sub_menues]) -%>
16
- <%- end -%>
17
- </li>
18
- <%- unless options[:spacer].empty? -%>
19
- <%= raw "<li class=\"navigation_spacer\">#{options[:spacer]}</li>" unless page == pages.to_a.last -%>
20
- <%- end -%>
21
- <%- end -%>
22
- </ul>
23
- <%- end -%>
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 -%>
@@ -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
- # Only active in production environment!!!
13
- :auto_logout_time: 30
15
+ #
16
+ # INFO: This is only active in production environments
17
+ #
18
+ auto_logout_time: 30
14
19
 
15
- # === Redirect options
16
- # redirect_index: You can set to redirect (an 301 permanent, for all you SEO geeks ^_^) to first child page (typically the homepage) the index/intro page if it's not visible.
17
- # So you don't get an 404 error if the language root page is not visible.
18
- # redirect_to_public_child: Alchemy redirects to the first public child page found, if a page is not visible.
19
- :redirect_index: true
20
- :redirect_to_public_child: true
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
- # Enabling the Ferret fulltext search engine.
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
- # Example: cd ~/html/alchemy/current && RAILS_ENV=production rake ferret:rebuild_index
25
- :ferret: true
31
+ #
32
+ # ==== Example:
33
+ #
34
+ # cd ~/html/alchemy/current && RAILS_ENV=production rake ferret:rebuild_index
35
+ #
36
+ ferret: true
26
37
 
27
- # === Pagecaching
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
- :cache_pages: true
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
- # show_root: Show language root page in sitemap?
37
- # show_flag: enables the Checkbox in Page#update overlay. So your customer can set the visibilit of pages in the sitemap.
38
- :sitemap:
39
- :show_root: true
40
- :show_flag: false
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
- # output_image_jpg_quality: If rendered as JPG this is the quality setting for it.
57
- # preprocess_image_resize: Large images are downsized after upload to save diskspace.
58
- # image_store_format: Masterimage storage format. Images are rendered from this master image, so a lossless format (png) is strongly recommended.
59
- # image_output_format: Globally image output format setting.
60
- # TIP: You can always override the output format in the options of your Essence. I.e. {:format => :gif}
61
- :output_image_jpg_quality: 85
62
- :preprocess_image_resize: 1000x1000
63
- :image_store_format: png
64
- :image_output_format: jpg
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
- # Default language for the seeder.
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
- :mailer:
100
- :page_layout_name: contact
101
- :forward_to_page: false
102
- :mail_success_page: thanks
103
- :mail_from: your.mail@your-domain.com
104
- :mail_to: your.mail@your-domain.com
105
- :fields: [salutation, firstname, lastname, address, zip, city, phone, email, message]
106
- :validate_fields: [lastname, email]
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 Userroles
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
- :user_roles: [registered, author, editor, admin]
154
+ #
155
+ user_roles: [registered, author, editor, admin]
119
156
 
120
157
  # === Uploader Settings
121
- # upload_limit: Integer Set an amount of files upload limit of files which can be uploaded at once. Set 0 for unlimited.
122
- # file_size_limit: Integer Set a file size limit in megabytes for a per file limit.
123
- # Allow filetypes to upload.
124
- # Pass * to allow all kind of files.
125
- :uploader:
126
- :upload_limit: 50
127
- :file_size_limit: 100
128
- :allowed_filetypes:
129
- :pictures: [jpg, jpeg, gif, png, psd, pdf]
130
- :attachments: ['*']
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
- :link_target_options: [blank]
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
- :open_external_links_in_new_tab: true
185
+ open_external_links_in_new_tab: true