{% set have_badges = user.gold or user.silver or user.bronze %}
{%- if user.is_read_only() -%}
    {% trans %}read only access{% endtrans %}
{%- else -%}
    {%- if settings.KARMA_MODE != 'hidden' -%}
    <a
      class="user-micro-info reputation"
      href="{{user.get_absolute_url()}}?sort=reputation"
      data-fetch-data-url="{{ url('get_perms_data') }}"
      data-url="{{ url('get_perms_data') }}"
    >{% trans %}karma:{% endtrans %} {{ user.get_localized_profile().get_reputation() }}</a>{% if settings.BADGES_MODE == 'public' and have_badges %}, {% endif -%}
    {%- endif -%}
    {%- if settings.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 -%}
