tkh_mailing_list 0.10.10 → 0.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eae53eacf735631453be7e76b3f2148757daf0a1
4
- data.tar.gz: 19730d823e3e74c25aee283834ba2a8359386f63
3
+ metadata.gz: ded4dc3a0f363b3036d2099b50d7e4aad5d642ac
4
+ data.tar.gz: 35e272681eb4c32792b01e47818bae5ed491ef65
5
5
  SHA512:
6
- metadata.gz: c35e5c54a41ae36f02109a005871757eae17424b344cb43b01d01c3eac81783e4eaaa90f5763e61d04941e96656c064ff8b358e295bf3f85d948cadf8d099b73
7
- data.tar.gz: 9fb2c34114ca201de47c77d56a46faf993b0071c14264bd386646af114377f417bce0bb95f4c8afe14bbf5a521da578e711a3f6bf4838a385716915f48def824
6
+ metadata.gz: eb1c8471ca174302634f07014fb2a0db5445daf8925c58591eaa7c07aa77a8be327e45e8cf75a50c018f0f9204c9e1e7249d5a74ac520be7a55b8456bd4c60d2
7
+ data.tar.gz: 5f43ef1675dc254483737e6a26d5f80908cd65f112e1bf256cf6832152e9c3d7edd0d5ead5d7c5019c91cdf7fff4036c6392161371d1ec7f2b79e1226bc6a495
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
 
4
4
 
5
+ ## 0.11
6
+
7
+ * Admin daily digest emails are also sent in HTML.
8
+
9
+
5
10
  ## 0.10.10
6
11
 
7
12
  * Added an invisible field in the contact form to trick spam robots.
@@ -0,0 +1,19 @@
1
+ h1, h2, h3, h4 {
2
+ color: #000099;
3
+ }
4
+
5
+ ul, ol {
6
+ margin-left: 0;
7
+ }
8
+
9
+ table {
10
+ background-color: #fff;
11
+ width: 600px;
12
+ }
13
+
14
+ #header {
15
+ text-align: center;
16
+ }
17
+ h1#header-title {
18
+ font-family: opensanscondlight, "Helvetica Neue", Helvetica, Arial, sans-serif;
19
+ }
@@ -1,4 +1,5 @@
1
1
  class AdministrationMailer < ActionMailer::Base
2
+ include Roadie::Rails::Automatic
2
3
 
3
4
  default :from => "#{Setting.first.try(:company_name)} <#{Setting.first.try(:contact_email)}>"
4
5
 
@@ -10,7 +11,10 @@ class AdministrationMailer < ActionMailer::Base
10
11
  reply_to = "#{Setting.first.try(:company_name)} <#{Setting.first.try(:contact_email)}>"
11
12
  mail to: recipient,
12
13
  reply_to: reply_to,
13
- subject: "#{t('admin.mailer.daily_digest.subject')}- #{l Time.zone.now.to_date}"
14
+ subject: "#{t('admin.mailer.daily_digest.subject')}- #{l Time.zone.now.to_date}" do |format|
15
+ format.html { render layout: 'admin_mailers.html.erb' }
16
+ format.text
17
+ end
14
18
  end
15
19
 
16
20
  end
@@ -0,0 +1,15 @@
1
+ <p>Hi <%= @recipient.friendly_name %>,</p>
2
+
3
+ <p>This a summary of what happened yesterday on the <%= Setting.first.try(:site_name) %> website.</p>
4
+
5
+ <h2>List of messages from the contact form:</h2>
6
+
7
+ <ul>
8
+ <% @contact_messages.each do |message| %>
9
+ <li><%= "from #{message.sender_name} (#{message.sender_email}): #{truncate(message.body, length: 50)}" %></li>
10
+ <% end %>
11
+ </ul>
12
+
13
+ <p>You can see and manage these messages at: <%= contacts_url %>.</p>
14
+
15
+ <p>You are receiving this email because you are an administrator of the <%= Setting.first.try(:site_name) %> website.</p>
@@ -5,7 +5,7 @@ This a summary of what happened yesterday on the <%= Setting.first.try(:site_nam
5
5
  List of messages from the contact form:
6
6
 
7
7
  <% @contact_messages.each do |message| %>
8
- <%= "- from #{message.sender_name} (#{message.sender_email}): #{truncate message.body}" %>
8
+ <%= "- from #{message.sender_name} (#{message.sender_email}): #{truncate message.body, length: 50}" %>
9
9
  <% end %>
10
10
 
11
11
  You can see and manage these messages at: <%= contacts_url %>
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="<%= I18n.locale %>">
3
+
4
+ <head>
5
+ <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
6
+ <%= stylesheet_link_tag 'emails' %>
7
+ </head>
8
+
9
+ <body>
10
+ <table>
11
+ <tr>
12
+ <td id="header">
13
+ <%= content_tag :h1, t('admin.site_admin'), id: 'header-title' %>
14
+ <%= image_tag 'admin/admin-logo.jpg'), id: 'admin-logo' %>
15
+ </td>
16
+ </tr>
17
+ <tr>
18
+ <td><%= yield %></td>
19
+ </tr>
20
+ </table>
21
+ </body>
22
+
23
+ </html>
@@ -48,6 +48,7 @@ de:
48
48
  message: 'Nachricht'
