mail_manager 3.0.0 → 3.2.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.
- checksums.yaml +5 -13
- data/.gitignore +5 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -1
- data/Gemfile +27 -10
- data/LICENSE.txt +2 -2
- data/MIT-LICENSE +1 -1
- data/README.md +97 -15
- data/{features/bounce_management.feature → app/assets/images/mail_manager/.gitkeep} +0 -0
- data/app/assets/images/mail_manager/BottomRight.gif +0 -0
- data/app/assets/images/mail_manager/MidRight.gif +0 -0
- data/app/assets/images/mail_manager/TopCenter.gif +0 -0
- data/app/assets/images/mail_manager/TopRight.gif +0 -0
- data/app/assets/images/mail_manager/calendar_date_select/calendar.gif +0 -0
- data/app/assets/images/mail_manager/iReach_logo.gif +0 -0
- data/app/assets/images/mail_manager/spacer.gif +0 -0
- data/app/assets/images/mail_manager/topMid.gif +0 -0
- data/app/assets/javascripts/mail_manager/application.js +19 -1
- data/app/assets/javascripts/mail_manager/jquery-ui-timepicker-addon.js +2134 -0
- data/app/assets/stylesheets/mail_manager/admin.css +261 -0
- data/app/assets/stylesheets/mail_manager/application.css +3 -1
- data/app/assets/stylesheets/mail_manager/nav.css +68 -0
- data/app/assets/stylesheets/mail_manager/timepicker.css +11 -0
- data/app/controllers/mail_manager/application_controller.rb +7 -2
- data/app/controllers/mail_manager/bounces_controller.rb +5 -10
- data/app/controllers/mail_manager/contacts_controller.rb +42 -20
- data/app/controllers/mail_manager/mailing_lists_controller.rb +5 -12
- data/app/controllers/mail_manager/mailings_controller.rb +18 -18
- data/app/controllers/mail_manager/messages_controller.rb +3 -10
- data/app/controllers/mail_manager/subscriptions_controller.rb +16 -75
- data/app/helpers/mail_manager/layout_helper.rb +43 -0
- data/app/models/mail_manager/bounce.rb +16 -5
- data/app/models/mail_manager/contact.rb +64 -1
- data/app/models/mail_manager/mailable.rb +14 -0
- data/app/models/mail_manager/mailer.rb +48 -81
- data/app/models/mail_manager/mailing.rb +23 -42
- data/app/models/mail_manager/message.rb +52 -8
- data/app/models/mail_manager/subscription.rb +9 -3
- data/app/models/status_history.rb +3 -2
- data/app/views/layouts/mail_manager/application.html.erb +33 -5
- data/app/views/layouts/mail_manager/layout.html.erb +15 -0
- data/app/views/mail_manager/bounces/index.html.erb +6 -4
- data/app/views/mail_manager/bounces/show.html.erb +3 -3
- data/app/views/mail_manager/contacts/_form.html.erb +7 -23
- data/app/views/mail_manager/contacts/edit.html.erb +3 -3
- data/app/views/mail_manager/contacts/index.html.erb +14 -28
- data/app/views/mail_manager/contacts/new.html.erb +2 -2
- data/app/views/mail_manager/contacts/show.html.erb +5 -5
- data/app/views/mail_manager/contacts/subscribe.html.erb +1 -1
- data/app/views/mail_manager/mailer/double_opt_in.erb +1 -1
- data/app/views/mail_manager/mailer/double_opt_in.html.erb +6 -0
- data/app/views/mail_manager/mailer/unsubscribed.erb +1 -1
- data/app/views/mail_manager/mailer/unsubscribed.html.erb +1 -1
- data/app/views/mail_manager/mailing_lists/_form.html.erb +8 -17
- data/app/views/mail_manager/mailing_lists/edit.html.erb +4 -4
- data/app/views/mail_manager/mailing_lists/index.html.erb +6 -5
- data/app/views/mail_manager/mailing_lists/new.html.erb +3 -3
- data/app/views/mail_manager/mailings/_form.html.erb +22 -44
- data/app/views/mail_manager/mailings/edit.html.erb +3 -3
- data/app/views/mail_manager/mailings/index.html.erb +23 -27
- data/app/views/mail_manager/mailings/new.html.erb +2 -2
- data/app/views/mail_manager/mailings/test.html.erb +3 -3
- data/app/views/mail_manager/messages/index.html.erb +2 -2
- data/app/views/mail_manager/subscriptions/_form.html.erb +1 -1
- data/app/views/mail_manager/subscriptions/_subscriptions.html.erb +2 -2
- data/app/views/mail_manager/subscriptions/edit.html.erb +2 -2
- data/app/views/mail_manager/subscriptions/index.html.erb +3 -3
- data/app/views/mail_manager/subscriptions/new.html.erb +1 -1
- data/app/views/mail_manager/subscriptions/unsubscribe.html.erb +1 -1
- data/app/views/mail_manager/subscriptions/unsubscribe_by_email_address.html.erb +3 -3
- data/config/locales/en.yml +13 -0
- data/config/locales/mailings.en.yml +52 -0
- data/config/routes.rb +21 -19
- data/db/migrate/008_add_bounces_count_to_mailings.rb +14 -0
- data/db/migrate/009_add_messages_count_to_mailings.rb +14 -0
- data/db/migrate/010_add_login_token_to_contact.rb +11 -0
- data/db/migrate/011_add_deleted_at_to_mailing.rb +11 -0
- data/lib/delayed/mailer.rb +9 -5
- data/lib/delayed/status.rb +6 -2
- data/lib/delayed_overrides/worker.rb +21 -0
- data/lib/deleteable.rb +13 -14
- data/lib/mail_manager/config.rb +3 -3
- data/lib/mail_manager/engine.rb +136 -7
- data/lib/mail_manager/lock.rb +1 -0
- data/lib/mail_manager/version.rb +1 -1
- data/lib/tasks/mail_manager.rake +92 -56
- data/mail_manager.gemspec +4 -0
- data/spec/rails_helper.rb +50 -0
- data/spec/spec_helper.rb +87 -48
- data/spec/test_app/.env.development +3 -0
- data/spec/test_app/.env.test +2 -0
- data/spec/test_app/.rspec +1 -0
- data/spec/test_app/Procfile +3 -0
- data/spec/test_app/app/controllers/application_controller.rb +4 -0
- data/spec/test_app/app/models/ability.rb +7 -0
- data/spec/test_app/app/models/user.rb +8 -2
- data/spec/test_app/app/models/user_with_role.rb +22 -0
- data/spec/test_app/config/database.postgres.yml +21 -0
- data/spec/test_app/config/database.sqlite.yml +2 -2
- data/spec/test_app/config/environment.rb +2 -2
- data/spec/test_app/config/environments/test.rb +13 -0
- data/spec/test_app/config/mail_manager.yml +66 -2
- data/spec/test_app/config/routes.rb +0 -1
- data/spec/test_app/db/migrate/20150420163235_add_bounces_count_to_mailings.rb +14 -0
- data/spec/test_app/db/migrate/20150420163804_add_messages_count_to_mailings.rb +14 -0
- data/spec/test_app/db/migrate/20150421151457_add_login_token_to_contact.rb +11 -0
- data/spec/test_app/db/migrate/20150423143754_add_deleted_at_to_mailing.rb +11 -0
- data/spec/test_app/db/schema.rb +10 -5
- data/spec/test_app/db/structure.sql +150 -15
- data/spec/test_app/features/bounce_management.feature +11 -0
- data/spec/test_app/features/contact_management.feature +91 -0
- data/{features → spec/test_app/features}/mailable.feature +3 -1
- data/spec/test_app/features/mailing_list_management.feature +39 -0
- data/spec/test_app/features/mailing_management.feature +60 -0
- data/{features → spec/test_app/features}/message.feature +4 -4
- data/spec/test_app/features/message_management.feature +22 -0
- data/spec/test_app/features/step_definitions/bounce_steps.rb +4 -0
- data/spec/test_app/features/step_definitions/contact_steps.rb +63 -0
- data/spec/test_app/features/step_definitions/debugging_steps.rb +3 -0
- data/spec/test_app/features/step_definitions/email_steps.rb +6 -0
- data/spec/test_app/features/step_definitions/job_steps.rb +25 -0
- data/spec/test_app/features/step_definitions/login_steps.rb +4 -0
- data/spec/test_app/features/step_definitions/mailing_list.rb +17 -0
- data/spec/test_app/features/step_definitions/mailing_steps.rb +51 -0
- data/spec/test_app/features/step_definitions/subscription_steps.rb +26 -0
- data/{features → spec/test_app/features}/step_definitions/webrat_steps.rb +10 -6
- data/spec/test_app/features/subscription_management.feature +62 -0
- data/spec/test_app/features/support/env.rb +37 -0
- data/spec/test_app/features/support/paths.rb +36 -0
- data/spec/test_app/lib/debugging.rb +61 -0
- data/spec/test_app/lib/post_office_manager.rb +71 -0
- data/spec/test_app/public/subscribe.html +40 -0
- data/spec/test_app/script/full_suite +50 -0
- data/spec/test_app/script/post_office +25 -0
- data/spec/test_app/script/rails +20 -0
- data/spec/test_app/script/rspec_multi_db +34 -0
- data/spec/test_app/spec/controllers/mail_manager/bounces_controller_spec.rb +59 -0
- data/spec/test_app/spec/controllers/mail_manager/contacts_controller_spec.rb +178 -0
- data/spec/test_app/spec/controllers/mail_manager/mailing_lists_controller_spec.rb +164 -0
- data/spec/test_app/spec/controllers/mail_manager/mailings_controller_spec.rb +184 -0
- data/spec/test_app/spec/controllers/users_controller_spec.rb +47 -46
- data/spec/test_app/spec/factories/_functions.rb +27 -0
- data/spec/test_app/spec/factories/contacts.rb +7 -0
- data/spec/test_app/spec/factories/mail_manager_bounces.rb +13 -0
- data/spec/test_app/spec/factories/mailable.rb +8 -0
- data/spec/test_app/spec/factories/mailings.rb +7 -1
- data/spec/test_app/spec/factories/message.rb +7 -0
- data/spec/test_app/spec/factories/users.rb +19 -7
- data/spec/test_app/spec/features/mail_manager/bounce_spec.rb +73 -0
- data/spec/test_app/spec/features/mail_manager/double_opt_in_spec.rb +62 -0
- data/spec/test_app/spec/features/mail_manager/mailing_spec.rb +46 -0
- data/spec/test_app/spec/features/navigation_spec.rb +9 -0
- data/spec/test_app/spec/helpers/mail_manager/layout_helper_spec.rb +41 -0
- data/spec/test_app/spec/helpers/mail_manager/subscriptions_helper_spec.rb +14 -0
- data/spec/test_app/spec/models/delayed/mailer_spec.rb +27 -0
- data/spec/test_app/spec/models/delayed/status_job_spec.rb +13 -0
- data/spec/test_app/spec/models/delayed/status_spec.rb +37 -0
- data/spec/test_app/spec/models/mail_manager/bounce_spec.rb +23 -3
- data/spec/test_app/spec/models/mail_manager/engine_spec.rb +79 -0
- data/spec/test_app/spec/models/mail_manager/mailable_spec.rb +10 -0
- data/spec/test_app/spec/models/mail_manager/mailer_spec.rb +35 -3
- data/spec/test_app/spec/models/mail_manager/mailing_list_spec.rb +5 -5
- data/spec/test_app/spec/models/mail_manager/mailing_spec.rb +58 -0
- data/spec/test_app/spec/models/mail_manager/message_spec.rb +112 -0
- data/spec/test_app/spec/models/user_spec.rb +10 -8
- data/spec/test_app/spec/rails_helper.rb +86 -0
- data/spec/test_app/spec/requests/users_spec.rb +3 -3
- data/spec/test_app/spec/routing/mail_manager/bounces_routing_spec.rb +27 -0
- data/spec/test_app/spec/routing/mail_manager/contacts_routing_spec.rb +36 -0
- data/spec/test_app/spec/routing/mail_manager/mailing_lists_routing_spec.rb +36 -0
- data/spec/test_app/spec/routing/mail_manager/mailings_routing_spec.rb +36 -0
- data/spec/test_app/spec/spec_helper.rb +82 -32
- data/spec/test_app/spec/support/continuance.rb +18 -0
- data/spec/test_app/spec/support/custom_matchers.rb +17 -0
- data/spec/test_app/spec/support/database_cleaner.rb +10 -1
- data/spec/test_app/spec/views/mail_manager/bounces/index.html.erb_spec.rb +32 -0
- data/spec/test_app/spec/views/mail_manager/bounces/show.html.erb_spec.rb +12 -0
- data/spec/test_app/spec/views/users/edit.html.erb_spec.rb +8 -5
- data/spec/test_app/spec/views/users/index.html.erb_spec.rb +10 -19
- data/spec/test_app/spec/views/users/new.html.erb_spec.rb +9 -6
- data/spec/test_app/spec/views/users/show.html.erb_spec.rb +8 -9
- metadata +231 -75
- data/.DS_Store +0 -0
- data/README.rdoc +0 -3
- data/app/.DS_Store +0 -0
- data/app/controllers/mail_manager/base_controller.rb +0 -22
- data/app/models/.DS_Store +0 -0
- data/features/contact_management.feature +0 -24
- data/features/mailing_management.feature +0 -78
- data/features/step_definitions/email_steps.rb +0 -50
- data/features/step_definitions/mlm_steps.rb +0 -11
- data/features/step_definitions/pickle_steps.rb +0 -41
- data/features/subscription_management.feature +0 -17
- data/features/support/env.rb +0 -11
- data/features/support/paths.rb +0 -44
- data/lib/tasks/mail_manager_tasks.rake +0 -4
- data/lib/tasks/rspec.rake +0 -165
- data/spec/test_app/bin/cucumber +0 -7
- data/spec/test_app/bin/rails +0 -10
- data/spec/test_app/bin/rake +0 -7
- data/spec/test_app/bin/rspec +0 -7
- data/spec/test_app/bin/spring +0 -18
- data/spec/test_app/spec/routing/users_routing_spec.rb +0 -35
- data/spec/test_app/spec/support/post_office.rb +0 -13
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
body {
|
|
2
|
+
margin:0;
|
|
3
|
+
padding:0;
|
|
4
|
+
border:0;
|
|
5
|
+
font-family:Arial, Helvetica, sans-serif;
|
|
6
|
+
font-size:12px;
|
|
7
|
+
background:#fdba59;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
#top {
|
|
11
|
+
background-image: url('/assets/i_reach/topMid.gif');
|
|
12
|
+
height: 85px;
|
|
13
|
+
min-width: 766px;
|
|
14
|
+
}
|
|
15
|
+
/*
|
|
16
|
+
img {
|
|
17
|
+
display: block;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.main {
|
|
21
|
+
font-family: helvetica, arial, sans-serif;
|
|
22
|
+
font-size: 11pt;
|
|
23
|
+
font-weight: normal;
|
|
24
|
+
padding-left: 20px;
|
|
25
|
+
padding-top: 20px;
|
|
26
|
+
padding-right: 10px;
|
|
27
|
+
padding-bottom: 5px; }
|
|
28
|
+
|
|
29
|
+
#container{
|
|
30
|
+
margin:0;
|
|
31
|
+
padding:0;
|
|
32
|
+
width:100%;
|
|
33
|
+
float:left;
|
|
34
|
+
}
|
|
35
|
+
*/
|
|
36
|
+
h1 {
|
|
37
|
+
font-size: 16pt;
|
|
38
|
+
color: #599c41;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
h2.list_group {
|
|
42
|
+
padding-bottom: 0;
|
|
43
|
+
margin-bottom: 0;
|
|
44
|
+
font-size: 12pt;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
#page_content {
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
background-image: url('/assets/i_reach/MidRight.gif');
|
|
50
|
+
background-repeat: repeat-y;
|
|
51
|
+
background-position: right;
|
|
52
|
+
padding: 10px 40px 10px 10px;
|
|
53
|
+
min-height: 300px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/*Content------------------------------------------------*/
|
|
57
|
+
/*
|
|
58
|
+
#content {
|
|
59
|
+
margin:0;
|
|
60
|
+
padding:10px 15px 15px 15px;
|
|
61
|
+
clear:both;
|
|
62
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
63
|
+
border-top: 1px solid #c4c1a8;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
#content table {
|
|
67
|
+
font-family:Arial, Helvetica, sans-serif;
|
|
68
|
+
font-size: 14px;
|
|
69
|
+
}
|
|
70
|
+
*/
|
|
71
|
+
hr {
|
|
72
|
+
margin: 0 0 0 10px;
|
|
73
|
+
width: 620px;
|
|
74
|
+
text-align:center;
|
|
75
|
+
color: #636343;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/* tables used as lists ------------------------------*/
|
|
80
|
+
table.list {
|
|
81
|
+
margin:10px 0 20px 20px;
|
|
82
|
+
padding: 0;
|
|
83
|
+
border-top: 1px solid #599c41;
|
|
84
|
+
border-right: 1px solid #599c41;
|
|
85
|
+
border-left: 1px solid #599c41;
|
|
86
|
+
font-size: 10pt;
|
|
87
|
+
border-collapse: collapse;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
table.list th {
|
|
91
|
+
background-color: #fef1de;
|
|
92
|
+
border-bottom: 2px solid #599c41;
|
|
93
|
+
padding: 3px 10px 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
table.list td {
|
|
97
|
+
margin:0;
|
|
98
|
+
padding: 5px 5px 5px;
|
|
99
|
+
border-bottom: 1px solid #599c41;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
table.list tr.title {
|
|
103
|
+
font-weight: bold;
|
|
104
|
+
color: #ffffff;
|
|
105
|
+
font-size: 11pt;
|
|
106
|
+
background: #599c41;
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
/* none of the hover stuff will work in IE
|
|
112
|
+
* without a proper DOCTYPE declaration.
|
|
113
|
+
* HTML 1.0 Transitional//EN works, as does
|
|
114
|
+
* XHTML 1.0 Strict//EN
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
table.list tr.odd {
|
|
118
|
+
background: #d9eabd;
|
|
119
|
+
}
|
|
120
|
+
table.list tr.even:hover {
|
|
121
|
+
background: #d9dcd3;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
table.list tr.odd:hover {
|
|
125
|
+
background: #e0f2c3;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
table.list tr.even {
|
|
129
|
+
background: #e2e8d9;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
/* form labels have different alignment*/
|
|
134
|
+
label {font-size: 11pt;
|
|
135
|
+
font-family: helvetica, arial, sans-serif;
|
|
136
|
+
font-weight: bold;
|
|
137
|
+
text-align: right;
|
|
138
|
+
color:#555;
|
|
139
|
+
width: 145px;
|
|
140
|
+
float:left;
|
|
141
|
+
display: block;
|
|
142
|
+
text-align: right;
|
|
143
|
+
padding: 7px 7px 0 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
input, select, textarea {
|
|
147
|
+
margin: 6px 0;
|
|
148
|
+
padding: 2px;
|
|
149
|
+
text-align: left;
|
|
150
|
+
color: #444;
|
|
151
|
+
border: 1px solid #599c41;
|
|
152
|
+
font-size: 10pt;
|
|
153
|
+
background-color: #e2e8d9;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
/*Input style buttons within table*/
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
input.button {
|
|
161
|
+
background: #ffd04f;
|
|
162
|
+
background-image: -webkit-linear-gradient(top, #ffd04f, #faeabe);
|
|
163
|
+
background-image: -moz-linear-gradient(top, #ffd04f, #faeabe);
|
|
164
|
+
background-image: -ms-linear-gradient(top, #ffd04f, #faeabe);
|
|
165
|
+
background-image: -o-linear-gradient(top, #ffd04f, #faeabe);
|
|
166
|
+
background-image: linear-gradient(to bottom, #ffd04f, #faeabe);
|
|
167
|
+
-webkit-border-radius: 12;
|
|
168
|
+
-moz-border-radius: 12;
|
|
169
|
+
border-radius: 10px;
|
|
170
|
+
padding: 0 10px;
|
|
171
|
+
border: solid #669421 1px;
|
|
172
|
+
text-decoration: none;
|
|
173
|
+
font-size: 11pt;
|
|
174
|
+
font-weight: bold;
|
|
175
|
+
color: #555;
|
|
176
|
+
margin-right: 10px;
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
input.button:hover {
|
|
181
|
+
background: #bafc56;
|
|
182
|
+
background-image: -webkit-linear-gradient(top, #bafc56, #f7ffeb);
|
|
183
|
+
background-image: -moz-linear-gradient(top, #bafc56, #f7ffeb);
|
|
184
|
+
background-image: -ms-linear-gradient(top, #bafc56, #f7ffeb);
|
|
185
|
+
background-image: -o-linear-gradient(top, #bafc56, #f7ffeb);
|
|
186
|
+
background-image: linear-gradient(to bottom, #bafc56, #f7ffeb);
|
|
187
|
+
text-decoration: none;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
a.button:link, a.button:visited {
|
|
191
|
+
/* background: #a6f038;
|
|
192
|
+
background-image: -webkit-linear-gradient(top, #a6f038, #f4ffe3);
|
|
193
|
+
background-image: -moz-linear-gradient(top, #a6f038, #f4ffe3);
|
|
194
|
+
background-image: -ms-linear-gradient(top, #a6f038, #f4ffe3);
|
|
195
|
+
background-image: -o-linear-gradient(top, #a6f038, #f4ffe3);
|
|
196
|
+
background-image: linear-gradient(to bottom, #a6f038, #f4ffe3);*/
|
|
197
|
+
/* freaky orange background */
|
|
198
|
+
background: #ffd04f;
|
|
199
|
+
background-image: -webkit-linear-gradient(top, #ffd04f, #faeabe);
|
|
200
|
+
background-image: -moz-linear-gradient(top, #ffd04f, #faeabe);
|
|
201
|
+
background-image: -ms-linear-gradient(top, #ffd04f, #faeabe);
|
|
202
|
+
background-image: -o-linear-gradient(top, #ffd04f, #faeabe);
|
|
203
|
+
background-image: linear-gradient(to bottom, #ffd04f, #faeabe);
|
|
204
|
+
-webkit-border-radius: 10;
|
|
205
|
+
-moz-border-radius: 10;
|
|
206
|
+
border-radius: 10px;
|
|
207
|
+
padding: 2px 10px 1px 10px;
|
|
208
|
+
border: solid #669421 1px;
|
|
209
|
+
text-decoration: none;
|
|
210
|
+
font-size: 11pt;
|
|
211
|
+
font-weight: bold;
|
|
212
|
+
color: #555;
|
|
213
|
+
margin-right: 10px;
|
|
214
|
+
/* do I need this? */
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
a.button:hover {
|
|
219
|
+
background: #bafc56;
|
|
220
|
+
background-image: -webkit-linear-gradient(top, #bafc56, #f7ffeb);
|
|
221
|
+
background-image: -moz-linear-gradient(top, #bafc56, #f7ffeb);
|
|
222
|
+
background-image: -ms-linear-gradient(top, #bafc56, #f7ffeb);
|
|
223
|
+
background-image: -o-linear-gradient(top, #bafc56, #f7ffeb);
|
|
224
|
+
background-image: linear-gradient(to bottom, #bafc56, #f7ffeb);
|
|
225
|
+
text-decoration: none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.newsletter_parts_group {
|
|
229
|
+
margin-top: 10px;
|
|
230
|
+
padding: 0 5px 5px 15px;
|
|
231
|
+
border: thin dashed #599c41;
|
|
232
|
+
background-color: #eee;
|
|
233
|
+
width: 755px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
a:link {
|
|
237
|
+
color: #F60;
|
|
238
|
+
text-decoration:none;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
a:visited {
|
|
242
|
+
color:#F60;
|
|
243
|
+
text-decoration:none;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
a:hover {
|
|
247
|
+
color: #efaa45;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.submit_button {
|
|
251
|
+
width: 500px;
|
|
252
|
+
text-align: right;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.mailing_lists_group {
|
|
256
|
+
margin-top: 10px;
|
|
257
|
+
padding: 0 5px 5px 15px;
|
|
258
|
+
border: thin dashed black;
|
|
259
|
+
background-color: #eee;
|
|
260
|
+
width: 500px;
|
|
261
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.line
|
|
2
|
+
{ color: #d9eabd;
|
|
3
|
+
width:160px;
|
|
4
|
+
background: #d9eabd;
|
|
5
|
+
border:none;
|
|
6
|
+
height:1px;
|
|
7
|
+
margin:4px 0;
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
#menu {font-size: 10pt;
|
|
12
|
+
float: left;
|
|
13
|
+
padding-left: 3px;
|
|
14
|
+
padding-bottom: 10px;
|
|
15
|
+
margin: 0 5px 5px 0;
|
|
16
|
+
/*border-right: 1px solid #fdba59;
|
|
17
|
+
border-bottom: 1px solid #fdba59;*/
|
|
18
|
+
font-family: helvetica, arial, sans-serif;
|
|
19
|
+
font-weight: bold;
|
|
20
|
+
line-height: 12pt;
|
|
21
|
+
color: #000000;
|
|
22
|
+
width:176px;
|
|
23
|
+
background: #8fc23f; /* Old browsers */
|
|
24
|
+
background: -moz-linear-gradient(top, #8fc23f 0%, #b2d57b 50%, #fffffe 100%); /* FF3.6+ */
|
|
25
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#8fc23f), color-stop(50%,#b2d57b), color-stop(100%,#fffffe)); /* Chrome,Safari4+ */
|
|
26
|
+
background: -webkit-linear-gradient(top, #8fc23f 0%,#b2d57b 50%,#fffffe 100%); /* Chrome10+,Safari5.1+ */
|
|
27
|
+
background: -o-linear-gradient(top, #8fc23f 0%,#b2d57b 50%,#fffffe 100%); /* Opera 11.10+ */
|
|
28
|
+
background: -ms-linear-gradient(top, #8fc23f 0%,#b2d57b 50%,#fffffe 100%); /* IE10+ */
|
|
29
|
+
background: linear-gradient(to bottom, #8fc23f 0%,#b2d57b 50%,#fffffe 100%); /* W3C */
|
|
30
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#8fc23f', endColorstr='#fffffe',GradientType=0 ); /* IE6-9 */
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#menu a:link { color: #000000; text-decoration: none; }
|
|
34
|
+
#menu a:visited { color: #000000; text-decoration: none; }
|
|
35
|
+
#menu a:active { color: #000000; text-decoration: none; }
|
|
36
|
+
#menu a:hover { color: #Fc6; text-decoration: none; }
|
|
37
|
+
|
|
38
|
+
#menu ul {
|
|
39
|
+
padding-left: 10px;
|
|
40
|
+
list-style: outside none none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
#menu ul li {
|
|
44
|
+
border-bottom: 1px solid #fff;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
#menu ul li ul {
|
|
48
|
+
padding-left: 20px;
|
|
49
|
+
list-style: outside none none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
#menu ul li ul li {font-size: 9pt;
|
|
53
|
+
font-family: helvetica, arial, sans-serif;
|
|
54
|
+
font-weight: bold;
|
|
55
|
+
line-height: 12pt;
|
|
56
|
+
color: #a42529;
|
|
57
|
+
border: none;
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
#menu ul li ul li a:link { color:#C18100; text-decoration: none; }
|
|
61
|
+
#menu ul li ul li a:visited { color:#a42529; text-decoration: none; }
|
|
62
|
+
#menu ul li ul li a:hover { color:#FC6; text-decoration: none; }
|
|
63
|
+
|
|
64
|
+
.table-bk {
|
|
65
|
+
background: url(/assets/i_reach/menuMain.gif) no-repeat top right;
|
|
66
|
+
padding-top: 20px;
|
|
67
|
+
padding-left:3px;
|
|
68
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
|
2
|
+
.ui-timepicker-div dl { text-align: left; }
|
|
3
|
+
.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; }
|
|
4
|
+
.ui-timepicker-div dl dd { margin: 0 10px 10px 45%; }
|
|
5
|
+
.ui-timepicker-div td { font-size: 90%; }
|
|
6
|
+
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
|
7
|
+
|
|
8
|
+
.ui-timepicker-rtl{ direction: rtl; }
|
|
9
|
+
.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
|
|
10
|
+
.ui-timepicker-rtl dl dt{ float: right; clear: right; }
|
|
11
|
+
.ui-timepicker-rtl dl dd { margin: 0 45% 10px 10px; }
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
require 'cancan'
|
|
2
|
+
require 'dynamic_form'
|
|
1
3
|
module MailManager
|
|
2
|
-
class ApplicationController < ApplicationController
|
|
3
|
-
|
|
4
|
+
class ApplicationController < ::ApplicationController
|
|
5
|
+
layout MailManager.layout
|
|
6
|
+
load_and_authorize_resource
|
|
7
|
+
helper :'mail_manager/layout'
|
|
8
|
+
helper :'mail_manager/subscriptions'
|
|
4
9
|
end
|
|
5
10
|
end
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
module MailManager
|
|
2
|
-
class BouncesController <
|
|
3
|
-
before_filter :find_bounce, :except => [:new, :create, :index]
|
|
2
|
+
class BouncesController < ::MailManager::ApplicationController
|
|
4
3
|
before_filter :find_mailing
|
|
5
4
|
|
|
6
5
|
def index
|
|
7
6
|
params[:bounce] = Hash.new unless params[:bounce]
|
|
8
|
-
|
|
9
|
-
@
|
|
7
|
+
status = params[:bounce][:status] || nil
|
|
8
|
+
@mailings = Mailing.order("created_at desc")
|
|
10
9
|
@bounces = Bounce.scoped
|
|
11
10
|
@bounces = @bounces.by_mailing_id(@mailing.id) if @mailing.present?
|
|
12
|
-
@bounces = @bounces.by_status(
|
|
11
|
+
@bounces = @bounces.by_status(status) if status.present?
|
|
13
12
|
@bounces = @bounces.paginate(:page => params[:page])
|
|
14
13
|
end
|
|
15
14
|
|
|
@@ -18,10 +17,6 @@ module MailManager
|
|
|
18
17
|
|
|
19
18
|
protected
|
|
20
19
|
|
|
21
|
-
def find_bounce
|
|
22
|
-
@bounce = Bounce.find(params[:id])
|
|
23
|
-
end
|
|
24
|
-
|
|
25
20
|
def find_mailing
|
|
26
21
|
return @mailing = Mailing.find_by_id(params[:mailing_id]) if params[:mailing_id]
|
|
27
22
|
return @mailing = @bounce.mailing if @bounce
|
|
@@ -29,4 +24,4 @@ module MailManager
|
|
|
29
24
|
end
|
|
30
25
|
|
|
31
26
|
end
|
|
32
|
-
end
|
|
27
|
+
end
|
|
@@ -1,21 +1,41 @@
|
|
|
1
1
|
module MailManager
|
|
2
|
-
class ContactsController <
|
|
2
|
+
class ContactsController < ::MailManager::ApplicationController
|
|
3
|
+
|
|
4
|
+
skip_before_filter :authorize, only: [:subscribe,:double_opt_in,:thank_you]
|
|
3
5
|
|
|
4
6
|
include DeleteableActions
|
|
5
7
|
|
|
6
8
|
def subscribe
|
|
7
|
-
if
|
|
8
|
-
@contact =
|
|
9
|
-
@contact
|
|
10
|
-
@contact.update_attributes(params[:contact])
|
|
11
|
-
#check to see what list we subscribed to, if Austin local redirect, if San Antonio, redirect to their thank you page
|
|
9
|
+
if valid_subscribe_submission?
|
|
10
|
+
@contact = Contact.signup(params[:contact])
|
|
11
|
+
@contact.double_opt_in(params[:mailing_list_ids])
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
if params[:redirect_url].present?
|
|
14
|
+
if params[:redirect_url].present?
|
|
15
15
|
redirect_to params[:redirect_url]
|
|
16
16
|
else
|
|
17
|
-
redirect_to
|
|
17
|
+
redirect_to main_app.subscribe_thank_you_path
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def thank_you
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def double_opt_in
|
|
25
|
+
@contact = Contact.find_by_token(params[:login_token])
|
|
26
|
+
if @contact.authorized?(params[:login_token])
|
|
27
|
+
@mailing_list_names = []
|
|
28
|
+
@contact.subscriptions.select(&:"pending?").reject(&:new_record?).each do |subscription|
|
|
29
|
+
subscription.change_status(:active)
|
|
30
|
+
@mailing_list_names << subscription.mailing_list_name
|
|
31
|
+
end
|
|
32
|
+
@message = "You have successfully subscribed to #{@mailing_list_names.join(',')}!"
|
|
33
|
+
else
|
|
34
|
+
@contact.generate_login_token
|
|
35
|
+
@contact.delay.deliver_double_opt_in
|
|
36
|
+
@message = "Your token has expired! Please check your email for a new one."
|
|
18
37
|
end
|
|
38
|
+
render :layout => ::MailManager.public_layout
|
|
19
39
|
end
|
|
20
40
|
|
|
21
41
|
def send_one_off_message
|
|
@@ -27,8 +47,13 @@ module MailManager
|
|
|
27
47
|
end
|
|
28
48
|
|
|
29
49
|
def index
|
|
30
|
-
@
|
|
50
|
+
@mailing_lists = MailingList.order('name').map{|mailing_list| [mailing_list.name,
|
|
51
|
+
mailing_list.id]
|
|
52
|
+
}
|
|
31
53
|
params[:status] ||= 'active'
|
|
54
|
+
@statuses = [["Any", ""], ["Active", "active"], ["Unsubscribed", "unsubscribed"],
|
|
55
|
+
["Failed Address", "failed_address"], ["Pending", "pending"]
|
|
56
|
+
]
|
|
32
57
|
@contacts = Contact.search(params).paginate(:page => params[:page], :per_page => params[:per_page])
|
|
33
58
|
end
|
|
34
59
|
|
|
@@ -37,7 +62,6 @@ module MailManager
|
|
|
37
62
|
end
|
|
38
63
|
|
|
39
64
|
def edit
|
|
40
|
-
find_contact
|
|
41
65
|
end
|
|
42
66
|
|
|
43
67
|
def create
|
|
@@ -51,7 +75,6 @@ module MailManager
|
|
|
51
75
|
end
|
|
52
76
|
|
|
53
77
|
def update
|
|
54
|
-
find_contact
|
|
55
78
|
if @contact.update_attributes(params[:contact])
|
|
56
79
|
flash[:notice] = 'Contact was successfully updated.'
|
|
57
80
|
redirect_to(mail_manager.contacts_path)
|
|
@@ -60,16 +83,15 @@ module MailManager
|
|
|
60
83
|
end
|
|
61
84
|
end
|
|
62
85
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
86
|
+
protected
|
|
87
|
+
|
|
88
|
+
def honey_pot_violated?
|
|
89
|
+
params[MailManager.honey_pot_field].present?
|
|
67
90
|
end
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
@contact = Contact.find(params[:id])
|
|
91
|
+
|
|
92
|
+
def valid_subscribe_submission?
|
|
93
|
+
params[:contact].present? && params[:contact][:email_address].present? &&
|
|
94
|
+
!honey_pot_violated?
|
|
73
95
|
end
|
|
74
96
|
end
|
|
75
97
|
end
|