]> git.parisson.com Git - telemeta.git/commitdiff
fix resource permissions, add translations, add user revisions
authoryomguy <yomguy@parisson.com>
Wed, 1 Feb 2012 13:43:03 +0000 (14:43 +0100)
committeryomguy <yomguy@parisson.com>
Wed, 1 Feb 2012 13:43:03 +0000 (14:43 +0100)
17 files changed:
telemeta/htdocs/css/telemeta.css
telemeta/locale/de/LC_MESSAGES/django.mo
telemeta/locale/de/LC_MESSAGES/django.po
telemeta/locale/de/LC_MESSAGES/djangojs.mo
telemeta/locale/de/LC_MESSAGES/djangojs.po
telemeta/locale/fr/LC_MESSAGES/django.mo
telemeta/locale/fr/LC_MESSAGES/django.po
telemeta/locale/fr/LC_MESSAGES/djangojs.mo
telemeta/locale/fr/LC_MESSAGES/djangojs.po
telemeta/models/media.py
telemeta/templates/telemeta/home.html
telemeta/templates/telemeta/inc/module_revisions.html
telemeta/templates/telemeta/index.html [deleted file]
telemeta/templates/telemeta/lists.html [new file with mode: 0644]
telemeta/templates/telemeta/resource_detail.html
telemeta/urls.py
telemeta/views/base.py

index bb72d138e6c0167cf5c3cb982f1c7992a2738ef1..be1983b926e46064188c10ceb5c9efc7f5e904bb 100644 (file)
@@ -203,7 +203,7 @@ a img { border: none; }
 }
 
 .vscroll {
-    max-height: 500px;
+    max-height: 300px;
     overflow-y: scroll;
     width: 100%;
 }
index a6d2db0ecc13949aae54d308c233a2217fe739dd..f633ac86dc1d10e06ef388157113237ad14b114e 100644 (file)
Binary files a/telemeta/locale/de/LC_MESSAGES/django.mo and b/telemeta/locale/de/LC_MESSAGES/django.mo differ
index 1d2d29ef060a6f98890ededd7b74861eeb555b74..09734e42e9d5a148f385e163962ac2786b8e1673 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-02-01 13:22+0100\n"
+"POT-Creation-Date: 2012-02-01 14:33+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -586,7 +586,7 @@ msgid "Enumerations"
 msgstr ""
 
 #: templates/telemeta/admin_enumerations.html:14
-#: templates/telemeta/home.html:46 templates/telemeta/mediaitem_add.html:33
+#: templates/telemeta/lists.html:56 templates/telemeta/mediaitem_add.html:33
 #: templates/telemeta/mediaitem_copy.html:34
 #: templates/telemeta/mediaitem_detail_video.html:295
 #: templates/telemeta/mediaitem_edit.html:26
@@ -656,7 +656,7 @@ msgid "Items"
 msgstr ""
 
 #: templates/telemeta/base.html:86 templates/telemeta/base.html.py:117
-#: templates/telemeta/index.html:25
+#: templates/telemeta/home.html:25
 msgid "Geo Navigator"
 msgstr ""
 
@@ -672,7 +672,7 @@ msgstr ""
 msgid "Desk"
 msgstr ""
 
-#: templates/telemeta/base.html:101 views/base.py:260
+#: templates/telemeta/base.html:101 views/base.py:264
 msgid "Lists"
 msgstr ""
 
@@ -763,7 +763,7 @@ msgid "Save"
 msgstr ""
 
 #: templates/telemeta/collection_detail.html:5
-#: templates/telemeta/collection_detail_dc.html:5 views/base.py:407
+#: templates/telemeta/collection_detail_dc.html:5 views/base.py:411
 msgid "Collection"
 msgstr ""
 
@@ -806,7 +806,7 @@ msgid "Listen to this collection"
 msgstr ""
 
 #: templates/telemeta/collection_detail.html:95
-#: templates/telemeta/home.html:50
+#: templates/telemeta/lists.html:60
 #: templates/telemeta/inc/collection_list.html:17
 msgid "Recording period"
 msgstr ""
@@ -818,7 +818,7 @@ msgid "Geographic and cultural informations"
 msgstr ""
 
 #: templates/telemeta/collection_detail.html:122
-#: templates/telemeta/home.html:49
+#: templates/telemeta/lists.html:59
 #: templates/telemeta/inc/collection_list.html:16
 #: templates/telemeta/inc/mediaitem_list.html:16
 msgid "Recordist"
@@ -866,7 +866,7 @@ msgid "Number of items"
 msgstr ""
 
 #: templates/telemeta/collection_detail.html:207
-#: templates/telemeta/home.html:35
+#: templates/telemeta/lists.html:45
 #: templates/telemeta/mediaitem_detail.html:293
 #: templates/telemeta/mediaitem_detail_video.html:363
 #: templates/telemeta/resource_detail.html:69
@@ -911,8 +911,8 @@ msgid "Sounds"
 msgstr ""
 
 #: templates/telemeta/collection_list.html:17
-#: templates/telemeta/enumeration_edit.html:23 templates/telemeta/home.html:27
-#: templates/telemeta/instrument_edit.html:22
+#: templates/telemeta/enumeration_edit.html:23
+#: templates/telemeta/instrument_edit.html:22 templates/telemeta/lists.html:37
 #: templates/telemeta/mediaitem_list.html:15
 #: templates/telemeta/resource_list.html:13
 msgid "Add"
@@ -1011,16 +1011,34 @@ msgid_plural "%(counter)s items "
 msgstr[0] ""
 msgstr[1] ""
 
-#: templates/telemeta/home.html:25 templates/telemeta/profile_detail.html:16
+#: templates/telemeta/home.html:14 templates/telemeta/home.html.py:57
+msgid "Musical selection"
+msgstr ""
+
+#: templates/telemeta/home.html:27
+msgid "Open the geographic navigator"
+msgstr ""
+
+#: templates/telemeta/instrument_edit.html:16
+#: templates/telemeta/instrument_edit.html:30
+#: templates/telemeta/instrument_edit_value.html:11
+msgid "Name"
+msgstr ""
+
+#: templates/telemeta/instrument_edit.html:48
+msgid "This instrument list is empty"
+msgstr ""
+
+#: templates/telemeta/lists.html:35 templates/telemeta/profile_detail.html:16
 msgid "Playlists"
 msgstr ""
 
-#: templates/telemeta/home.html:47
+#: templates/telemeta/lists.html:57
 #: templates/telemeta/inc/module_revisions.html:14
 msgid "Type"
 msgstr ""
 
-#: templates/telemeta/home.html:48 templates/telemeta/mediaitem_add.html:34
+#: templates/telemeta/lists.html:58 templates/telemeta/mediaitem_add.html:34
 #: templates/telemeta/mediaitem_copy.html:35
 #: templates/telemeta/mediaitem_edit.html:27
 #: templates/telemeta/inc/children_list.html:17
@@ -1030,40 +1048,23 @@ msgstr ""
 msgid "Code"
 msgstr ""
 
-#: templates/telemeta/home.html:51 templates/telemeta/search_criteria.html:130
+#: templates/telemeta/lists.html:61
+#: templates/telemeta/search_criteria.html:130
 #: templates/telemeta/search_results.html:57
 #: templates/telemeta/inc/collection_list.html:18
 #: templates/telemeta/inc/mediaitem_list.html:23
 msgid "Sound"
 msgstr ""
 
-#: templates/telemeta/home.html:52
+#: templates/telemeta/lists.html:62
 msgid "Action"
 msgstr ""
 
-#: templates/telemeta/home.html:66
-#: templates/telemeta/inc/module_revisions.html:33
+#: templates/telemeta/lists.html:76
+#: templates/telemeta/inc/module_revisions.html:36
 msgid "deleted"
 msgstr ""
 
-#: templates/telemeta/index.html:14 templates/telemeta/index.html.py:57
-msgid "Musical selection"
-msgstr ""
-
-#: templates/telemeta/index.html:27
-msgid "Open the geographic navigator"
-msgstr ""
-
-#: templates/telemeta/instrument_edit.html:16
-#: templates/telemeta/instrument_edit.html:30
-#: templates/telemeta/instrument_edit_value.html:11
-msgid "Name"
-msgstr ""
-
-#: templates/telemeta/instrument_edit.html:48
-msgid "This instrument list is empty"
-msgstr ""
-
 #: templates/telemeta/login.html:5
 msgid "User authentication"
 msgstr ""
@@ -1079,7 +1080,7 @@ msgstr ""
 #: templates/telemeta/mediaitem_add.html:5
 #: templates/telemeta/mediaitem_copy.html:5
 #: templates/telemeta/mediaitem_detail.html:5
-#: templates/telemeta/mediaitem_detail_video.html:5 views/base.py:569
+#: templates/telemeta/mediaitem_detail_video.html:5 views/base.py:573
 msgid "Item"
 msgstr ""
 
@@ -1223,7 +1224,7 @@ msgstr ""
 msgid "User Profile"
 msgstr ""
 
-#: templates/telemeta/profile_detail.html:8 views/base.py:1337
+#: templates/telemeta/profile_detail.html:8 views/base.py:1341
 msgid "User profile"
 msgstr ""
 
@@ -1281,6 +1282,7 @@ msgstr ""
 msgid "New"
 msgstr ""
 
+#: templates/telemeta/resource_detail.html:75
 #: templates/telemeta/resource_detail_dc.html:16
 msgid "No such resource"
 msgstr ""
@@ -1365,7 +1367,7 @@ msgstr ""
 msgid "No item"
 msgstr ""
 
-#: templates/telemeta/inc/module_revisions.html:7 views/base.py:1367
+#: templates/telemeta/inc/module_revisions.html:7 views/base.py:1371
 msgid "Last changes"
 msgstr ""
 
@@ -1559,13 +1561,13 @@ msgid_plural "%(count)d collections"
 msgstr[0] ""
 msgstr[1] ""
 
-#: views/base.py:259 views/base.py:406 views/base.py:568 views/base.py:862
-#: views/base.py:1336
+#: views/base.py:263 views/base.py:410 views/base.py:572 views/base.py:866
+#: views/base.py:1340
 msgid "Access not allowed"
 msgstr ""
 
-#: views/base.py:261 views/base.py:408 views/base.py:570 views/base.py:864
-#: views/base.py:1338
+#: views/base.py:265 views/base.py:412 views/base.py:574 views/base.py:868
+#: views/base.py:1342
 msgid ""
 "Please login or contact the website administator to get a private access."
 msgstr ""
index a6d2db0ecc13949aae54d308c233a2217fe739dd..f633ac86dc1d10e06ef388157113237ad14b114e 100644 (file)
Binary files a/telemeta/locale/de/LC_MESSAGES/djangojs.mo and b/telemeta/locale/de/LC_MESSAGES/djangojs.mo differ
index 6230063bd5f5ffaa4ebd89c508eda45ad7c2cce3..f350b32d81e31faa54781e824eaf55c168d96d98 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-02-01 13:22+0100\n"
+"POT-Creation-Date: 2012-02-01 14:33+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index d29389040896b431fa25baf11aab35d38fc123d1..a12c828ff09637b145337a01968445729da8775e 100644 (file)
Binary files a/telemeta/locale/fr/LC_MESSAGES/django.mo and b/telemeta/locale/fr/LC_MESSAGES/django.mo differ
index 4235163a4b2c0391fb1df3987cce7021b635874b..f85f869589b3015083b00dfd76ad0d006504eead 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-02-01 13:22+0100\n"
+"POT-Creation-Date: 2012-02-01 14:33+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: Olivier Guilyardi <olivier samalyse com>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -588,7 +588,7 @@ msgid "Enumerations"
 msgstr "Énumérations"
 
 #: templates/telemeta/admin_enumerations.html:14
