# HG changeset patch # User hamidouk # Date 1326814240 -3600 # Node ID b7662f1c13daaddafdd6b191e50525baf494dc3c # Parent 3c34dc8347818b6f82e0afe51832efad13e1d326# Parent c0c4cd87daf2615edf7052d1fdb7a3f955575df8 Merge with upstream diff -r 3c34dc834781 -r b7662f1c13da src/ldt/ldt/ldt_utils/forms.py --- a/src/ldt/ldt/ldt_utils/forms.py Tue Jan 17 16:30:06 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/forms.py Tue Jan 17 16:30:40 2012 +0100 @@ -51,7 +51,7 @@ media_input_type = forms.ChoiceField(required=False, label=_("content.media_input_type"), choices=(("upload", _("file_upload")), ("url", _("url")), ("link", _("existing_media")), ("create", _("create_media")), ("none", _("none_media")))) groups = forms.ModelMultipleChoiceField(Group.objects.all(), required=False) is_public = forms.BooleanField(required=False) - front_project = forms.ModelChoiceField(queryset=Project.objects.all(), required=False, label=_("content.front_project")) + front_project = forms.ModelChoiceField(queryset=Project.objects.none(), required=False, label=_("content.front_project")) def clean_iri_id(self): data = self.cleaned_data.get('iri_id') diff -r 3c34dc834781 -r b7662f1c13da src/ldt/ldt/ldt_utils/projectserializer.py --- a/src/ldt/ldt/ldt_utils/projectserializer.py Tue Jan 17 16:30:06 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/projectserializer.py Tue Jan 17 16:30:40 2012 +0100 @@ -16,7 +16,7 @@ """ class ProjectSerializer: - def __init__(self, project, from_contents=True, from_display=True, first_cutting=None, viewable_contents=[]): + def __init__(self, project, from_contents=True, from_display=True, first_cutting=None, viewable_contents=[], only_one_cutting=False): self.project = project self.parsed = False self.ldt_doc = None @@ -35,6 +35,7 @@ self.display_ensemble_list = [] self.viewable_contents = viewable_contents self.first_cutting = first_cutting + self.only_one_cutting = only_one_cutting def __parse_views(self, display_node_list): @@ -80,6 +81,9 @@ if index >= 0: annotation_types[0], annotation_types[index] = annotation_types[index], annotation_types[0] + if self.only_one_cutting: + new_display['annotation_types'] = [new_display['annotation_types'][0]] + self.views_dict[display_id] = new_display diff -r 3c34dc834781 -r b7662f1c13da src/ldt/ldt/ldt_utils/templates/front/front_group.html --- a/src/ldt/ldt/ldt_utils/templates/front/front_group.html Tue Jan 17 16:30:06 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/templates/front/front_group.html Tue Jan 17 16:30:40 2012 +0100 @@ -20,7 +20,7 @@ {% for content in content_list %}
{% trans 'by' %} IRI | {{content.duration|str_duration:"h"}}