Commits

Kai Diefenbach committed 821ccc0

Fixed display of image for category sub-categories view.

  • Participants
  • Parent commits 5c3340d

Comments (0)

Files changed (2)

File lfstheme/static/css/main.css

     font-weight: bold;
 }
 
-.category .category-image,
 .category .product-image {
     margin-right: 40px;
     padding-bottom: 10px;
     float: left;
 }
 
+.category .category-image {
+    margin-right: 10px;
+    padding-bottom: 10px;
+    float: left;
+}
+
 .category .product-row {
     border-bottom: 1px solid #eae5e2;
 }

File lfstheme/templates/lfs/catalog/categories/category/default.html

                 {% for category in row %}
                     <td class="category-row">
                         <h2 class="first-heading">{{ category.name }}</h2>
+                        {% if category.get_image %}
                         <div class="category-image">
                             <a href="{% url lfs_category category.slug %}">
-                                {% if category.image %}
-                                    <img src="{{category.image.url_100x100}}"
-                                         alt="{{category.name}}" />
-                                {% endif %}
+                                <img src="{{ category.get_image.url_100x100 }}"
+                                     alt="{{ category.name }}" />
                             </a>
                         </div>
+                        {% endif %}
                         <div class="category-description">
                             {{ category.short_description|safe }}
                         </div>
-
                         <div class="clear details-button">
                             <a class="button emphasized"
                                href="{% url lfs_category category.slug %}">{% trans 'Details' %}
                             </a>
                         </div>
-
                         <hr>
                     </td>
                 {% endfor %}