-#: templates/telemeta/home.html:46 templates/telemeta/mediaitem_add.html:33
+#: templates/telemeta/lists.html:56 templates/telemeta/mediaitem_add.html:33
 #: templates/telemeta/mediaitem_copy.html:34
 #: templates/telemeta/mediaitem_detail_video.html:295
 #: templates/telemeta/mediaitem_edit.html:26
@@ -606,8 +606,9 @@ msgid "Title"
 msgstr "Titre"
 
 #: templates/telemeta/admin_enumerations.html:24
+#, fuzzy
 msgid "No enumerations"
-msgstr "Pas d'énumérations"
+msgstr "Aucune énumération"
 
 #: templates/telemeta/admin_general.html:5 templates/telemeta/base.html:125
 msgid "General"
@@ -622,6 +623,7 @@ msgstr "Utilisateurs"
 
 #: templates/telemeta/admin_instruments.html:15
 #: templates/telemeta/admin_users.html:11 templates/telemeta/users.html:16
+#, fuzzy
 msgid "No users"
 msgstr "Pas d'utilisateurs"
 
@@ -658,7 +660,7 @@ msgid "Items"
 msgstr "Items"
 
 #: templates/telemeta/base.html:86 templates/telemeta/base.html.py:117
-#: templates/telemeta/index.html:25
+#: templates/telemeta/home.html:25
 msgid "Geo Navigator"
 msgstr "Géo-Navigateur"
 
@@ -674,7 +676,7 @@ msgstr "Admin"
 msgid "Desk"
 msgstr "Bureau"
 
-#: templates/telemeta/base.html:101 views/base.py:260
+#: templates/telemeta/base.html:101 views/base.py:264
 msgid "Lists"
 msgstr "Listes"
 
@@ -767,7 +769,7 @@ msgid "Save"
 msgstr "Enregistrer"
 
 #: templates/telemeta/collection_detail.html:5
-#: templates/telemeta/collection_detail_dc.html:5 views/base.py:407
+#: templates/telemeta/collection_detail_dc.html:5 views/base.py:411
 msgid "Collection"
 msgstr "Collection"
 
@@ -810,7 +812,7 @@ msgid "Listen to this collection"
 msgstr "Écouter la collection"
 
 #: templates/telemeta/collection_detail.html:95
-#: templates/telemeta/home.html:50
+#: templates/telemeta/lists.html:60
 #: templates/telemeta/inc/collection_list.html:17
 msgid "Recording period"
 msgstr "Période d'enregistrement"
@@ -822,7 +824,7 @@ msgid "Geographic and cultural informations"
 msgstr "Indications géographiques et culturelles"
 
 #: templates/telemeta/collection_detail.html:122
-#: templates/telemeta/home.html:49
+#: templates/telemeta/lists.html:59
 #: templates/telemeta/inc/collection_list.html:16
 #: templates/telemeta/inc/mediaitem_list.html:16
 msgid "Recordist"
@@ -870,7 +872,7 @@ msgid "Number of items"
 msgstr "Nombre d'items"
 
 #: templates/telemeta/collection_detail.html:207
-#: templates/telemeta/home.html:35
+#: templates/telemeta/lists.html:45
 #: templates/telemeta/mediaitem_detail.html:293
 #: templates/telemeta/mediaitem_detail_video.html:363
 #: templates/telemeta/resource_detail.html:69
@@ -885,7 +887,7 @@ msgstr "Vue normale"
 
 #: templates/telemeta/collection_detail_dc.html:22
 msgid "No such collection"
-msgstr "Collection introuvable"
+msgstr "Aucune collection de ce type"
 
 #: templates/telemeta/collection_list.html:5
 #: templates/telemeta/collection_list.html:8
@@ -915,8 +917,8 @@ msgid "Sounds"
 msgstr "Sonores"
 
 #: templates/telemeta/collection_list.html:17
-#: templates/telemeta/enumeration_edit.html:23 templates/telemeta/home.html:27
-#: templates/telemeta/instrument_edit.html:22
+#: templates/telemeta/enumeration_edit.html:23
+#: templates/telemeta/instrument_edit.html:22 templates/telemeta/lists.html:37
 #: templates/telemeta/mediaitem_list.html:15
 #: templates/telemeta/resource_list.html:13
 msgid "Add"
@@ -1015,16 +1017,34 @@ msgid_plural "%(counter)s items "
 msgstr[0] "1 item"
 msgstr[1] "%(counter)s items "
 
-#: templates/telemeta/home.html:25 templates/telemeta/profile_detail.html:16
+#: templates/telemeta/home.html:14 templates/telemeta/home.html.py:57
+msgid "Musical selection"
+msgstr "Sélection musicale"
+
+#: templates/telemeta/home.html:27
+msgid "Open the geographic navigator"
+msgstr "Accéder au navigateur géographique"
+
+#: templates/telemeta/instrument_edit.html:16
+#: templates/telemeta/instrument_edit.html:30
+#: templates/telemeta/instrument_edit_value.html:11
+msgid "Name"
+msgstr "Nom"
+
+#: templates/telemeta/instrument_edit.html:48
+msgid "This instrument list is empty"
+msgstr "Cette énumération est vide"
+
+#: templates/telemeta/lists.html:35 templates/telemeta/profile_detail.html:16
 msgid "Playlists"
 msgstr "Listes de lecture"
 
-#: templates/telemeta/home.html:47
+#: templates/telemeta/lists.html:57
 #: templates/telemeta/inc/module_revisions.html:14
 msgid "Type"
 msgstr ""
 
