--- a/src/metadatacomposer/templates/partial/library_image_list.html Fri Jun 07 15:41:12 2013 +0200
+++ b/src/metadatacomposer/templates/partial/library_image_list.html Fri Jun 07 16:17:28 2013 +0200
@@ -1,11 +1,12 @@
{% load static %}
{% load i18n %}
{% load thumbnail %}
+{% load absurl %}
{% load front_tags %}
<div class="row">
{% for i in image_results %}
<div class="span2">
- <a data-url="{% url 'composer_image' branding=branding image_pk=i.pk %}"
+ <a data-url="{% absurl 'composer_image' branding=branding image_pk=i.pk %}"
data-title="{{ i.title }}"
data-description="{{ i.description }}" href="#">
{% thumbnail i.image_file "140x140" crop="center" format="PNG" as im %}<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" />{% empty %}<img src="{% static 'metadatacomposer/img/140x140.gif' %}" width="140px" height="140px" />{% endthumbnail %}
--- a/src/metadatacomposer/views.py Fri Jun 07 15:41:12 2013 +0200
+++ b/src/metadatacomposer/views.py Fri Jun 07 16:17:28 2013 +0200
@@ -219,7 +219,10 @@
for content in results.object_list:
# We filter the content's projects with the user's ones
if select_media:
- content.url = content.videopath.rstrip('/') + "/" + content.src
+ if not content.videopath and content.videopath!="":
+ content.url = content.videopath.rstrip('/') + "/" + content.src
+ else:
+ content.url = content.src
elif create_empty_project:
content.url = "create_project_for_me"
projects = content.project_set.all().filter(owner=user)