<% badge_style = 'padding: 3px 5px; font-size: 70%; font-weight: normal;' badge_text = user.forums_badge_text if user.favorite_page_type? favorite_link = link_to main_app.send("#{user.favorite_page_type.downcase.pluralize}_user_path", { id: user.id }) do content_tag(:i, class: "material-icons tiny #{content_class_from_name(user.favorite_page_type).try(:text_color)}", style: 'position: relative; top: 4px') do "#{content_class_from_name(user.favorite_page_type).try(:icon)}" end end badge_text = favorite_link + badge_text end %> <% if user.respond_to?(:selected_billing_plan_id) %> <% if user.id == 5 %> <%= badge_text.presence || 'Admin' %> <% elsif user.selected_billing_plan_id == 2 %> <%= badge_text.presence || 'Beta Tester' %> <% elsif user.selected_billing_plan_id == 3 %> <%= badge_text.presence || 'Early Adopter' %> <% elsif user.on_premium_plan? %> <%= badge_text.presence || 'Premium Supporter' %> <% else %> <%= favorite_link %> <% end %> <% end %>