-#: templates/telemeta/home.html:48 templates/telemeta/mediaitem_add.html:34
+#: templates/telemeta/lists.html:58 templates/telemeta/mediaitem_add.html:34
 #: templates/telemeta/mediaitem_copy.html:35
 #: templates/telemeta/mediaitem_edit.html:27
 #: templates/telemeta/inc/children_list.html:17
@@ -1034,40 +1054,23 @@ msgstr ""
 msgid "Code"
 msgstr "Cote"
 
-#: templates/telemeta/home.html:51 templates/telemeta/search_criteria.html:130
+#: templates/telemeta/lists.html:61
+#: templates/telemeta/search_criteria.html:130
 #: templates/telemeta/search_results.html:57
 #: templates/telemeta/inc/collection_list.html:18
 #: templates/telemeta/inc/mediaitem_list.html:23
 msgid "Sound"
 msgstr "Sonore"
 
-#: templates/telemeta/home.html:52
+#: templates/telemeta/lists.html:62
 msgid "Action"
 msgstr "Action"
 
-#: templates/telemeta/home.html:66
-#: templates/telemeta/inc/module_revisions.html:33
+#: templates/telemeta/lists.html:76
+#: templates/telemeta/inc/module_revisions.html:36
 msgid "deleted"
 msgstr "supprimé"
 
-#: templates/telemeta/index.html:14 templates/telemeta/index.html.py:57
-msgid "Musical selection"
-msgstr "Sélection musicale"
-
-#: templates/telemeta/index.html:27
-msgid "Open the geographic navigator"
-msgstr "Accéder au navigateur géographique"
-
-#: templates/telemeta/instrument_edit.html:16
-#: templates/telemeta/instrument_edit.html:30
-#: templates/telemeta/instrument_edit_value.html:11
-msgid "Name"
-msgstr "Nom"
-
-#: templates/telemeta/instrument_edit.html:48
-msgid "This instrument list is empty"
-msgstr "Cette énumération est vide"
-
 #: templates/telemeta/login.html:5
 msgid "User authentication"
 msgstr "Identification"
@@ -1084,7 +1087,7 @@ msgstr "Mot de passe oublié"
 #: templates/telemeta/mediaitem_add.html:5
 #: templates/telemeta/mediaitem_copy.html:5
 #: templates/telemeta/mediaitem_detail.html:5
-#: templates/telemeta/mediaitem_detail_video.html:5 views/base.py:569
+#: templates/telemeta/mediaitem_detail_video.html:5 views/base.py:573
 msgid "Item"
 msgstr "Item"
 
@@ -1228,7 +1231,7 @@ msgstr "Formation"
 msgid "User Profile"
 msgstr "Profil utilisateur"
 
-#: templates/telemeta/profile_detail.html:8 views/base.py:1337
+#: templates/telemeta/profile_detail.html:8 views/base.py:1341
 msgid "User profile"
 msgstr "Profil utilisateur"
 
@@ -1284,8 +1287,9 @@ msgstr ""
 
 #: templates/telemeta/resource_add.html:6
 msgid "New"
-msgstr ""
+msgstr "Nouveau"
 
+#: templates/telemeta/resource_detail.html:75
 #: templates/telemeta/resource_detail_dc.html:16
 msgid "No such resource"
 msgstr "Aucune ressource de ce type"
@@ -1335,7 +1339,6 @@ msgid "Reference"
 msgstr "Référence"
 
 #: templates/telemeta/inc/children_list.html:34
-#, fuzzy
 msgid "No resources"
 msgstr "Aucune ressource"
 
@@ -1371,7 +1374,7 @@ msgstr "Etat/Continent"
 msgid "No item"
 msgstr "Aucun item"
 
-#: templates/telemeta/inc/module_revisions.html:7 views/base.py:1367
+#: templates/telemeta/inc/module_revisions.html:7 views/base.py:1371
 msgid "Last changes"
 msgstr "Dernières modifications"
 
@@ -1572,13 +1575,13 @@ msgid_plural "%(count)d collections"
 msgstr[0] "%(count)d collection"
 msgstr[1] "%(count)d collections"
 
-#: views/base.py:259 views/base.py:406 views/base.py:568 views/base.py:862
-#: views/base.py:1336
+#: views/base.py:263 views/base.py:410 views/base.py:572 views/base.py:866
+#: views/base.py:1340
 msgid "Access not allowed"
 msgstr "Accès non autorisé"
 
-#: views/base.py:261 views/base.py:408 views/base.py:570 views/base.py:864
-#: views/base.py:1338
+#: views/base.py:265 views/base.py:412 views/base.py:574 views/base.py:868
+#: views/base.py:1342
 msgid ""
 "Please login or contact the website administator to get a private access."
 msgstr ""
index 6e023cdd3356c13d71a12c7b637e232013af9f81..c751f2af8fb108d60daaa4d28ffc6673f717bb40 100644 (file)
Binary files a/telemeta/locale/fr/LC_MESSAGES/djangojs.mo and b/telemeta/locale/fr/LC_MESSAGES/djangojs.mo differ
index a6c4333e4730fa28018ad734120ee9ee6197bf3e..b7048874a47ed79677929ed21d28475917ebaab0 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-02-01 13:22+0100\n"
+"POT-Creation-Date: 2012-02-01 14:33+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: Guillaume Pellerin <yomguy@parisson.com>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index a85f8b94e21581623157e35bb25da69f0f765ac4..940a53085d4b23f1c78576cdc30bae5a229208e3 100644 (file)
@@ -630,7 +630,7 @@ class MediaCorpus(MediaBaseResource):
     children_type = 'collections'
     icon = 'corpus.png'
 
-    children = models.ManyToManyField(MediaCollection, related_name="corpus", verbose_name=_('collections'))
+    children = models.ManyToManyField(MediaCollection, related_name="corpus", verbose_name=_('collections'),  blank=True, null=True)
     recorded_from_year    = IntegerField(_('recording year (from)'))
     recorded_to_year      = IntegerField(_('recording year (until)'))
 
