Conditionally removing listing reference (#17211)
* Conditionally removing listing reference Prior to this commit, our notifications would send listing related information. * Update app/views/mailers/notify_mailer/new_badge_email.html.erb Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com> Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
This commit is contained in:
parent
3edffcbb22
commit
02ff835e7f
3 changed files with 3 additions and 3 deletions
|
|
@ -26,7 +26,7 @@
|
|||
</a>
|
||||
</p>
|
||||
|
||||
<% unless @badge.credits_awarded.zero? %>
|
||||
<% if @badge.credits_awarded > 0 && Listing.feature_enabled? %>
|
||||
<hr style="opacity:0.4;width: 150px;margin: 30px auto;" />
|
||||
<p>
|
||||
You also get <strong><a href="<%= credits_url %>"><%= @badge.credits_awarded %> new credits</a></strong> to use for <strong><a href="<%= listings_url %>">community listings</a></strong><br />
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Congratulations, <%= @user.name %>! You got the <%= @badge.title %> badge! Be su
|
|||
|
||||
<%= user_url(@user) %>
|
||||
|
||||
<% unless @badge.credits_awarded.zero? %>
|
||||
<% if @badge.credits_awarded > 0 && Listing.feature_enabled? %>
|
||||
You also get <%= @badge.credits_awarded %> new credits to use for community listings if you have anything you'd like to promote: <%= listings_url %>
|
||||
|
||||
To manage your credits visit: <%= credits_url %>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<p class="self-stretch"><a href="<%= json_data["user"]["path"] %>" class="crayons-btn w-100 m:w-50"><%= t("views.notifications.badge.profile") %></a></p>
|
||||
<% credits_awarded = json_data["badge_achievement"]["badge"]["credits_awarded"] %>
|
||||
<% unless credits_awarded.present? && credits_awarded.zero? %>
|
||||
<% if credits_awarded.to_i > 0 && Listing.feature_enabled? %>
|
||||
<p class="max-w-75 mx-auto">
|
||||
<%= t("views.notifications.badge.awarded_html", credits: link_to(t("views.notifications.badge.credits", count: json_data["badge_achievement"]["badge"]["credits_awarded"]), "/credits", class: "crayons-link crayons-link--brand fw-bold"),
|
||||
listings: link_to(t("views.notifications.badge.listings"), "/listings")) %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue