From: Guillaume Pellerin Date: Thu, 26 Dec 2013 14:46:16 +0000 (+0100) Subject: Merge branch 'dev2' into dev X-Git-Tag: 1.4.5~2^2~4 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=b99b3510005a6770713d9a87d86fd7cc5687b763;p=telemeta.git Merge branch 'dev2' into dev --- b99b3510005a6770713d9a87d86fd7cc5687b763 diff --cc telemeta/locale/de/LC_MESSAGES/django.po index bebe1aaa,774226d0..c17a0354 --- a/telemeta/locale/de/LC_MESSAGES/django.po +++ b/telemeta/locale/de/LC_MESSAGES/django.po @@@ -1108,10 -1116,9 +1116,9 @@@ msgstr "erweiterte Suche msgid "Admin" msgstr "Verwaltung" -#: templates/telemeta/base.html:117 templates/telemeta/instrument_edit.html:4 +#: templates/telemeta/base.html:119 templates/telemeta/instrument_edit.html:4 #: templates/telemeta/instrument_edit.html:7 #: templates/telemeta/instrument_edit_value.html:5 - #: templates/telemeta/mediaitem_detail.html:195 msgid "Instruments" msgstr "Instrumente" @@@ -1131,9 -1138,8 +1138,8 @@@ msgstr " "Die Benutzung des Archivs erfolgt mit Respekt vor dem kulturellen Erbe der " "Ursprungsgesellschaften." -#: templates/telemeta/base.html:165 +#: templates/telemeta/base.html:167 #: templates/telemeta/collection_detail.html:124 - #: templates/telemeta/mediaitem_detail.html:245 msgid "Legal notices" msgstr "juristische Hinweise" @@@ -1143,15 -1149,14 +1149,15 @@@ #: templates/telemeta/collection_edit.html:35 #: templates/telemeta/collection_related_edit.html:12 #: templates/telemeta/collection_related_edit.html:41 -#: templates/telemeta/enumeration_edit_value.html:19 +#: templates/telemeta/enumeration_edit_value.html:18 +#: templates/telemeta/enumeration_edit_value.html:40 #: templates/telemeta/instrument_edit_value.html:19 #: templates/telemeta/mediaitem_add.html:14 - #: templates/telemeta/mediaitem_add.html:43 + #: templates/telemeta/mediaitem_add.html:49 #: templates/telemeta/mediaitem_copy.html:16 - #: templates/telemeta/mediaitem_copy.html:51 + #: templates/telemeta/mediaitem_copy.html:57 #: templates/telemeta/mediaitem_edit.html:11 - #: templates/telemeta/mediaitem_edit.html:63 + #: templates/telemeta/mediaitem_edit.html:69 #: templates/telemeta/mediaitem_keywords_edit.html:12 #: templates/telemeta/mediaitem_keywords_edit.html:40 #: templates/telemeta/mediaitem_performances_edit.html:12 @@@ -1175,14 -1180,14 +1181,14 @@@ msgstr "abbrechen #: templates/telemeta/collection_edit.html:37 #: templates/telemeta/collection_related_edit.html:14 #: templates/telemeta/collection_related_edit.html:43 -#: templates/telemeta/enumeration_edit_value.html:17 +#: templates/telemeta/enumeration_edit_value.html:16 #: templates/telemeta/instrument_edit_value.html:17 #: templates/telemeta/mediaitem_add.html:16 - #: templates/telemeta/mediaitem_add.html:46 + #: templates/telemeta/mediaitem_add.html:52 #: templates/telemeta/mediaitem_copy.html:18 - #: templates/telemeta/mediaitem_copy.html:52 + #: templates/telemeta/mediaitem_copy.html:58 #: templates/telemeta/mediaitem_edit.html:13 - #: templates/telemeta/mediaitem_edit.html:65 + #: templates/telemeta/mediaitem_edit.html:71 #: templates/telemeta/mediaitem_keywords_edit.html:13 #: templates/telemeta/mediaitem_keywords_edit.html:41 #: templates/telemeta/mediaitem_performances_edit.html:13 diff --cc telemeta/locale/fr/LC_MESSAGES/django.po index c2aea8a4,f498e9e9..04b4ab21 --- a/telemeta/locale/fr/LC_MESSAGES/django.po +++ b/telemeta/locale/fr/LC_MESSAGES/django.po @@@ -1103,10 -1108,9 +1108,9 @@@ msgstr "Recherche avancée msgid "Admin" msgstr "Admin" -#: templates/telemeta/base.html:117 templates/telemeta/instrument_edit.html:4 +#: templates/telemeta/base.html:119 templates/telemeta/instrument_edit.html:4 #: templates/telemeta/instrument_edit.html:7 #: templates/telemeta/instrument_edit_value.html:5 - #: templates/telemeta/mediaitem_detail.html:195 msgid "Instruments" msgstr "Instruments" @@@ -1126,9 -1130,8 +1130,8 @@@ msgstr " "Usage des archives réservé dans le respect du patrimoine culturel des " "communautés d'origine." -#: templates/telemeta/base.html:165 +#: templates/telemeta/base.html:167 #: templates/telemeta/collection_detail.html:124 - #: templates/telemeta/mediaitem_detail.html:245 msgid "Legal notices" msgstr "Mentions légales" @@@ -1138,15 -1141,14 +1141,15 @@@ #: templates/telemeta/collection_edit.html:35 #: templates/telemeta/collection_related_edit.html:12 #: templates/telemeta/collection_related_edit.html:41 -#: templates/telemeta/enumeration_edit_value.html:19 +#: templates/telemeta/enumeration_edit_value.html:18 +#: templates/telemeta/enumeration_edit_value.html:40 #: templates/telemeta/instrument_edit_value.html:19 #: templates/telemeta/mediaitem_add.html:14 - #: templates/telemeta/mediaitem_add.html:43 + #: templates/telemeta/mediaitem_add.html:49 #: templates/telemeta/mediaitem_copy.html:16 - #: templates/telemeta/mediaitem_copy.html:51 + #: templates/telemeta/mediaitem_copy.html:57 #: templates/telemeta/mediaitem_edit.html:11 - #: templates/telemeta/mediaitem_edit.html:63 + #: templates/telemeta/mediaitem_edit.html:69 #: templates/telemeta/mediaitem_keywords_edit.html:12 #: templates/telemeta/mediaitem_keywords_edit.html:40 #: templates/telemeta/mediaitem_performances_edit.html:12 @@@ -1170,14 -1172,14 +1173,14 @@@ msgstr "Annuler #: templates/telemeta/collection_edit.html:37 #: templates/telemeta/collection_related_edit.html:14 #: templates/telemeta/collection_related_edit.html:43 -#: templates/telemeta/enumeration_edit_value.html:17 +#: templates/telemeta/enumeration_edit_value.html:16 #: templates/telemeta/instrument_edit_value.html:17 #: templates/telemeta/mediaitem_add.html:16 - #: templates/telemeta/mediaitem_add.html:46 + #: templates/telemeta/mediaitem_add.html:52 #: templates/telemeta/mediaitem_copy.html:18 - #: templates/telemeta/mediaitem_copy.html:52 + #: templates/telemeta/mediaitem_copy.html:58 #: templates/telemeta/mediaitem_edit.html:13 - #: templates/telemeta/mediaitem_edit.html:65 + #: templates/telemeta/mediaitem_edit.html:71 #: templates/telemeta/mediaitem_keywords_edit.html:13 #: templates/telemeta/mediaitem_keywords_edit.html:41 #: templates/telemeta/mediaitem_performances_edit.html:13 diff --cc telemeta/views/core.py index 2db1b785,150f4463..97cec189 --- a/telemeta/views/core.py +++ b/telemeta/views/core.py @@@ -227,15 -251,3 +253,15 @@@ def auto_code(resources, base_code) index += 1 return code + +def get_room(content_type=None, id=None, name=None): + rooms = jqchat.models.Room.objects.filter(content_type=content_type, + object_id=id) + if not rooms: + room = jqchat.models.Room.objects.create(content_type=content_type, + object_id=id, + name=name[:20]) + else: + room = rooms[0] + return room - ++ diff --cc telemeta/views/item.py index 1f02aa76,38239778..766955d1 --- a/telemeta/views/item.py +++ b/telemeta/views/item.py @@@ -118,10 -119,15 +120,12 @@@ class ItemView(object) if request.REQUEST.has_key('grapher_id'): grapher_id = request.REQUEST['grapher_id'] else: - try: - grapher_id = settings.TELEMETA_DEFAULT_GRAPHER_ID - except: - grapher_id = 'waveform' + grapher_id = getattr(settings, 'TELEMETA_DEFAULT_GRAPHER_ID', 'waveform') previous, next = self.item_previous_next(item) + mime_type = self.item_analyze(item) + #FIXME: use mimetypes.guess_type if 'quicktime' in mime_type: mime_type = 'video/mp4'