@@ -651,7 +651,7 @@ class MediaFonds(MediaBaseResource):
     children_type = 'corpus'
     icon = 'fonds.png'
 
-    children = models.ManyToManyField(MediaCorpus, related_name="fonds", verbose_name=_('corpus'))
+    children = models.ManyToManyField(MediaCorpus, related_name="fonds", verbose_name=_('corpus'), blank=True, null=True)
 
     @property
     def public_id(self):
index 8b2bf7b73ec60b0756df6acfa2a83db015b1871c..7e45ed613abdc7631ea86bda9e7b8ab7b45170b3 100644 (file)
@@ -2,95 +2,68 @@
 {% load telemeta_utils %}
 {% load i18n %}
 
-{% block extra_javascript %}
-<script src="{% url telemeta-js "popupdiv-min.js" %}" type="text/javascript"></script>
-<script src="{% url telemeta-js "playlist.js" %}" type="text/javascript"></script>
-<script>
-    jQuery(window).ready(function(){
-        var p = playlistUtils;
-        var a = jQuery('#_new_playlist'); 
-        a.unbind('click').click(function(){p.showAdd(a);return false;});
-    });
-   
-</script>
+{% block content %}
+<div class="home-content">
+<div id="module-set">
+
+{% block modules %}
+
+{% if sound_pub_item %}
+<div id="module" class="module">
+    <h3><img src="{% url telemeta-images "module_playlist.png" %}" alt="playlist" style="vertical-align:middle" />
+    {% trans "Musical selection" %}</h3>
+    <ul class="playlist">
+    <li><a href="{% url telemeta-item-detail sound_pub_item.public_id %}"><b>{{ sound_pub_item }}</b></a>{% if sound_pub_item.alt_title %} ({{ sound_pub_item.alt_title }}){% endif %}<br /><span style="font-size: 90%">{{ sound_pub_item.location.fullnames|to_string }}</span><br />
+<iframe width='376' height='215' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='/archives/items/{{ sound_pub_item.public_id }}/player/362x130/'></iframe>
+    </li>
+    </ul>
+</div>
+{% endif %}
+
+<div class="module">
+    <h3><img src="{% url telemeta-images "module_world.png" %}" alt="world" style="vertical-align:middle" />
+    {% trans "Geo Navigator" %}</h3>
+    <a class="image-link" href="{% url telemeta-geo-continents %}">
+    <img class="map-thumbnail" src="{% url telemeta-images "world2.png" %}" alt="{% trans "Open the geographic navigator" %}" style="width:398px" /></a>
+</div>
+
+{% include "telemeta/inc/module_revisions.html" %}
+
+{{ block.super }}
+<div id="module" class="module">
+    <h3><img src="/images/module_playlist.png" style="vertical-align:middle" />
+    Partenaires</h3><br />
+    <div style="background-color: white; padding: 1ex;" align="center">
+    <a href="http://www.cnrs.fr"><img class="image-link" src="{% url telemeta-images "logo-CNRS.png" %}" alt="CNRS"></a>&nbsp;&nbsp;&nbsp;
+    <a href="http://www.culture.gouv.fr"><img class="image-link" src="{% url telemeta-images "logo_mcc_2.png" %}" alt="MCC"></a>&nbsp;&nbsp;
+    <a href="http://www.mnhn.fr"><img class="image-link" src="{% url telemeta-images "logo-mnhn.gif" %}" alt="MNHN"></a>
+    <br /><br />
+    <a href="http://www.tge-adonis.fr"><img class="image-link" src="{% url telemeta-images "logo-adonis.jpg" %}" alt="TGE Adonis"></a>
+    </div>
+</div>
+
 {% endblock %}
 
-{% block content %}
-<div id="module-set" style="width: 33%">
-    {% block modules %}
-    {% include "telemeta/inc/module_revisions.html" %}
-    {% endblock %}
 </div>
+
 <div class="home-description">
-    <h1><img src="{% url telemeta-images "playlist_title.png" %}" alt="playlists" style="vertical-align:middle" /> {% trans "Playlists" %}</h1>
-    <a href=# id="_new_playlist" style="float:right" class="component_icon button icon_add">
-        {% trans "Add" %}</a>
-    {% for playlist in playlists %}
-    <table class="listing" style="width:100%;margin-top: 3em">
-        <tr>
-            <td style="border-bottom:1px solid #6A0307;color:#6A0307;font-size: 100%">{{ playlist.playlist.title }}</td>
-            <td style="width:66ex; padding-right: 0; border-bottom:1px solid #6A0307; text-align:right">
-                <a href="{% url telemeta-playlist-csv-export playlist.playlist.public_id 'collections' %}" class="component_icon button icon_csv">CSV Collections</a>
-                <a href="{% url telemeta-playlist-csv-export playlist.playlist.public_id 'items' %}" class="component_icon button icon_csv">CSV Items</a>
-                <a href="#" id="{{playlist.playlist.public_id}}" onclick="playlistUtils.remove(this.id);return false;" class="component_icon button icon_cancel">{% trans "Delete" %}</a>
-            </td>
-        </tr>
-        {% if playlist.playlist.description %}
-         <tr>
-          <td colspan="2" style="border-bottom:1px solid #6A0307;color:#6A0307;font-size: 80%">{{ playlist.playlist.description }}</td>
-         </tr>
-        {% endif %}  
-    </table>
-    <table class="listing" width="100%">
-        <tr>
-            <th class="highlight">{% trans "Title" %}</th>
-            <th>{% trans "Type" %}</th>
-            <th>{% trans "Code" %}</th>
-            <th>{% trans "Recordist" %}</th>
-            <th>{% trans "Recording period" %}</th>
-            <th>{% trans "Sound" %}</th>
-            <th>{% trans "Action" %}</th>
-        </tr>
-        {% for resource in playlist.resources %}
-        <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-            <td>
-                {% if resource.type == "item" and not resource.element == None %}
-                <a href="{% url telemeta-item-detail resource.element.public_id %}">{{ resource.element }}</a>
-                {% endif %}
-                {% if resource.type == "collection" and not resource.element == None %}
-                <a href="{% url telemeta-collection-detail resource.element.public_id %}">{% if resource.element.title %}{{ resource.element.title }}{% else %}{{ resource.element }}{% endif %}</a>
-                {% endif %}
-                {% if resource.type == "marker" and not resource.element == None  %}
-                <a href="{% url telemeta-item-detail-marker resource.element.public_id %}">{{ resource.element }}</a>
-                {% endif %}
-                {% if resource.element == None %}{% trans "deleted" %}{% endif %}
-            </td>
-            <td>{{ resource.type }}</td>
-            <td>
-                {{ resource.element.public_id }}
-            </td>
-            <td>{{ resource.element.apparent_collector }}</td>
+<img class="align-left" src="{% url telemeta-images "vox.png" %}" alt="vox" style="vertical-align:middle;" />
+{{ page_content|render_flatpage }}
+</div>
 
