##// END OF EJS Templates
Don't show random image for tag that does not have images
neko259 -
r1266:0c448cb2 default
parent child Browse files
Show More
@@ -38,14 +38,16 b''
38
38
39 {% if tag %}
39 {% if tag %}
40 <div class="tag_info">
40 <div class="tag_info">
41 <div class="tag-image">
41 {% if random_image_post %}
42 {% with image=random_image_post.images.first %}
42 <div class="tag-image">
43 <a href="{{ random_image_post.get_absolute_url }}"><img
43 {% with image=random_image_post.images.first %}
44 src="{{ image.image.url_200x150 }}"
44 <a href="{{ random_image_post.get_absolute_url }}"><img
45 width="{{ image.pre_width }}"
45 src="{{ image.image.url_200x150 }}"
46 height="{{ image.pre_height }}"/></a>
46 width="{{ image.pre_width }}"
47 {% endwith %}
47 height="{{ image.pre_height }}"/></a>
48 </div>
48 {% endwith %}
49 </div>
50 {% endif %}
49 <div class="tag-text-data">
51 <div class="tag-text-data">
50 <h2>
52 <h2>
51 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
53 <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form">
General Comments 0
You need to be logged in to leave comments. Login now