Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: AlchemyCMS/alchemy_cms
...
head fork: AlchemyCMS/alchemy_cms
Checking mergeability… Don't worry, you can still create the pull request.
  • 10 commits
  • 11 files changed
  • 0 commit comments
  • 3 contributors
View
2  app/models/alchemy/essence_file.rb
@@ -1,7 +1,7 @@
module Alchemy
class EssenceFile < ActiveRecord::Base
- attr_accessible :title, :css_class
+ attr_accessible :title, :css_class, :attachment_id
acts_as_essence(
:ingredient_column => :attachment,
View
18 app/models/alchemy/message.rb
@@ -1,13 +1,13 @@
# This is a tableless model only used for validating contactform fields.
-#
+#
# You can specify the fields for your contactform in the +config/alchemy/config.yml+ file in the +:mailer+ options.
-#
+#
# === Example Contactform Configuration:
-#
-# :mailer:
-# :form_layout_name: contact
-# :fields: [subject, name, email, message, info]
-# :validate_fields: [name, email]
+#
+# mailer:
+# form_layout_name: contact
+# fields: [subject, name, email, message, info]
+# validate_fields: [name, email]
module Alchemy
class Message
@@ -22,12 +22,12 @@ class Message
attr_accessor :contact_form_id, :ip
attr_accessible :contact_form_id
- @@config[:fields].each do |field|
+ @@config['fields'].each do |field|
attr_accessor field.to_sym
attr_accessible field.to_sym
end
- @@config[:validate_fields].each do |field|
+ @@config['validate_fields'].each do |field|
validates_presence_of field
if field.to_s == 'email'
validates_format_of field, :with => ::Authlogic::Regex.email, :if => :email_is_filled
View
2  app/views/alchemy/admin/attachments/new.html.erb
@@ -2,7 +2,7 @@
<%= render(
:partial => "alchemy/admin/partials/upload_form",
:locals => {
- :file_types => configuration(:uploader)[:allowed_filetypes][:attachments],
+ :file_types => configuration(:uploader)['allowed_filetypes']['attachments'],
:file_types_description => t('documents'),
:model_name => 'attachment',
:item_type => t('files')
View
4 app/views/alchemy/admin/partials/_upload_form.html.erb
@@ -44,10 +44,10 @@
Alchemy.Uploader.init({
upload_url: '<%= new_asset_path_with_session_information(model_name) %>',
post_params: <%= post_params.html_safe %>,
- file_size_limit: <%= configuration(:uploader)[:file_size_limit] || 100 -%>,
+ file_size_limit: <%= configuration(:uploader)['file_size_limit'] || 100 -%>,
file_types: '<%= file_types.map{ |f| "*.#{f}" }.join(";") %>',
file_types_description: "<%= file_types_description %>",
- file_upload_limit: <%= configuration(:uploader)[:upload_limit] || 50 -%>,
+ file_upload_limit: <%= configuration(:uploader)['upload_limit'] || 50 -%>,
locale: "<%= ::I18n.locale || 'en' %>"
});
View
2  app/views/alchemy/admin/pictures/new.html.erb
@@ -2,7 +2,7 @@
<%= render(
:partial => "alchemy/admin/partials/upload_form",
:locals => {
- :file_types => configuration(:uploader)[:allowed_filetypes][:pictures],
+ :file_types => configuration(:uploader)['allowed_filetypes']['pictures'],
:file_types_description => t('images'),
:model_name => 'picture',
:item_type => t('images')
View
4 app/views/alchemy/essences/_essence_picture_tools.html.erb
@@ -23,11 +23,11 @@
:options => options
),
{
- :title => t('swap_image'),
+ :title => (content.ingredient ? t('swap_image') : t('insert_image')),
:size => '720x580',
:resizable => "true"
},
- :title => t('swap_image')
+ :title => (content.ingredient ? t('swap_image') : t('insert_image'))
) %>
<%= link_to_function(
View
172 config/alchemy/config.yml
@@ -1,69 +1,101 @@
# encoding: UTF-8
-#
+#
# = Configuration
#
# == This is the global Alchemy configuration file
+#
# Please override your apps settings in your config/alchemy/config.yml file.
# You can use a handy rake task to generate it.
#
# rake alchemy:app_structure:create:config
+# === Auto Log Out Time
+#
# The amount of time of inactivity in minutes after which the user is kicked out of his current session.
-# Only active in production environment!!!
-:auto_logout_time: 30
+#
+# INFO: This is only active in production environments
+#
+auto_logout_time: 30
-# === Redirect options
-# 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.
-# So you don't get an 404 error if the language root page is not visible.
-# redirect_to_public_child: Alchemy redirects to the first public child page found, if a page is not visible.
-:redirect_index: true
-:redirect_to_public_child: true
+# === Redirect Options
+#
+# redirect_index [Boolean] # You can disable the redirect to first child page for not public pages.
+# redirect_to_public_child [Boolean] # Alchemy redirects to the first public child page found, if a page is not visible.
+#
+redirect_index: true
+redirect_to_public_child: true
-# Enabling the Ferret fulltext search engine.
+# === Enable the Ferret fulltext search engine
+#
# Tip! For best performance and stability install a crontab that reindexes ferrets search index periodly.
-# Example: cd ~/html/alchemy/current && RAILS_ENV=production rake ferret:rebuild_index
-:ferret: true
+#
+# ==== Example:
+#
+# cd ~/html/alchemy/current && RAILS_ENV=production rake ferret:rebuild_index
+#
+ferret: true
-# === Pagecaching
+# === Page caching
+#
# Enable/Disable pagecaching globally.
+#
# Hint: You can enable/disable page caching for single Alchemy::PageLayouts in the page_layout.yml file.
-:cache_pages: true
+#
+cache_pages: true
# === Sitemap
+#
# Alchemy renders a nice HTML (<ul><li> style) and XML (Google conform!) Sitemap for you.
+#
# Just place a sitemap element for a page layout in your page_layouts.yml file. Alchemy does the rest.
+#
# ==== Options:
-# show_root: Show language root page in sitemap?
-# show_flag: enables the Checkbox in Page#update overlay. So your customer can set the visibilit of pages in the sitemap.
-:sitemap:
- :show_root: true
- :show_flag: false
+#
+# show_root [Boolean] # Show language root page in sitemap?
+# show_flag [Boolean] # Enables the Checkbox in Page#update overlay. So your customer can set the visibilit of pages in the sitemap.
+#
+sitemap:
+ show_root: true
+ show_flag: false
# === URL nesting
+#
# By default Alchemy does not nest page urls respectivley to their page tree position.
+#
# Enable +url_nesting+ to get nested urls.
+#
# ==== Example of a nested url:
+#
# +http://homepage.com/company/history/the-early-years+
+#
# Alchemy supports url nesting up to three levels deep. We think that's more then enough,
# because URLs like this are possible:
+#
# +http://homepage.com/en/2011/12/08/my-post
+#
url_nesting: false
# === Picture rendering settings
+#
# Alchemy uses Fleximage and RMagick to render images. Use {:image_size => "XXXxYYY", :crop => BOOLEAN [true]} to resize images.
+#
# See https://github.com/Squeegy/fleximage for further infos.
+#
# ==== Options:
-# output_image_jpg_quality: If rendered as JPG this is the quality setting for it.
-# preprocess_image_resize: Large images are downsized after upload to save diskspace.
-# image_store_format: Masterimage storage format. Images are rendered from this master image, so a lossless format (png) is strongly recommended.
-# image_output_format: Globally image output format setting.
-# TIP: You can always override the output format in the options of your Essence. I.e. {:format => :gif}
-:output_image_jpg_quality: 85
-:preprocess_image_resize: 1000x1000
-:image_store_format: png
-:image_output_format: jpg
+#
+# output_image_jpg_quality [Integer] # If image gets rendered as JPG this is the quality setting for it. (Default 85)
+# 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)
+# 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)
+# image_output_format [String] # The global image output format setting.
+#
+# TIP: You can always override the output format in the options of your Essence. I.E. {:format => :gif}
+#
+output_image_jpg_quality: 85
+preprocess_image_resize:
+image_store_format: png
+image_output_format: jpg
-# Default language for the seeder.
+# This is the default language for the seeder.
default_language:
code: de
name: Deutsch
@@ -71,73 +103,83 @@ default_language:
frontpage_name: Intro
# === Mailer Settings:
-#
+#
# To send Mails via contact forms you can create your form fields here and set which fields are to be validated.
-#
+#
# === Validating fields:
-#
+#
# Pass the field name as symbol and a message_id (will be translated) to :validate_fields:
-#
+#
# ==== Options:
-#
+#
# page_layout_name: [String] # A +Alchemy::PageLayout+ name. Used to render the contactform on a page with this layout.
# fields: [Array] # An Array of fieldnames.
# validate_fields: [Array] # An Array of fieldnames to be validated on presence.
-#
+#
# ==== Translating validation messages:
-#
+#
# The validation messages are passed through ::I18n.t so you can translate it in your language yml file.
-#
+#
# ==== Example:
-#
-# de:
+#
+# de:
# activemodel:
# attributes:
# alchemy/message:
# firstname: Vorname
-#
-:mailer:
- :page_layout_name: contact
- :forward_to_page: false
- :mail_success_page: thanks
- :mail_from: your.mail@your-domain.com
- :mail_to: your.mail@your-domain.com
- :fields: [salutation, firstname, lastname, address, zip, city, phone, email, message]
- :validate_fields: [lastname, email]
+#
+mailer:
+ page_layout_name: contact
+ forward_to_page: false
+ mail_success_page: thanks
+ mail_from: your.mail@your-domain.com
+ mail_to: your.mail@your-domain.com
+ fields: [salutation, firstname, lastname, address, zip, city, phone, email, message]
+ validate_fields: [lastname, email]
# === User roles
+#
# You can add own user roles. To set permissions for this roles please add an authorization_rules.rb file in your config folder.
# Further documentation for the auth system used please visit:
+#
# https://github.com/stffn/declarative_authorization/blob/master/README.rdoc
-#
-# ==== Translating Userroles
+#
+# ==== Translating User roles
+#
# Userroles can be translated inside your the language yml file under:
+#
# alchemy:
# user_roles:
# rolename: Name of the role
-:user_roles: [registered, author, editor, admin]
+#
+user_roles: [registered, author, editor, admin]
# === Uploader Settings
-# upload_limit: Integer Set an amount of files upload limit of files which can be uploaded at once. Set 0 for unlimited.
-# file_size_limit: Integer Set a file size limit in megabytes for a per file limit.
-# Allow filetypes to upload.
-# Pass * to allow all kind of files.
-:uploader:
- :upload_limit: 50
- :file_size_limit: 100
- :allowed_filetypes:
- :pictures: [jpg, jpeg, gif, png, psd, pdf]
- :attachments: ['*']
+#
+# upload_limit [Integer] # Set an amount of files upload limit of files which can be uploaded at once. Set 0 for unlimited.
+# file_size_limit* [Integer] # Set a file size limit in mega bytes for a per file limit.
+#
+# *) Allow filetypes to upload. Pass * to allow all kind of files.
+#
+uploader:
+ upload_limit: 50
+ file_size_limit: 100
+ allowed_filetypes:
+ pictures: [jpg, jpeg, gif, png, psd, pdf]
+ attachments: ['*']
# === Link Target Options
+#
# Values for the link target selectbox inside the page link overlay.
# The value gets attached as a data-link-target attribute to the link.
-#
+#
# == Example:
+#
# Open all links set to overlay inside an jQuery UI Dialog Window.
-#
+#
# jQuery(a[data-link-target="overlay"]).dialog();
-:link_target_options: [blank]
+#
+link_target_options: [blank]
# Should pages that redirect to an external url open the link in a new tab/window?
-:open_external_links_in_new_tab: true
+open_external_links_in_new_tab: true
View
1  config/locales/alchemy.de.yml
@@ -497,6 +497,7 @@ de:
successfully_added_element: "Element wurde hinzugefügt."
successfully_saved_element_position: "Die Elementposition wurde gespeichert."
swap_image: "Bild tauschen"
+ insert_image: "Bild einfügen"
swfupload:
cancel_uploads: "Hochladen abbrechen"
title: "Titel"
View
1  config/locales/alchemy.en.yml
@@ -339,6 +339,7 @@ en:
successfully_added_element: "Succesfully added new element."
successfully_saved_element_position: "Element position updated succesfully."
swap_image: "Change image"
+ insert_image: "Insert image"
swfupload:
cancel_uploads: "Cancel uploads"
title: "Title"
View
2  lib/alchemy/version.rb
@@ -1,5 +1,5 @@
module Alchemy
- VERSION = "2.2.rc9"
+ VERSION = "2.2.rc10"
end
View
2  spec/config_spec.rb
@@ -2,6 +2,6 @@
describe Alchemy::Config do
it "should have an array of fields for mailer" do
- Alchemy::Config.get(:mailer)[:fields].should be_a(Array)
+ Alchemy::Config.get(:mailer)['fields'].should be_a(Array)
end
end

No commit comments for this range

Something went wrong with that request. Please try again.