<%
  badge_style  = 'padding: 3px 5px; font-size: 70%; font-weight: normal;'
  badge_text   = user.forums_badge_text
%>

<% if user.respond_to?(:selected_billing_plan_id) %>
  <% if user.id == 5 %>
    <span style="<%= badge_style %>; background: #2196F3; color: white"><%= badge_text.presence || 'Admin' %></span>
  <% elsif user.selected_billing_plan_id == 2 %>
    <span style="<%= badge_style %>; background: #dedeff"><%= badge_text.presence || 'Beta Tester' %></span>
  <% elsif user.selected_billing_plan_id == 3 %>
    <span style="<%= badge_style %>; background: #ffdede"><%= badge_text.presence || 'Early Adopter' %></span>
  <% elsif user.on_premium_plan? %>
    <span style="<%= badge_style %>; background: #ffffaa"><%= badge_text.presence || 'Premium Supporter' %></span>
  <% end %>
<% end %>
