Source

satchmo-imagekit / satchmo / apps / satchmo_ext / brand / templates / brand / view_brand.html

Full commit
{% extends "shop/base.html" %}
{% load i18n %}
{% block pagename %}{{ brand.name }}{% endblock %}

{% block extra-head %}
{% if category.meta %}
    <meta name="description" content="{{brand.name}}">
{% endif %}
{% endblock %}

{% block navbar %}
<li><a href="{{shop_base}}">{% trans 'Home' %}</a></li>
{% if brand.brand %}<li><a href="{{ brand.brand.get_absolute_url }}">{{ brand.brand.translation.name }}</a></li>{% endif %}
<li>{{ brand.translation.name }}</li>
{% endblock %}

{% block content %}
{% with brand.translation as translated %}
<div id="product_category" class="brand">
	<div class="brand_description">
		<h3>{{ translated.name }}</h3>
	    {% if translated.picture %}
        {% with translated.thumbnail_image as image %}
        <a href="{{ brand.get_absolute_url }}"><img src="{{ image.url }}" width="{{ image.width }}" height="{{ image.height }}" alt="{{ translated.name }}" /></a>
        {% endwith %}
	    {% endif %}
		{% if translated.description %}
		<div class="description">
			{{ translated.description|safe }}
        </div>
		{% endif %}
		{% if user.is_staff or user.is_superuser %}
            <p><a href="/admin/brand/brand/{{ brand.id }}/">Edit this brand</a></p>
        {% endif %}
	</div>

    {% if brand.has_content %}
    	{% if brand.has_products %}
		<div class="brandproducts">
		{% for product in products %} 
			<div class="productImage{% if forloop.first %} first{% endif %}">	
            {% with product.main_image.thumbnail_image as image %}
            <a href="{{ product.get_absolute_url }}"><img src="{{ image.url }}" width="{{ image.width }}" height="{{ image.height }}" /></a>
            {% endwith %}
				<br/>
		        <a href="{{ product.get_absolute_url }}">{{ product.translated_name }}</a>
	         </div>
	    {% endfor %}
		</div>
		{% endif %}

		{% if brand.has_categories %}
		<div class="brandcategories">
			<h4>{% trans 'View more products in these categories' %}</h4>
      	    {% for cat in brand.active_categories %}{% with cat.translation as translatedcat %}
			<div class="brandImage">
            {% with translatedcat.thumbnail_image as image %}
            <a href="{{ cat.get_absolute_url }}"><img src="{{ image.url }}" width="{{ image.width }}" height="{{ image.height }}" />
            {% endwith %}
				<br/>
            	<a href="{{ cat.get_absolute_url }}">{{ translatedcat.name }}</a>
			</div>
	        {% endwith %}{% endfor %}
		</div>
		{% endif %}
	{% endif %}
	{% if sale %}
	{% include "product/some_discount_eligible.html" %}
	{% endif %}
</div>
{% endwith %}
{% endblock %}