-            <td>
-                {% if resource.element.recorded_from_date %}
-                {{ resource.element.recorded_from_date.year }}
-                {% if resource.element.recorded_to_date and not resource.element.recorded_to_date.year|equals:resource.element.recorded_from_date.year %}
-                - {{ resource.element.recorded_to_date.year }}
-                {% endif %}
-                {% endif %}
-            </td>
-            <td align="center" style="vertical-align:middle">
-                {% if resource.element.file or resource.element.has_mediafile %}
-                <img src="{% url telemeta-images "ok.png" %}" alt="yes" style="vertical-align:middle" /></a>
-                {% endif %}
-            </td>
-            <td style="vertical-align:middle">
-                <a href="#" onclick="playlistUtils.removeResource('{{resource.public_id}}');return false;" class="component_icon button icon_cancel" style="padding: 4px 12px;"></a>
-            </td>
-        </tr>
-        {% endfor %}
-    </table>
-    {% endfor %}
+{% if sound_pub_items %}
+<div style="margin-top: 1ex;">
+<h1><img src="{% url telemeta-images "playlist_title.png" %}" alt="playlists" style="vertical-align:middle" />
+    {% trans "Musical selection" %}</h1>
+<table style="font-size: 90%"><tr>
+{% for item in sound_pub_items %}
+<td width="390"><a href="{% url telemeta-item-detail item.public_id %}">{{ item }}</a>{% if item.alt_title %} ({{ item.alt_title }}){% endif %}<br /><span style="font-size: 80%">{{ item.location.fullnames|to_string }}</span><br />
+<iframe width='376' height='220' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='/archives/items/{{ item.public_id }}/player/362x130/'></iframe></td>
+{% endfor %}
+</tr>
+</table>
 </div>
-{% endblock %}
+{% endif %}
 
+</div>
+{% endblock %}
index 5df16154424442beba19e2aac3d11f825870276b..7d9983dbefe4d832096186ec4ebbc6e712f5e887 100644 (file)
@@ -19,6 +19,9 @@
         <td>{{ r.revision.time }}</td>
         <td>
         {% if r.element %}
+            {% if r.revision.element_type == "corpus" or r.revision.element_type == "fonds"%}
+            <a href="{% url telemeta-resource-detail r.revision.element_type r.element.public_id %}">{{ r.element.title }}</a>
+            {% endif %}
             {% if r.revision.element_type == "collection" %}
             <a href="{% url telemeta-collection-detail r.element.public_id %}">{{ r.element.title }}</a>
             {% endif %}
