docbrown/app/views/notifications/_badgeachievement.html.erb
Lisa Sy 36e271e1cb
Deprecate old button stylings with Crayons buttons (#10694) [deploy]
* Deprecate old buttons.scss file

* Replace outdated button styles with Crayons button styling

* Update additional views after removing old button styling

* Update tests

* Update test

* Update test

* Fix button placements
2020-10-14 07:28:41 -07: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="<%= optimized_image_url(json_data["badge_achievement"]["badge"]["badge_image_url"], width: 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="crayons-btn follow-action-button badge-button">
Visit 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_url %>">More information about listings<a></strong>
</p>
</div>