Source

satchmo-imagekit / satchmo / apps / product / templates / product / recently_added.html

Full commit
{% extends "shop/base.html" %}
{% load i18n %}
{% load satchmo_util %}

{% block navbar %}
<li class="first"><a href="{{ shop_base }}/">{% trans "Home" %}</a></li>
<li>{% trans "Recently Added" %}</li>
{% endblock %}

{% block content %}
<h2>{% trans "Recently Added" %}</h2>
{% if page %}
	{% for product in page.object_list %}
		<div class="recentlyadded">
	    <div class = "productImage">    
	   		{% if product.main_image %}
	      	<center>
                {% 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>
	      	</center>
	   		{% endif %}     
	    	<p><a href="{{ product.get_absolute_url }}">{{ product.translated_name }}</a></p>
		</div>
		</div>
	{% endfor %}
	{% if page.has_other_pages %}
	<div id = "pagination">
	<ul>
	    {% if page.has_previous %}
	        <li> <a href="{{ request.path }}?page={{page.previous_page_number}}">{% trans "Previous" %}</a> </li>
	    {% else %}
	        <li> {% trans "Previous" %} </li>
	    {% endif %}
	    {% if page.has_next %}
	        <li> <a href="{{ request.path }}?page={{page.next_page_number}}">{% trans "Next" %}</a></li>
	    {% else %}
	        <li> {% trans "Next" %} </li>
	    {% endif %}
	</ul>
	</div>
	{% endif %}
{% else %}
	<div class="recentlyadded">
		<p>{% trans "Bad Page" %}</p>
	</div>
{% endif %}
{% endblock %}