diff --git a/telemeta/templates/telemeta/index.html b/telemeta/templates/telemeta/index.html
deleted file mode 100644 (file)
index 7e45ed6..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% block content %}
-<div class="home-content">
-<div id="module-set">
-
-{% block modules %}
-
-{% if sound_pub_item %}
-<div id="module" class="module">
-    <h3><img src="{% url telemeta-images "module_playlist.png" %}" alt="playlist" style="vertical-align:middle" />
-    {% trans "Musical selection" %}</h3>
-    <ul class="playlist">
-    <li><a href="{% url telemeta-item-detail sound_pub_item.public_id %}"><b>{{ sound_pub_item }}</b></a>{% if sound_pub_item.alt_title %} ({{ sound_pub_item.alt_title }}){% endif %}<br /><span style="font-size: 90%">{{ sound_pub_item.location.fullnames|to_string }}</span><br />
-<iframe width='376' height='215' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='/archives/items/{{ sound_pub_item.public_id }}/player/362x130/'></iframe>
-    </li>
-    </ul>
-</div>
-{% endif %}
-
-<div class="module">
-    <h3><img src="{% url telemeta-images "module_world.png" %}" alt="world" style="vertical-align:middle" />
-    {% trans "Geo Navigator" %}</h3>
-    <a class="image-link" href="{% url telemeta-geo-continents %}">
-    <img class="map-thumbnail" src="{% url telemeta-images "world2.png" %}" alt="{% trans "Open the geographic navigator" %}" style="width:398px" /></a>
-</div>
-
-{% include "telemeta/inc/module_revisions.html" %}
-
-{{ block.super }}
-<div id="module" class="module">
-    <h3><img src="/images/module_playlist.png" style="vertical-align:middle" />
-    Partenaires</h3><br />
-    <div style="background-color: white; padding: 1ex;" align="center">
-    <a href="http://www.cnrs.fr"><img class="image-link" src="{% url telemeta-images "logo-CNRS.png" %}" alt="CNRS"></a>&nbsp;&nbsp;&nbsp;
-    <a href="http://www.culture.gouv.fr"><img class="image-link" src="{% url telemeta-images "logo_mcc_2.png" %}" alt="MCC"></a>&nbsp;&nbsp;
-    <a href="http://www.mnhn.fr"><img class="image-link" src="{% url telemeta-images "logo-mnhn.gif" %}" alt="MNHN"></a>
-    <br /><br />
-    <a href="http://www.tge-adonis.fr"><img class="image-link" src="{% url telemeta-images "logo-adonis.jpg" %}" alt="TGE Adonis"></a>
-    </div>
-</div>
-
-{% endblock %}
-
-</div>
-
-<div class="home-description">
-<img class="align-left" src="{% url telemeta-images "vox.png" %}" alt="vox" style="vertical-align:middle;" />
-{{ page_content|render_flatpage }}
-</div>
-
-{% if sound_pub_items %}
-<div style="margin-top: 1ex;">
-<h1><img src="{% url telemeta-images "playlist_title.png" %}" alt="playlists" style="vertical-align:middle" />
-    {% trans "Musical selection" %}</h1>
-<table style="font-size: 90%"><tr>
-{% for item in sound_pub_items %}
-<td width="390"><a href="{% url telemeta-item-detail item.public_id %}">{{ item }}</a>{% if item.alt_title %} ({{ item.alt_title }}){% endif %}<br /><span style="font-size: 80%">{{ item.location.fullnames|to_string }}</span><br />
-<iframe width='376' height='220' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='/archives/items/{{ item.public_id }}/player/362x130/'></iframe></td>
-{% endfor %}
-</tr>
-</table>
-</div>
-{% endif %}
-
-</div>
-{% endblock %}
diff --git a/telemeta/templates/telemeta/lists.html b/telemeta/templates/telemeta/lists.html
new file mode 100644 (file)
index 0000000..56224dc
--- /dev/null
@@ -0,0 +1,106 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block extra_javascript %}
+<script src="{% url telemeta-js "popupdiv-min.js" %}" type="text/javascript"></script>
+<script src="{% url telemeta-js "playlist.js" %}" type="text/javascript"></script>
+<script>
+    jQuery(window).ready(function(){
+        var p = playlistUtils;
+        var a = jQuery('#_new_playlist'); 
+        a.unbind('click').click(function(){p.showAdd(a);return false;});
+    });
+   
+</script>
+{% endblock %}
+
+{% block content %}
+<div id="module-set" style="width: 33%">
+    {% block module_user_revisions %}
+    {% with user_revisions as revisions %}
+    {% include "telemeta/inc/module_revisions.html" %}
+    {% endwith %}
+    {% endblock %}
+
+    {% block module_all_revisions %}
+    {% with revisions as revisions %}
+    {% include "telemeta/inc/module_revisions.html" %}
+    {% endwith %}
+    {% endblock %}
+    
+</div>
+
+<div class="home-description">
+    <h1><img src="{% url telemeta-images "playlist_title.png" %}" alt="playlists" style="vertical-align:middle" /> {% trans "Playlists" %}</h1>
+    <a href=# id="_new_playlist" style="float:right" class="component_icon button icon_add">
+        {% trans "Add" %}</a>
+    {% for playlist in playlists %}
+    <table class="listing" style="width:100%;margin-top: 3em">
+        <tr>
+            <td style="border-bottom:1px solid #6A0307;color:#6A0307;font-size: 100%">{{ playlist.playlist.title }}</td>
+            <td style="width:66ex; padding-right: 0; border-bottom:1px solid #6A0307; text-align:right">
+                <a href="{% url telemeta-playlist-csv-export playlist.playlist.public_id 'collections' %}" class="component_icon button icon_csv">CSV Collections</a>
+                <a href="{% url telemeta-playlist-csv-export playlist.playlist.public_id 'items' %}" class="component_icon button icon_csv">CSV Items</a>
+                <a href="#" id="{{playlist.playlist.public_id}}" onclick="playlistUtils.remove(this.id);return false;" class="component_icon button icon_cancel">{% trans "Delete" %}</a>
+            </td>
+        </tr>
+        {% if playlist.playlist.description %}
+         <tr>
+          <td colspan="2" style="border-bottom:1px solid #6A0307;color:#6A0307;font-size: 80%">{{ playlist.playlist.description }}</td>
+         </tr>
+        {% endif %}  
+    </table>
+    <table class="listing" width="100%">
+        <tr>
+            <th class="highlight">{% trans "Title" %}</th>
+            <th>{% trans "Type" %}</th>
+            <th>{% trans "Code" %}</th>
+            <th>{% trans "Recordist" %}</th>
+            <th>{% trans "Recording period" %}</th>
+            <th>{% trans "Sound" %}</th>
+            <th>{% trans "Action" %}</th>
+        </tr>
+        {% for resource in playlist.resources %}
+        <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+            <td>
+                {% if resource.type == "item" and not resource.element == None %}
+                <a href="{% url telemeta-item-detail resource.element.public_id %}">{{ resource.element }}</a>
+                {% endif %}
+                {% if resource.type == "collection" and not resource.element == None %}
+                <a href="{% url telemeta-collection-detail resource.element.public_id %}">{% if resource.element.title %}{{ resource.element.title }}{% else %}{{ resource.element }}{% endif %}</a>
+                {% endif %}
+                {% if resource.type == "marker" and not resource.element == None  %}
+                <a href="{% url telemeta-item-detail-marker resource.element.public_id %}">{{ resource.element }}</a>
+                {% endif %}
+                {% if resource.element == None %}{% trans "deleted" %}{% endif %}
+            </td>
+            <td>{{ resource.type }}</td>
+            <td>
+                {{ resource.element.public_id }}
+            </td>
+            <td>{{ resource.element.apparent_collector }}</td>
+
+            <td>
+                {% if resource.element.recorded_from_date %}
+                {{ resource.element.recorded_from_date.year }}
+                {% if resource.element.recorded_to_date and not resource.element.recorded_to_date.year|equals:resource.element.recorded_from_date.year %}
+                - {{ resource.element.recorded_to_date.year }}
+                {% endif %}
+                {% endif %}
+            </td>
+            <td align="center" style="vertical-align:middle">
+                {% if resource.element.file or resource.element.has_mediafile %}
+                <img src="{% url telemeta-images "ok.png" %}" alt="yes" style="vertical-align:middle" /></a>
+                {% endif %}
+            </td>
+            <td style="vertical-align:middle">
+                <a href="#" onclick="playlistUtils.removeResource('{{resource.public_id}}');return false;" class="component_icon button icon_cancel" style="padding: 4px 12px;"></a>
+            </td>
+        </tr>
+        {% endfor %}
+    </table>
+    {% endfor %}
+</div>
+{% endblock %}
+
index 9c1870d88a70e92f09c58397efa1ab35547cc80f..d2ea86502a9c53715374f39fb7af35eb07eb0e10 100644 (file)
@@ -72,6 +72,6 @@
 {% endblock %}
 
 {% else %}
