]> git.parisson.com Git - telemeta.git/commitdiff
playlist resource_id is now element.pk and NOT element.public_id anymore
authoryomguy <yomguy@parisson.com>
Wed, 11 May 2011 10:59:20 +0000 (12:59 +0200)
committeryomguy <yomguy@parisson.com>
Wed, 11 May 2011 10:59:20 +0000 (12:59 +0200)
telemeta/templates/telemeta_default/collection_add.html
telemeta/templates/telemeta_default/collection_detail.html
telemeta/templates/telemeta_default/collection_edit.html
telemeta/web/base.py

index d83fcb84ec61ff04860250c586d4fb20d16c6a62..b4f4d1442c456b85e41e0b305a5efa0ad9551d66 100644 (file)
@@ -2,12 +2,14 @@
 {% load i18n %}
 {% load telemeta_utils %}
 
+{% block title %}
+    <h1><img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection : NEW</h1>
+{% endblock %}
 
 {% block title_buttons %}
      <a href="{% url telemeta-collections %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
 {% endblock %}
 
-
 {% block infos %}
         <div class="infos">
         <form method="POST" id ="_addCollectionForm" action="">{% csrf_token %}
index 7a086ec0fdac9896a65750f9c4774a663303c43b..6896af6b91978faf99b1d3ebf2867838fd27b755 100644 (file)
@@ -34,7 +34,7 @@
 {% if collection %}
 
 {% block title %}
-    <h1><img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection: {{ collection }}</h1>
+    <h1><img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection : {{ collection }}</h1>
 {% endblock %}
 
 {% block title_buttons %}
index 4548d7f31a9a379786a74cd62558b06a3a7df946..654e06f99a09be308c615f56b4eb8111b6b0fe9e 100644 (file)
@@ -3,7 +3,7 @@
 {% load telemeta_utils %}
 
 {% block title %}
-    <h1><img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection: {{ collection }}</h1>
+    <h1><img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection : {{ collection }}</h1>
 {% endblock %}
 {% block title_buttons %}
     <a href="{% url telemeta-collection-detail collection.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
index bafa501e4fec481cf8c486c547407ca219d67289..db9e568f006064f65256b8aba65a5040d76348cc 100644 (file)
@@ -949,11 +949,11 @@ class WebView(object):
                 for resource in playlist_resources:
                     try:
                         if resource.resource_type == 'item':
-                            element = MediaItem.objects.get(public_id=resource.resource_id)
+                            element = MediaItem.objects.get(pk=resource.resource_id)
                         if resource.resource_type == 'collection':
-                            element = MediaCollection.objects.get(public_id=resource.resource_id)
+                            element = MediaCollection.objects.get(pk=resource.resource_id)
                         if resource.resource_type == 'marker':
-                            element = MediaItemMarker.objects.get(public_id=resource.resource_id)
+                            element = MediaItemMarker.objects.get(pk=resource.resource_id)
                     except:
                         element = None
                     resources.append({'element': element, 'type': resource.resource_type, 'public_id': resource.public_id })
@@ -1000,17 +1000,17 @@ class WebView(object):
         for resource in resources:
             if resource_type == 'items':
                 if resource.resource_type == 'collection':
-                    collection = MediaCollection.objects.get(code=resource.resource_id)
+                    collection = MediaCollection.objects.get(pk=resource.resource_id)
                     collection_items = MediaItem.objects.filter(collection=collection)
                     for item in collection_items:
                         elements.append(item)
                 elif resource.resource_type == 'item':
-                    item = MediaItem.objects.get(code=resource.resource_id)
+                    item = MediaItem.objects.get(pk=resource.resource_id)
                     elements.append(item)
                 
             elif resource_type == 'collections':
                 if resource.resource_type == 'collection':
-                    collection = MediaCollection.objects.get(code=resource.resource_id)
+                    collection = MediaCollection.objects.get(pk=resource.resource_id)
                     elements.append(collection)
                 
         if elements: