{% ssi_include 'chunk' key='picture-list' %}
{% endblock %}
</div></div>
- <div class="right-column" id="logo-space">
- {% block book_list_logos %}
- <a href="http://www.nck.pl">
- <img style="float:right; width:200px; margin:1em" src="{% static "img/logo_nck_200horiz_trans.png" %}" alt="Narodowe Centrum Kultury" ></img></a>
- {% endblock %}
- </div>
<div class='clearboth'></div>
</a></li>
<li id="sponsors">
- <a href="http://www.nck.pl"><img src="{% static "img/logo_nck.jpg" %}" alt="Narodowe Centrum Kultury" ></img></a>
+ {% for sponsor in sponsors %}
+ {% thumbnail sponsor.logo "80x200" as logo %}
+ <a href="{{ sponsor.url }}" target="_blank"><img src="{{ logo.url }}" alt="{{ sponsor.name }}" /></a>
+ {% endthumbnail %}
+ {% endfor %}
</li>
{% endblock %}
<div class="sponsors">
<a href="/"><img src="{% static "img/logo-220.png" %}" alt="Wolne Lektury" ></img>
</a>
- <a href="http://www.nck.pl"><img src="{% static "img/logo_nck_200horiz_trans.png" %}" alt="Narodowe Centrum Kultury" ></img></a>
+ {% for sponsor in sponsors %}
+ {% thumbnail sponsor.logo "220x220" as logo %}
+ <a href="{{ sponsor.url }}" target="_blank"><img src="{{ logo.url }}" alt="{{ sponsor.name }}" /></a>
+ {% endthumbnail %}
+ {% endfor %}
</div>
{% book_info picture %}
from picture.models import Picture, PictureArea
from catalogue.utils import split_tags
from ssify import ssi_included
+from sponsors.models import Sponsor
# was picture/picture_list.html list (without thumbs)
def picture_list(request, filter=None, get_filter=None, template_name='catalogue/picture_list.html', cache_key=None, context=None):
def picture_viewer(request, slug):
picture = get_object_or_404(Picture, slug=slug)
+ sponsors = []
+ for sponsor in picture.extra_info.get('sponsors', []):
+ have_sponsors = Sponsor.objects.filter(name=sponsor)
+ if have_sponsors.exists():
+ sponsors.append(have_sponsors[0])
return render_to_response("picture/picture_viewer.html", locals(),
context_instance=RequestContext(request))
margin: 1em 0 0;
}
+#info .sponsors img {
+ margin-bottom: 1em;
+}
+
+
/* =================================================== */
/* = Common elements: headings, paragraphs and lines = */
/* =================================================== */