Fixing poll markup
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 21 May 2013 07:51:13 +0000 (09:51 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 3 Jun 2013 08:03:41 +0000 (10:03 +0200)
- removing unnecessary closing div tag
- style should be set even when vote_count equals to 0

apps/polls/templates/polls/tags/poll.html

index 355348a..8566a9d 100644 (file)
@@ -9,11 +9,7 @@
                 {% for item in poll.items.all %}
                     <li>
                         {{item.content}}
-                        <div class="poll-bar"><div class="poll-bar-inner"
-                        {% if vote_count %}
-                                style="width:{{item.vote_ratio|stringformat:"f"}}%;"
-                        {% endif %}
-                        ></div></div>
+                        <div class="poll-bar"><div class="poll-bar-inner" style="width:{{item.vote_ratio|stringformat:"f"}}%;"></div>
                     </li>
                 {% endfor %}
                 </ul>