{% set have_badges = user.gold or user.silver or user.bronze %}
{%- if user.is_read_only() -%}
    {% trans %}read only access{% endtrans %}
{%- else -%}
    {%- if karma_mode != 'hidden' -%}
    <a 
      class="user-micro-info reputation" 
      href="{{user.get_absolute_url()}}?sort=reputation"
      data-url="{% url 'get_perms_data' %}"
    >{% trans %}karma:{% endtrans %} {{user.reputation}}</a>{% if badges_mode == 'public' and have_badges %}, {% endif -%}
    {%- endif -%}
    {%- if badges_mode == 'public' and have_badges -%}
      <a class="user-micro-info"
         href="{{ user.get_absolute_url() }}#badges"
      ><span title="{{ user.get_badge_summary() }}">{% trans %}badges:{% endtrans %}
          {% if user.gold %}
          <span class='badge1'>&#9679;</span>
          <span class="badgecount">{{user.gold}}</span>
          {% endif %}
          {% if user.silver %}
          <span class='badge2'>&#9679;</span>
          <span class="badgecount">{{user.silver}}</span>
          {% endif %}
          {% if user.bronze %}
          <span class='badge3'>&#9679;</span>
          <span class="badgecount">{{user.bronze}}</span>
          {%- endif -%}
      </span></a>
    {%- endif -%}
{%- endif -%}
