Ignore:
Timestamp:
Mar 24, 2012 5:57:54 PM (14 months ago)
Author:
slav0nic <slav0nic0@…>
Branch:
stable
Children:
425:d738e802c9fe, 428:91b189c7e649
Message:

small template refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • djangobb_forum/templates/djangobb_forum/topic.html

    r422 r424  
    9999                                                <p class="postedit"><em>{% trans "Edited" %} {{ post.updated_by.username }} ({% forum_time post.updated %})</em></p> 
    100100                                        {% endif %} 
    101                                         {% if post.attachments.exists %} 
    102                                                 {% for attach in post.attachments.all %} 
    103                                                         <p class="postedit"><em>{% trans "Attachments:" %} <br />{{ attach|attachment_link }}</em></p> 
    104                                                 {% endfor %} 
    105                                         {% endif %} 
     101                                        {% with post.attachments.all as attachments %} 
     102                                                {% if attachments %} 
     103                                                        {% for attach in attachments %} 
     104                                                                <p class="postedit"><em>{% trans "Attachments:" %} <br />{{ attach|attachment_link }}</em></p> 
     105                                                        {% endfor %} 
     106                                                {% endif %} 
     107                                        {% endwith %} 
    106108                                </div> 
    107109                        </div> 
Note: See TracChangeset for help on using the changeset viewer.