docbrown/app/views/notifications/_badgeachievement.html.erb
Ben Halpern cbe599e2eb
Adjust internal page logic and add credits copy to notifications (#3843)
* Adjust internal page logic and add credits copy to notifications

* Adjust badge email copy
2019-08-26 13:41:13 -04:00

30 lines
1.3 KiB
Text

<% json_data = notification.json_data %>
<div class="content notification-content badge-content">
<% cache "activity-badge-reward-#{json_data['badge_achievement']['badge_id']}" do %>
<div class="badge-title">
You received the <strong><%= sanitize(json_data["badge_achievement"]["badge"]["title"]) %></strong> badge
</div>
<p class="badge-description">
<%= json_data["badge_achievement"]["badge"]["description"] %>
</p>
<img class="badge-image" src="<%= cloudinary json_data["badge_achievement"]["badge"]["badge_image_url"], 250 %>" alt="<%= json_data["badge_achievement"]["badge"]["title"] %>">
<% end %>
<p class="badge-reward-message">
<em>
<%= json_data["badge_achievement"]["rewarding_context_message"].html_safe %>
</em>
</p>
<a href="<%= json_data["user"]["path"] %>">
<button class="cta follow-action-button badge-button">
CHECK YOUR PROFILE
</button>
</a>
<hr class="minimal-divider" />
<p class="badge-credit-message">
You also get <strong><a href="/credits">5 new credits</a></strong> to use for <strong><a href="/listings">community listings</a></strong><br />
if you have anything you'd like to promote. 🎉
</p>
<p class="badge-credit-message">
<strong><a href="/about-listings">More information about listings<a></strong>
</p>
</div>