Bugfixes in search page + update settings metadataplayer
authorverrierj
Tue, 31 Jan 2012 14:38:21 +0100
changeset 488 403f92f24144
parent 487 bf64db9fc5da
child 490 501c00591739
child 491 b0da8cecb6b3
Bugfixes in search page + update settings metadataplayer
src/ldt/ldt/ldt_utils/templates/front/front_search_results.html
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html
src/ldt/ldt/ldt_utils/utils.py
src/ldt/ldt/ldt_utils/views/workspace.py
--- a/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html	Tue Jan 31 12:46:00 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_search_results.html	Tue Jan 31 14:38:21 2012 +0100
@@ -99,8 +99,10 @@
                             <h4><a class="pink under b" href="{% url ldt.ldt_utils.views.front.annot_content segment.iri_id segment.project_id segment.cutting_id %}#id={{segment.element_id}}" title="{% trans 'view this annotation in the player' %}">
                             {% if segment.title %}{{ segment.title }}{% else %}{% trans "No title" %}{% endif %}</a></h4>
                             <p class="bigmargin">{{ segment.abstract }}</p>
-                            <h5>Tags:</h5>
-                            <p class="result_taglist b fl">{{ segment.tags }}</p>
+                            {% if segment.tags %}
+                            	<h5>Tags:</h5>
+                            	<p class="result_taglist b fl">{{ segment.tags }}</p>
+                            {% endif %}
                         </div>
                     </li>
                 {% endfor %}
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html	Tue Jan 31 12:46:00 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/embed_player.html	Tue Jan 31 14:38:21 2012 +0100
@@ -15,7 +15,7 @@
   IriSP.widgetsDefaults["createAnnotationWidget"].cinecast_version = false;
   
   IriSP.widgetsDefaults["AnnotationsListWidget"] = {};
-  IriSP.widgetsDefaults["AnnotationsListWidget"].project_url = "{{WEB_URL}}{% url segment_api iri_id='{content}' begin='{begin}' end='{end}' %}";
+  IriSP.widgetsDefaults["AnnotationsListWidget"].platform_url = "{{WEB_URL}}{% url segment_api iri_id='{content}' begin='{begin}' end='{end}' %}";
   
   IriSP.platform_url = "{{WEB_URL}}{{BASE_URL}}"; 
   
--- a/src/ldt/ldt/ldt_utils/utils.py	Tue Jan 31 12:46:00 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/utils.py	Tue Jan 31 14:38:21 2012 +0100
@@ -241,11 +241,11 @@
                     content_display = lxml.etree.SubElement(path_view[0], 'content')
                     content_display.set('id', media)
                     content_display = [content_display]
-                # We add the decoupage node to the content node
-                dec = lxml.etree.SubElement(content_display[0], 'decoupage')
-                dec.set('idens', ensemble_id)
-                dec.set('id', cutting_id)
-                dec.set('tagsSelect', '')
+                    # We add the decoupage node to the content node
+                    dec = lxml.etree.SubElement(content_display[0], 'decoupage')
+                    dec.set('idens', ensemble_id)
+                    dec.set('id', cutting_id)
+                    dec.set('tagsSelect', '')
         
         # We add the annotation/element node
         element = lxml.etree.SubElement(decoupage_elements[0], 'element')
--- a/src/ldt/ldt/ldt_utils/views/workspace.py	Tue Jan 31 12:46:00 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/workspace.py	Tue Jan 31 14:38:21 2012 +0100
@@ -193,7 +193,7 @@
                     segment.context_tags = s['tags']
                                         
                     if not s['project_id']:
-                        s['project_id'] = '_'
+                        segment.project_id = '_'
                         valid_segments.append(segment)
                     elif s['project_id'] in viewable_projects_id:
                         valid_segments.append(segment)