-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip if new_work_views or new_file_downloads is 0
- Loading branch information
1 parent
fd8bdb7
commit 608faf9
Showing
3 changed files
with
48 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
body { font-family: Arial, sans-serif; line-height: 1.6; } | ||
.email-container { max-width: 600px; margin: auto; padding: 20px; border: 1px solid #ccc; } | ||
.footer { font-size: 12px; color: #666; margin-top: 20px; } | ||
.highlight { color: #0056b3; } | ||
.button { | ||
display: inline-block; | ||
padding: 10px 20px; | ||
margin: 10px 0; | ||
background-color: #0056b3; | ||
color: white; | ||
text-decoration: none; | ||
border-radius: 5px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="email-container"> | ||
<p>Dear Author,</p> | ||
<p>You had <%= pluralize(@statistics[:new_file_downloads], 'download') %> in <%= Date.today.prev_month.strftime("%B %Y") %> across your <%= pluralize(@statistics[:new_work_views], 'work') %> in <%= @application_name %>. Your current readership:</p> | ||
<ul> | ||
<li><%= pluralize(@statistics[:total_file_downloads], 'Total File Download') %></li> | ||
<li><%= pluralize(@statistics[:total_work_views], 'Total Work View') %></li> | ||
</ul> | ||
<a href="<%= @url %>" class="button">VISIT MY DASHBOARD</a> | ||
<div class="footer"> | ||
<p>These monthly reports are provided to you on behalf of <%= @application_name %>. For questions, comments, or to add more content and increase your readership and visibility as an author, please contact your repository administrator.</p> | ||
<head> | ||
<style> | ||
body { font-family: Arial, sans-serif; line-height: 1.6; } | ||
.email-container { max-width: 600px; margin: auto; padding: 20px; border: 1px solid #ccc; } | ||
.footer { font-size: 12px; color: #666; margin-top: 20px; } | ||
.highlight { color: #0056b3; } | ||
.button { | ||
display: inline-block; | ||
padding: 10px 20px; | ||
margin: 10px 0; | ||
background-color: #0056b3; | ||
color: white; | ||
text-decoration: none; | ||
border-radius: 5px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="email-container"> | ||
<p>Dear Author,</p> | ||
<p>You had <%= pluralize(@statistics[:new_file_downloads], 'new download') %> in <%= Date.today.prev_month.strftime("%B %Y") %> across your <%= pluralize(@statistics[:new_work_views], 'new work') %> in <%= @application_name %>. Your current readership:</p> | ||
<ul> | ||
<li><%= pluralize(@statistics[:total_file_downloads], 'Total File Download') %></li> | ||
<li><%= pluralize(@statistics[:total_work_views], 'Total Work View') %></li> | ||
</ul> | ||
<a href="<%= @url %>" class="button">VISIT MY DASHBOARD</a> | ||
<div class="footer"> | ||
<p>These monthly reports are provided to you on behalf of <%= @application_name %>. For questions, comments, or to add more content and increase your readership and visibility as an author, please contact your repository administrator.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shouldn't this be and rather than or? I think we'd want to send as long as anything is non-zero.