From bfe202185934a5e820853c33537f15dd13a8f9b1 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 7 Nov 2014 17:00:09 -0500 Subject: [PATCH] UX: In digest email lists of topics, show striped version of category badge --- app/helpers/user_notifications_helper.rb | 13 ++++++++++--- app/views/user_notifications/digest.html.erb | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/helpers/user_notifications_helper.rb b/app/helpers/user_notifications_helper.rb index 99807e2db4f..1b3dccf0491 100644 --- a/app/helpers/user_notifications_helper.rb +++ b/app/helpers/user_notifications_helper.rb @@ -68,10 +68,17 @@ module UserNotificationsHelper return "" if category.uncategorized? && !opts[:show_uncategorized] result = "" - if category.parent_category.present? - result << " " + + if opts[:only_stripe] + result << " " + result << "#{category.name}" + else + if category.parent_category.present? + result << " " + end + result << "#{category.name}" end - result << "#{category.name}" + result.html_safe end end diff --git a/app/views/user_notifications/digest.html.erb b/app/views/user_notifications/digest.html.erb index 38144435765..980806f1708 100644 --- a/app/views/user_notifications/digest.html.erb +++ b/app/views/user_notifications/digest.html.erb @@ -44,7 +44,7 @@
  • <%= link_to t.title, "#{Discourse.base_url}#{t.relative_url}" %> <%= t('user_notifications.digest.posts', count: t.posts_count) %> - <%= email_category(t.category) %> + <%= email_category(t.category, only_stripe: true) %>
  • <%- end -%>