alchemy_crm 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +22 -0
- data/.travis.yml +12 -0
- data/Gemfile +21 -0
- data/Guardfile +13 -0
- data/LICENSE +24 -0
- data/README.md +82 -0
- data/Rakefile +27 -0
- data/alchemy_crm.gemspec +31 -0
- data/app/assets/images/.DS_Store +0 -0
- data/app/assets/images/alchemy_crm/.DS_Store +0 -0
- data/app/assets/images/alchemy_crm/contact-icons.png +0 -0
- data/app/assets/images/alchemy_crm/fill_content.gif +0 -0
- data/app/assets/images/alchemy_crm/group-icons.png +0 -0
- data/app/assets/images/alchemy_crm/mailing-icons.png +0 -0
- data/app/assets/images/alchemy_crm/module_icon.png +0 -0
- data/app/assets/images/alchemy_crm/newsletter-icons.png +0 -0
- data/app/assets/images/alchemy_crm/statistic.png +0 -0
- data/app/assets/images/alchemy_crm/tag-icons.png +0 -0
- data/app/assets/javascripts/alchemy_crm/alchemy_crm.base.js +65 -0
- data/app/assets/javascripts/alchemy_crm/scripts.js +2 -0
- data/app/assets/stylesheets/alchemy_crm/base.css.scss +473 -0
- data/app/assets/stylesheets/alchemy_crm/styles.css +3 -0
- data/app/controllers/alchemy_crm/admin/base_controller.rb +7 -0
- data/app/controllers/alchemy_crm/admin/contact_groups_controller.rb +23 -0
- data/app/controllers/alchemy_crm/admin/contacts_controller.rb +112 -0
- data/app/controllers/alchemy_crm/admin/deliveries_controller.rb +80 -0
- data/app/controllers/alchemy_crm/admin/elements_controller_extension.rb +32 -0
- data/app/controllers/alchemy_crm/admin/mailings_controller.rb +47 -0
- data/app/controllers/alchemy_crm/admin/newsletters_controller.rb +24 -0
- data/app/controllers/alchemy_crm/admin/tags_controller.rb +62 -0
- data/app/controllers/alchemy_crm/base_controller.rb +5 -0
- data/app/controllers/alchemy_crm/contacts_controller.rb +103 -0
- data/app/controllers/alchemy_crm/mailings_controller.rb +20 -0
- data/app/controllers/alchemy_crm/recipients_controller.rb +35 -0
- data/app/controllers/alchemy_crm/subscriptions_controller.rb +57 -0
- data/app/helpers/alchemy/pages_helper_extension.rb +18 -0
- data/app/helpers/alchemy_crm/admin/base_helper.rb +12 -0
- data/app/helpers/alchemy_crm/mailings_helper.rb +190 -0
- data/app/mailers/alchemy_crm/bounce_receiver.rb +13 -0
- data/app/mailers/alchemy_crm/contacts_mailer.rb +26 -0
- data/app/mailers/alchemy_crm/mailings_mailer.rb +48 -0
- data/app/mailers/alchemy_crm/subscriptions_mailer.rb +17 -0
- data/app/models/alchemy/essence_element_teaser.rb +19 -0
- data/app/models/alchemy_crm/contact.rb +264 -0
- data/app/models/alchemy_crm/contact_group.rb +26 -0
- data/app/models/alchemy_crm/contact_group_filter.rb +26 -0
- data/app/models/alchemy_crm/delivery.rb +57 -0
- data/app/models/alchemy_crm/element_extension.rb +28 -0
- data/app/models/alchemy_crm/mailing.rb +93 -0
- data/app/models/alchemy_crm/newsletter.rb +48 -0
- data/app/models/alchemy_crm/reaction.rb +9 -0
- data/app/models/alchemy_crm/recipient.rb +48 -0
- data/app/models/alchemy_crm/subscription.rb +8 -0
- data/app/views/alchemy/admin/elements/_view_not_found.text.erb +0 -0
- data/app/views/alchemy/admin/elements/fill.js.erb +13 -0
- data/app/views/alchemy/admin/elements/link.js.erb +1 -0
- data/app/views/alchemy/elements/_newsletter_article_editor.html.erb +4 -0
- data/app/views/alchemy/elements/_newsletter_article_view.html.erb +16 -0
- data/app/views/alchemy/elements/_newsletter_article_view.text.erb +5 -0
- data/app/views/alchemy/elements/_newsletter_greeting_editor.html.erb +3 -0
- data/app/views/alchemy/elements/_newsletter_greeting_view.html.erb +11 -0
- data/app/views/alchemy/elements/_newsletter_greeting_view.text.erb +6 -0
- data/app/views/alchemy/elements/_newsletter_signout_form_editor.html.erb +3 -0
- data/app/views/alchemy/elements/_newsletter_signout_form_view.html.erb +32 -0
- data/app/views/alchemy/elements/_newsletter_signout_mail_editor.html.erb +4 -0
- data/app/views/alchemy/elements/_newsletter_signup_form_editor.html.erb +6 -0
- data/app/views/alchemy/elements/_newsletter_signup_form_view.html.erb +78 -0
- data/app/views/alchemy/elements/_newsletter_signup_mail_editor.html.erb +4 -0
- data/app/views/alchemy/essences/_essence_date_view.text.erb +3 -0
- data/app/views/alchemy/essences/_essence_element_teaser_editor.html.erb +31 -0
- data/app/views/alchemy/essences/_essence_element_teaser_view.html.erb +1 -0
- data/app/views/alchemy/essences/_essence_element_teaser_view.text.erb +3 -0
- data/app/views/alchemy/essences/_essence_richtext_view.text.erb +1 -0
- data/app/views/alchemy/essences/_essence_text_view.text.erb +1 -0
- data/app/views/alchemy/newsletter_layouts/_standard.html.erb +39 -0
- data/app/views/alchemy/newsletter_layouts/_standard.text.erb +5 -0
- data/app/views/alchemy_crm/admin/contact_groups/_contact_group.html.erb +32 -0
- data/app/views/alchemy_crm/admin/contact_groups/_filter.html.erb +30 -0
- data/app/views/alchemy_crm/admin/contact_groups/_form.html.erb +47 -0
- data/app/views/alchemy_crm/admin/contact_groups/_tag.html.erb +6 -0
- data/app/views/alchemy_crm/admin/contact_groups/add_filter.js.erb +9 -0
- data/app/views/alchemy_crm/admin/contact_groups/destroy.rjs +1 -0
- data/app/views/alchemy_crm/admin/contact_groups/edit.html.erb +1 -0
- data/app/views/alchemy_crm/admin/contact_groups/index.html.erb +41 -0
- data/app/views/alchemy_crm/admin/contact_groups/new.html.erb +1 -0
- data/app/views/alchemy_crm/admin/contacts/_contact.html.erb +44 -0
- data/app/views/alchemy_crm/admin/contacts/_form.html.erb +86 -0
- data/app/views/alchemy_crm/admin/contacts/destroy.rjs +1 -0
- data/app/views/alchemy_crm/admin/contacts/edit.html.erb +1 -0
- data/app/views/alchemy_crm/admin/contacts/import.html.erb +33 -0
- data/app/views/alchemy_crm/admin/contacts/import.js.erb +2 -0
- data/app/views/alchemy_crm/admin/contacts/index.html.erb +51 -0
- data/app/views/alchemy_crm/admin/contacts/new.html.erb +1 -0
- data/app/views/alchemy_crm/admin/contacts/vcf_import_result.html.erb +49 -0
- data/app/views/alchemy_crm/admin/deliveries/_delivery.html.erb +41 -0
- data/app/views/alchemy_crm/admin/deliveries/_form.html.erb +65 -0
- data/app/views/alchemy_crm/admin/deliveries/_recipient.html.erb +40 -0
- data/app/views/alchemy_crm/admin/deliveries/edit.html.erb +1 -0
- data/app/views/alchemy_crm/admin/deliveries/index.html.erb +29 -0
- data/app/views/alchemy_crm/admin/deliveries/new.html.erb +1 -0
- data/app/views/alchemy_crm/admin/deliveries/show.html.erb +66 -0
- data/app/views/alchemy_crm/admin/elements/link.rjs +4 -0
- data/app/views/alchemy_crm/admin/elements/teasables.html.erb +57 -0
- data/app/views/alchemy_crm/admin/mailings/_form.html.erb +43 -0
- data/app/views/alchemy_crm/admin/mailings/_mailing.html.erb +75 -0
- data/app/views/alchemy_crm/admin/mailings/edit.html.erb +1 -0
- data/app/views/alchemy_crm/admin/mailings/edit_content.html.erb +194 -0
- data/app/views/alchemy_crm/admin/mailings/import_result.html.erb +37 -0
- data/app/views/alchemy_crm/admin/mailings/index.html.erb +39 -0
- data/app/views/alchemy_crm/admin/mailings/new.html.erb +1 -0
- data/app/views/alchemy_crm/admin/mailings/show.html.erb +1 -0
- data/app/views/alchemy_crm/admin/mailings/show.text.erb +1 -0
- data/app/views/alchemy_crm/admin/newsletters/_form.html.erb +54 -0
- data/app/views/alchemy_crm/admin/newsletters/_newsletter.html.erb +42 -0
- data/app/views/alchemy_crm/admin/newsletters/_tag_with_radiobutton.html.erb +7 -0
- data/app/views/alchemy_crm/admin/newsletters/destroy.rjs +1 -0
- data/app/views/alchemy_crm/admin/newsletters/edit.html.erb +1 -0
- data/app/views/alchemy_crm/admin/newsletters/index.html.erb +42 -0
- data/app/views/alchemy_crm/admin/newsletters/new.html.erb +10 -0
- data/app/views/alchemy_crm/admin/tags/_radio_tag.html.erb +6 -0
- data/app/views/alchemy_crm/admin/tags/_tag.html.erb +32 -0
- data/app/views/alchemy_crm/admin/tags/edit.html.erb +40 -0
- data/app/views/alchemy_crm/admin/tags/index.html.erb +35 -0
- data/app/views/alchemy_crm/admin/tags/new.html.erb +16 -0
- data/app/views/alchemy_crm/contacts_mailer/signout_mail.html.erb +8 -0
- data/app/views/alchemy_crm/contacts_mailer/signout_mail.text.erb +4 -0
- data/app/views/alchemy_crm/contacts_mailer/signup_mail.html.erb +11 -0
- data/app/views/alchemy_crm/contacts_mailer/signup_mail.text.erb +4 -0
- data/app/views/alchemy_crm/mailings/show.html.erb +1 -0
- data/app/views/alchemy_crm/mailings_mailer/verification_mail.html.erb +11 -0
- data/app/views/alchemy_crm/subscriptions/index.html.erb +23 -0
- data/app/views/alchemy_crm/subscriptions_mailer/overview_mail.html.erb +27 -0
- data/app/views/alchemy_crm/subscriptions_mailer/overview_mail.text.erb +19 -0
- data/app/views/csv_magic/import_errors.html.erb +44 -0
- data/app/views/csv_magic/mapper.html.erb +62 -0
- data/app/views/layouts/alchemy_crm/mailings.html.erb +212 -0
- data/app/views/layouts/alchemy_crm/mailings.text.erb +3 -0
- data/config/alchemy_crm.config.yml +21 -0
- data/config/authorization_rules.rb +37 -0
- data/config/initializers/assets.rb +4 -0
- data/config/initializers/delayed_job.rb +6 -0
- data/config/locales/alchemy.de.yml +55 -0
- data/config/locales/alchemy.en.yml +52 -0
- data/config/locales/alchemy_crm.de.yml +196 -0
- data/config/locales/alchemy_crm.en.yml +53 -0
- data/config/locales/localized_country_select.de.rb +268 -0
- data/config/locales/localized_country_select.en.rb +282 -0
- data/config/module_definition.yml +30 -0
- data/config/routes.rb +71 -0
- data/db/migrate/20100708220434_create_mailings.rb +19 -0
- data/db/migrate/20100708220534_create_contacts.rb +27 -0
- data/db/migrate/20100708220812_create_contact_groups.rb +13 -0
- data/db/migrate/20100708221009_create_newsletters.rb +15 -0
- data/db/migrate/20100708221319_create_sent_mailings.rb +15 -0
- data/db/migrate/20100708221529_create_recipients.rb +21 -0
- data/db/migrate/20100708222620_acts_as_taggable_migration.rb +28 -0
- data/db/migrate/20100708223324_create_contact_group_filters.rb +17 -0
- data/db/migrate/20100708223727_create_newsletter_subscriptions.rb +14 -0
- data/db/migrate/20100708223922_create_essence_element_teasers.rb +15 -0
- data/db/migrate/20100714172207_create_contact_groups_newsletters.rb +12 -0
- data/db/migrate/20100927152601_create_reactions.rb +14 -0
- data/db/migrate/20111028091722_acts_as_taggable_on_migration.rb +15 -0
- data/db/migrate/20111028200710_add_counter_cache_columns_for_tags.rb +11 -0
- data/db/migrate/20111030204931_create_delayed_jobs.rb +21 -0
- data/db/migrate/20111104105854_add_deliver_at_to_sent_mailings.rb +9 -0
- data/db/migrate/20111104125306_remove_sent_mailing_pdf_id_from_sent_mailings.rb +9 -0
- data/db/migrate/20111104131912_add_delivered_at_to_sent_mailings.rb +9 -0
- data/db/migrate/20111124145923_namespace_alchemy_crm_models.rb +17 -0
- data/db/migrate/20120306115555_add_disabled_to_alchemy_crm_contacts.rb +5 -0
- data/db/migrate/20120307160721_rename_alchemy_crm_recipients_sent_mailing_id.rb +5 -0
- data/db/migrate/20120315113522_add_url_to_alchemy_crm_reactions.rb +5 -0
- data/db/migrate/20120316161333_add_sha1_and_salt_to_alchemy_crm_recipients.rb +6 -0
- data/db/migrate/20120320103412_add_indexes_to_alchemy_crm_sha1_columns.rb +7 -0
- data/db/migrate/20120321105455_add_queue_to_delayed_jobs.rb +9 -0
- data/db/migrate/20120327174301_add_more_indexes_to_alchemy_crm_tables.rb +12 -0
- data/lib/alchemy_crm.rb +18 -0
- data/lib/alchemy_crm/bounced_delivery.rb +46 -0
- data/lib/alchemy_crm/config.rb +28 -0
- data/lib/alchemy_crm/engine.rb +40 -0
- data/lib/alchemy_crm/i18n_helpers.rb +35 -0
- data/lib/alchemy_crm/newsletter_layout.rb +40 -0
- data/lib/alchemy_crm/seeder.rb +30 -0
- data/lib/alchemy_crm/version.rb +3 -0
- data/lib/generators/alchemy_crm/scaffold/files/_standard.html.erb +1 -0
- data/lib/generators/alchemy_crm/scaffold/files/_standard.text.erb +1 -0
- data/lib/generators/alchemy_crm/scaffold/files/elements.yml +51 -0
- data/lib/generators/alchemy_crm/scaffold/files/newsletter_layouts.yml +3 -0
- data/lib/generators/alchemy_crm/scaffold/files/newsletters.html.erb +22 -0
- data/lib/generators/alchemy_crm/scaffold/files/newsletters.text.erb +4 -0
- data/lib/generators/alchemy_crm/scaffold/files/page_layouts.yml +19 -0
- data/lib/generators/alchemy_crm/scaffold/scaffold_generator.rb +26 -0
- data/lib/tasks/alchemy_crm.rake +28 -0
- data/lib/tasks/routes.rake +29 -0
- data/rails/init.rb +1 -0
- data/recipes/alchemy-mailings-capistrano-tasks.rb +12 -0
- data/spec/alchemy_mailings_spec.rb +7 -0
- data/spec/config_spec.rb +28 -0
- data/spec/controllers/alchemy_crm/contacts_controller_spec.rb +210 -0
- data/spec/controllers/alchemy_crm/mailings_controller_spec.rb +89 -0
- data/spec/controllers/alchemy_crm/recipients_controller_spec.rb +155 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/alchemy/config.yml +142 -0
- data/spec/dummy/config/alchemy/elements.yml +79 -0
- data/spec/dummy/config/alchemy/newsletter_layouts.yml +4 -0
- data/spec/dummy/config/alchemy/page_layouts.yml +55 -0
- data/spec/dummy/config/application.rb +43 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +22 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +30 -0
- data/spec/dummy/config/environments/production.rb +60 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/db/schema.rb +452 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/helpers/alchemy_crm/mailings_helper_spec.rb +169 -0
- data/spec/mailers/alchemy_crm/contacts_mailer_spec.rb +88 -0
- data/spec/mailers/alchemy_crm/mailings_mailer_spec.rb +42 -0
- data/spec/models/alchemy_crm/contact_group_spec.rb +41 -0
- data/spec/models/alchemy_crm/contact_spec.rb +108 -0
- data/spec/models/alchemy_crm/delivery_spec.rb +55 -0
- data/spec/models/alchemy_crm/mailing_spec.rb +63 -0
- data/spec/models/alchemy_crm/newsletter_spec.rb +45 -0
- data/spec/spec_helper.rb +58 -0
- data/vendor/assets/javascripts/autocomplete-rails.js +16 -0
- metadata +438 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<%= form_for [:admin, @delivery] do |f| %>
|
|
2
|
+
<div id="errors" style="display:none"></div>
|
|
3
|
+
<table style="width: 100%">
|
|
4
|
+
<tr>
|
|
5
|
+
<td class="label"><%= f.label :name, 'Name:' %></td>
|
|
6
|
+
<td><%= @mailing.name %></td>
|
|
7
|
+
</tr>
|
|
8
|
+
<tr>
|
|
9
|
+
<td class="label"><%= f.label :subject, 'Betreff:' %></td>
|
|
10
|
+
<td><%= @mailing.subject %></td>
|
|
11
|
+
</tr>
|
|
12
|
+
<tr>
|
|
13
|
+
<td class="label"><%= f.label :recipients, 'Empfänger:' %></td>
|
|
14
|
+
<td><%= @delivery.new_record? ? @mailing.contacts_not_having_email_yet.count : @delivery.recipients.count %> (<%= link_to_function "Empfänger anzeigen", "jQuery('#all_contacts').toggle(); AlchemyCrm.toggleLabel(this, 'Empfänger ausblenden', 'Empfänger anzeigen')" ,:class => "" %>)</td>
|
|
15
|
+
</tr>
|
|
16
|
+
<tr>
|
|
17
|
+
<td></td>
|
|
18
|
+
<td>
|
|
19
|
+
<ul id="all_contacts" style="display: none">
|
|
20
|
+
<% emails = @delivery.new_record? ? @mailing.emails : @delivery.recipients.collect(&:email) -%>
|
|
21
|
+
<%- emails.each do |email| -%>
|
|
22
|
+
<li class="<%= cycle("even", "odd") -%>"><%= email %></li>
|
|
23
|
+
<%- end -%>
|
|
24
|
+
</ul>
|
|
25
|
+
</td>
|
|
26
|
+
</tr>
|
|
27
|
+
<tr>
|
|
28
|
+
<td class="label">
|
|
29
|
+
<%= f.label :deliver_at, "versenden am" %>
|
|
30
|
+
</td>
|
|
31
|
+
<td class="delivery_time">
|
|
32
|
+
<%= text_field_tag nil, @delivery.deliver_at.strftime('%d.%m.%Y'), :class => 'datepicker thin_border', :id => nil, :style => 'width: 90px' %>
|
|
33
|
+
<label>um</label>
|
|
34
|
+
<%= f.time_select :deliver_at, { :minute_step => 15, :time_separator => '<label>: </label>'.html_safe }, { :class => 'alchemy_selectbox time_select' } %>
|
|
35
|
+
<label>Uhr</label>
|
|
36
|
+
</td>
|
|
37
|
+
</tr>
|
|
38
|
+
<tr>
|
|
39
|
+
<td colspan="2" class="submit">
|
|
40
|
+
<%= f.hidden_field :mailing_id %>
|
|
41
|
+
<%= f.button("speichern", :class => "button") %>
|
|
42
|
+
</td>
|
|
43
|
+
</tr>
|
|
44
|
+
</table>
|
|
45
|
+
<% end %>
|
|
46
|
+
<script type="text/javascript" charset="utf-8">
|
|
47
|
+
(function($) {
|
|
48
|
+
|
|
49
|
+
$('input.datepicker').datepicker({
|
|
50
|
+
dateFormat: 'dd.mm.yy',
|
|
51
|
+
dayNames: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
|
|
52
|
+
dayNamesMin: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
|
|
53
|
+
monthNames: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
|
|
54
|
+
monthNamesShort: ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
|
|
55
|
+
onClose: function(dateText, inst) {
|
|
56
|
+
var dateparts = dateText.split('.');
|
|
57
|
+
console.info('partsText: ', dateparts);
|
|
58
|
+
$('#delivery_deliver_at_1i').val(dateparts[2]);
|
|
59
|
+
$('#delivery_deliver_at_2i').val(dateparts[1]);
|
|
60
|
+
$('#delivery_deliver_at_3i').val(dateparts[0]);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
})(jQuery);
|
|
65
|
+
</script>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<tr class="recipient">
|
|
2
|
+
<td>
|
|
3
|
+
<%= if recipient.contact.blank?
|
|
4
|
+
"<i>#{alchemy_crm_t(:without)}</i>".html_safe
|
|
5
|
+
else
|
|
6
|
+
link_to(recipient.contact.fullname.blank? ? "<i>#{alchemy_crm_t(:without)}</i>".html_safe : recipient.contact.fullname, admin_contacts_path(:query => recipient.contact.email), :title => alchemy_crm_t(:show_contact))
|
|
7
|
+
end
|
|
8
|
+
%>
|
|
9
|
+
</td>
|
|
10
|
+
<td>
|
|
11
|
+
<%= recipient.email %>
|
|
12
|
+
</td>
|
|
13
|
+
<%- if reactions -%>
|
|
14
|
+
<td>
|
|
15
|
+
<%- recipient.reactions.each do |reaction| -%>
|
|
16
|
+
<%= reaction.url %><br />
|
|
17
|
+
<%- end -%>
|
|
18
|
+
</td>
|
|
19
|
+
<%- end -%>
|
|
20
|
+
<%- if bounced -%>
|
|
21
|
+
<td>
|
|
22
|
+
<%- if recipient.contact -%>
|
|
23
|
+
<%= link_to_overlay_window(
|
|
24
|
+
alchemy_crm_t(:edit_contact),
|
|
25
|
+
edit_admin_contact_path(recipient.contact),
|
|
26
|
+
{
|
|
27
|
+
:title => alchemy_crm_t(:edit_contact),
|
|
28
|
+
:size => '415x560'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
:title => alchemy_crm_t(:edit_contact),
|
|
32
|
+
:class => 'button with_icon edit'
|
|
33
|
+
}
|
|
34
|
+
) -%>
|
|
35
|
+
<%- else -%>
|
|
36
|
+
|
|
37
|
+
<%- end -%>
|
|
38
|
+
</td>
|
|
39
|
+
<%- end -%>
|
|
40
|
+
</tr>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= render :partial => 'form' %>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<%- if @deliveries.blank? -%>
|
|
2
|
+
<div class="info with_margin">
|
|
3
|
+
<%= render_icon('info') %>
|
|
4
|
+
<%= alchemy_crm_t(:this_mailing_has_not_been_delivered_yet) %>
|
|
5
|
+
</div>
|
|
6
|
+
<%- else -%>
|
|
7
|
+
<div class="with_padding">
|
|
8
|
+
<div class="info">
|
|
9
|
+
<%= render_icon('info') %>
|
|
10
|
+
<h1><%= alchemy_crm_t(:this_list_shows_all_deliveries) %></h1>
|
|
11
|
+
<ol>
|
|
12
|
+
<li><%= alchemy_crm_t(:you_can_open_statistics_for_delivered_mailings) %></li>
|
|
13
|
+
<li><%= alchemy_crm_t(:not_yet_delivered_mailings_can_be_rescheduled) %></li>
|
|
14
|
+
<li><%= alchemy_crm_t(:not_yet_delivered_mailings_can_be_canceled) %></li>
|
|
15
|
+
</ol>
|
|
16
|
+
</div>
|
|
17
|
+
<div id="deliveries">
|
|
18
|
+
<table class="list">
|
|
19
|
+
<tr>
|
|
20
|
+
<th><%= alchemy_crm_t(:delivery_scheduled_at) %></th>
|
|
21
|
+
<th class="right"><%= translate_model_attribute(:delivery, :recipients_count) %></th>
|
|
22
|
+
<th class="center"><%= translate_model_attribute(:delivery, :delivered?) %></th>
|
|
23
|
+
<th class="center"><%= alchemy_crm_t(:statistics) %></th>
|
|
24
|
+
</tr>
|
|
25
|
+
<%= render @deliveries %>
|
|
26
|
+
</table>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<%- end -%>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= render :partial => 'form' %>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<div id="delivery" class="with_padding" style="padding: 8px">
|
|
2
|
+
<div class="recipient_group">
|
|
3
|
+
<h2><%= alchemy_crm_t(:total_recipients_count) %>: <span style="float: right"><%= @recipients.length %></span></h2>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<div class="recipient_group">
|
|
7
|
+
<h2><%= alchemy_crm_t(:count_of_recipients_that_received_the_email) %>: <span style="float: right"><%= @read.length %></span></h2>
|
|
8
|
+
<p><%= link_to_function(alchemy_crm_t(:details), "$('#read').toggle()", :class => 'button small no-spinner') %></p>
|
|
9
|
+
<div class="recipients" id="read" style="display: none">
|
|
10
|
+
<%- if @read.blank? -%>
|
|
11
|
+
<p style="font-style: italic"><%= alchemy_crm_t(:none) %></p>
|
|
12
|
+
<%- else -%>
|
|
13
|
+
<table class="recipients_table">
|
|
14
|
+
<tr>
|
|
15
|
+
<th><%= translate_model_attribute(:contact, :name) %></th>
|
|
16
|
+
<th><%= translate_model_attribute(:contact, :email).gsub(/\*$/, '') %></th>
|
|
17
|
+
</tr>
|
|
18
|
+
<tr>
|
|
19
|
+
<%= render :partial => 'recipient', :collection => @read, :locals => {:reactions => false, :bounced => false} %>
|
|
20
|
+
</tr>
|
|
21
|
+
</table>
|
|
22
|
+
<%- end -%>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="recipient_group">
|
|
27
|
+
<h2><%= alchemy_crm_t(:count_of_recipients_that_clicked_a_link) %>: <span style="float: right"><%= @reacted.length %></span></h2>
|
|
28
|
+
<p><%= link_to_function(alchemy_crm_t(:details), "$('#reacted').toggle()", :class => 'button small no-spinner') %></p>
|
|
29
|
+
<div class="recipients" id="reacted" style="display: none">
|
|
30
|
+
<%- if @reacted.blank? -%>
|
|
31
|
+
<p style="font-style: italic"><%= alchemy_crm_t(:none) %></p>
|
|
32
|
+
<%- else -%>
|
|
33
|
+
<table class="recipients_table">
|
|
34
|
+
<tr>
|
|
35
|
+
<th><%= translate_model_attribute(:contact, :name) %></th>
|
|
36
|
+
<th><%= translate_model_attribute(:contact, :email).gsub(/\*$/, '') %></th>
|
|
37
|
+
<th><%= alchemy_crm_t(:clicked_links) %></th>
|
|
38
|
+
</tr>
|
|
39
|
+
<tr>
|
|
40
|
+
<%= render :partial => 'recipient', :collection => @reacted, :locals => {:reactions => true, :bounced => false} %>
|
|
41
|
+
</tr>
|
|
42
|
+
</table>
|
|
43
|
+
<%- end -%>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="recipient_group">
|
|
48
|
+
<h2><%= alchemy_crm_t(:count_of_bounced_emails) %>: <span style="float: right"><%= @bounced.length %></span></h2>
|
|
49
|
+
<p><%= link_to_function(alchemy_crm_t(:details), "$('#bounced').toggle()", :class => 'button small no-spinner') %></p>
|
|
50
|
+
<div class="recipients" id="bounced" style="display: none">
|
|
51
|
+
<%- if @bounced.blank? -%>
|
|
52
|
+
<p style="font-style: italic"><%= alchemy_crm_t(:none) %></p>
|
|
53
|
+
<%- else -%>
|
|
54
|
+
<table class="recipients_table">
|
|
55
|
+
<tr>
|
|
56
|
+
<th><%= translate_model_attribute(:contact, :name) %></th>
|
|
57
|
+
<th><%= translate_model_attribute(:contact, :email).gsub(/\*$/, '') %></th>
|
|
58
|
+
</tr>
|
|
59
|
+
<tr>
|
|
60
|
+
<%= render :partial => 'recipient', :collection => @bounced, :locals => {:reactions => false, :bounced => true} %>
|
|
61
|
+
</tr>
|
|
62
|
+
</table>
|
|
63
|
+
<%- end -%>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<div id="overlay_toolbar" style="margin: 0">
|
|
2
|
+
Nur Elemente der Seite:
|
|
3
|
+
<%= select_tag(
|
|
4
|
+
"pages",
|
|
5
|
+
options_for_select([["Alle", ""]]) + options_from_collection_for_select(@pages, :id, :name),
|
|
6
|
+
:onchange => "AlchemyCrm.teasablesFilter(this.value)",
|
|
7
|
+
:class => 'alchemy_selectbox'
|
|
8
|
+
) %>
|
|
9
|
+
anzeigen.
|
|
10
|
+
</div>
|
|
11
|
+
<div class="with_padding" style="padding: 8px">
|
|
12
|
+
<div id="teasable_elements">
|
|
13
|
+
<%- if @elements.blank? -%>
|
|
14
|
+
<p>Es wurden keine Elemente gefunden.</p>
|
|
15
|
+
<%- else -%>
|
|
16
|
+
<%- @elements.group_by{ |e| e.page }.each do |page, elements| -%>
|
|
17
|
+
<%- if page -%>
|
|
18
|
+
<div id="teasable_page_<%= page.id %>" class="teasable_page">
|
|
19
|
+
<h2><%= page.name %></h2>
|
|
20
|
+
<%- elements.each do |element| -%>
|
|
21
|
+
<div class="teasable_element">
|
|
22
|
+
<%= element.preview_text(200) %>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="teasable_tools">
|
|
25
|
+
<%= link_to(
|
|
26
|
+
"kompletten Inhalt in das Mailing übernehmen",
|
|
27
|
+
url_for({
|
|
28
|
+
:controller => "/admin/elements",
|
|
29
|
+
:action => "fill",
|
|
30
|
+
:id => @element.id,
|
|
31
|
+
:source_element_id => element.id
|
|
32
|
+
}),
|
|
33
|
+
:method => 'put',
|
|
34
|
+
:class => 'button',
|
|
35
|
+
:remote => true
|
|
36
|
+
) %>
|
|
37
|
+
<%= link_to(
|
|
38
|
+
"Nur einen Link setzen",
|
|
39
|
+
url_for({
|
|
40
|
+
:controller => "/admin/elements",
|
|
41
|
+
:action => "link",
|
|
42
|
+
:id => @element.id,
|
|
43
|
+
:source_element_id => element.id,
|
|
44
|
+
:link_only => true
|
|
45
|
+
}),
|
|
46
|
+
:method => 'put',
|
|
47
|
+
:class => "link_only button",
|
|
48
|
+
:remote => true
|
|
49
|
+
) %>
|
|
50
|
+
</div>
|
|
51
|
+
<%- end -%>
|
|
52
|
+
</div>
|
|
53
|
+
<%- end -%>
|
|
54
|
+
<%- end -%>
|
|
55
|
+
<%- end -%>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<%= form_for [:admin, @mailing], :class => " with_padding", :remote => true do |f| %>
|
|
2
|
+
<div id="errors" style="display: none"></div>
|
|
3
|
+
<table>
|
|
4
|
+
<tr>
|
|
5
|
+
<td class="label">
|
|
6
|
+
<%= f.label :newsletter %>
|
|
7
|
+
</td>
|
|
8
|
+
<td class="select">
|
|
9
|
+
<%= f.collection_select :newsletter_id, @newsletters, :id, :humanized_name, { :prompt => t('Please choose') }, { :class => "alchemy_selectbox long" } %>
|
|
10
|
+
</td>
|
|
11
|
+
</tr>
|
|
12
|
+
<tr>
|
|
13
|
+
<td class="label">
|
|
14
|
+
<%= f.label :name %>
|
|
15
|
+
</td>
|
|
16
|
+
<td class="input">
|
|
17
|
+
<%= f.text_field :name, :class => "thin_border long" %>
|
|
18
|
+
</td>
|
|
19
|
+
</tr>
|
|
20
|
+
<tr>
|
|
21
|
+
<td class="label">
|
|
22
|
+
<%= f.label :subject %>
|
|
23
|
+
</td>
|
|
24
|
+
<td class="input">
|
|
25
|
+
<%= f.text_field :subject, :class => "thin_border long" %>
|
|
26
|
+
</td>
|
|
27
|
+
</tr>
|
|
28
|
+
<tr>
|
|
29
|
+
<td class="label">
|
|
30
|
+
<%= f.label :additional_email_addresses %>
|
|
31
|
+
</td>
|
|
32
|
+
<td class="input">
|
|
33
|
+
<%= f.text_area :additional_email_addresses, :class => "thin_border long", :style => "height: 4em;" %>
|
|
34
|
+
<p style="text-align: right"><sup><%= alchemy_crm_t(:seperate_emails_with_comma) %></sup></p>
|
|
35
|
+
</td>
|
|
36
|
+
</tr>
|
|
37
|
+
<tr>
|
|
38
|
+
<td class="submit" colspan="2">
|
|
39
|
+
<%= f.button t(:save), :class => "button" %>
|
|
40
|
+
</td>
|
|
41
|
+
</tr>
|
|
42
|
+
</table>
|
|
43
|
+
<% end %>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
|
2
|
+
<td class="icon">
|
|
3
|
+
<%= content_tag('span', '', :class => 'icon mailing') %>
|
|
4
|
+
</td>
|
|
5
|
+
<td class="name">
|
|
6
|
+
<%= link_to mailing.name, {:action => 'edit_content', :id => mailing}, :title => alchemy_crm_t(:edit_mailing_content) -%>
|
|
7
|
+
</td>
|
|
8
|
+
<td class="name">
|
|
9
|
+
<%= mailing.subject -%>
|
|
10
|
+
</td>
|
|
11
|
+
<td>
|
|
12
|
+
<%= mailing.newsletter.blank? ? '' : mailing.newsletter.name -%>
|
|
13
|
+
</td>
|
|
14
|
+
<td class="size">
|
|
15
|
+
<%= mailing.recipients.count -%>
|
|
16
|
+
</td>
|
|
17
|
+
<td class="time">
|
|
18
|
+
<%- if mailing.next_pending_delivery -%>
|
|
19
|
+
<%= mailing.next_pending_delivery.deliver_at.nil? ? '' : l(mailing.next_pending_delivery.deliver_at) -%>
|
|
20
|
+
<%- end -%>
|
|
21
|
+
</td>
|
|
22
|
+
<td class="tools">
|
|
23
|
+
<%= link_to_overlay_window(
|
|
24
|
+
render_icon('send_mailing'),
|
|
25
|
+
new_admin_delivery_path(:mailing_id => mailing.id),
|
|
26
|
+
{
|
|
27
|
+
:title => alchemy_crm_t('Send Mailing'),
|
|
28
|
+
:size => '420x210'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
:title => alchemy_crm_t('Send Mailing')
|
|
32
|
+
}
|
|
33
|
+
) %>
|
|
34
|
+
<%= link_to_overlay_window(
|
|
35
|
+
render_icon('delivery'),
|
|
36
|
+
admin_mailing_deliveries_path(mailing.id),
|
|
37
|
+
{
|
|
38
|
+
:title => alchemy_crm_t(:sent_mailings),
|
|
39
|
+
:size => '500x550'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
:title => alchemy_crm_t(:show_sent_mailings)
|
|
43
|
+
}
|
|
44
|
+
) -%>
|
|
45
|
+
<%= link_to_overlay_window(
|
|
46
|
+
render_icon('mailing_copy'),
|
|
47
|
+
copy_admin_mailing_path(mailing),
|
|
48
|
+
{
|
|
49
|
+
:title => alchemy_crm_t(:copy_mailing),
|
|
50
|
+
:size => '450x260'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
:title => alchemy_crm_t(:copy_mailing)
|
|
54
|
+
}
|
|
55
|
+
) -%>
|
|
56
|
+
<%= link_to_overlay_window(
|
|
57
|
+
render_icon('mailing_edit'),
|
|
58
|
+
edit_admin_mailing_path(mailing),
|
|
59
|
+
{
|
|
60
|
+
:title => alchemy_crm_t(:edit_mailing),
|
|
61
|
+
:size => '450x270'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
:class => 'edit_mailing_button',
|
|
65
|
+
:title => alchemy_crm_t(:edit_mailing)
|
|
66
|
+
}
|
|
67
|
+
) -%>
|
|
68
|
+
<%= link_to_confirmation_window(
|
|
69
|
+
render_icon('mailing_delete'),
|
|
70
|
+
alchemy_crm_t(:do_you_really_want_to_delete_this_mailing?),
|
|
71
|
+
admin_mailing_path(mailing),
|
|
72
|
+
:title => alchemy_crm_t(:delete_mailing)
|
|
73
|
+
) -%>
|
|
74
|
+
</td>
|
|
75
|
+
</tr>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= render :partial => "form" %>
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
<%- content_for(:javascript_includes) do -%>
|
|
2
|
+
<%= javascript_include_tag "alchemy_crm/scripts.js" %>
|
|
3
|
+
<%- end -%>
|
|
4
|
+
|
|
5
|
+
<%- content_for(:stylesheets) do -%>
|
|
6
|
+
<%= stylesheet_link_tag('alchemy_crm/styles') %>
|
|
7
|
+
<%- end -%>
|
|
8
|
+
|
|
9
|
+
<%- content_for(:subnav_additions) do -%>
|
|
10
|
+
<label><%= ::I18n.t('Active Mailing', :scope => :alchemy_crm) %> »</label>
|
|
11
|
+
<span class="page_status_and_name">
|
|
12
|
+
<span class="page_name"><%= @mailing.name %></span>
|
|
13
|
+
</span>
|
|
14
|
+
<%- end -%>
|
|
15
|
+
<%- content_for(:toolbar) do -%>
|
|
16
|
+
<div id="toolbar_buttons">
|
|
17
|
+
<div class="button_with_label">
|
|
18
|
+
<%= form_tag(
|
|
19
|
+
alchemy.unlock_admin_page_path(
|
|
20
|
+
@page,
|
|
21
|
+
:redirect_to => admin_mailings_path
|
|
22
|
+
),
|
|
23
|
+
:onsubmit => "return Alchemy.checkPageDirtyness(this, {title: '#{ t('Warning!') }', message: '#{ t('You have unsaved elements on this page. Do you really want to leave this page?') }', okLabel: '#{ t('Yes') }', cancelLabel: '#{ t('No') }'});"
|
|
24
|
+
) do %>
|
|
25
|
+
<button class="icon_button" title="<%= t('explain_unlocking') %>">
|
|
26
|
+
<%= render_icon('close') %>
|
|
27
|
+
</button>
|
|
28
|
+
<label><%= t("unlock_page") %></label>
|
|
29
|
+
<% end %>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="button_with_label">
|
|
32
|
+
<%= link_to_overlay_window(
|
|
33
|
+
render_icon('mailing_edit'),
|
|
34
|
+
alchemy_crm.edit_admin_mailing_path(@mailing),
|
|
35
|
+
{
|
|
36
|
+
:title => alchemy_crm_t(:edit_mailing),
|
|
37
|
+
:size => '450x270'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
:class => 'icon_button',
|
|
41
|
+
:title => alchemy_crm_t(:edit_mailing)
|
|
42
|
+
}
|
|
43
|
+
) -%><br />
|
|
44
|
+
<label><%= alchemy_crm_t(:edit_mailing) %></label>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="button_with_label">
|
|
47
|
+
<%= link_to_overlay_window(
|
|
48
|
+
render_icon('send_mailing'),
|
|
49
|
+
alchemy_crm.new_admin_delivery_path(:mailing_id => @mailing.id),
|
|
50
|
+
{
|
|
51
|
+
:title => alchemy_crm_t('Send Mailing'),
|
|
52
|
+
:size => '420x210'
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
:title => alchemy_crm_t('Send Mailing'),
|
|
56
|
+
:class => 'icon_button'
|
|
57
|
+
}
|
|
58
|
+
) %>
|
|
59
|
+
<label><%= alchemy_crm_t('Send Mailing') %></label>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="button_with_label">
|
|
62
|
+
<%= link_to(
|
|
63
|
+
render_icon('plain_text_view'),
|
|
64
|
+
alchemy_crm.admin_mailing_path(@mailing, :format => :text),
|
|
65
|
+
:title => alchemy_crm_t(:show_as_plain_text),
|
|
66
|
+
:class => 'icon_button',
|
|
67
|
+
:id => "toggle_preview_frame_button"
|
|
68
|
+
) %>
|
|
69
|
+
<label><%= alchemy_crm_t(:show_as_plain_text) %></label>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div id="toolbar_buttons_right">
|
|
73
|
+
<div class="button_with_label" id="show_preview_window">
|
|
74
|
+
<%= link_to_function(
|
|
75
|
+
render_icon('preview_window'),
|
|
76
|
+
"AlchemyCrm.openPreviewWindow()",
|
|
77
|
+
{
|
|
78
|
+
:title => t('Show Preview Window'),
|
|
79
|
+
:class => 'icon_button'
|
|
80
|
+
}
|
|
81
|
+
) %><br />
|
|
82
|
+
<label><%= t('Show Preview Window') %></label>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="button_with_label" id="show_element_window">
|
|
85
|
+
<%= link_to_function(
|
|
86
|
+
render_icon('element_window'),
|
|
87
|
+
"AlchemyCrm.openElementsWindow()",
|
|
88
|
+
{
|
|
89
|
+
:title => t('Show Elements Window'),
|
|
90
|
+
:class => 'icon_button'
|
|
91
|
+
}
|
|
92
|
+
) %><br />
|
|
93
|
+
<label><%= t('Show Elements Window') %></label>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<%- end -%>
|
|
97
|
+
<%- content_for :javascripts do -%>
|
|
98
|
+
<%= tinymce_javascript_tags %>
|
|
99
|
+
<script type="text/javascript" charset="utf-8">
|
|
100
|
+
|
|
101
|
+
AlchemyCrm.openPreviewWindow = function() {
|
|
102
|
+
Alchemy.PreviewWindow.init('<%= alchemy_crm.admin_mailing_path(@mailing) %>', '<%= t("Page Preview") -%>');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
AlchemyCrm.openElementsWindow = function() {
|
|
106
|
+
Alchemy.ElementsWindow.init('<%= alchemy.admin_elements_path(:page_id => @page.id) -%>', {
|
|
107
|
+
texts: {
|
|
108
|
+
title: '<%= t("Elements") -%>',
|
|
109
|
+
dirtyTitle: '<%= t("Warning!") -%>',
|
|
110
|
+
dirtyMessage: '<%= t(:element_dirty_close_window_notice) -%>',
|
|
111
|
+
okLabel: '<%= t("Yes") -%>',
|
|
112
|
+
cancelLabel: '<%= t("No") -%>'
|
|
113
|
+
},
|
|
114
|
+
toolbarButtons: [
|
|
115
|
+
{
|
|
116
|
+
title: '<%= t("New Element") -%>',
|
|
117
|
+
label: '<%= t("New Element") -%>',
|
|
118
|
+
iconClass: 'new_element',
|
|
119
|
+
onClick: function() {
|
|
120
|
+
Alchemy.openWindow(
|
|
121
|
+
'<%= alchemy.new_admin_element_path(:page_id => @page.id) -%>',
|
|
122
|
+
'<%= t("New Element") -%>',
|
|
123
|
+
'320',
|
|
124
|
+
'120',
|
|
125
|
+
false,
|
|
126
|
+
true,
|
|
127
|
+
true
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
title: '<%= t("Clipboard") -%>',
|
|
133
|
+
label: '<%= t("Show clipboard") -%>',
|
|
134
|
+
iconClass: 'clipboard<%= clipboard_empty?("elements") ? "" : " full" -%>',
|
|
135
|
+
buttonId: 'clipboard_button',
|
|
136
|
+
onClick: function() {
|
|
137
|
+
Alchemy.openWindow(
|
|
138
|
+
'<%= alchemy.admin_clipboard_path(:remarkable_type => "elements") -%>',
|
|
139
|
+
'<%= t("Clipboard") -%>',
|
|
140
|
+
'380',
|
|
141
|
+
'270',
|
|
142
|
+
false,
|
|
143
|
+
true,
|
|
144
|
+
true
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
title: '<%= t("Show trash") -%>',
|
|
150
|
+
label: '<%= t("Show trash") -%>',
|
|
151
|
+
iconClass: 'trash<%= trash_empty?("elements") ? "" : " full" -%>',
|
|
152
|
+
buttonId: 'element_trash_button',
|
|
153
|
+
onClick: function() {
|
|
154
|
+
Alchemy.openTrashWindow(<%= @page.id %>, '<%= t("Trash") -%>');
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}, function() {
|
|
159
|
+
Alchemy.SortableElements(<%= @page.id %>, '<%= form_authenticity_token %>');
|
|
160
|
+
Alchemy.ElementEditorSelector.init();
|
|
161
|
+
Alchemy.SelectBox('.element_editor select');
|
|
162
|
+
Alchemy.Tinymce.init(function() {
|
|
163
|
+
Alchemy.ElementDirtyObserver('#element_area');
|
|
164
|
+
});
|
|
165
|
+
jQuery('#cells').tabs();
|
|
166
|
+
jQuery('#cells').tabs('paging', { follow: true, followOnSelect: true } );
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
jQuery(document).ready(function($) {
|
|
171
|
+
var texts = {
|
|
172
|
+
title: '<%= t("Warning!") %>',
|
|
173
|
+
message: '<%= t(:element_dirty_page_leave_warning) %>',
|
|
174
|
+
okLabel: '<%= t("Yes") %>',
|
|
175
|
+
cancelLabel: '<%= t("No") %>'
|
|
176
|
+
};
|
|
177
|
+
$('#unlock_page_form, #visit_page_form, #publish_page_form').on('submit', function(event) {
|
|
178
|
+
var not_dirty = Alchemy.checkPageDirtyness(this, texts);
|
|
179
|
+
if (!not_dirty) Alchemy.pleaseWaitOverlay(false);
|
|
180
|
+
return not_dirty;
|
|
181
|
+
});
|
|
182
|
+
Alchemy.PageLeaveObserver(texts);
|
|
183
|
+
AlchemyCrm.openElementsWindow();
|
|
184
|
+
AlchemyCrm.openPreviewWindow();
|
|
185
|
+
|
|
186
|
+
$('#toggle_preview_frame_button').on('click', function(e) {
|
|
187
|
+
e.preventDefault();
|
|
188
|
+
AlchemyCrm.togglePreviewFrame(this, '<%= alchemy_crm.admin_mailing_path(@mailing, :format => :text) -%>', '<%= alchemy_crm.admin_mailing_path(@mailing) -%>');
|
|
189
|
+
return false;
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
</script>
|
|
194
|
+
<%- end -%>
|