alchemy_crm 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +10 -11
- data/alchemy_crm.gemspec +21 -21
- data/app/assets/javascripts/alchemy_crm/alchemy_crm.base.js +54 -54
- data/app/assets/stylesheets/alchemy_crm/base.css.scss +199 -199
- data/app/controllers/alchemy_crm/admin/base_controller.rb +5 -5
- data/app/controllers/alchemy_crm/admin/contact_groups_controller.rb +15 -15
- data/app/controllers/alchemy_crm/admin/contacts_controller.rb +95 -95
- data/app/controllers/alchemy_crm/admin/deliveries_controller.rb +66 -66
- data/app/controllers/alchemy_crm/admin/elements_controller_extension.rb +23 -23
- data/app/controllers/alchemy_crm/admin/mailings_controller.rb +44 -44
- data/app/controllers/alchemy_crm/admin/newsletters_controller.rb +16 -16
- data/app/controllers/alchemy_crm/admin/tags_controller.rb +60 -59
- data/app/controllers/alchemy_crm/base_controller.rb +3 -3
- data/app/controllers/alchemy_crm/contacts_controller.rb +88 -88
- data/app/controllers/alchemy_crm/mailings_controller.rb +16 -16
- data/app/controllers/alchemy_crm/recipients_controller.rb +30 -30
- data/app/controllers/alchemy_crm/subscriptions_controller.rb +54 -54
- data/app/helpers/alchemy/pages_helper_extension.rb +14 -14
- data/app/helpers/alchemy_crm/admin/base_helper.rb +8 -8
- data/app/helpers/alchemy_crm/mailings_helper.rb +175 -175
- data/app/mailers/alchemy_crm/bounce_receiver.rb +9 -9
- data/app/mailers/alchemy_crm/contacts_mailer.rb +21 -21
- data/app/mailers/alchemy_crm/mailings_mailer.rb +46 -46
- data/app/mailers/alchemy_crm/subscriptions_mailer.rb +12 -12
- data/app/models/alchemy/essence_element_teaser.rb +14 -14
- data/app/models/alchemy_crm/contact.rb +260 -260
- data/app/models/alchemy_crm/contact_group.rb +15 -15
- data/app/models/alchemy_crm/contact_group_filter.rb +17 -17
- data/app/models/alchemy_crm/delivery.rb +54 -54
- data/app/models/alchemy_crm/element_extension.rb +23 -23
- data/app/models/alchemy_crm/mailing.rb +90 -90
- data/app/models/alchemy_crm/newsletter.rb +33 -33
- data/app/models/alchemy_crm/reaction.rb +5 -5
- data/app/models/alchemy_crm/recipient.rb +46 -46
- data/app/models/alchemy_crm/subscription.rb +4 -4
- data/app/views/alchemy/admin/elements/fill.js.erb +11 -11
- data/app/views/alchemy/elements/_newsletter_article_view.html.erb +14 -14
- data/app/views/alchemy/elements/_newsletter_greeting_view.html.erb +9 -9
- data/app/views/alchemy/elements/_newsletter_signout_form_view.html.erb +18 -18
- data/app/views/alchemy/elements/_newsletter_signup_form_view.html.erb +62 -62
- data/app/views/alchemy/essences/_essence_element_teaser_editor.html.erb +29 -29
- data/app/views/alchemy/newsletter_layouts/_standard.html.erb +37 -37
- data/app/views/alchemy_crm/admin/contact_groups/_contact_group.html.erb +30 -30
- data/app/views/alchemy_crm/admin/contact_groups/_filter.html.erb +28 -28
- data/app/views/alchemy_crm/admin/contact_groups/_form.html.erb +45 -45
- data/app/views/alchemy_crm/admin/contact_groups/_tag.html.erb +4 -4
- data/app/views/alchemy_crm/admin/contact_groups/add_filter.js.erb +7 -7
- data/app/views/alchemy_crm/admin/contact_groups/index.html.erb +28 -28
- data/app/views/alchemy_crm/admin/contacts/_contact.html.erb +42 -42
- data/app/views/alchemy_crm/admin/contacts/_form.html.erb +76 -76
- data/app/views/alchemy_crm/admin/contacts/import.html.erb +27 -27
- data/app/views/alchemy_crm/admin/contacts/index.html.erb +39 -39
- data/app/views/alchemy_crm/admin/contacts/vcf_import_result.html.erb +24 -24
- data/app/views/alchemy_crm/admin/deliveries/_delivery.html.erb +30 -30
- data/app/views/alchemy_crm/admin/deliveries/_form.html.erb +61 -61
- data/app/views/alchemy_crm/admin/deliveries/_recipient.html.erb +36 -36
- data/app/views/alchemy_crm/admin/deliveries/index.html.erb +21 -21
- data/app/views/alchemy_crm/admin/deliveries/show.html.erb +61 -61
- data/app/views/alchemy_crm/admin/elements/teasables.html.erb +53 -53
- data/app/views/alchemy_crm/admin/mailings/_form.html.erb +41 -41
- data/app/views/alchemy_crm/admin/mailings/_mailing.html.erb +73 -73
- data/app/views/alchemy_crm/admin/mailings/edit_content.html.erb +170 -170
- data/app/views/alchemy_crm/admin/mailings/import_result.html.erb +18 -18
- data/app/views/alchemy_crm/admin/mailings/index.html.erb +25 -25
- data/app/views/alchemy_crm/admin/newsletters/_form.html.erb +52 -52
- data/app/views/alchemy_crm/admin/newsletters/_tag_with_radiobutton.html.erb +5 -5
- data/app/views/alchemy_crm/admin/newsletters/index.html.erb +29 -29
- data/app/views/alchemy_crm/admin/newsletters/new.html.erb +4 -4
- data/app/views/alchemy_crm/admin/tags/_radio_tag.html.erb +4 -4
- data/app/views/alchemy_crm/admin/tags/_tag.html.erb +30 -30
- data/app/views/alchemy_crm/admin/tags/edit.html.erb +32 -32
- data/app/views/alchemy_crm/admin/tags/index.html.erb +23 -23
- data/app/views/alchemy_crm/admin/tags/new.html.erb +14 -14
- data/app/views/alchemy_crm/contacts_mailer/signout_mail.html.erb +6 -6
- data/app/views/alchemy_crm/contacts_mailer/signout_mail.text.erb +2 -2
- data/app/views/alchemy_crm/contacts_mailer/signup_mail.html.erb +9 -9
- data/app/views/alchemy_crm/contacts_mailer/signup_mail.text.erb +2 -2
- data/app/views/alchemy_crm/mailings_mailer/verification_mail.html.erb +9 -9
- data/app/views/alchemy_crm/subscriptions/index.html.erb +4 -4
- data/app/views/alchemy_crm/subscriptions_mailer/overview_mail.html.erb +25 -25
- data/app/views/alchemy_crm/subscriptions_mailer/overview_mail.text.erb +2 -2
- data/app/views/csv_magic/import_errors.html.erb +23 -23
- data/app/views/csv_magic/mapper.html.erb +46 -46
- data/app/views/layouts/alchemy_crm/mailings.html.erb +177 -177
- data/config/initializers/assets.rb +2 -2
- data/config/locales/alchemy_crm.de.yml +1 -1
- data/config/locales/alchemy_crm.en.yml +1 -0
- data/config/locales/localized_country_select.de.rb +260 -260
- data/config/locales/localized_country_select.en.rb +274 -274
- data/config/routes.rb +67 -67
- data/db/migrate/20111104125306_remove_sent_mailing_pdf_id_from_sent_mailings.rb +1 -1
- data/db/migrate/20111124145923_namespace_alchemy_crm_models.rb +13 -13
- data/db/migrate/20120307160721_rename_alchemy_crm_recipients_sent_mailing_id.rb +3 -3
- data/db/migrate/20120320103412_add_indexes_to_alchemy_crm_sha1_columns.rb +3 -3
- data/db/migrate/20120327174301_add_more_indexes_to_alchemy_crm_tables.rb +10 -10
- data/lib/alchemy_crm.rb +15 -15
- data/lib/alchemy_crm/bounced_delivery.rb +38 -38
- data/lib/alchemy_crm/config.rb +25 -25
- data/lib/alchemy_crm/engine.rb +31 -31
- data/lib/alchemy_crm/i18n_helpers.rb +28 -28
- data/lib/alchemy_crm/newsletter_layout.rb +28 -28
- data/lib/alchemy_crm/seeder.rb +26 -26
- data/lib/alchemy_crm/version.rb +1 -1
- data/lib/generators/alchemy_crm/scaffold/files/newsletters.html.erb +19 -19
- data/lib/generators/alchemy_crm/scaffold/scaffold_generator.rb +2 -2
- data/lib/tasks/alchemy_crm.rake +22 -22
- data/lib/tasks/routes.rake +25 -25
- data/spec/config_spec.rb +24 -24
- data/spec/controllers/alchemy_crm/contacts_controller_spec.rb +147 -147
- data/spec/controllers/alchemy_crm/mailings_controller_spec.rb +62 -62
- data/spec/controllers/alchemy_crm/recipients_controller_spec.rb +109 -109
- data/spec/helpers/alchemy_crm/mailings_helper_spec.rb +165 -165
- data/spec/mailers/alchemy_crm/contacts_mailer_spec.rb +84 -84
- data/spec/mailers/alchemy_crm/mailings_mailer_spec.rb +29 -29
- data/spec/models/alchemy_crm/contact_group_spec.rb +25 -25
- data/spec/models/alchemy_crm/contact_spec.rb +71 -71
- data/spec/models/alchemy_crm/delivery_spec.rb +43 -39
- data/spec/models/alchemy_crm/mailing_spec.rb +46 -42
- data/spec/models/alchemy_crm/newsletter_spec.rb +29 -29
- data/spec/spec_helper.rb +36 -36
- metadata +6 -8
- data/rails/init.rb +0 -1
- data/recipes/alchemy-mailings-capistrano-tasks.rb +0 -12
@@ -1,23 +1,23 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
module AlchemyCrm
|
3
|
-
|
4
|
-
|
3
|
+
module Admin
|
4
|
+
class ContactGroupsController < AlchemyCrm::Admin::BaseController
|
5
5
|
|
6
|
-
|
6
|
+
before_filter :load_additional_data, :only => [:new, :edit]
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
def add_filter
|
9
|
+
@contact_group = ContactGroup.find(params[:contact_group_id])
|
10
|
+
@filter = @contact_group.filters.build
|
11
|
+
@count = @contact_group.filters.length - 1
|
12
|
+
end
|
13
13
|
|
14
|
-
|
14
|
+
private
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
def load_additional_data
|
17
|
+
@contacts = Contact.all
|
18
|
+
@tags = ActsAsTaggableOn::Tag.order("name ASC").all
|
19
|
+
end
|
20
20
|
|
21
|
-
|
22
|
-
|
21
|
+
end
|
22
|
+
end
|
23
23
|
end
|
@@ -1,112 +1,112 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
module AlchemyCrm
|
3
|
-
|
4
|
-
|
3
|
+
module Admin
|
4
|
+
class ContactsController < AlchemyCrm::Admin::BaseController
|
5
5
|
|
6
|
-
|
6
|
+
include CSVMagic::ControllerActions
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
8
|
+
csv_magic_config(
|
9
|
+
:mapping => {
|
10
|
+
Contact.human_attribute_name(:salutation).gsub(/\*$/, '') => :salutation,
|
11
|
+
Contact.human_attribute_name(:title) => :title,
|
12
|
+
Contact.human_attribute_name(:firstname).gsub(/\*$/, '') => :firstname,
|
13
|
+
Contact.human_attribute_name(:lastname).gsub(/\*$/, '') => :lastname,
|
14
|
+
Contact.human_attribute_name(:email).gsub(/\*$/, '') => :email,
|
15
|
+
Contact.human_attribute_name(:organisation) => :organisation,
|
16
|
+
Contact.human_attribute_name(:address) => :address,
|
17
|
+
Contact.human_attribute_name(:zip) => :zip,
|
18
|
+
Contact.human_attribute_name(:city) => :city,
|
19
|
+
Contact.human_attribute_name(:country) => :country,
|
20
|
+
Contact.human_attribute_name(:phone) => :phone,
|
21
|
+
Contact.human_attribute_name(:mobile) => :mobile
|
22
|
+
}
|
23
|
+
)
|
24
24
|
|
25
|
-
|
25
|
+
before_filter :load_tags, :only => [:new, :edit]
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
def new
|
28
|
+
@contact = Contact.new(:country => ::I18n.locale.to_s.upcase)
|
29
|
+
render :layout => false
|
30
|
+
end
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
32
|
+
def import
|
33
|
+
if request.post?
|
34
|
+
if params[:verified] == "1"
|
35
|
+
if params[:fields] || !(params[:file].content_type =~ /csv|plain|comma-separated-values/i).nil?
|
36
|
+
handle_csv_post_request
|
37
|
+
elsif !(params[:file].content_type =~ /vcard|directory/i).nil?
|
38
|
+
handle_vcf_post_request
|
39
|
+
else
|
40
|
+
flash[:error] = alchemy_crm_t(:invalid_file_type) % {:mime_type => params[:file].content_type}
|
41
|
+
redirect_to admin_contacts_path
|
42
|
+
end
|
43
|
+
else
|
44
|
+
@error = build_error_message(alchemy_crm_t(:imported_contacts_not_verified))
|
45
|
+
end
|
46
|
+
else
|
47
|
+
render :layout => !request.xhr?
|
48
|
+
end
|
49
|
+
end
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
51
|
+
def export
|
52
|
+
@contact = Contact.find(params[:id])
|
53
|
+
@contact.to_vcard
|
54
|
+
send_file("#{Rails.root.to_s}/tmp/#{@contact.fullname}.vcf")
|
55
|
+
end
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
57
|
+
def autocomplete_tag_list
|
58
|
+
items = ActsAsTaggableOn::Tag.where(['LOWER(name) LIKE ?', "#{params[:term].downcase}%"])
|
59
|
+
render :json => json_for_autocomplete(items, :name)
|
60
|
+
end
|
61
61
|
|
62
|
-
|
62
|
+
private
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
64
|
+
def load_tags
|
65
|
+
@tags = ActsAsTaggableOn::Tag.order("name ASC").all
|
66
|
+
@tags = @tags - @contact.tags.to_a unless @contact.nil?
|
67
|
+
end
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
def build_error_message(message)
|
70
|
+
heading = "<h1>#{alchemy_crm_t(:errors_while_importing)}</h1>".html_safe
|
71
|
+
message = "<p>#{message}</p>".html_safe
|
72
|
+
heading + message
|
73
|
+
end
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
75
|
+
def create_resource_items_from_csv(*args)
|
76
|
+
@csv_import_errors = []
|
77
|
+
@contacts = []
|
78
|
+
reader = CSVMagic::Reader.new(params)
|
79
|
+
reader.each do |row|
|
80
|
+
@contacts << contact = Contact.new(row)
|
81
|
+
contact.verified = true
|
82
|
+
contact.skip_validation = true
|
83
|
+
unless contact.save
|
84
|
+
@csv_import_errors.push [contact, contact.errors]
|
85
|
+
end
|
86
|
+
end
|
87
|
+
@valid_contacts = @contacts.select(&:valid?)
|
88
|
+
reader.remove_file if @csv_import_errors.empty?
|
89
|
+
end
|
90
90
|
|
91
|
-
|
92
|
-
|
93
|
-
|
91
|
+
def render_csv_import_form
|
92
|
+
render 'import'
|
93
|
+
end
|
94
94
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
95
|
+
def handle_vcf_post_request
|
96
|
+
if params[:file].blank?
|
97
|
+
@errors = build_error_message(alchemy_crm_t(:missing_vcard))
|
98
|
+
else
|
99
|
+
@contacts = Contact.new_from_vcard(params[:file], true)
|
100
|
+
if @contacts.detect(&:invalid?).nil?
|
101
|
+
flash[:notice] = alchemy_crm_t(:successfully_imported_contacts)
|
102
|
+
else
|
103
|
+
@errors = build_error_message(alchemy_crm_t(:please_check_highlighted_vcards_on_errors))
|
104
|
+
end
|
105
|
+
end
|
106
|
+
@valid_contacts = @contacts.select(&:valid?) || []
|
107
|
+
render :vcf_import_result
|
108
|
+
end
|
109
109
|
|
110
|
-
|
111
|
-
|
110
|
+
end
|
111
|
+
end
|
112
112
|
end
|
@@ -1,80 +1,80 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
module AlchemyCrm
|
3
|
-
|
4
|
-
|
3
|
+
module Admin
|
4
|
+
class DeliveriesController < AlchemyCrm::Admin::BaseController
|
5
5
|
|
6
|
-
|
6
|
+
before_filter :load_mailing, :only => [:index, :new]
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
def index
|
9
|
+
@deliveries = @mailing.deliveries.order('deliver_at DESC')
|
10
|
+
render :layout => false
|
11
|
+
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
def new
|
14
|
+
@delivery = Delivery.new(
|
15
|
+
:deliver_at => Time.now + 1.hour,
|
16
|
+
:mailing => @mailing
|
17
|
+
)
|
18
|
+
render :layout => false
|
19
|
+
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
21
|
+
def show
|
22
|
+
begin
|
23
|
+
@delivery = Delivery.find(params[:id])
|
24
|
+
@recipients = @delivery.recipients
|
25
|
+
@read = @delivery.recipients.select{|r| r.read}
|
26
|
+
@reacted = @delivery.recipients.select{|r| r.reacted}
|
27
|
+
@bounced = @delivery.recipients.select{|r| r.bounced}
|
28
|
+
rescue
|
29
|
+
log_error($!)
|
30
|
+
end
|
31
|
+
render :layout => false
|
32
|
+
end
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
34
|
+
def create
|
35
|
+
@delivery = Delivery.new(params[:delivery])
|
36
|
+
@mailing = @delivery.mailing = Mailing.find(params[:delivery][:mailing_id])
|
37
|
+
if @delivery.save
|
38
|
+
@delivery.send_chunks(
|
39
|
+
:language_id => session[:language_id],
|
40
|
+
:protocol => request.protocol,
|
41
|
+
:host => request.host,
|
42
|
+
:port => request.port,
|
43
|
+
:locale => ::I18n.locale
|
44
|
+
)
|
45
|
+
flash[:notice] = alchemy_crm_t(:successfully_scheduled_mailing)
|
46
|
+
end
|
47
|
+
redirect_to admin_mailings_path
|
48
|
+
end
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
def edit
|
51
|
+
@delivery = Delivery.find(params[:id])
|
52
|
+
@mailing = @delivery.mailing
|
53
|
+
render :layout => false
|
54
|
+
end
|
55
55
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
56
|
+
def update
|
57
|
+
@delivery = Delivery.find(params[:id])
|
58
|
+
@delivery.update_attributes(params[:delivery])
|
59
|
+
render_errors_or_redirect(
|
60
|
+
@delivery,
|
61
|
+
admin_mailings_path,
|
62
|
+
alchemy_crm_t(:successfully_rescheduled_mailing)
|
63
|
+
)
|
64
|
+
end
|
65
65
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
66
|
+
def destroy
|
67
|
+
@delivery = Delivery.find(params[:id])
|
68
|
+
@delivery.destroy
|
69
|
+
render :js => "window.location.replace('#{admin_mailings_path}'); Alchemy.growl('#{successfully_canceled_delivery}')"
|
70
|
+
end
|
71
71
|
|
72
|
-
|
72
|
+
private
|
73
73
|
|
74
|
-
|
75
|
-
|
76
|
-
|
74
|
+
def load_mailing
|
75
|
+
@mailing = Mailing.find(params[:mailing_id])
|
76
|
+
end
|
77
77
|
|
78
|
-
|
79
|
-
|
78
|
+
end
|
79
|
+
end
|
80
80
|
end
|
@@ -3,30 +3,30 @@
|
|
3
3
|
|
4
4
|
Alchemy::Admin::ElementsController.class_eval do
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
def teasables
|
7
|
+
@pages = Alchemy::Page.language_root_for(session[:language_id]).descendants
|
8
|
+
@content = Content.find(params[:content_id])
|
9
|
+
@element = @content.element
|
10
|
+
@elements = Alchemy::Element.where(:name => @content.settings[:teasable_elements])
|
11
|
+
render :layout => false
|
12
|
+
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
14
|
+
def fill
|
15
|
+
@element = Alchemy::Element.find(params[:id])
|
16
|
+
@source_element = Alchemy::Element.find(params[:source_element_id])
|
17
|
+
@params = "?page_id=#{@source_element.page.id}&element_id=#{@source_element.id}"
|
18
|
+
@content = @element.contents.where(:essence_type => "EssenceRichtext")
|
19
|
+
@target_contents = []
|
20
|
+
@source_element.contents.each do |content|
|
21
|
+
@target_contents << @element.contents.select { |c| c.essence_type == content.essence_type && c.name == content.name }
|
22
|
+
end
|
23
|
+
end
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
def link
|
26
|
+
@element = Alchemy::Element.find(params[:id])
|
27
|
+
@source_element = Alchemy::Element.find(params[:source_element_id])
|
28
|
+
@content = @element.contents.where(:essence_type => "EssenceElementTeaser")
|
29
|
+
@params = "?page_id=#{@source_element.page.id}&element_id=#{@source_element.id}"
|
30
|
+
end
|
31
31
|
|
32
32
|
end
|