alchemy_cms 2.1.7 → 2.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -1
- data/README.md +2 -2
- data/alchemy_cms.gemspec +3 -4
- data/app/assets/stylesheets/alchemy/jquery-ui.alchemy.css.scss +4 -0
- data/app/controllers/alchemy/admin/contents_controller.rb +11 -4
- data/app/controllers/alchemy/base_controller.rb +8 -1
- data/app/controllers/alchemy/messages_controller.rb +13 -16
- data/app/helpers/alchemy/admin/essences_helper.rb +5 -2
- data/app/models/alchemy/message.rb +1 -19
- data/app/models/alchemy/user_session.rb +2 -0
- data/app/views/alchemy/admin/contents/create.js.erb +34 -125
- data/app/views/alchemy/admin/contents/new.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
- data/app/views/alchemy/admin/pages/edit.html.erb +2 -0
- data/app/views/alchemy/admin/users/_table.html.erb +2 -2
- data/app/views/alchemy/base/error_notice.js.erb +1 -1
- data/app/views/alchemy/elements/_contactform_view.html.erb +4 -5
- data/app/views/alchemy/essences/_essence_picture_view.html.erb +1 -1
- data/app/views/alchemy/messages/contact_form_mail.text.erb +8 -6
- data/config/alchemy/config.yml +8 -3
- data/config/alchemy/elements.yml +1 -0
- data/config/locales/alchemy.de.yml +11 -9
- data/config/locales/alchemy.en.yml +6 -4
- data/lib/alchemy/version.rb +1 -1
- metadata +35 -38
- data/app/views/alchemy/messages/contact_form_mail.html.erb +0 -14
- data/app/views/elements/_download_editor.html.erb +0 -1
- data/app/views/elements/_download_view.html.erb +0 -3
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@ Alchemy CMS
|
|
2
2
|
===========
|
3
3
|
|
4
4
|
[![Build Status](https://secure.travis-ci.org/magiclabs/alchemy_cms.png?branch=master)](http://travis-ci.org/magiclabs/alchemy_cms)
|
5
|
-
![Status](http://stillmaintained.com/magiclabs/alchemy_cms.png)
|
5
|
+
[![Development Status](http://stillmaintained.com/magiclabs/alchemy_cms.png)](http://stillmaintained.com/magiclabs/alchemy_cms)
|
6
6
|
|
7
7
|
About
|
8
8
|
-----
|
@@ -102,7 +102,7 @@ Resources
|
|
102
102
|
|
103
103
|
* Homepage: <http://alchemy-cms.com>
|
104
104
|
* Live-Demo: <http://demo.alchemy-cms.com> (user: demo, password: demo)
|
105
|
-
*
|
105
|
+
* Guidelines: <http://guides.alchemy-cms.com>
|
106
106
|
* API Documentation: <http://api.alchemy-cms.com>
|
107
107
|
* Issue-Tracker: <http://issues.alchemy-cms.com>
|
108
108
|
* Sourcecode: <http://source.alchemy-cms.com>
|
data/alchemy_cms.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_runtime_dependency(%q<rails>, ["~> 3.1.
|
22
|
+
s.add_runtime_dependency(%q<rails>, ["~> 3.1.4"])
|
23
23
|
s.add_runtime_dependency(%q<authlogic>)
|
24
24
|
s.add_runtime_dependency(%q<awesome_nested_set>, ["~> 2.0"])
|
25
25
|
s.add_runtime_dependency(%q<declarative_authorization>, ["~> 0.5.4"])
|
@@ -31,9 +31,8 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_runtime_dependency(%q<dynamic_form>, ["~> 1.1"])
|
32
32
|
s.add_runtime_dependency(%q<jquery-rails>, ["~> 1.0.16"])
|
33
33
|
s.add_runtime_dependency(%q<attachment_magic>, ["~> 0.2.1"])
|
34
|
-
s.add_runtime_dependency(
|
35
|
-
|
34
|
+
s.add_runtime_dependency(%q<sass-rails>, ['~> 3.1.4'])
|
35
|
+
|
36
36
|
s.add_development_dependency(%q<rspec-rails>, ["~> 2.8"])
|
37
37
|
s.add_development_dependency(%q<sqlite3>)
|
38
|
-
|
39
38
|
end
|
@@ -12,20 +12,27 @@ module Alchemy
|
|
12
12
|
def create
|
13
13
|
@element = Element.find(params[:content][:element_id])
|
14
14
|
@content = Content.create_from_scratch(@element, params[:content])
|
15
|
-
@options = params[:options]
|
15
|
+
@options = params[:options] || {}
|
16
|
+
@html_options = params[:html_options] || {}
|
16
17
|
# If options params come from Flash uploader then we have to parse them as hash.
|
17
18
|
if @options.is_a?(String)
|
18
19
|
@options = Rack::Utils.parse_query(@options)
|
19
20
|
end
|
20
21
|
if @content.essence_type == "Alchemy::EssencePicture"
|
22
|
+
@element_dom_id = "#add_content_#{@element.id}"
|
21
23
|
@content.essence.picture_id = params[:picture_id]
|
22
24
|
@content.essence.save
|
23
25
|
@contents_of_this_type = @element.contents.find_all_by_essence_type('Alchemy::EssencePicture')
|
24
26
|
@dragable = @contents_of_this_type.length > 1
|
25
|
-
@options = @options.merge(
|
26
|
-
|
27
|
-
|
27
|
+
@options = @options.merge(:dragable => @dragable)
|
28
|
+
else
|
29
|
+
@element_dom_id = "#add_content_for_element_#{@element.id}"
|
28
30
|
end
|
31
|
+
@locals = {
|
32
|
+
:content => @content,
|
33
|
+
:options => @options.symbolize_keys,
|
34
|
+
:html_options => @html_options.symbolize_keys
|
35
|
+
}
|
29
36
|
end
|
30
37
|
|
31
38
|
def update
|
@@ -130,7 +130,14 @@ module Alchemy
|
|
130
130
|
if request.referer == alchemy.login_url
|
131
131
|
render :file => File.join(Rails.root.to_s, 'public', '422.html'), :status => 422, :layout => false
|
132
132
|
elsif request.xhr?
|
133
|
-
|
133
|
+
respond_to do |format|
|
134
|
+
format.js {
|
135
|
+
render :js => "Alchemy.growl('#{t('You are not authorized')}', 'warning'); Alchemy.enableButton('button.button, a.button, input.button');"
|
136
|
+
}
|
137
|
+
format.html {
|
138
|
+
render :partial => 'alchemy/admin/partials/flash', :locals => {:message => t('You are not authorized'), :flash_type => 'warning'}
|
139
|
+
}
|
140
|
+
end
|
134
141
|
else
|
135
142
|
flash[:error] = t('You are not authorized')
|
136
143
|
redirect_to alchemy.admin_dashboard_path
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# == Sending Messages:
|
2
2
|
# To send Messages via contact forms you can create your form fields in the config.yml
|
3
|
+
#
|
3
4
|
# === Example:
|
4
5
|
# Make an Element with this options inside your @elements.yml file:
|
5
6
|
#
|
6
|
-
# - name:
|
7
|
-
# display_name: Kontaktformular
|
7
|
+
# - name: contactform
|
8
8
|
# contents:
|
9
9
|
# - name: mail_to
|
10
10
|
# type: EssenceText
|
@@ -15,30 +15,27 @@
|
|
15
15
|
# - name: success_page
|
16
16
|
# type: EssenceText
|
17
17
|
#
|
18
|
-
# The fields mail_to
|
19
|
-
# The MessagesController uses them to send your mails. So your customer has full controll of these values inside his contactform
|
18
|
+
# The fields +mail_to+, +mail_from+, +subject+ and +success_page+ are recommended.
|
19
|
+
# The +Alchemy::MessagesController+ uses them to send your mails. So your customer has full controll of these values inside his contactform element.
|
20
20
|
#
|
21
|
-
# Then make a page layout for your contact page in the page_layouts.yml file:
|
21
|
+
# Then make a page layout for your contact page in the +page_layouts.yml+ file:
|
22
22
|
#
|
23
23
|
# - name: contact
|
24
|
-
# display_name: Kontakt
|
25
24
|
# unique: true
|
26
25
|
# cache: false
|
27
|
-
#
|
28
|
-
# autogenerate: [
|
26
|
+
# elements: [pageheading, heading, contactform]
|
27
|
+
# autogenerate: [contactform]
|
29
28
|
#
|
30
29
|
# Disabling the page caching is stronlgy recommended!
|
31
30
|
#
|
32
|
-
# The editor view for your
|
31
|
+
# The editor view for your element should have this layout:
|
33
32
|
#
|
34
|
-
# <%= render_essence_editor_by_name(
|
35
|
-
# <%= render_essence_editor_by_name(
|
36
|
-
# <%= render_essence_editor_by_name(
|
37
|
-
#
|
38
|
-
# Folgeseite: <%= page_selector(@element, 'success_page') %>
|
39
|
-
# </p>
|
33
|
+
# <%= render_essence_editor_by_name(element, 'mail_from') %>
|
34
|
+
# <%= render_essence_editor_by_name(element, 'mail_to') %>
|
35
|
+
# <%= render_essence_editor_by_name(element, 'subject') %>
|
36
|
+
# <%= page_selector(element, 'success_page', :page_attribute => :urlname) %>
|
40
37
|
#
|
41
|
-
# Please have a look at the alchemy/config/config.yml file for further Message settings.
|
38
|
+
# Please have a look at the +alchemy/config/config.yml+ file for further Message settings.
|
42
39
|
|
43
40
|
module Alchemy
|
44
41
|
class MessagesController < Alchemy::BaseController
|
@@ -83,18 +83,21 @@ module Alchemy
|
|
83
83
|
#
|
84
84
|
# :only [Hash] # Pagelayout names. Only pages with this page_layout will be displayed inside the select.
|
85
85
|
# :page_attribute [Symbol] # The Page attribute which will be stored.
|
86
|
+
# :global [Boolean] # Display only global pages. Default is false.
|
86
87
|
#
|
87
88
|
def page_selector(element, content_name, options = {}, select_options = {})
|
88
89
|
default_options = {
|
89
90
|
:page_attribute => :id,
|
91
|
+
:global => false,
|
90
92
|
:prompt => t('Choose page')
|
91
93
|
}
|
92
94
|
options = default_options.merge(options)
|
93
95
|
pages = Page.where({
|
94
96
|
:language_id => session[:language_id],
|
95
|
-
:
|
96
|
-
:public =>
|
97
|
+
:layoutpage => options[:global] == true,
|
98
|
+
:public => options[:global] == false
|
97
99
|
})
|
100
|
+
pages = pages.where({:page_layout => options[:only]}) if options[:only].present?
|
98
101
|
content = element.content_by_name(content_name)
|
99
102
|
options.update(
|
100
103
|
:select_values => pages_for_select(pages, content ? content.essence.body : nil, options[:prompt], options[:page_attribute])
|
@@ -1,24 +1,6 @@
|
|
1
1
|
# This is a tableless model only used for validating Contactform Fields.
|
2
|
-
# You can specify the fields for your contactform in the config/alchemy/config.yml file in the
|
2
|
+
# You can specify the fields for your contactform in the +config/alchemy/config.yml+ file in the +:mailer+ options
|
3
3
|
#
|
4
|
-
# === Options:
|
5
|
-
#
|
6
|
-
# - form_layout_name: A Alchemy::PageLayout name (String). Used to render the contactform on a page with this layout.
|
7
|
-
#
|
8
|
-
# === Validating fields:
|
9
|
-
#
|
10
|
-
# Pass the field name as symbol and a message_id (will be translated) to :validate_fields:
|
11
|
-
#
|
12
|
-
# === Translating the validation messages:
|
13
|
-
#
|
14
|
-
# Validationmessages will be send to +Alchemy::I18n.t+ method with the scope +"alchemy.contactform.validations.#{field[1][:message].to_s}"+.
|
15
|
-
# So a +name+ field with the validation message_id +blank_name+ will be available for translation in your locale files like:
|
16
|
-
#
|
17
|
-
# de:
|
18
|
-
# contactform:
|
19
|
-
# validations:
|
20
|
-
# blank_name: 'Bitte geben Sie Ihren Namen an'
|
21
|
-
#
|
22
4
|
# === Example Contactform Configuration:
|
23
5
|
#
|
24
6
|
# :mailer:
|
@@ -1,138 +1,47 @@
|
|
1
1
|
(function($) {
|
2
|
+
<% if params[:was_missing] -%>
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<% if params[:was_missing] -%>
|
11
|
-
|
12
|
-
$("#element_<%= @element.id -%>_content_missing").replaceWith('<%= escape_javascript(
|
13
|
-
render(
|
14
|
-
:partial => "alchemy/essences/essence_picture_editor",
|
15
|
-
:locals => locals
|
16
|
-
)
|
17
|
-
) -%>');
|
4
|
+
$("#element_<%= @element.id -%>_content_missing").replaceWith('<%= escape_javascript(
|
5
|
+
render(
|
6
|
+
:partial => "alchemy/essences/#{@content.essence_partial_name}_editor",
|
7
|
+
:locals => @locals
|
8
|
+
)
|
9
|
+
) -%>');
|
18
10
|
|
19
|
-
|
11
|
+
<% else -%>
|
20
12
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
Alchemy.SortableContents('#element_<%= @element.id -%>_contents', '<%= form_authenticity_token -%>');
|
28
|
-
|
29
|
-
<%- if @contents_of_this_type.length > 1 -%>
|
30
|
-
$('#element_<%= @element.id -%>_contents .essence_picture_editor').addClass('dragable_picture');
|
31
|
-
<%- end -%>
|
32
|
-
|
33
|
-
<%- if !max_image_count.blank? && (@contents_of_this_type.length >= max_image_count) -%>
|
34
|
-
$("#add_content_<%= @element.id -%>").remove();
|
35
|
-
<%- end -%>
|
36
|
-
|
37
|
-
Alchemy.reloadPreview();
|
38
|
-
Alchemy.closeCurrentWindow();
|
39
|
-
|
40
|
-
<% end -%>
|
13
|
+
$("<%= @element_dom_id -%>").before('<%= escape_javascript(
|
14
|
+
render(
|
15
|
+
:partial => "alchemy/essences/#{@content.essence_partial_name}_editor",
|
16
|
+
:locals => @locals
|
17
|
+
)
|
18
|
+
) -%>');
|
41
19
|
|
42
|
-
|
20
|
+
<% end -%>
|
43
21
|
|
44
|
-
|
45
|
-
|
46
|
-
:options => {:as => 'text_field'}.merge(@options.nil? ? {} : @options.symbolize_keys)
|
47
|
-
} -%>
|
22
|
+
<% case @content.essence_type -%>
|
23
|
+
<% when "Alchemy::EssencePicture" -%>
|
48
24
|
|
49
|
-
|
25
|
+
<% if @contents_of_this_type.length > 1 -%>
|
26
|
+
$('#element_<%= @element.id -%>_contents .essence_picture_editor').addClass('dragable_picture');
|
27
|
+
<% end -%>
|
28
|
+
<% if !max_image_count.blank? && (@contents_of_this_type.length >= max_image_count) -%>
|
29
|
+
$("#add_content_<%= @element.id -%>").remove();
|
30
|
+
<% end -%>
|
31
|
+
Alchemy.SortableContents('#element_<%= @element.id -%>_contents', '<%= form_authenticity_token -%>');
|
50
32
|
|
51
|
-
|
52
|
-
render(
|
53
|
-
:partial => "alchemy/essences/essence_text_editor",
|
54
|
-
:locals => locals
|
55
|
-
)
|
56
|
-
) -%>');
|
33
|
+
<% when "Alchemy::EssenceDate" -%>
|
57
34
|
|
58
|
-
|
35
|
+
Alchemy.Datepicker('#element_<%= @element.id -%> input.date');
|
59
36
|
|
60
|
-
|
61
|
-
render(
|
62
|
-
:partial => "alchemy/essences/essence_text_editor",
|
63
|
-
:locals => locals
|
64
|
-
)
|
65
|
-
) -%>');
|
66
|
-
Alchemy.reloadPreview();
|
67
|
-
Alchemy.closeCurrentWindow();
|
68
|
-
|
69
|
-
<%- end -%>
|
37
|
+
<% when "Alchemy::EssenceRichtext" -%>
|
70
38
|
|
71
|
-
Alchemy.
|
39
|
+
Alchemy.Tinymce.addEditor('contents_content_<%= @content.id -%>_body');
|
72
40
|
|
73
|
-
|
41
|
+
<% end -%>
|
74
42
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
<%- if params[:was_missing] -%>
|
81
|
-
|
82
|
-
$("#element_<%= @element.id -%>_content_missing").replaceWith('<%= escape_javascript(
|
83
|
-
render(
|
84
|
-
:partial => "alchemy/essences/essence_richtext_editor",
|
85
|
-
:locals => locals
|
86
|
-
)
|
87
|
-
) -%>');
|
88
|
-
|
89
|
-
<%- else -%>
|
90
|
-
|
91
|
-
$("#add_content_for_element_<%= @element.id -%>").before('<%= escape_javascript(
|
92
|
-
render(
|
93
|
-
:partial => "alchemy/essences/essence_richtext_editor",
|
94
|
-
:locals => locals
|
95
|
-
)
|
96
|
-
) -%>');
|
97
|
-
Alchemy.closeCurrentWindow();
|
98
|
-
|
99
|
-
<%- end -%>
|
100
|
-
|
101
|
-
Alchemy.Tinymce.addEditor('contents_content_<%= @content.id -%>_body');
|
102
|
-
|
103
|
-
<%- else -%>
|
104
|
-
|
105
|
-
<%- locals = {
|
106
|
-
:content => @content,
|
107
|
-
:options => @options.nil? ? {} : @options.symbolize_keys
|
108
|
-
} -%>
|
109
|
-
|
110
|
-
<%- if params[:was_missing] -%>
|
111
|
-
|
112
|
-
$("#element_<%= @element.id -%>_content_missing").replaceWith('<%= escape_javascript(
|
113
|
-
render(
|
114
|
-
:partial => "alchemy/essences/#{@content.essence_partial_name}_editor",
|
115
|
-
:locals => locals
|
116
|
-
)
|
117
|
-
) -%>');
|
118
|
-
|
119
|
-
<%- else -%>
|
120
|
-
|
121
|
-
$("#add_content_for_element_<%= @element.id -%>").before('<%= escape_javascript(
|
122
|
-
render(
|
123
|
-
:partial => "alchemy/essences/#{@content.essence_partial_name}_editor",
|
124
|
-
:locals => locals
|
125
|
-
)
|
126
|
-
) -%>');
|
127
|
-
Alchemy.closeCurrentWindow();
|
128
|
-
|
129
|
-
<%- end -%>
|
130
|
-
|
131
|
-
<% if @content.essence_type == "Alchemy::EssenceDate" -%>
|
132
|
-
Alchemy.Datepicker('#element_<%= @element.id -%> input.date');
|
133
|
-
<% end -%>
|
134
|
-
|
135
|
-
<%- end -%>
|
136
|
-
|
137
|
-
Alchemy.growl('<%= t("Successfully added content", :content => @content.name) -%>');
|
138
|
-
})(jQuery);
|
43
|
+
Alchemy.reloadPreview();
|
44
|
+
Alchemy.closeCurrentWindow();
|
45
|
+
Alchemy.SelectBox("#element_<%= @element.id %> select.alchemy_selectbox");
|
46
|
+
Alchemy.growl('<%= t("Successfully added content", :content => @content.name) -%>');
|
47
|
+
})(jQuery);
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<table>
|
5
5
|
<tr>
|
6
6
|
<td>
|
7
|
-
<%= f.select 'name', @contents.map { |a| [t("content_names.#{a['name']}"), a['name']] }, :class => 'alchemy_selectbox' %>
|
7
|
+
<%= f.select 'name', @contents.map { |a| [t("content_names.#{a['name']}"), a['name']] }, {}, {:class => 'alchemy_selectbox'} %>
|
8
8
|
<%= hidden_field_tag('options', @options) %>
|
9
9
|
</td>
|
10
10
|
<td class="submit">
|
@@ -21,7 +21,7 @@
|
|
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, :class => 'alchemy_selectbox' %></td>
|
24
|
+
<td class="select"><%= f.select 'language', translations_for_select, {}, {:class => 'alchemy_selectbox'} %></td>
|
25
25
|
</tr>
|
26
26
|
<tr>
|
27
27
|
<td class="label mandatory"><%= f.label 'password' %></td>
|
@@ -34,7 +34,7 @@
|
|
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), :class => 'alchemy_selectbox' %></td>
|
37
|
+
<td class="select"><%= f.select :role, options_for_select(@user_roles, @user.role), {}, {:class => 'alchemy_selectbox'} %></td>
|
38
38
|
</tr>
|
39
39
|
<%- else -%>
|
40
40
|
<%= f.hidden_field :role %>
|
@@ -1,2 +1,2 @@
|
|
1
1
|
Alchemy.growl('<%= escape_javascript(@notice) %>', 'error');
|
2
|
-
Alchemy.enableButton('
|
2
|
+
Alchemy.enableButton('button.button, a.button, input.button');
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<%= form_for(@message ||= Alchemy::Message.new, :html => {:id => "contact", "data-alchemy-element" => (@preview_mode ? element.id : nil)}) do |f| %>
|
2
2
|
<%= f.error_messages %>
|
3
3
|
<%= f.hidden_field "contact_form_id", :value => element.id %>
|
4
|
-
<%= hidden_field_tag "mail_to", params[:mail_to] %>
|
5
4
|
<table class="contactform">
|
6
5
|
<tr>
|
7
6
|
<td class="label">
|
@@ -29,10 +28,10 @@
|
|
29
28
|
</tr>
|
30
29
|
<tr>
|
31
30
|
<td class="label">
|
32
|
-
<%= f.label :lastname,
|
31
|
+
<%= f.label :lastname, t('contactform.labels.lastname') + '*' %>
|
33
32
|
</td>
|
34
33
|
<td class="field">
|
35
|
-
<%= f.text_field(:lastname, :class => "field") %>
|
34
|
+
<%= f.text_field(:lastname, :class => "field", :required => true) %>
|
36
35
|
</td>
|
37
36
|
</tr>
|
38
37
|
<tr>
|
@@ -62,10 +61,10 @@
|
|
62
61
|
</tr>
|
63
62
|
<tr>
|
64
63
|
<td class="label">
|
65
|
-
<%= f.label :email,
|
64
|
+
<%= f.label :email, t('contactform.labels.email') + '*' %>
|
66
65
|
</td>
|
67
66
|
<td class="field">
|
68
|
-
<%= f.
|
67
|
+
<%= f.email_field :email, :class => 'field', :required => true %>
|
69
68
|
</td>
|
70
69
|
</tr>
|
71
70
|
</table>
|
@@ -1,10 +1,12 @@
|
|
1
1
|
<%= @message.message %>
|
2
2
|
|
3
3
|
--
|
4
|
+
<%= Alchemy::I18n.t(:salutation, :scope => 'contactform.labels') %>: <%= Alchemy::I18n.t(@message.salutation, :scope => 'contactform.labels') %>
|
5
|
+
<%= Alchemy::I18n.t(:firstname, :scope => 'contactform.labels') %>: <%= @message.firstname %>
|
6
|
+
<%= Alchemy::I18n.t(:lastname, :scope => 'contactform.labels') %>: <%= @message.lastname %>
|
4
7
|
|
5
|
-
<%= @message.
|
6
|
-
<%= @message.
|
7
|
-
|
8
|
-
<%=
|
9
|
-
<%= @message.
|
10
|
-
<%= @message.email %>
|
8
|
+
<%= Alchemy::I18n.t(:address, :scope => 'contactform.labels') %>: <%= @message.address %>
|
9
|
+
<%= Alchemy::I18n.t(:zip, :scope => 'contactform.labels') %>: <%= @message.zip %> <%= @message.city %>
|
10
|
+
|
11
|
+
<%= Alchemy::I18n.t(:phone, :scope => 'contactform.labels') %>: <%= @message.phone %>
|
12
|
+
<%= Alchemy::I18n.t(:email, :scope => 'contactform.labels') %>: <%= @message.email %>
|
data/config/alchemy/config.yml
CHANGED
@@ -74,10 +74,15 @@ default_language:
|
|
74
74
|
#
|
75
75
|
# To send Mails via contact forms you can create your form fields here and set which fields are to be validated.
|
76
76
|
#
|
77
|
+
# === Validating fields:
|
78
|
+
#
|
79
|
+
# Pass the field name as symbol and a message_id (will be translated) to :validate_fields:
|
80
|
+
#
|
77
81
|
# ==== Options:
|
78
82
|
#
|
79
|
-
#
|
80
|
-
#
|
83
|
+
# page_layout_name: [String] # A +Alchemy::PageLayout+ name. Used to render the contactform on a page with this layout.
|
84
|
+
# fields: [Array] # An Array of fieldnames
|
85
|
+
# validate_fields: [Hash] # A Hash with fieldname as key and a Hash (with :message as key and a message_id as value) as value
|
81
86
|
#
|
82
87
|
# ==== Translating validation messages:
|
83
88
|
#
|
@@ -102,7 +107,7 @@ default_language:
|
|
102
107
|
:lastname:
|
103
108
|
:message: enter_name
|
104
109
|
:email:
|
105
|
-
:message:
|
110
|
+
:message: enter_email
|
106
111
|
|
107
112
|
# === User roles
|
108
113
|
# You can add own user roles. To set permissions for this roles please add an authorization_rules.rb file in your config folder.
|
data/config/alchemy/elements.yml
CHANGED
@@ -101,24 +101,24 @@ de:
|
|
101
101
|
contactform:
|
102
102
|
labels:
|
103
103
|
salutation: 'Anrede'
|
104
|
-
choose: Wählen Sie
|
104
|
+
choose: 'Wählen Sie'
|
105
105
|
mr: 'Herr'
|
106
106
|
mrs: 'Frau'
|
107
107
|
firstname: 'Vorname'
|
108
|
-
lastname: '
|
109
|
-
address: 'Straße/Nr'
|
110
|
-
zip: 'PLZ/Ort'
|
108
|
+
lastname: 'Name'
|
109
|
+
address: 'Straße / Nr.'
|
110
|
+
zip: 'PLZ / Ort'
|
111
111
|
phone: 'Telefon'
|
112
|
-
email: '
|
112
|
+
email: 'E-Mail'
|
113
113
|
message: 'Nachricht'
|
114
|
-
send: '
|
115
|
-
mandatory_fields: 'Pflichtfelder. Bitte füllen Sie diese Felder aus.
|
114
|
+
send: 'absenden'
|
115
|
+
mandatory_fields: '*Pflichtfelder. Bitte füllen Sie diese Felder aus.'
|
116
116
|
# Translations for the contactform validations.
|
117
117
|
# Validations are set in the config/alchemy/config.yml mailer section.
|
118
118
|
validations:
|
119
119
|
enter_name: 'Bitte geben Sie Ihren Namen an'
|
120
|
-
|
121
|
-
wrong_email_format: 'Die
|
120
|
+
enter_email: Bitte geben Sie Ihre E-Mail-Adresse an
|
121
|
+
wrong_email_format: 'Die E-Mail-Adresse scheint nicht richtig zu sein.'
|
122
122
|
# The flash message shown after succesfully sending the message.
|
123
123
|
messages:
|
124
124
|
success: 'Ihre Nachricht wurde erfolgreich übermittelt.'
|
@@ -807,6 +807,7 @@ de:
|
|
807
807
|
error_messages:
|
808
808
|
login_blank: "^Es wurde kein Benutzername angeben."
|
809
809
|
login_not_found: "^Dieser Benutzername existiert nicht."
|
810
|
+
general_credentials_error: "Die Kombination aus Benutzername und Passwort ist nicht gültig."
|
810
811
|
consecutive_failed_logins_limit_exceeded: "Zu viele Fehlversuche! Dieser Account ist aus Sicherheitsgründen gesperrt worden. Bitte wenden Sie sich an den Administrator."
|
811
812
|
email_invalid: "Die Email-Adresse entspricht nicht dem Format einer Email-Adresse."
|
812
813
|
password_blank: "^Bitte ein Passwort angegeben."
|
@@ -827,3 +828,4 @@ de:
|
|
827
828
|
email: Email
|
828
829
|
password: Passwort
|
829
830
|
remember_me: "eingeloggt bleiben"
|
831
|
+
|
@@ -94,14 +94,14 @@ en:
|
|
94
94
|
phone: 'Telephone'
|
95
95
|
email: 'Email'
|
96
96
|
message: 'Message'
|
97
|
-
send: 'Send
|
98
|
-
mandatory_fields: 'Mandatory fields.'
|
97
|
+
send: 'Send'
|
98
|
+
mandatory_fields: '*Mandatory fields.'
|
99
99
|
# Translations for the contactform validations.
|
100
100
|
# Validations are set in the config/alchemy/config.yml mailer section.
|
101
101
|
validations:
|
102
102
|
enter_name: 'Please enter your name'
|
103
|
-
|
104
|
-
wrong_email_format: 'Email has wrong format
|
103
|
+
enter_email: 'Please enter your email'
|
104
|
+
wrong_email_format: 'Email has wrong format'
|
105
105
|
# The flash message shown after succesfully sending the message.
|
106
106
|
messages:
|
107
107
|
success: 'Your message was delivered succesfully.'
|
@@ -599,6 +599,7 @@ en:
|
|
599
599
|
error_messages:
|
600
600
|
login_blank: 'can not be blank'
|
601
601
|
login_not_found: 'could not be found'
|
602
|
+
general_credentials_error: "User does not exist or invalid password!"
|
602
603
|
consecutive_failed_logins_limit_exceeded: 'Consecutive failed logins limit exceeded, account is disabled.'
|
603
604
|
email_invalid: 'should look like an email address.'
|
604
605
|
password_blank: 'can not be blank'
|
@@ -618,3 +619,4 @@ en:
|
|
618
619
|
email: Email
|
619
620
|
password: Password
|
620
621
|
remember_me: 'remember me'
|
622
|
+
|
data/lib/alchemy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,22 +11,22 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-04-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
18
|
-
requirement: &
|
18
|
+
requirement: &70221202607480 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 3.1.
|
23
|
+
version: 3.1.4
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *70221202607480
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: authlogic
|
29
|
-
requirement: &
|
29
|
+
requirement: &70221202628920 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
@@ -34,10 +34,10 @@ dependencies:
|
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *70221202628920
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: awesome_nested_set
|
40
|
-
requirement: &
|
40
|
+
requirement: &70221202627520 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
@@ -45,10 +45,10 @@ dependencies:
|
|
45
45
|
version: '2.0'
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *70221202627520
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: declarative_authorization
|
51
|
-
requirement: &
|
51
|
+
requirement: &70221202626220 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
54
54
|
- - ~>
|
@@ -56,10 +56,10 @@ dependencies:
|
|
56
56
|
version: 0.5.4
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
|
-
version_requirements: *
|
59
|
+
version_requirements: *70221202626220
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: tvdeyen-fleximage
|
62
|
-
requirement: &
|
62
|
+
requirement: &70221202648140 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
65
65
|
- - ~>
|
@@ -67,10 +67,10 @@ dependencies:
|
|
67
67
|
version: 1.0.9
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
|
-
version_requirements: *
|
70
|
+
version_requirements: *70221202648140
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: kaminari
|
73
|
-
requirement: &
|
73
|
+
requirement: &70221202645940 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - ~>
|
@@ -78,10 +78,10 @@ dependencies:
|
|
78
78
|
version: 0.13.0
|
79
79
|
type: :runtime
|
80
80
|
prerelease: false
|
81
|
-
version_requirements: *
|
81
|
+
version_requirements: *70221202645940
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: acts_as_ferret
|
84
|
-
requirement: &
|
84
|
+
requirement: &70221202643060 !ruby/object:Gem::Requirement
|
85
85
|
none: false
|
86
86
|
requirements:
|
87
87
|
- - ~>
|
@@ -89,10 +89,10 @@ dependencies:
|
|
89
89
|
version: '0.5'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
|
-
version_requirements: *
|
92
|
+
version_requirements: *70221202643060
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: acts_as_list
|
95
|
-
requirement: &
|
95
|
+
requirement: &70221202656920 !ruby/object:Gem::Requirement
|
96
96
|
none: false
|
97
97
|
requirements:
|
98
98
|
- - ~>
|
@@ -100,10 +100,10 @@ dependencies:
|
|
100
100
|
version: '0.1'
|
101
101
|
type: :runtime
|
102
102
|
prerelease: false
|
103
|
-
version_requirements: *
|
103
|
+
version_requirements: *70221202656920
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: magiclabs-userstamp
|
106
|
-
requirement: &
|
106
|
+
requirement: &70221202654560 !ruby/object:Gem::Requirement
|
107
107
|
none: false
|
108
108
|
requirements:
|
109
109
|
- - ~>
|
@@ -111,10 +111,10 @@ dependencies:
|
|
111
111
|
version: 2.0.2
|
112
112
|
type: :runtime
|
113
113
|
prerelease: false
|
114
|
-
version_requirements: *
|
114
|
+
version_requirements: *70221202654560
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: dynamic_form
|
117
|
-
requirement: &
|
117
|
+
requirement: &70221202652900 !ruby/object:Gem::Requirement
|
118
118
|
none: false
|
119
119
|
requirements:
|
120
120
|
- - ~>
|
@@ -122,10 +122,10 @@ dependencies:
|
|
122
122
|
version: '1.1'
|
123
123
|
type: :runtime
|
124
124
|
prerelease: false
|
125
|
-
version_requirements: *
|
125
|
+
version_requirements: *70221202652900
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: jquery-rails
|
128
|
-
requirement: &
|
128
|
+
requirement: &70221202651320 !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
131
131
|
- - ~>
|
@@ -133,10 +133,10 @@ dependencies:
|
|
133
133
|
version: 1.0.16
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
|
-
version_requirements: *
|
136
|
+
version_requirements: *70221202651320
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: attachment_magic
|
139
|
-
requirement: &
|
139
|
+
requirement: &70221202665420 !ruby/object:Gem::Requirement
|
140
140
|
none: false
|
141
141
|
requirements:
|
142
142
|
- - ~>
|
@@ -144,10 +144,10 @@ dependencies:
|
|
144
144
|
version: 0.2.1
|
145
145
|
type: :runtime
|
146
146
|
prerelease: false
|
147
|
-
version_requirements: *
|
147
|
+
version_requirements: *70221202665420
|
148
148
|
- !ruby/object:Gem::Dependency
|
149
149
|
name: sass-rails
|
150
|
-
requirement: &
|
150
|
+
requirement: &70221202664100 !ruby/object:Gem::Requirement
|
151
151
|
none: false
|
152
152
|
requirements:
|
153
153
|
- - ~>
|
@@ -155,10 +155,10 @@ dependencies:
|
|
155
155
|
version: 3.1.4
|
156
156
|
type: :runtime
|
157
157
|
prerelease: false
|
158
|
-
version_requirements: *
|
158
|
+
version_requirements: *70221202664100
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: rspec-rails
|
161
|
-
requirement: &
|
161
|
+
requirement: &70221202662900 !ruby/object:Gem::Requirement
|
162
162
|
none: false
|
163
163
|
requirements:
|
164
164
|
- - ~>
|
@@ -166,10 +166,10 @@ dependencies:
|
|
166
166
|
version: '2.8'
|
167
167
|
type: :development
|
168
168
|
prerelease: false
|
169
|
-
version_requirements: *
|
169
|
+
version_requirements: *70221202662900
|
170
170
|
- !ruby/object:Gem::Dependency
|
171
171
|
name: sqlite3
|
172
|
-
requirement: &
|
172
|
+
requirement: &70221202659560 !ruby/object:Gem::Requirement
|
173
173
|
none: false
|
174
174
|
requirements:
|
175
175
|
- - ! '>='
|
@@ -177,7 +177,7 @@ dependencies:
|
|
177
177
|
version: '0'
|
178
178
|
type: :development
|
179
179
|
prerelease: false
|
180
|
-
version_requirements: *
|
180
|
+
version_requirements: *70221202659560
|
181
181
|
description: Alchemy is a Rails 3 CMS with a flexible content storing architecture.
|
182
182
|
email:
|
183
183
|
- alchemy@magiclabs.de
|
@@ -499,7 +499,6 @@ files:
|
|
499
499
|
- app/views/alchemy/essences/_essence_text_view.html.erb
|
500
500
|
- app/views/alchemy/essences/_essence_video_editor.html.erb
|
501
501
|
- app/views/alchemy/essences/_essence_video_view.html.erb
|
502
|
-
- app/views/alchemy/messages/contact_form_mail.html.erb
|
503
502
|
- app/views/alchemy/messages/contact_form_mail.text.erb
|
504
503
|
- app/views/alchemy/messages/new.html.erb
|
505
504
|
- app/views/alchemy/navigation/_image_link.html.erb
|
@@ -529,8 +528,6 @@ files:
|
|
529
528
|
- app/views/alchemy/user_sessions/login.html.erb
|
530
529
|
- app/views/alchemy/user_sessions/logout.html.erb
|
531
530
|
- app/views/alchemy/user_sessions/signup.html.erb
|
532
|
-
- app/views/elements/_download_editor.html.erb
|
533
|
-
- app/views/elements/_download_view.html.erb
|
534
531
|
- app/views/kaminari/_gap.html.erb
|
535
532
|
- app/views/kaminari/_next_page.html.erb
|
536
533
|
- app/views/kaminari/_page.html.erb
|
@@ -819,7 +816,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
819
816
|
version: '0'
|
820
817
|
segments:
|
821
818
|
- 0
|
822
|
-
hash:
|
819
|
+
hash: 33058783529269066
|
823
820
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
824
821
|
none: false
|
825
822
|
requirements:
|
@@ -828,7 +825,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
828
825
|
version: '0'
|
829
826
|
segments:
|
830
827
|
- 0
|
831
|
-
hash:
|
828
|
+
hash: 33058783529269066
|
832
829
|
requirements:
|
833
830
|
- ImageMagick (libmagick), v6.6 or greater.
|
834
831
|
rubyforge_project:
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<pre>
|
2
|
-
<%= @message.message %>
|
3
|
-
</pre>
|
4
|
-
|
5
|
-
<p>
|
6
|
-
<%= @message.salutation %><br>
|
7
|
-
<%= @message.firstname %> <%= @message.lastname %><br>
|
8
|
-
<br>
|
9
|
-
<%= @message.address %><br>
|
10
|
-
<%= @message.zip %> <%= @message.city %><br>
|
11
|
-
<br>
|
12
|
-
<%= @message.phone %><br>
|
13
|
-
<%= @message.email %>
|
14
|
-
</p>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= render_essence_editor_by_name(element, 'file') %>
|