maily_herald-webui 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +18 -0
- data/.rspec +5 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +250 -0
- data/Guardfile +23 -0
- data/LICENSE +11 -0
- data/README.md +62 -0
- data/Rakefile +30 -0
- data/app/assets/images/maily_herald/.gitkeep +0 -0
- data/app/assets/images/maily_herald/webui/arrow-bottom.png +0 -0
- data/app/assets/images/maily_herald/webui/arrow-left.png +0 -0
- data/app/assets/images/maily_herald/webui/arrow-right.png +0 -0
- data/app/assets/images/maily_herald/webui/arrow-top.png +0 -0
- data/app/assets/images/maily_herald/webui/logo.svg +38 -0
- data/app/assets/images/maily_herald/webui/sprite-dropdown.png +0 -0
- data/app/assets/images/maily_herald/webui/sprite-form.png +0 -0
- data/app/assets/images/maily_herald/webui/sprite.png +0 -0
- data/app/assets/images/maily_herald/webui/user.png +0 -0
- data/app/assets/javascripts/maily_herald/webui/application.js +20 -0
- data/app/assets/javascripts/maily_herald/webui/dispatches.coffee +58 -0
- data/app/assets/javascripts/maily_herald/webui/webui.coffee +209 -0
- data/app/assets/stylesheets/maily_herald/webui/application.css +18 -0
- data/app/assets/stylesheets/maily_herald/webui/webui-bootstrap.scss +0 -0
- data/app/assets/stylesheets/maily_herald/webui/webui.sass +846 -0
- data/app/controllers/maily_herald/webui/application_controller.rb +19 -0
- data/app/controllers/maily_herald/webui/dashboard_controller.rb +65 -0
- data/app/controllers/maily_herald/webui/dispatches_controller.rb +42 -0
- data/app/controllers/maily_herald/webui/lists_controller.rb +69 -0
- data/app/controllers/maily_herald/webui/logs_controller.rb +20 -0
- data/app/controllers/maily_herald/webui/mailings_controller.rb +68 -0
- data/app/controllers/maily_herald/webui/one_time_mailings_controller.rb +32 -0
- data/app/controllers/maily_herald/webui/periodical_mailings_controller.rb +25 -0
- data/app/controllers/maily_herald/webui/resources_controller.rb +144 -0
- data/app/controllers/maily_herald/webui/sequence_mailings_controller.rb +43 -0
- data/app/controllers/maily_herald/webui/sequences_controller.rb +56 -0
- data/app/controllers/maily_herald/webui/sessions_controller.rb +11 -0
- data/app/controllers/maily_herald/webui/subscriptions_controller.rb +33 -0
- data/app/helpers/maily_herald/webui/application_helper.rb +157 -0
- data/app/helpers/maily_herald/webui/dispatches_helper.rb +18 -0
- data/app/helpers/maily_herald/webui/logs_helper.rb +37 -0
- data/app/helpers/maily_herald/webui/mailings_helper.rb +64 -0
- data/app/helpers/maily_herald/webui/sequence_mailings_helper.rb +13 -0
- data/app/helpers/maily_herald/webui/sequences_helper.rb +6 -0
- data/app/helpers/maily_herald/webui/subscribers_helper.rb +25 -0
- data/app/helpers/maily_herald/webui/subscriptions_helper.rb +11 -0
- data/app/helpers/maily_herald_helper.rb +151 -0
- data/app/views/layouts/maily_herald/webui/application.html.haml +58 -0
- data/app/views/layouts/maily_herald/webui/modal.html.haml +6 -0
- data/app/views/maily_herald/webui/dashboard/_log.html.haml +20 -0
- data/app/views/maily_herald/webui/dashboard/_log_list.html.haml +19 -0
- data/app/views/maily_herald/webui/dashboard/_logs.html.haml +15 -0
- data/app/views/maily_herald/webui/dashboard/index.html.haml +43 -0
- data/app/views/maily_herald/webui/dashboard/index.js.erb +15 -0
- data/app/views/maily_herald/webui/dispatches/_entities.html.haml +7 -0
- data/app/views/maily_herald/webui/dispatches/_logs.html.haml +4 -0
- data/app/views/maily_herald/webui/dispatches/_schedules.html.haml +4 -0
- data/app/views/maily_herald/webui/dispatches/_toggle.js.erb +1 -0
- data/app/views/maily_herald/webui/lists/_details.html.haml +14 -0
- data/app/views/maily_herald/webui/lists/_details_form.html.haml +14 -0
- data/app/views/maily_herald/webui/lists/_form.html.haml +1 -0
- data/app/views/maily_herald/webui/lists/_header.html.haml +13 -0
- data/app/views/maily_herald/webui/lists/_items.html.haml +24 -0
- data/app/views/maily_herald/webui/lists/_opt_outs.html.haml +7 -0
- data/app/views/maily_herald/webui/lists/_potential_subscribers.html.haml +7 -0
- data/app/views/maily_herald/webui/lists/_subscribers.html.haml +7 -0
- data/app/views/maily_herald/webui/lists/context_variables.html.haml +15 -0
- data/app/views/maily_herald/webui/lists/subscribe.js.erb +10 -0
- data/app/views/maily_herald/webui/lists/unsubscribe.js.erb +7 -0
- data/app/views/maily_herald/webui/logs/_items.html.haml +34 -0
- data/app/views/maily_herald/webui/logs/preview.html.haml +22 -0
- data/app/views/maily_herald/webui/mailings-old/_entity.html.haml +17 -0
- data/app/views/maily_herald/webui/mailings-old/_entity_list.html.haml +26 -0
- data/app/views/maily_herald/webui/mailings-old/_form.html.haml +32 -0
- data/app/views/maily_herald/webui/mailings-old/_print.html.haml +123 -0
- data/app/views/maily_herald/webui/mailings-old/create.js.erb +1 -0
- data/app/views/maily_herald/webui/mailings-old/destroy.js.erb +1 -0
- data/app/views/maily_herald/webui/mailings-old/edit.html.haml +16 -0
- data/app/views/maily_herald/webui/mailings-old/edit.js.erb +2 -0
- data/app/views/maily_herald/webui/mailings-old/index.html.haml +9 -0
- data/app/views/maily_herald/webui/mailings-old/index.js.erb +1 -0
- data/app/views/maily_herald/webui/mailings-old/new.html.haml +16 -0
- data/app/views/maily_herald/webui/mailings-old/new.js.erb +1 -0
- data/app/views/maily_herald/webui/mailings-old/preview.js.erb +2 -0
- data/app/views/maily_herald/webui/mailings-old/refresh_list.js.erb +1 -0
- data/app/views/maily_herald/webui/mailings-old/show.html.haml +135 -0
- data/app/views/maily_herald/webui/mailings-old/show.js.erb +1 -0
- data/app/views/maily_herald/webui/mailings-old/update.js.erb +1 -0
- data/app/views/maily_herald/webui/mailings/_deliver.js.erb +1 -0
- data/app/views/maily_herald/webui/mailings/_details.html.haml +65 -0
- data/app/views/maily_herald/webui/mailings/_details_form.html.haml +39 -0
- data/app/views/maily_herald/webui/mailings/_form.html.haml +1 -0
- data/app/views/maily_herald/webui/mailings/_form_periodical.html.haml +2 -0
- data/app/views/maily_herald/webui/mailings/_form_sequence.html.haml +1 -0
- data/app/views/maily_herald/webui/mailings/_form_template_generic.html.haml +7 -0
- data/app/views/maily_herald/webui/mailings/_form_template_mailer.html.haml +4 -0
- data/app/views/maily_herald/webui/mailings/_header.html.haml +24 -0
- data/app/views/maily_herald/webui/mailings/_list.html.haml +27 -0
- data/app/views/maily_herald/webui/mailings/_template.html.haml +16 -0
- data/app/views/maily_herald/webui/mailings/_template_form.html.haml +7 -0
- data/app/views/maily_herald/webui/mailings/nav_secondary/_index.html.haml +3 -0
- data/app/views/maily_herald/webui/mailings/preview.html.haml +13 -0
- data/app/views/maily_herald/webui/mailings/update_form.js.erb +33 -0
- data/app/views/maily_herald/webui/resources/edit.js.erb +2 -0
- data/app/views/maily_herald/webui/resources/index.html.haml +11 -0
- data/app/views/maily_herald/webui/resources/index.js.erb +1 -0
- data/app/views/maily_herald/webui/resources/new.html.haml +5 -0
- data/app/views/maily_herald/webui/resources/show.html.haml +4 -0
- data/app/views/maily_herald/webui/resources/show.js.erb +3 -0
- data/app/views/maily_herald/webui/resources/update.js.erb +18 -0
- data/app/views/maily_herald/webui/sequences-old/_entity.html.haml +11 -0
- data/app/views/maily_herald/webui/sequences-old/_entity_list.html.haml +23 -0
- data/app/views/maily_herald/webui/sequences-old/_form.html.haml +17 -0
- data/app/views/maily_herald/webui/sequences-old/_log.html.haml +7 -0
- data/app/views/maily_herald/webui/sequences-old/_logs.html.haml +16 -0
- data/app/views/maily_herald/webui/sequences-old/_mailing.html.haml +4 -0
- data/app/views/maily_herald/webui/sequences-old/_mailing_list.html.haml +19 -0
- data/app/views/maily_herald/webui/sequences-old/edit.html.haml +14 -0
- data/app/views/maily_herald/webui/sequences-old/new.html.haml +13 -0
- data/app/views/maily_herald/webui/sequences-old/show.html.haml +122 -0
- data/app/views/maily_herald/webui/sequences-old/show.js.erb +2 -0
- data/app/views/maily_herald/webui/sequences-old/subscription.html.haml +79 -0
- data/app/views/maily_herald/webui/sequences/_details.html.haml +39 -0
- data/app/views/maily_herald/webui/sequences/_details_form.html.haml +27 -0
- data/app/views/maily_herald/webui/sequences/_form.html.haml +1 -0
- data/app/views/maily_herald/webui/sequences/_header.html.haml +11 -0
- data/app/views/maily_herald/webui/sequences/_list.html.haml +21 -0
- data/app/views/maily_herald/webui/sequences/_mailing_list.html.haml +21 -0
- data/app/views/maily_herald/webui/sequences/_mailings.html.haml +7 -0
- data/app/views/maily_herald/webui/sequences/update_form.js.erb +14 -0
- data/app/views/maily_herald/webui/shared/_context_attributes.html.haml +11 -0
- data/app/views/maily_herald/webui/subscribers/_item.html.haml +8 -0
- data/app/views/maily_herald/webui/subscribers/_list.html.haml +18 -0
- data/app/views/maily_herald/webui/subscription_groups/_form.html.haml +5 -0
- data/app/views/maily_herald/webui/subscription_groups/_subscription.html.haml +8 -0
- data/app/views/maily_herald/webui/subscription_groups/_subscription_list.html.haml +19 -0
- data/app/views/maily_herald/webui/subscription_groups/edit.html.haml +16 -0
- data/app/views/maily_herald/webui/subscription_groups/index.html.haml +35 -0
- data/app/views/maily_herald/webui/subscription_groups/new.html.haml +11 -0
- data/app/views/maily_herald/webui/subscription_groups/show.html.haml +42 -0
- data/app/views/maily_herald/webui/subscription_groups/show.js.erb +1 -0
- data/app/views/maily_herald/webui/subscriptions/show.html.haml +21 -0
- data/app/views/maily_herald/webui/subscriptions/toggle.js.erb +1 -0
- data/app/views/maily_herald/webui/webui/index.html.haml +136 -0
- data/app/views/maily_herald/webui/webui/show.html.haml +0 -0
- data/config/database.yml +5 -0
- data/config/initializers/smart_listing.rb +77 -0
- data/config/locales/en.yml +237 -0
- data/config/routes.rb +103 -0
- data/config/spring.rb +1 -0
- data/lib/maily_herald/webui.rb +15 -0
- data/lib/maily_herald/webui/breadcrumbs.rb +50 -0
- data/lib/maily_herald/webui/engine.rb +18 -0
- data/lib/maily_herald/webui/form_builder.rb +285 -0
- data/lib/maily_herald/webui/menu_manager.rb +66 -0
- data/lib/maily_herald/webui/version.rb +5 -0
- data/maily_herald-webui.gemspec +40 -0
- data/script/rails +8 -0
- data/spec/dummy/Guardfile +35 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -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/mailers/.gitkeep +0 -0
- data/spec/dummy/app/mailers/test_mailer.rb +11 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/models/user.rb +7 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/test_mailer/sample_mail.text.erb +1 -0
- data/spec/dummy/bin/rails +10 -0
- data/spec/dummy/bin/rake +7 -0
- data/spec/dummy/bin/rspec +7 -0
- data/spec/dummy/bin/spring +18 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +65 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +38 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/maily_herald.rb +101 -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/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/locales/maily_herald.en.yml +28 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/db/migrate/20130723074347_create_users.rb +11 -0
- data/spec/dummy/db/migrate/20140804152249_create_maily_herald_tables.maily_herald.rb +68 -0
- data/spec/dummy/db/migrate/20140804152250_create_lists.maily_herald.rb +33 -0
- data/spec/dummy/db/schema.rb +79 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/lib/tasks/dummy.rb +8 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/spec_helper.rb +46 -0
- data/vendor/assets/fonts/maily_herald/webui/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/maily_herald/webui/Nexa_Free_Bold-webfont.eot +0 -0
- data/vendor/assets/fonts/maily_herald/webui/Nexa_Free_Bold-webfont.svg +1816 -0
- data/vendor/assets/fonts/maily_herald/webui/Nexa_Free_Bold-webfont.ttf +0 -0
- data/vendor/assets/fonts/maily_herald/webui/Nexa_Free_Bold-webfont.woff +0 -0
- data/vendor/assets/fonts/maily_herald/webui/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/maily_herald/webui/fontawesome-webfont.svg +520 -0
- data/vendor/assets/fonts/maily_herald/webui/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/maily_herald/webui/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-bold-webfont.eot +0 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-bold-webfont.svg +1825 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-bold-webfont.ttf +0 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-bold-webfont.woff +0 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-italic-webfont.eot +0 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-italic-webfont.svg +1825 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-italic-webfont.ttf +0 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-italic-webfont.woff +0 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-regular-webfont.eot +0 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-regular-webfont.svg +1825 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-regular-webfont.ttf +0 -0
- data/vendor/assets/fonts/maily_herald/webui/opensans-regular-webfont.woff +0 -0
- data/vendor/assets/javascripts/maily_herald/webui/bootstrap-datepicker.js +1681 -0
- data/vendor/assets/javascripts/maily_herald/webui/bootstrap.min.js +6 -0
- data/vendor/assets/javascripts/maily_herald/webui/d3.v3.js +5 -0
- data/vendor/assets/javascripts/maily_herald/webui/rickshaw.js +4067 -0
- data/vendor/assets/stylesheets/maily_herald/webui/bootstrap-datepicker.css +786 -0
- data/vendor/assets/stylesheets/maily_herald/webui/bootstrap.min.css +5 -0
- data/vendor/assets/stylesheets/maily_herald/webui/font-awesome.min.css +4 -0
- data/vendor/assets/stylesheets/maily_herald/webui/rickshaw.css +355 -0
- metadata +564 -0
@@ -0,0 +1 @@
|
|
1
|
+
<%= smart_listing_update(:entities) %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= smart_listing_item :mailings, :update, @mailing, @mailing.valid? ? "/maily_herald/webui/mailings/mailing" : "/maily_herald/webui/mailings/form" %>
|
@@ -0,0 +1 @@
|
|
1
|
+
$("#entities").smart_listing().fadeLoaded();
|
@@ -0,0 +1,65 @@
|
|
1
|
+
= render partial: "header"
|
2
|
+
|
3
|
+
- if @item.disabled?
|
4
|
+
.alert.alert-warning= tw("mailings.infos.disabled")
|
5
|
+
- elsif @item.archived?
|
6
|
+
.alert.alert-info= tw("mailings.infos.archived")
|
7
|
+
|
8
|
+
.dl-horizontal
|
9
|
+
- content_for_expert do
|
10
|
+
%dt= tw("attributes.name")
|
11
|
+
%dd= @item.name
|
12
|
+
%dt= tw("attributes.title")
|
13
|
+
%dd= @item.title
|
14
|
+
|
15
|
+
%dt
|
16
|
+
= tw("attributes.mailer")
|
17
|
+
= display_help_icon :mailer_name, scope: "mailings"
|
18
|
+
%dd= display_mailing_mailer @item.mailer_name
|
19
|
+
|
20
|
+
%dt
|
21
|
+
= @item.class.human_attribute_name(:from)
|
22
|
+
= display_help_icon "from", scope: "mailings"
|
23
|
+
%dd= display_mailing_from @item
|
24
|
+
|
25
|
+
%dt= tw(:label_list)
|
26
|
+
%dd= link_to friendly_name(@item.list), list_path(@item.list)
|
27
|
+
|
28
|
+
|
29
|
+
%p
|
30
|
+
|
31
|
+
= render_context_attributes_info @item.list
|
32
|
+
|
33
|
+
- if @item.periodical?
|
34
|
+
%p
|
35
|
+
|
36
|
+
.dl-horizontal
|
37
|
+
%dt= @item.class.human_attribute_name(:start_at)
|
38
|
+
%dd= @item.start_at
|
39
|
+
|
40
|
+
%dt= @item.class.human_attribute_name(:period)
|
41
|
+
%dd= display_mailing_period @item
|
42
|
+
- elsif @item.sequence?
|
43
|
+
%p
|
44
|
+
|
45
|
+
.dl-horizontal
|
46
|
+
%dt= @item.class.human_attribute_name(:absolute_delay)
|
47
|
+
%dd= display_mailing_absolute_delay @item
|
48
|
+
|
49
|
+
|
50
|
+
%p
|
51
|
+
|
52
|
+
.dl-horizontal
|
53
|
+
%dt= tw("attributes.conditions")
|
54
|
+
%dd
|
55
|
+
- if @item.conditions.present?
|
56
|
+
%code= @item.conditions
|
57
|
+
- else
|
58
|
+
= tw(:label_no_conditions)
|
59
|
+
%dt
|
60
|
+
= tw("attributes.override_subscription")
|
61
|
+
= display_help_icon("override_subscription", scope: "mailings")
|
62
|
+
%dd
|
63
|
+
= boolean_icon(@item.override_subscription, text: :yes)
|
64
|
+
|
65
|
+
%p
|
@@ -0,0 +1,39 @@
|
|
1
|
+
- unless @item.new_record?
|
2
|
+
= render partial: "header"
|
3
|
+
|
4
|
+
= form_for(@item, :url => {:action => "update"}, :as => :item, :layout => :horizontal, :remote => !@item.new_record?, :control_col => "col-sm-5", help_scope: "mailings", html: {class: "dispatch-form"}, data: {update_form_path: url_for(action: "update_form") }) do |f|
|
5
|
+
- if f.object.new_record?
|
6
|
+
%h2= tw("dispatches.general")
|
7
|
+
|
8
|
+
- content_for_expert do
|
9
|
+
= f.text_field :name
|
10
|
+
= f.text_field :title
|
11
|
+
= f.maily_mailer_select help: true
|
12
|
+
= f.maily_from_field help: true
|
13
|
+
- if @item.new_record? && !@item.sequence?
|
14
|
+
= f.maily_list_select
|
15
|
+
|
16
|
+
.form-group
|
17
|
+
%label.control-label.col-sm-2= tw("attributes.context")
|
18
|
+
.col-sm-5
|
19
|
+
%p.help-block.context-name
|
20
|
+
= link_to_context_attributes_overview(@item.list, text: true) || tw("dispatches.no_context")
|
21
|
+
|
22
|
+
- if @item.periodical?
|
23
|
+
= render partial: "form_periodical", locals: {f: f}
|
24
|
+
- elsif @item.sequence?
|
25
|
+
= render partial: "form_sequence", locals: {f: f}
|
26
|
+
|
27
|
+
= f.text_area :conditions
|
28
|
+
= f.check_box :override_subscription
|
29
|
+
|
30
|
+
- if f.object.new_record?
|
31
|
+
.template-generic
|
32
|
+
= render partial: "form_template_generic", locals: {f: f}
|
33
|
+
.template-mailer
|
34
|
+
= render partial: "form_template_mailer", locals: {f: f}
|
35
|
+
|
36
|
+
- if @item.new_record?
|
37
|
+
= f.buttons :create
|
38
|
+
- else
|
39
|
+
= f.buttons :save, :cancel
|
@@ -0,0 +1 @@
|
|
1
|
+
= render partial: "details_form"
|
@@ -0,0 +1 @@
|
|
1
|
+
= f.maily_absolute_delay_field
|
@@ -0,0 +1,24 @@
|
|
1
|
+
%h1
|
2
|
+
- if @item.sequence?
|
3
|
+
= link_to @item.sequence do
|
4
|
+
%span.resource-name= friendly_name @item.sequence
|
5
|
+
»
|
6
|
+
%span.resource-name= friendly_name @item
|
7
|
+
- unless @item.locked?
|
8
|
+
= link_to({action: "toggle", id: @item}, :remote => true, :class => "link link-sm dispatch-state", :confirm => @item.enabled? ? t(".disable_confirm") : t(".enable_confirm"), :method => :post) do
|
9
|
+
= display_dispatch_state @item
|
10
|
+
= link_to({action: "edit", id: @item}, :remote => true, :class => "link link-sm") do
|
11
|
+
= icon(:pencil)
|
12
|
+
= tw("commons.edit")
|
13
|
+
- else
|
14
|
+
%a.link.link-sm.text-warning{:data => {:toggle => "tooltip", :placement => "top"}, :title => tw("dispatches.locked_info")}
|
15
|
+
= icon(:lock)
|
16
|
+
= tw("commons.locked")
|
17
|
+
- if @item.enabled? && @item.one_time?
|
18
|
+
= link_to({action: "deliver", id: @item}, :method => :post, :remote => true, :data => {:confirm => tw("one_time_mailings.header.confirm_run")}, :class => "link link-sm") do
|
19
|
+
= icon(:send)
|
20
|
+
= tw("commons.run")
|
21
|
+
- unless @item.locked? || @item.archived?
|
22
|
+
= link_to({action: "destroy", id: @item}, :method => :delete, :remote => true, :data => {:confirm => t(".confirm_archive")}, :class => "link link-sm") do
|
23
|
+
= icon(:archive)
|
24
|
+
= tw("commons.archive")
|
@@ -0,0 +1,27 @@
|
|
1
|
+
- unless smart_listing.empty?
|
2
|
+
%table.table.table-striped
|
3
|
+
%thead
|
4
|
+
%tr
|
5
|
+
%th.col-md-3= tw("attributes.title")
|
6
|
+
- if @sequence
|
7
|
+
%th= MailyHerald::SequenceMailing.human_attribute_name(:absolute_delay)
|
8
|
+
%th= tw("attributes.state")
|
9
|
+
%th= tw(:label_list)
|
10
|
+
%th= tw("attributes.mailer")
|
11
|
+
%th
|
12
|
+
%tbody
|
13
|
+
- smart_listing.collection.each do |mailing|
|
14
|
+
%tr
|
15
|
+
%td= link_to_mailing mailing
|
16
|
+
- if @sequence
|
17
|
+
%td= distance_of_time_in_words(mailing.absolute_delay)
|
18
|
+
%td= display_dispatch_state mailing
|
19
|
+
%td= link_to friendly_name(mailing.list), list_path(mailing.list)
|
20
|
+
%td= display_mailing_mailer mailing.mailer_name
|
21
|
+
%td.actions
|
22
|
+
.action-group= smart_listing_item_actions [{name: :show, url: url_for_mailing(mailing)}]
|
23
|
+
|
24
|
+
= smart_listing.paginate
|
25
|
+
= smart_listing.pagination_per_page_links
|
26
|
+
- else
|
27
|
+
= t(".no_mailings")
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- if @item.generic_mailer?
|
2
|
+
%h2.border
|
3
|
+
= tw("mailings.template")
|
4
|
+
= link_to({action: "edit", id: @item, :edited_container => "template"}, :remote => true, :class => "link link-sm") do
|
5
|
+
= icon(:pencil)
|
6
|
+
= tw("commons.edit")
|
7
|
+
.dl-horizontal
|
8
|
+
%dt= tw("attributes.subject")
|
9
|
+
%dd= @item.subject
|
10
|
+
%br
|
11
|
+
%pre= @item.template
|
12
|
+
%br
|
13
|
+
- else
|
14
|
+
%h2.border
|
15
|
+
= tw("mailings.template")
|
16
|
+
%p= tw("mailings.infos.non_generic_mailer", mailer: display_mailing_mailer(@item.mailer_name).html_safe, generic_mailer: display_mailing_mailer(:generic)).html_safe
|
@@ -0,0 +1,7 @@
|
|
1
|
+
= form_for @item, :as => :item, :layout => :horizontal, :remote => !@item.new_record?, :control_col => "col-sm-5", html: {class: "edit-mailing-template-form"} do |f|
|
2
|
+
= hidden_field_tag :edited_container, "template"
|
3
|
+
- if @item.generic_mailer?
|
4
|
+
= render partial: "form_template_generic", locals: {f: f}
|
5
|
+
- else
|
6
|
+
= render partial: "form_template_mailer", locals: {f: f}
|
7
|
+
= f.buttons :save, :cancel
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<% if @item.generic_mailer? %>
|
2
|
+
$(".template-generic").show();
|
3
|
+
$(".template-mailer").hide();
|
4
|
+
var link = "<%= escape_javascript(link_to_context_attributes_overview(@item.list)) %>";
|
5
|
+
if(link) {
|
6
|
+
if($(".template-generic h2 a").length == 1) {
|
7
|
+
$(".template-generic h2 a").replaceWith(link);
|
8
|
+
} else {
|
9
|
+
$(".template-generic h2").append(link);
|
10
|
+
}
|
11
|
+
} else {
|
12
|
+
$(".template-generic h2 a").remove();
|
13
|
+
}
|
14
|
+
<% else %>
|
15
|
+
$(".template-generic").hide();
|
16
|
+
$(".template-mailer").show();
|
17
|
+
$(".template-mailer p code:first-child").replaceWith("<%= escape_javascript(display_mailing_mailer(@item.mailer_name)) %>");
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<% if @item.list.try(:context_name) %>
|
21
|
+
$(".context-name").html("<%= escape_javascript(link_to_context_attributes_overview(@item.list, text: true)) %>");
|
22
|
+
var btn = "<%= escape_javascript(link_to_context_attributes_overview(@item.list, class: "btn btn-default")) %>"
|
23
|
+
if($(".mailing-start-at .input-group-btn .btn").length == 2) {
|
24
|
+
$(".mailing-start-at .input-group-btn .btn:last-child").replaceWith(btn);
|
25
|
+
} else {
|
26
|
+
$(".mailing-start-at .input-group-btn").append(btn);
|
27
|
+
}
|
28
|
+
<% else %>
|
29
|
+
$(".context-name").html("<%= escape_javascript(tw("mailings.no_context")) %>");
|
30
|
+
if($(".mailing-start-at .input-group-btn .btn").length == 2) {
|
31
|
+
$(".mailing-start-at .input-group-btn .btn:last-child").remove();
|
32
|
+
}
|
33
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
= smart_listing_controls_for :items, :class => "context-menu" do
|
2
|
+
%ul.nav.nav-secondary
|
3
|
+
%li
|
4
|
+
= link_to(controller: controller_name, action: :new) do
|
5
|
+
= icon :plus
|
6
|
+
= tw("#{controller_name}.new.label")
|
7
|
+
= render :partial => "maily_herald/webui/#{controller_name}/nav_secondary/#{action_name}" rescue nil
|
8
|
+
%form{:action => ""}= filter_box
|
9
|
+
|
10
|
+
|
11
|
+
= smart_listing_render :items
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= smart_listing_update(:items) %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if @item.valid? %>
|
2
|
+
<% @rendered_containers.each do |name, opts| %>
|
3
|
+
<% opts = resource_spec.update_containers[name] %>
|
4
|
+
<% editable = opts.is_a?(Hash) ? opts[:editable] : false %>
|
5
|
+
|
6
|
+
<% if editable %>
|
7
|
+
$(".container-<%= name %>").editable("<%= escape_javascript(render(:partial => name)) %>");
|
8
|
+
<% else %>
|
9
|
+
$(".container-<%= name %>").html("<%= escape_javascript(render(:partial => name)) %>");
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
$(".resource-name").html("<%= friendly_name(@item) %>");
|
14
|
+
<% else %>
|
15
|
+
$(".container-<%= @edited_container %>").editable("<%= escape_javascript(render(:partial => "#{@edited_container}_form")) %>");
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<%= render(partial: action_name) rescue nil %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
%td= object.id
|
2
|
+
%td= object.to_s
|
3
|
+
%td= @sequence.destination_for object
|
4
|
+
%td= @sequence.subscription_for(object).logs.length
|
5
|
+
%td
|
6
|
+
- if @sequence.subscription_for(object).active?
|
7
|
+
%span.glyphicon.glyphicon-ok
|
8
|
+
- else
|
9
|
+
%span.glyphicon.glyphicon-remove
|
10
|
+
%td.actions
|
11
|
+
= smart_listing_item_actions sequence_entity_list_actions(object)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
- unless smart_listing.collection.empty?
|
2
|
+
%table.table.table-listing
|
3
|
+
%thead
|
4
|
+
%tr
|
5
|
+
%th Id
|
6
|
+
%th Name
|
7
|
+
%th Destination
|
8
|
+
%th.span2.span1
|
9
|
+
%span.glyphicon.glyphicon-download-alt{:title => "Deliveries count"}
|
10
|
+
%th.span2.span1
|
11
|
+
%span.glyphicon.glyphicon-book{:title => "Subscription active?"}
|
12
|
+
%th.span1
|
13
|
+
|
14
|
+
%tbody
|
15
|
+
- smart_listing.collection.each do |entity|
|
16
|
+
%tr.editable{:data => {"id" => entity.id}}
|
17
|
+
= render :partial => "maily_herald/webui/sequences/entity", :locals => {:object => entity}
|
18
|
+
|
19
|
+
.row
|
20
|
+
.col-xs-6= smart_listing.paginate
|
21
|
+
.col-xs-6= smart_listing.pagination_per_page_links
|
22
|
+
- else
|
23
|
+
%p.alert No entities in the scope
|
@@ -0,0 +1,17 @@
|
|
1
|
+
= labelled_form_for @sequence, :url => @sequence.new_record? ? webui_sequences_path : webui_sequence_path(@sequence) do |f|
|
2
|
+
= f.text_field :title
|
3
|
+
%hr
|
4
|
+
= f.check_box :autosubscribe, :help => "Check this if you want new entities within the scope to be automatically subscribed"
|
5
|
+
= f.check_box :override_subscription, :help => "Check this if you want to send this mailing regardless of entity subscription"
|
6
|
+
= f.select :subscription_group, maily_herald_subscription_group_options_for_select
|
7
|
+
= f.select :token_action, maily_herald_token_action_options_for_select
|
8
|
+
%hr
|
9
|
+
= f.select :context_name, maily_herald_context_options_for_select
|
10
|
+
%hr
|
11
|
+
%p
|
12
|
+
%em Please supply here sequence start date. You can specify this either as an absolute date or evaluated context variable. If both specified, absolute start date will be taken under consideration.
|
13
|
+
= f.datetime :start_text, :comment => Time.zone
|
14
|
+
= f.text_field :start_var, :comment => context_attributes_link(:notext => true, :context => @sequence.context ? @sequence.context.name : ""), :help => "Type here valid context variable that will be evaluated into start date (i.e. 'user.activated_at')"
|
15
|
+
%hr
|
16
|
+
-#= f.text_field :delay
|
17
|
+
= f.buttons :submit
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- unless @logs.empty?
|
2
|
+
%table.table.table-striped
|
3
|
+
%thead
|
4
|
+
%tr
|
5
|
+
%th Id
|
6
|
+
%th Delivery date
|
7
|
+
%th Mailing
|
8
|
+
%th Opened
|
9
|
+
%th Opened at
|
10
|
+
|
11
|
+
%tbody
|
12
|
+
- @logs.each do |log|
|
13
|
+
%tr
|
14
|
+
= render :partial => "maily_herald/webui/sequences/log", :locals => {:object => log}
|
15
|
+
- else
|
16
|
+
%p.alert No delivery logs
|
@@ -0,0 +1,19 @@
|
|
1
|
+
- unless smart_listing.collection.empty?
|
2
|
+
%table.table.table-listing
|
3
|
+
%thead
|
4
|
+
%tr
|
5
|
+
%th Title
|
6
|
+
%th.span2 Absolute Delay
|
7
|
+
%th.span1
|
8
|
+
|
9
|
+
%tbody
|
10
|
+
- smart_listing.collection.each do |mailing|
|
11
|
+
%tr.editable{:data => {"id" => mailing.id}}
|
12
|
+
= render :partial => "maily_herald/webui/sequences/mailing", :locals => {:object => mailing}
|
13
|
+
|
14
|
+
.row
|
15
|
+
.col-xs-6= smart_listing.paginate
|
16
|
+
.col-xs-6= smart_listing.pagination_per_page_links
|
17
|
+
|
18
|
+
- else
|
19
|
+
%p.alert No mailings
|