]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/badges.html
Jira OSQA-456, avoid using nested loops, use the 'in' operator in the template instead.
[osqa.git] / forum / skins / default / templates / badges.html
index 016cc71d0073bc99d36c91ee2eda21e8ba95b36e..7184204d519a241704cd67db1201d5059141c179 100644 (file)
         {% for badge in badges %}
         <div style="clear:both;line-height:30px">
             <div style="float:left;min-width:30px;text-align:right;height:30px">
-            {% for a in mybadges %}
-                {% ifequal a.badge_id badge.id %}
+            {% if badge.id in mybadges %}
                  <span style="font-size:175%; padding-right:5px; color:#5B9058;">&#10004;</span>
-                {% endifequal %}
-            {% endfor %}
+            {% endif %}
             </div>
             <div style="float:left;width:230px;">
                 <a href="{{badge.get_absolute_url}}" title="{{ badge.get_type_display }} : {{ badge.description }}" class="medal"><span class="badge{{ badge.type }}">&#9679;</span>&nbsp;{{ badge.name }}</a><strong> &#215; {{ badge.awarded_count|intcomma }}</strong>