49
49
 
50
50
  admin:
51
+ site_admin: 'site administration'
51
52
  mailer:
52
53
  daily_digest:
53
54
  subject: "Admin Daily Digest"
@@ -50,6 +50,7 @@ en:
50
50
  message: 'Message:'
51
51
 
52
52
  admin:
53
+ site_admin: 'site administration'
53
54
  mailer:
54
55
  daily_digest:
55
56
  subject: "Admin Daily Digest"
@@ -48,6 +48,7 @@ es:
48
48
  message: 'Message:'
49
49
 
50
50
  admin:
51
+ site_admin: 'site administration'
51
52
  mailer:
52
53
  daily_digest:
53
54
  subject: "Admin Daily Digest"
@@ -49,6 +49,7 @@ fr:
49
49
  message: 'Message :'
50
50
 
51
51
  admin:
52
+ site_admin: 'administration du site'
52
53
  mailer:
53
54
  daily_digest:
54
55
  subject: "Résumé d'activité"
@@ -1,5 +1,5 @@
1
1
  require "tkh_mailing_list/version"
2
-
2
+ require "roadie-rails"
3
3
 
4
4
  module TkhMailingList
5
5
  class Engine < ::Rails::Engine
@@ -1,3 +1,3 @@
1
1
  module TkhMailingList
2
- VERSION = "0.10.10"
2
+ VERSION = "0.11"
3
3
  end
@@ -20,4 +20,9 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
+
24
+ # temporarily, until roadie-rails reaches 1.1
25
+ # a spceial fork needs to be used from the host app:
26
+ # gem 'roadie-rails', git: 'https://github.com/tomasc/roadie-rails'
27
+ spec.add_dependency 'roadie-rails'
23
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkh_mailing_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.10
4
+ version: '0.11'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swami Atma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-18 00:00:00.000000000 Z
11
+ date: 2015-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: roadie-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: A mailing list module to work with tkh_authentication gem
42
56
  email:
43
57
  - swami@TenThousandHours.eu
@@ -55,6 +69,7 @@ files:
55
69
  - app/assets/images/Jcrop.gif
56
70
  - app/assets/javascripts/jquery.jcrop.min.js
57
71
  - app/assets/javascripts/profiles.js.coffee
72
+ - app/assets/stylesheets/emails.css.scss
58
73
  - app/assets/stylesheets/jquery.jcrop.min.css.scss
59
74
  - app/controllers/contacts_controller.rb
60
75
  - app/controllers/details_controller.rb
@@ -69,6 +84,7 @@ files:
69
84
  - app/models/member.rb
70
85
  - app/models/profile.rb
71
86
  - app/uploaders/portrait_uploader.rb
87
+ - app/views/administration_mailer/daily_digest.html.erb
72
88
  - app/views/administration_mailer/daily_digest.text.erb
73
89
  - app/views/contact_mailer/message_from_contact_form.text.erb
74
90
  - app/views/contacts/_form.html.erb
@@ -80,6 +96,7 @@ files:
80
96
  - app/views/details/edit.html.erb
81
97
  - app/views/details/new.html.erb
82
98
  - app/views/details/show.html.erb
99
+ - app/views/layouts/admin_mailers.html.erb
83
100
  - app/views/members/_admin_context_menu.html.erb
84
101
  - app/views/members/_form.html.erb
85
102
  - app/views/members/_tab_admin_menu.html.erb
@@ -130,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
147
  version: '0'
131
148
  requirements: []
132
149
  rubyforge_project:
133
- rubygems_version: 2.2.2
150
+ rubygems_version: 2.4.4
134
151
  signing_key:
135
152
  specification_version: 4
136
153
  summary: This gem inherits from the tkh_authentication gem and allows administrators