-    <p>No such resource</p>
+    <p>{% trans "No such resource" %}</p>
 {% endif %}
 
index a69178d362a6a924c1b3de5e38cbece052d324c1..24c3420e63cdd41d92124f9cb938e5dec0749ee7 100644 (file)
@@ -300,6 +300,7 @@ urlpatterns = patterns('',
     # Profiles
     url(r'^users/(?P<username>[A-Za-z0-9._-]+)/profile/$', profile_view.profile_detail, name="telemeta-profile-detail"),
     url(r'^users/(?P<username>[A-Za-z0-9._-]+)/profile/edit/$', profile_view.profile_edit, name="telemeta-profile-edit"),
+#    url(r'^users/(?P<username>[A-Za-z0-9._-]+)/profile/rss/$', profile_view.rss, name="telemeta-profile-rss"),
 
 
     # Registration
index c38e44b59d0abddb3e83816136d55198f1507457..a2174d9c1fae75a66cbc973628e4ef105000e36f 100644 (file)
@@ -127,8 +127,11 @@ def get_public_access(access, year_from=None, year_to=None):
             public_access = False
     return public_access
 
-def get_revisions(nb):
-    last_revisions = Revision.objects.order_by('-time')[0:nb]
+def get_revisions(nb, user=None):
+    last_revisions = Revision.objects.order_by('-time')
+    if user:
+        last_revisions = last_revisions.filter(user=user)
+    last_revisions = last_revisions[0:nb]
     revisions = []
     for revision in last_revisions:
         if revision.element_type == 'item':
@@ -216,7 +219,7 @@ class GeneralView(object):
     def index(self, request):
         """Render the index page"""
 
-        template = loader.get_template('telemeta/index.html')
+        template = loader.get_template('telemeta/home.html')
 
         sound_items = MediaItem.objects.sound()
         _sound_pub_items = []
@@ -248,12 +251,13 @@ class GeneralView(object):
         """Render the home page"""
 
         if request.user.is_authenticated():
-            template='telemeta/home.html'
+            template='telemeta/lists.html'
             playlists = get_playlists(request)
             revisions = get_revisions(100)
             searches = Search.objects.filter(username=request.user)
+            user_revisions = get_revisions(25, request.user)
             return render(request, template, {'playlists': playlists, 'searches': searches,
-                                              'revisions': revisions,})
+                                              'revisions': revisions, 'user_revisions': user_revisions })
         else:
             template = 'telemeta/messages.html'
             mess = ugettext('Access not allowed')
@@ -1401,7 +1405,6 @@ class LastestRevisionsFeed(Feed):
         return link
 
 
-
 class ResourceView(object):
     """Provide Resource web UI methods"""
 
@@ -1436,6 +1439,8 @@ class ResourceView(object):
 
         return render(request, template, {'resource': resource, 'type': type, 'children': children, 'related_media': related_media})
 
+    @jsonrpc_method('telemeta.change_fonds')
+    @jsonrpc_method('telemeta.change_corpus')
     def edit(self, request, type, public_id, template='telemeta/resource_edit.html'):
         self.setup(type)
         resource = self.model.objects.get(code=public_id)
@@ -1452,6 +1457,8 @@ class ResourceView(object):
             form = self.form(instance=resource)
         return render(request, template, {'resource': resource, 'type': type, 'form': form,})
 
+    @jsonrpc_method('telemeta.add_fonds')
+    @jsonrpc_method('telemeta.add_corpus')
     def add(self, request, type, template='telemeta/resource_add.html'):
         self.setup(type)
         resource = self.model()
@@ -1468,6 +1475,8 @@ class ResourceView(object):
             form = self.form(instance=resource)
         return render(request, template, {'resource': resource, 'type': type, 'form': form,})
 
+    @jsonrpc_method('telemeta.add_fonds')
+    @jsonrpc_method('telemeta.add_corpus')
     def copy(self, request, type, public_id, template='telemeta/resource_edit.html'):
         self.setup(type)
         if request.method == 'POST':
@@ -1496,6 +1505,8 @@ class ResourceView(object):
         context = RequestContext(request, {'resource': resource, 'host': request.META['HTTP_HOST']})
         return HttpResponse(template.render(context), mimetype=mimetype)
 
+    @jsonrpc_method('telemeta.del_fonds')
+    @jsonrpc_method('telemeta.del_corpus')
     def delete(self, request, type, public_id):
         self.setup(type)
         resource = self.model.objects.get(code=public_id)
@@ -1509,6 +1520,8 @@ class ResourceView(object):
         response = HttpResponse(stream_from_file(media.file.path), mimetype=media.mime_type)
         return response
 
+    @jsonrpc_method('telemeta.add_fonds_related_media')
+    @jsonrpc_method('telemeta.add_corpus_related_media')
     def related_edit(self, request, type, public_id, template):
         self.setup(type)
         resource = self.model.objects.get(code=public_id)