# HG changeset patch # User ymh # Date 1380140091 -7200 # Node ID 0a4e7d6ebe80d98e41dda5307c5f69735a4002fd # Parent 0a6c7c8f8490b434b5a398ba5adca893e39ef890 - Do not create object for new - optimise object loading on edit (avoid double object query) - optimize sparql queries configuration - rename templates - update trnslations diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/api/serializers.py --- a/src/p4l/api/serializers.py Mon Sep 23 00:38:16 2013 +0200 +++ b/src/p4l/api/serializers.py Wed Sep 25 22:14:51 2013 +0200 @@ -79,7 +79,8 @@ if value in (None, ''): into[(self.source or field_name)] = None elif self.many and hasattr(value, '__iter__'): - obj.all().delete() + if obj is not None: + obj.all().delete() nested_items = [] for val in value: kwargs = { @@ -118,19 +119,18 @@ Serializer for record ''' language = ThesaurusSerializer(many=False, required=False, slug_field='uri') - otherLanguages = ThesaurusSerializer(many=True, slug_field='uri') - subjects = ThesaurusSerializer(many=True, slug_field='uri') - themes = ThesaurusSerializer(many=True, slug_field='uri') - countries = ThesaurusSerializer(many=True, slug_field='uri') - projectNames = ThesaurusSerializer(many=True, slug_field='uri') - subjectCorporateBodies = ThesaurusSerializer(many=True, slug_field='uri') - corporateAuthors = ThesaurusSerializer(many=True, slug_field='uri') - audiences = ThesaurusSerializer(many=True, slug_field='uri') + otherLanguages = ThesaurusSerializer(many=True, required=False, slug_field='uri') + subjects = ThesaurusSerializer(many=True, required=False, slug_field='uri') + themes = ThesaurusSerializer(many=True, required=False, slug_field='uri') + countries = ThesaurusSerializer(many=True, required=False, slug_field='uri') + projectNames = ThesaurusSerializer(many=True, required=False, slug_field='uri') + subjectCorporateBodies = ThesaurusSerializer(many=True, required=False, slug_field='uri') + corporateAuthors = ThesaurusSerializer(many=True, required=False, slug_field='uri') + audiences = ThesaurusSerializer(many=True, required=False, slug_field='uri') class Meta: model = Record depth = 1 - read_only_fields = ('identifier', 'uri') fields = ("identifier", "uri", "subjects", "notes", "otherLanguages", "language", "editionStatement", "recordType", "isDocumentPart", "hidden", "restricted", "themes", "countries", "projectNames", diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/locale/en/LC_MESSAGES/django.mo Binary file src/p4l/locale/en/LC_MESSAGES/django.mo has changed diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/locale/en/LC_MESSAGES/django.po --- a/src/p4l/locale/en/LC_MESSAGES/django.po Mon Sep 23 00:38:16 2013 +0200 +++ b/src/p4l/locale/en/LC_MESSAGES/django.po Wed Sep 25 22:14:51 2013 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-22 17:28-0500\n" +"POT-Creation-Date: 2013-09-24 06:09-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,7 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: admin.py:10 forms.py:34 templates/p4l/p4l_record_view.html:55 +#: admin.py:10 forms.py:34 templates/p4l/record_view.html:56 msgid "language" msgstr "language" @@ -52,275 +52,72 @@ msgid "or" msgstr "or" -#: templates/p4l/p4l_base.html:35 +#: templates/p4l/base.html:35 msgid "logout" msgstr "logout" -#: templates/p4l/p4l_base.html:37 templates/registration/login.html:4 +#: templates/p4l/base.html:37 templates/registration/login.html:4 #: templates/registration/login.html:27 msgid "login" msgstr "login" -#: templates/p4l/p4l_home.html:6 templates/p4l/p4l_home.html.py:10 +#: templates/p4l/home.html:6 templates/p4l/home.html.py:10 msgid "Record List" msgstr "Record list" -#: templates/p4l/p4l_home.html:6 templates/p4l/p4l_home.html.py:30 -#: templates/p4l/p4l_home.html:70 +#: templates/p4l/home.html:6 templates/p4l/home.html.py:30 +#: templates/p4l/home.html:70 msgid "Page" msgstr "Page" -#: templates/p4l/p4l_home.html:14 +#: templates/p4l/home.html:14 msgid "Query" msgstr "Query" -#: templates/p4l/p4l_home.html:19 +#: templates/p4l/home.html:19 msgid "New record" msgstr "New record" -#: templates/p4l/p4l_home.html:27 templates/p4l/p4l_home.html.py:67 +#: templates/p4l/home.html:27 templates/p4l/home.html.py:67 msgid "Previous" msgstr "Previous" -#: templates/p4l/p4l_home.html:30 templates/p4l/p4l_home.html.py:70 +#: templates/p4l/home.html:30 templates/p4l/home.html.py:70 msgid "on" msgstr "on" -#: templates/p4l/p4l_home.html:33 templates/p4l/p4l_home.html.py:73 +#: templates/p4l/home.html:33 templates/p4l/home.html.py:73 msgid "Next" msgstr "Next" -#: templates/p4l/p4l_home.html:43 templates/p4l/p4l_record_view.html:35 +#: templates/p4l/home.html:43 templates/p4l/record_view.html:36 msgid "identifier" msgstr "identifier" -#: templates/p4l/p4l_home.html:43 templates/p4l/p4l_record_view.html:63 +#: templates/p4l/home.html:43 templates/p4l/record_view.html:64 msgid "titles" msgstr "titles" -#: templates/p4l/p4l_home.html:43 +#: templates/p4l/home.html:43 msgid "dates" msgstr "dates" -#: templates/p4l/p4l_home.html:43 +#: templates/p4l/home.html:43 msgid "actions" msgstr "actions" -#: templates/p4l/p4l_home.html:59 +#: templates/p4l/home.html:59 msgid "No record" msgstr "No record" -#: templates/p4l/p4l_record_view.html:6 -#: templates/p4l/record_update_form.html:5 +#: templates/p4l/record_update_form.html:5 templates/p4l/record_view.html:7 msgid "Record" msgstr "Record" -#: templates/p4l/p4l_record_view.html:6 -#: templates/p4l/record_update_form.html:5 +#: templates/p4l/record_update_form.html:5 templates/p4l/record_view.html:7 msgid "View" msgstr "View" -#: templates/p4l/p4l_record_view.html:10 -#: templates/p4l/p4l_record_view.html:236 templates/p4l/translations.html:21 -msgid "Edit the record" -msgstr "Edit the record" - -#: templates/p4l/p4l_record_view.html:11 -#: templates/p4l/p4l_record_view.html:237 -#: templates/p4l/record_update_form.html:61 -#: templates/p4l/record_update_form.html:249 -msgid "" -"Are your sure you want to delete this record ? This action is irreversible." -msgstr "" -"Are your sure you want to delete this record ? This action is irreversible." - -#: templates/p4l/p4l_record_view.html:11 -#: templates/p4l/p4l_record_view.html:237 -#: templates/p4l/record_update_form.html:61 -#: templates/p4l/record_update_form.html:249 -msgid "Delete the record" -msgstr "Delete the record" - -#: templates/p4l/p4l_record_view.html:15 -msgid "property" -msgstr "property" - -#: templates/p4l/p4l_record_view.html:15 -msgid "value" -msgstr "value" - -#: templates/p4l/p4l_record_view.html:23 -msgid "subjects" -msgstr "subjects" - -#: templates/p4l/p4l_record_view.html:27 -msgid "themes" -msgstr "themes" - -#: templates/p4l/p4l_record_view.html:31 -msgid "countries" -msgstr "countries" - -#: templates/p4l/p4l_record_view.html:39 -msgid "notes" -msgstr "notes" - -#: templates/p4l/p4l_record_view.html:43 -msgid "issns" -msgstr "issns" - -#: templates/p4l/p4l_record_view.html:47 -msgid "isbns" -msgstr "isbns" - -#: templates/p4l/p4l_record_view.html:51 -msgid "document code" -msgstr "document code" - -#: templates/p4l/p4l_record_view.html:59 -msgid "other languages" -msgstr "other languages" - -#: templates/p4l/p4l_record_view.html:67 -msgid "abstracts" -msgstr "abstracts" - -#: templates/p4l/p4l_record_view.html:71 -msgid "added titles" -msgstr "addes titles" - -#: templates/p4l/p4l_record_view.html:75 -msgid "titles main document" -msgstr "titles main document" - -#: templates/p4l/p4l_record_view.html:79 -msgid "edition statement" -msgstr "edition statement" - -#: templates/p4l/p4l_record_view.html:83 -msgid "imprints" -msgstr "imprints" - -#: templates/p4l/p4l_record_view.html:89 -msgid "City" -msgstr "City" - -#: templates/p4l/p4l_record_view.html:90 -msgid "Publisher" -msgstr "Publisher" - -#: templates/p4l/p4l_record_view.html:91 -#: templates/p4l/p4l_record_view.html:137 -#: templates/p4l/p4l_record_view.html:182 -msgid "Date" -msgstr "Date" - -#: templates/p4l/p4l_record_view.html:92 -#: templates/p4l/p4l_record_view.html:112 -msgid "Language" -msgstr "Language" - -#: templates/p4l/p4l_record_view.html:100 -msgid "collations" -msgstr "collations" - -#: templates/p4l/p4l_record_view.html:104 -msgid "volume issues" -msgstr "volume issues" - -#: templates/p4l/p4l_record_view.html:110 -#: templates/p4l/p4l_record_view.html:153 -msgid "Volume" -msgstr "Volume" - -#: templates/p4l/p4l_record_view.html:111 -#: templates/p4l/p4l_record_view.html:135 -#: templates/p4l/p4l_record_view.html:180 -msgid "Number" -msgstr "Number" - -#: templates/p4l/p4l_record_view.html:120 -msgid "project names" -msgstr "project names" - -#: templates/p4l/p4l_record_view.html:124 -msgid "periodicals" -msgstr "periodicals" - -#: templates/p4l/p4l_record_view.html:128 -msgid "meetings" -msgstr "meetings" - -#: templates/p4l/p4l_record_view.html:136 -#: templates/p4l/p4l_record_view.html:181 -msgid "Place" -msgstr "Place" - -#: templates/p4l/p4l_record_view.html:138 -#: templates/p4l/p4l_record_view.html:183 -msgid "Year" -msgstr "Year" - -#: templates/p4l/p4l_record_view.html:146 -msgid "series" -msgstr "series" - -#: templates/p4l/p4l_record_view.html:161 -msgid "authors" -msgstr "authors" - -#: templates/p4l/p4l_record_view.html:165 -msgid "subject persons" -msgstr "subject persons" - -#: templates/p4l/p4l_record_view.html:169 -msgid "subject corporate bodies" -msgstr "subject corporate bodies" - -#: templates/p4l/p4l_record_view.html:173 -msgid "subject meetings" -msgstr "subject meetings" - -#: templates/p4l/p4l_record_view.html:191 -msgid "corporate authors" -msgstr "corporate authors" - -#: templates/p4l/p4l_record_view.html:195 -msgid "corporate author label" -msgstr "corporate author label" - -#: templates/p4l/p4l_record_view.html:199 -msgid "Urls" -msgstr "Urls" - -#: templates/p4l/p4l_record_view.html:205 -msgid "Address" -msgstr "Address" - -#: templates/p4l/p4l_record_view.html:206 -msgid "Display" -msgstr "Display" - -#: templates/p4l/p4l_record_view.html:214 -msgid "record type" -msgstr "record type" - -#: templates/p4l/p4l_record_view.html:218 -msgid "audiences" -msgstr "audiences" - -#: templates/p4l/p4l_record_view.html:222 -msgid "is document part" -msgstr "is document part" - -#: templates/p4l/p4l_record_view.html:226 -msgid "is hidden" -msgstr "is hidden" - -#: templates/p4l/p4l_record_view.html:230 -msgid "is restricted" -msgstr "is restricted" - #: templates/p4l/record_update_form.html:52 templates/p4l/translations.html:4 msgid "Save" msgstr "Save" @@ -335,6 +132,199 @@ msgid "View the record" msgstr "View the record" +#: templates/p4l/record_update_form.html:61 +#: templates/p4l/record_update_form.html:249 templates/p4l/record_view.html:12 +#: templates/p4l/record_view.html.py:238 +msgid "" +"Are your sure you want to delete this record ? This action is irreversible." +msgstr "" +"Are your sure you want to delete this record ? This action is irreversible." + +#: templates/p4l/record_update_form.html:61 +#: templates/p4l/record_update_form.html:249 templates/p4l/record_view.html:12 +#: templates/p4l/record_view.html.py:238 +msgid "Delete the record" +msgstr "Delete the record" + +#: templates/p4l/record_view.html:11 templates/p4l/record_view.html.py:237 +#: templates/p4l/translations.html:21 +msgid "Edit the record" +msgstr "Edit the record" + +#: templates/p4l/record_view.html:16 +msgid "property" +msgstr "property" + +#: templates/p4l/record_view.html:16 +msgid "value" +msgstr "value" + +#: templates/p4l/record_view.html:24 +msgid "subjects" +msgstr "subjects" + +#: templates/p4l/record_view.html:28 +msgid "themes" +msgstr "themes" + +#: templates/p4l/record_view.html:32 +msgid "countries" +msgstr "countries" + +#: templates/p4l/record_view.html:40 +msgid "notes" +msgstr "notes" + +#: templates/p4l/record_view.html:44 +msgid "issns" +msgstr "issns" + +#: templates/p4l/record_view.html:48 +msgid "isbns" +msgstr "isbns" + +#: templates/p4l/record_view.html:52 +msgid "document code" +msgstr "document code" + +#: templates/p4l/record_view.html:60 +msgid "other languages" +msgstr "other languages" + +#: templates/p4l/record_view.html:68 +msgid "abstracts" +msgstr "abstracts" + +#: templates/p4l/record_view.html:72 +msgid "added titles" +msgstr "addes titles" + +#: templates/p4l/record_view.html:76 +msgid "titles main document" +msgstr "titles main document" + +#: templates/p4l/record_view.html:80 +msgid "edition statement" +msgstr "edition statement" + +#: templates/p4l/record_view.html:84 +msgid "imprints" +msgstr "imprints" + +#: templates/p4l/record_view.html:90 +msgid "City" +msgstr "City" + +#: templates/p4l/record_view.html:91 +msgid "Publisher" +msgstr "Publisher" + +#: templates/p4l/record_view.html:92 templates/p4l/record_view.html.py:138 +#: templates/p4l/record_view.html:183 +msgid "Date" +msgstr "Date" + +#: templates/p4l/record_view.html:93 templates/p4l/record_view.html.py:113 +msgid "Language" +msgstr "Language" + +#: templates/p4l/record_view.html:101 +msgid "collations" +msgstr "collations" + +#: templates/p4l/record_view.html:105 +msgid "volume issues" +msgstr "volume issues" + +#: templates/p4l/record_view.html:111 templates/p4l/record_view.html.py:154 +msgid "Volume" +msgstr "Volume" + +#: templates/p4l/record_view.html:112 templates/p4l/record_view.html.py:136 +#: templates/p4l/record_view.html:181 +msgid "Number" +msgstr "Number" + +#: templates/p4l/record_view.html:121 +msgid "project names" +msgstr "project names" + +#: templates/p4l/record_view.html:125 +msgid "periodicals" +msgstr "periodicals" + +#: templates/p4l/record_view.html:129 +msgid "meetings" +msgstr "meetings" + +#: templates/p4l/record_view.html:137 templates/p4l/record_view.html.py:182 +msgid "Place" +msgstr "Place" + +#: templates/p4l/record_view.html:139 templates/p4l/record_view.html.py:184 +msgid "Year" +msgstr "Year" + +#: templates/p4l/record_view.html:147 +msgid "series" +msgstr "series" + +#: templates/p4l/record_view.html:162 +msgid "authors" +msgstr "authors" + +#: templates/p4l/record_view.html:166 +msgid "subject persons" +msgstr "subject persons" + +#: templates/p4l/record_view.html:170 +msgid "subject corporate bodies" +msgstr "subject corporate bodies" + +#: templates/p4l/record_view.html:174 +msgid "subject meetings" +msgstr "subject meetings" + +#: templates/p4l/record_view.html:192 +msgid "corporate authors" +msgstr "corporate authors" + +#: templates/p4l/record_view.html:196 +msgid "corporate author label" +msgstr "corporate author label" + +#: templates/p4l/record_view.html:200 +msgid "Urls" +msgstr "Urls" + +#: templates/p4l/record_view.html:206 +msgid "Address" +msgstr "Address" + +#: templates/p4l/record_view.html:207 +msgid "Display" +msgstr "Display" + +#: templates/p4l/record_view.html:215 +msgid "record type" +msgstr "record type" + +#: templates/p4l/record_view.html:219 +msgid "audiences" +msgstr "audiences" + +#: templates/p4l/record_view.html:223 +msgid "is document part" +msgstr "is document part" + +#: templates/p4l/record_view.html:227 +msgid "is hidden" +msgstr "is hidden" + +#: templates/p4l/record_view.html:231 +msgid "is restricted" +msgstr "is restricted" + #: templates/p4l/translations.html:3 msgid "Add" msgstr "Add" @@ -415,5 +405,5 @@ msgid "Password" msgstr "Password" -msgid "Title" -msgstr "Title" +#~ msgid "Title" +#~ msgstr "Title" diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/locale/es/LC_MESSAGES/django.mo Binary file src/p4l/locale/es/LC_MESSAGES/django.mo has changed diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/locale/es/LC_MESSAGES/django.po --- a/src/p4l/locale/es/LC_MESSAGES/django.po Mon Sep 23 00:38:16 2013 +0200 +++ b/src/p4l/locale/es/LC_MESSAGES/django.po Wed Sep 25 22:14:51 2013 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-22 17:28-0500\n" +"POT-Creation-Date: 2013-09-24 06:09-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,7 +17,7 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: admin.py:10 forms.py:34 templates/p4l/p4l_record_view.html:55 +#: admin.py:10 forms.py:34 templates/p4l/record_view.html:56 msgid "language" msgstr "language" @@ -53,275 +53,72 @@ msgid "or" msgstr "or" -#: templates/p4l/p4l_base.html:35 +#: templates/p4l/base.html:35 msgid "logout" msgstr "logout" -#: templates/p4l/p4l_base.html:37 templates/registration/login.html:4 +#: templates/p4l/base.html:37 templates/registration/login.html:4 #: templates/registration/login.html:27 msgid "login" msgstr "login" -#: templates/p4l/p4l_home.html:6 templates/p4l/p4l_home.html.py:10 +#: templates/p4l/home.html:6 templates/p4l/home.html.py:10 msgid "Record List" msgstr "Record list" -#: templates/p4l/p4l_home.html:6 templates/p4l/p4l_home.html.py:30 -#: templates/p4l/p4l_home.html:70 +#: templates/p4l/home.html:6 templates/p4l/home.html.py:30 +#: templates/p4l/home.html:70 msgid "Page" msgstr "Page" -#: templates/p4l/p4l_home.html:14 +#: templates/p4l/home.html:14 msgid "Query" msgstr "Query" -#: templates/p4l/p4l_home.html:19 +#: templates/p4l/home.html:19 msgid "New record" msgstr "New record" -#: templates/p4l/p4l_home.html:27 templates/p4l/p4l_home.html.py:67 +#: templates/p4l/home.html:27 templates/p4l/home.html.py:67 msgid "Previous" msgstr "Previous" -#: templates/p4l/p4l_home.html:30 templates/p4l/p4l_home.html.py:70 +#: templates/p4l/home.html:30 templates/p4l/home.html.py:70 msgid "on" msgstr "on" -#: templates/p4l/p4l_home.html:33 templates/p4l/p4l_home.html.py:73 +#: templates/p4l/home.html:33 templates/p4l/home.html.py:73 msgid "Next" msgstr "Next" -#: templates/p4l/p4l_home.html:43 templates/p4l/p4l_record_view.html:35 +#: templates/p4l/home.html:43 templates/p4l/record_view.html:36 msgid "identifier" msgstr "identifier" -#: templates/p4l/p4l_home.html:43 templates/p4l/p4l_record_view.html:63 +#: templates/p4l/home.html:43 templates/p4l/record_view.html:64 msgid "titles" msgstr "titles" -#: templates/p4l/p4l_home.html:43 +#: templates/p4l/home.html:43 msgid "dates" msgstr "dates" -#: templates/p4l/p4l_home.html:43 +#: templates/p4l/home.html:43 msgid "actions" msgstr "actions" -#: templates/p4l/p4l_home.html:59 +#: templates/p4l/home.html:59 msgid "No record" msgstr "No record" -#: templates/p4l/p4l_record_view.html:6 -#: templates/p4l/record_update_form.html:5 +#: templates/p4l/record_update_form.html:5 templates/p4l/record_view.html:7 msgid "Record" msgstr "Record" -#: templates/p4l/p4l_record_view.html:6 -#: templates/p4l/record_update_form.html:5 +#: templates/p4l/record_update_form.html:5 templates/p4l/record_view.html:7 msgid "View" msgstr "View" -#: templates/p4l/p4l_record_view.html:10 -#: templates/p4l/p4l_record_view.html:236 templates/p4l/translations.html:21 -msgid "Edit the record" -msgstr "Edit the record" - -#: templates/p4l/p4l_record_view.html:11 -#: templates/p4l/p4l_record_view.html:237 -#: templates/p4l/record_update_form.html:61 -#: templates/p4l/record_update_form.html:249 -msgid "" -"Are your sure you want to delete this record ? This action is irreversible." -msgstr "" -"Are your sure you want to delete this record ? This action is irreversible." - -#: templates/p4l/p4l_record_view.html:11 -#: templates/p4l/p4l_record_view.html:237 -#: templates/p4l/record_update_form.html:61 -#: templates/p4l/record_update_form.html:249 -msgid "Delete the record" -msgstr "Delete the record" - -#: templates/p4l/p4l_record_view.html:15 -msgid "property" -msgstr "property" - -#: templates/p4l/p4l_record_view.html:15 -msgid "value" -msgstr "value" - -#: templates/p4l/p4l_record_view.html:23 -msgid "subjects" -msgstr "subjects" - -#: templates/p4l/p4l_record_view.html:27 -msgid "themes" -msgstr "themes" - -#: templates/p4l/p4l_record_view.html:31 -msgid "countries" -msgstr "countries" - -#: templates/p4l/p4l_record_view.html:39 -msgid "notes" -msgstr "notes" - -#: templates/p4l/p4l_record_view.html:43 -msgid "issns" -msgstr "issns" - -#: templates/p4l/p4l_record_view.html:47 -msgid "isbns" -msgstr "isbns" - -#: templates/p4l/p4l_record_view.html:51 -msgid "document code" -msgstr "document code" - -#: templates/p4l/p4l_record_view.html:59 -msgid "other languages" -msgstr "other languages" - -#: templates/p4l/p4l_record_view.html:67 -msgid "abstracts" -msgstr "abstracts" - -#: templates/p4l/p4l_record_view.html:71 -msgid "added titles" -msgstr "addes titles" - -#: templates/p4l/p4l_record_view.html:75 -msgid "titles main document" -msgstr "titles main document" - -#: templates/p4l/p4l_record_view.html:79 -msgid "edition statement" -msgstr "edition statement" - -#: templates/p4l/p4l_record_view.html:83 -msgid "imprints" -msgstr "imprints" - -#: templates/p4l/p4l_record_view.html:89 -msgid "City" -msgstr "City" - -#: templates/p4l/p4l_record_view.html:90 -msgid "Publisher" -msgstr "Publisher" - -#: templates/p4l/p4l_record_view.html:91 -#: templates/p4l/p4l_record_view.html:137 -#: templates/p4l/p4l_record_view.html:182 -msgid "Date" -msgstr "Date" - -#: templates/p4l/p4l_record_view.html:92 -#: templates/p4l/p4l_record_view.html:112 -msgid "Language" -msgstr "Language" - -#: templates/p4l/p4l_record_view.html:100 -msgid "collations" -msgstr "collations" - -#: templates/p4l/p4l_record_view.html:104 -msgid "volume issues" -msgstr "volume issues" - -#: templates/p4l/p4l_record_view.html:110 -#: templates/p4l/p4l_record_view.html:153 -msgid "Volume" -msgstr "Volume" - -#: templates/p4l/p4l_record_view.html:111 -#: templates/p4l/p4l_record_view.html:135 -#: templates/p4l/p4l_record_view.html:180 -msgid "Number" -msgstr "Number" - -#: templates/p4l/p4l_record_view.html:120 -msgid "project names" -msgstr "project names" - -#: templates/p4l/p4l_record_view.html:124 -msgid "periodicals" -msgstr "periodicals" - -#: templates/p4l/p4l_record_view.html:128 -msgid "meetings" -msgstr "meetings" - -#: templates/p4l/p4l_record_view.html:136 -#: templates/p4l/p4l_record_view.html:181 -msgid "Place" -msgstr "Place" - -#: templates/p4l/p4l_record_view.html:138 -#: templates/p4l/p4l_record_view.html:183 -msgid "Year" -msgstr "Year" - -#: templates/p4l/p4l_record_view.html:146 -msgid "series" -msgstr "series" - -#: templates/p4l/p4l_record_view.html:161 -msgid "authors" -msgstr "authors" - -#: templates/p4l/p4l_record_view.html:165 -msgid "subject persons" -msgstr "subject persons" - -#: templates/p4l/p4l_record_view.html:169 -msgid "subject corporate bodies" -msgstr "subject corporate bodies" - -#: templates/p4l/p4l_record_view.html:173 -msgid "subject meetings" -msgstr "subject meetings" - -#: templates/p4l/p4l_record_view.html:191 -msgid "corporate authors" -msgstr "corporate authors" - -#: templates/p4l/p4l_record_view.html:195 -msgid "corporate author label" -msgstr "corporate author label" - -#: templates/p4l/p4l_record_view.html:199 -msgid "Urls" -msgstr "Urls" - -#: templates/p4l/p4l_record_view.html:205 -msgid "Address" -msgstr "Address" - -#: templates/p4l/p4l_record_view.html:206 -msgid "Display" -msgstr "Display" - -#: templates/p4l/p4l_record_view.html:214 -msgid "record type" -msgstr "record type" - -#: templates/p4l/p4l_record_view.html:218 -msgid "audiences" -msgstr "audiences" - -#: templates/p4l/p4l_record_view.html:222 -msgid "is document part" -msgstr "is document part" - -#: templates/p4l/p4l_record_view.html:226 -msgid "is hidden" -msgstr "is hidden" - -#: templates/p4l/p4l_record_view.html:230 -msgid "is restricted" -msgstr "is restricted" - #: templates/p4l/record_update_form.html:52 templates/p4l/translations.html:4 msgid "Save" msgstr "Save" @@ -336,6 +133,199 @@ msgid "View the record" msgstr "View the record" +#: templates/p4l/record_update_form.html:61 +#: templates/p4l/record_update_form.html:249 templates/p4l/record_view.html:12 +#: templates/p4l/record_view.html.py:238 +msgid "" +"Are your sure you want to delete this record ? This action is irreversible." +msgstr "" +"Are your sure you want to delete this record ? This action is irreversible." + +#: templates/p4l/record_update_form.html:61 +#: templates/p4l/record_update_form.html:249 templates/p4l/record_view.html:12 +#: templates/p4l/record_view.html.py:238 +msgid "Delete the record" +msgstr "Delete the record" + +#: templates/p4l/record_view.html:11 templates/p4l/record_view.html.py:237 +#: templates/p4l/translations.html:21 +msgid "Edit the record" +msgstr "Edit the record" + +#: templates/p4l/record_view.html:16 +msgid "property" +msgstr "property" + +#: templates/p4l/record_view.html:16 +msgid "value" +msgstr "value" + +#: templates/p4l/record_view.html:24 +msgid "subjects" +msgstr "subjects" + +#: templates/p4l/record_view.html:28 +msgid "themes" +msgstr "themes" + +#: templates/p4l/record_view.html:32 +msgid "countries" +msgstr "countries" + +#: templates/p4l/record_view.html:40 +msgid "notes" +msgstr "notes" + +#: templates/p4l/record_view.html:44 +msgid "issns" +msgstr "issns" + +#: templates/p4l/record_view.html:48 +msgid "isbns" +msgstr "isbns" + +#: templates/p4l/record_view.html:52 +msgid "document code" +msgstr "document code" + +#: templates/p4l/record_view.html:60 +msgid "other languages" +msgstr "other languages" + +#: templates/p4l/record_view.html:68 +msgid "abstracts" +msgstr "abstracts" + +#: templates/p4l/record_view.html:72 +msgid "added titles" +msgstr "addes titles" + +#: templates/p4l/record_view.html:76 +msgid "titles main document" +msgstr "titles main document" + +#: templates/p4l/record_view.html:80 +msgid "edition statement" +msgstr "edition statement" + +#: templates/p4l/record_view.html:84 +msgid "imprints" +msgstr "imprints" + +#: templates/p4l/record_view.html:90 +msgid "City" +msgstr "City" + +#: templates/p4l/record_view.html:91 +msgid "Publisher" +msgstr "Publisher" + +#: templates/p4l/record_view.html:92 templates/p4l/record_view.html.py:138 +#: templates/p4l/record_view.html:183 +msgid "Date" +msgstr "Date" + +#: templates/p4l/record_view.html:93 templates/p4l/record_view.html.py:113 +msgid "Language" +msgstr "Language" + +#: templates/p4l/record_view.html:101 +msgid "collations" +msgstr "collations" + +#: templates/p4l/record_view.html:105 +msgid "volume issues" +msgstr "volume issues" + +#: templates/p4l/record_view.html:111 templates/p4l/record_view.html.py:154 +msgid "Volume" +msgstr "Volume" + +#: templates/p4l/record_view.html:112 templates/p4l/record_view.html.py:136 +#: templates/p4l/record_view.html:181 +msgid "Number" +msgstr "Number" + +#: templates/p4l/record_view.html:121 +msgid "project names" +msgstr "project names" + +#: templates/p4l/record_view.html:125 +msgid "periodicals" +msgstr "periodicals" + +#: templates/p4l/record_view.html:129 +msgid "meetings" +msgstr "meetings" + +#: templates/p4l/record_view.html:137 templates/p4l/record_view.html.py:182 +msgid "Place" +msgstr "Place" + +#: templates/p4l/record_view.html:139 templates/p4l/record_view.html.py:184 +msgid "Year" +msgstr "Year" + +#: templates/p4l/record_view.html:147 +msgid "series" +msgstr "series" + +#: templates/p4l/record_view.html:162 +msgid "authors" +msgstr "authors" + +#: templates/p4l/record_view.html:166 +msgid "subject persons" +msgstr "subject persons" + +#: templates/p4l/record_view.html:170 +msgid "subject corporate bodies" +msgstr "subject corporate bodies" + +#: templates/p4l/record_view.html:174 +msgid "subject meetings" +msgstr "subject meetings" + +#: templates/p4l/record_view.html:192 +msgid "corporate authors" +msgstr "corporate authors" + +#: templates/p4l/record_view.html:196 +msgid "corporate author label" +msgstr "corporate author label" + +#: templates/p4l/record_view.html:200 +msgid "Urls" +msgstr "Urls" + +#: templates/p4l/record_view.html:206 +msgid "Address" +msgstr "Address" + +#: templates/p4l/record_view.html:207 +msgid "Display" +msgstr "Display" + +#: templates/p4l/record_view.html:215 +msgid "record type" +msgstr "record type" + +#: templates/p4l/record_view.html:219 +msgid "audiences" +msgstr "audiences" + +#: templates/p4l/record_view.html:223 +msgid "is document part" +msgstr "is document part" + +#: templates/p4l/record_view.html:227 +msgid "is hidden" +msgstr "is hidden" + +#: templates/p4l/record_view.html:231 +msgid "is restricted" +msgstr "is restricted" + #: templates/p4l/translations.html:3 msgid "Add" msgstr "Add" @@ -416,5 +406,5 @@ msgid "Password" msgstr "Password" -msgid "Title" -msgstr "Title" +#~ msgid "Title" +#~ msgstr "Title" diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/locale/fr/LC_MESSAGES/django.mo Binary file src/p4l/locale/fr/LC_MESSAGES/django.mo has changed diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/locale/fr/LC_MESSAGES/django.po --- a/src/p4l/locale/fr/LC_MESSAGES/django.po Mon Sep 23 00:38:16 2013 +0200 +++ b/src/p4l/locale/fr/LC_MESSAGES/django.po Wed Sep 25 22:14:51 2013 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-22 17:28-0500\n" +"POT-Creation-Date: 2013-09-24 06:09-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,7 +17,7 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: admin.py:10 forms.py:34 templates/p4l/p4l_record_view.html:55 +#: admin.py:10 forms.py:34 templates/p4l/record_view.html:56 msgid "language" msgstr "langue" @@ -54,276 +54,72 @@ msgid "or" msgstr "ou" -#: templates/p4l/p4l_base.html:35 +#: templates/p4l/base.html:35 msgid "logout" msgstr "deconnection" -#: templates/p4l/p4l_base.html:37 templates/registration/login.html:4 +#: templates/p4l/base.html:37 templates/registration/login.html:4 #: templates/registration/login.html:27 msgid "login" msgstr "connection" -#: templates/p4l/p4l_home.html:6 templates/p4l/p4l_home.html.py:10 +#: templates/p4l/home.html:6 templates/p4l/home.html.py:10 msgid "Record List" msgstr "Liste notice" -#: templates/p4l/p4l_home.html:6 templates/p4l/p4l_home.html.py:30 -#: templates/p4l/p4l_home.html:70 +#: templates/p4l/home.html:6 templates/p4l/home.html.py:30 +#: templates/p4l/home.html:70 msgid "Page" msgstr "Page" -#: templates/p4l/p4l_home.html:14 +#: templates/p4l/home.html:14 msgid "Query" msgstr "Requête" -#: templates/p4l/p4l_home.html:19 +#: templates/p4l/home.html:19 msgid "New record" msgstr "Nouvelle notice" -#: templates/p4l/p4l_home.html:27 templates/p4l/p4l_home.html.py:67 +#: templates/p4l/home.html:27 templates/p4l/home.html.py:67 msgid "Previous" msgstr "Préc." -#: templates/p4l/p4l_home.html:30 templates/p4l/p4l_home.html.py:70 +#: templates/p4l/home.html:30 templates/p4l/home.html.py:70 msgid "on" msgstr "sur" -#: templates/p4l/p4l_home.html:33 templates/p4l/p4l_home.html.py:73 +#: templates/p4l/home.html:33 templates/p4l/home.html.py:73 msgid "Next" msgstr "Suiv." -#: templates/p4l/p4l_home.html:43 templates/p4l/p4l_record_view.html:35 +#: templates/p4l/home.html:43 templates/p4l/record_view.html:36 msgid "identifier" msgstr "identifiant" -#: templates/p4l/p4l_home.html:43 templates/p4l/p4l_record_view.html:63 +#: templates/p4l/home.html:43 templates/p4l/record_view.html:64 msgid "titles" msgstr "titres" -#: templates/p4l/p4l_home.html:43 +#: templates/p4l/home.html:43 msgid "dates" msgstr "dates" -#: templates/p4l/p4l_home.html:43 +#: templates/p4l/home.html:43 msgid "actions" msgstr "actions" -#: templates/p4l/p4l_home.html:59 +#: templates/p4l/home.html:59 msgid "No record" msgstr "Pas de notice" -#: templates/p4l/p4l_record_view.html:6 -#: templates/p4l/record_update_form.html:5 +#: templates/p4l/record_update_form.html:5 templates/p4l/record_view.html:7 msgid "Record" msgstr "Notice" -#: templates/p4l/p4l_record_view.html:6 -#: templates/p4l/record_update_form.html:5 +#: templates/p4l/record_update_form.html:5 templates/p4l/record_view.html:7 msgid "View" msgstr "Vue" -#: templates/p4l/p4l_record_view.html:10 -#: templates/p4l/p4l_record_view.html:236 templates/p4l/translations.html:21 -msgid "Edit the record" -msgstr "Modifier la notice" - -#: templates/p4l/p4l_record_view.html:11 -#: templates/p4l/p4l_record_view.html:237 -#: templates/p4l/record_update_form.html:61 -#: templates/p4l/record_update_form.html:249 -msgid "" -"Are your sure you want to delete this record ? This action is irreversible." -msgstr "" -"Êtes-vous sûr sur vouloir effacer cette notice ? Cette action est " -"irréversible." - -#: templates/p4l/p4l_record_view.html:11 -#: templates/p4l/p4l_record_view.html:237 -#: templates/p4l/record_update_form.html:61 -#: templates/p4l/record_update_form.html:249 -msgid "Delete the record" -msgstr "Effacer la notice" - -#: templates/p4l/p4l_record_view.html:15 -msgid "property" -msgstr "propriété" - -#: templates/p4l/p4l_record_view.html:15 -msgid "value" -msgstr "valeur" - -#: templates/p4l/p4l_record_view.html:23 -msgid "subjects" -msgstr "sujets" - -#: templates/p4l/p4l_record_view.html:27 -msgid "themes" -msgstr "thèmes" - -#: templates/p4l/p4l_record_view.html:31 -msgid "countries" -msgstr "pays" - -#: templates/p4l/p4l_record_view.html:39 -msgid "notes" -msgstr "notes" - -#: templates/p4l/p4l_record_view.html:43 -msgid "issns" -msgstr "issns" - -#: templates/p4l/p4l_record_view.html:47 -msgid "isbns" -msgstr "isbns" - -#: templates/p4l/p4l_record_view.html:51 -msgid "document code" -msgstr "code document" - -#: templates/p4l/p4l_record_view.html:59 -msgid "other languages" -msgstr "autres langues" - -#: templates/p4l/p4l_record_view.html:67 -msgid "abstracts" -msgstr "résumés" - -#: templates/p4l/p4l_record_view.html:71 -msgid "added titles" -msgstr "titres ajoutés" - -#: templates/p4l/p4l_record_view.html:75 -msgid "titles main document" -msgstr "titre doc. principal" - -#: templates/p4l/p4l_record_view.html:79 -msgid "edition statement" -msgstr "déclatation pub." - -#: templates/p4l/p4l_record_view.html:83 -msgid "imprints" -msgstr "impressions" - -#: templates/p4l/p4l_record_view.html:89 -msgid "City" -msgstr "Ville" - -#: templates/p4l/p4l_record_view.html:90 -msgid "Publisher" -msgstr "Éditeur" - -#: templates/p4l/p4l_record_view.html:91 -#: templates/p4l/p4l_record_view.html:137 -#: templates/p4l/p4l_record_view.html:182 -msgid "Date" -msgstr "Date" - -#: templates/p4l/p4l_record_view.html:92 -#: templates/p4l/p4l_record_view.html:112 -msgid "Language" -msgstr "Langue" - -#: templates/p4l/p4l_record_view.html:100 -msgid "collations" -msgstr "paginations" - -#: templates/p4l/p4l_record_view.html:104 -msgid "volume issues" -msgstr "volume de parution" - -#: templates/p4l/p4l_record_view.html:110 -#: templates/p4l/p4l_record_view.html:153 -msgid "Volume" -msgstr "Volume" - -#: templates/p4l/p4l_record_view.html:111 -#: templates/p4l/p4l_record_view.html:135 -#: templates/p4l/p4l_record_view.html:180 -msgid "Number" -msgstr "Nombre" - -#: templates/p4l/p4l_record_view.html:120 -msgid "project names" -msgstr "noms de projet" - -#: templates/p4l/p4l_record_view.html:124 -msgid "periodicals" -msgstr "périodiques" - -#: templates/p4l/p4l_record_view.html:128 -msgid "meetings" -msgstr "réunion" - -#: templates/p4l/p4l_record_view.html:136 -#: templates/p4l/p4l_record_view.html:181 -msgid "Place" -msgstr "Lieu" - -#: templates/p4l/p4l_record_view.html:138 -#: templates/p4l/p4l_record_view.html:183 -msgid "Year" -msgstr "Année" - -#: templates/p4l/p4l_record_view.html:146 -msgid "series" -msgstr "séries" - -#: templates/p4l/p4l_record_view.html:161 -msgid "authors" -msgstr "auteurs" - -#: templates/p4l/p4l_record_view.html:165 -msgid "subject persons" -msgstr "personnes sujets" - -#: templates/p4l/p4l_record_view.html:169 -msgid "subject corporate bodies" -msgstr "personne morale sujets" - -#: templates/p4l/p4l_record_view.html:173 -msgid "subject meetings" -msgstr "réunion sujets" - -#: templates/p4l/p4l_record_view.html:191 -msgid "corporate authors" -msgstr "entités auteurs" - -#: templates/p4l/p4l_record_view.html:195 -msgid "corporate author label" -msgstr "Libellé de l'auteur institutionnel" - -#: templates/p4l/p4l_record_view.html:199 -msgid "Urls" -msgstr "Urls" - -#: templates/p4l/p4l_record_view.html:205 -msgid "Address" -msgstr "Adresse" - -#: templates/p4l/p4l_record_view.html:206 -msgid "Display" -msgstr "Affichage" - -#: templates/p4l/p4l_record_view.html:214 -msgid "record type" -msgstr "type de notice" - -#: templates/p4l/p4l_record_view.html:218 -msgid "audiences" -msgstr "audiences" - -#: templates/p4l/p4l_record_view.html:222 -msgid "is document part" -msgstr "document partiel" - -#: templates/p4l/p4l_record_view.html:226 -msgid "is hidden" -msgstr "caché" - -#: templates/p4l/p4l_record_view.html:230 -msgid "is restricted" -msgstr "restreint" - #: templates/p4l/record_update_form.html:52 templates/p4l/translations.html:4 msgid "Save" msgstr "Enregistrer" @@ -338,6 +134,200 @@ msgid "View the record" msgstr "Voir la notice" +#: templates/p4l/record_update_form.html:61 +#: templates/p4l/record_update_form.html:249 templates/p4l/record_view.html:12 +#: templates/p4l/record_view.html.py:238 +msgid "" +"Are your sure you want to delete this record ? This action is irreversible." +msgstr "" +"Êtes-vous sûr sur vouloir effacer cette notice ? Cette action est " +"irréversible." + +#: templates/p4l/record_update_form.html:61 +#: templates/p4l/record_update_form.html:249 templates/p4l/record_view.html:12 +#: templates/p4l/record_view.html.py:238 +msgid "Delete the record" +msgstr "Effacer la notice" + +#: templates/p4l/record_view.html:11 templates/p4l/record_view.html.py:237 +#: templates/p4l/translations.html:21 +msgid "Edit the record" +msgstr "Modifier la notice" + +#: templates/p4l/record_view.html:16 +msgid "property" +msgstr "propriété" + +#: templates/p4l/record_view.html:16 +msgid "value" +msgstr "valeur" + +#: templates/p4l/record_view.html:24 +msgid "subjects" +msgstr "sujets" + +#: templates/p4l/record_view.html:28 +msgid "themes" +msgstr "thèmes" + +#: templates/p4l/record_view.html:32 +msgid "countries" +msgstr "pays" + +#: templates/p4l/record_view.html:40 +msgid "notes" +msgstr "notes" + +#: templates/p4l/record_view.html:44 +msgid "issns" +msgstr "issns" + +#: templates/p4l/record_view.html:48 +msgid "isbns" +msgstr "isbns" + +#: templates/p4l/record_view.html:52 +msgid "document code" +msgstr "code document" + +#: templates/p4l/record_view.html:60 +msgid "other languages" +msgstr "autres langues" + +#: templates/p4l/record_view.html:68 +msgid "abstracts" +msgstr "résumés" + +#: templates/p4l/record_view.html:72 +msgid "added titles" +msgstr "titres ajoutés" + +#: templates/p4l/record_view.html:76 +msgid "titles main document" +msgstr "titre doc. principal" + +#: templates/p4l/record_view.html:80 +msgid "edition statement" +msgstr "déclatation pub." + +#: templates/p4l/record_view.html:84 +msgid "imprints" +msgstr "impressions" + +#: templates/p4l/record_view.html:90 +msgid "City" +msgstr "Ville" + +#: templates/p4l/record_view.html:91 +msgid "Publisher" +msgstr "Éditeur" + +#: templates/p4l/record_view.html:92 templates/p4l/record_view.html.py:138 +#: templates/p4l/record_view.html:183 +msgid "Date" +msgstr "Date" + +#: templates/p4l/record_view.html:93 templates/p4l/record_view.html.py:113 +msgid "Language" +msgstr "Langue" + +#: templates/p4l/record_view.html:101 +msgid "collations" +msgstr "paginations" + +#: templates/p4l/record_view.html:105 +msgid "volume issues" +msgstr "volume de parution" + +#: templates/p4l/record_view.html:111 templates/p4l/record_view.html.py:154 +msgid "Volume" +msgstr "Volume" + +#: templates/p4l/record_view.html:112 templates/p4l/record_view.html.py:136 +#: templates/p4l/record_view.html:181 +msgid "Number" +msgstr "Nombre" + +#: templates/p4l/record_view.html:121 +msgid "project names" +msgstr "noms de projet" + +#: templates/p4l/record_view.html:125 +msgid "periodicals" +msgstr "périodiques" + +#: templates/p4l/record_view.html:129 +msgid "meetings" +msgstr "réunion" + +#: templates/p4l/record_view.html:137 templates/p4l/record_view.html.py:182 +msgid "Place" +msgstr "Lieu" + +#: templates/p4l/record_view.html:139 templates/p4l/record_view.html.py:184 +msgid "Year" +msgstr "Année" + +#: templates/p4l/record_view.html:147 +msgid "series" +msgstr "séries" + +#: templates/p4l/record_view.html:162 +msgid "authors" +msgstr "auteurs" + +#: templates/p4l/record_view.html:166 +msgid "subject persons" +msgstr "personnes sujets" + +#: templates/p4l/record_view.html:170 +msgid "subject corporate bodies" +msgstr "personne morale sujets" + +#: templates/p4l/record_view.html:174 +msgid "subject meetings" +msgstr "réunion sujets" + +#: templates/p4l/record_view.html:192 +msgid "corporate authors" +msgstr "entités auteurs" + +#: templates/p4l/record_view.html:196 +msgid "corporate author label" +msgstr "Libellé de l'auteur institutionnel" + +#: templates/p4l/record_view.html:200 +msgid "Urls" +msgstr "Urls" + +#: templates/p4l/record_view.html:206 +msgid "Address" +msgstr "Adresse" + +#: templates/p4l/record_view.html:207 +msgid "Display" +msgstr "Affichage" + +#: templates/p4l/record_view.html:215 +msgid "record type" +msgstr "type de notice" + +#: templates/p4l/record_view.html:219 +msgid "audiences" +msgstr "audiences" + +#: templates/p4l/record_view.html:223 +msgid "is document part" +msgstr "document partiel" + +#: templates/p4l/record_view.html:227 +msgid "is hidden" +msgstr "caché" + +#: templates/p4l/record_view.html:231 +msgid "is restricted" +msgstr "restreint" + #: templates/p4l/translations.html:3 msgid "Add" msgstr "Ajouter" diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/search/index.py --- a/src/p4l/search/index.py Mon Sep 23 00:38:16 2013 +0200 +++ b/src/p4l/search/index.py Wed Sep 25 22:14:51 2013 +0200 @@ -29,7 +29,7 @@ else: missing_uris.append(uri) - new_labels = get_labels_for_uris(missing_uris, settings.RDF_SCHEMES['organization'], None, True) + new_labels = get_labels_for_uris(missing_uris, settings.RDF_SCHEMES['organizations'], None, True) for k,v in new_labels.iteritems(): cache.set(safe_cache_key(k),v) res[k] = v diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/search/views.py --- a/src/p4l/search/views.py Mon Sep 23 00:38:16 2013 +0200 +++ b/src/p4l/search/views.py Wed Sep 25 22:14:51 2013 +0200 @@ -16,7 +16,7 @@ def __init__(self, template=None, load_all=True, form_class=None, searchqueryset=None, context_class=RequestContext, results_per_page=None): record_searchQuerySet = SearchQuerySet().order_by('identifier') - template = "p4l/p4l_home.html" + template = "p4l/home.html" results_per_page= settings.NB_RECORDS_BY_PAGE form_class = RecordSearchForm SearchView.__init__(self, template=template, load_all=False, form_class=form_class, searchqueryset=record_searchQuerySet, context_class=context_class, results_per_page=results_per_page) diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/settings.py --- a/src/p4l/settings.py Mon Sep 23 00:38:16 2013 +0200 +++ b/src/p4l/settings.py Wed Sep 25 22:14:51 2013 +0200 @@ -199,354 +199,17 @@ } -SPARQL_QUERY_ENDPOINT = "http://localhost:8080/openrdf-sesame/repositories/plan4learning" -SPARQL_SUBJECT_QUERIES = { -"filter" : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label -WHERE { - ?uri a skos:Concept. - ?uri skos:inScheme . - ?uri skos:prefLabel ?label. - FILTER (lang(?label) = %s). - ?uri skos:prefLabel ?lab. - FILTER regex (str(?lab), ?reg, 'i'). - FILTER (lang (?lab) = %s). - BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). - BIND (STRLEN(STR(?lab)) AS ?len) -} -ORDER BY ?place ?len ?lab -""", -"root" : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label ?type -WHERE { - ?uri a skos:Collection ; - skos:inScheme ; - skos:prefLabel|rdfs:label ?label ; - rdf:type ?type ; - FILTER (lang(?label) = %s). - FILTER NOT EXISTS { [skos:member ?uri] }. -} -ORDER BY ?label -""", -"childs" : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label ?type -WHERE { - ?uri skos:inScheme . - { ?uri a ?type - FILTER (?type = skos:Collection || ?type = skos:Concept) }. - ?root skos:narrower|skos:member ?uri. - ?uri skos:prefLabel|rdfs:label ?label. - FILTER (lang(?label) = %s). -} -ORDER BY ?label -""", -"child-count" : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT (COUNT(?uri) as ?nb) -WHERE { - ?uri skos:inScheme . - ?root skos:narrower|skos:member ?uri. -} -""" -} -SPARQL_THEME_QUERIES = { -'filter' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label -WHERE { - ?uri a skos:Concept. - ?uri skos:inScheme . - ?uri skos:prefLabel ?label. - FILTER (lang(?label) = %s). - ?uri skos:prefLabel ?lab. - FILTER regex (str(?lab), ?reg, 'i'). - FILTER (lang (?lab) = %s). - BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). - BIND (STRLEN(STR(?lab)) AS ?len) -} -ORDER BY ?place ?len ?lab -""", -'root' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label ?type -WHERE { - ?uri a skos:Collection ; - skos:inScheme ; - skos:prefLabel|rdfs:label ?label ; - rdf:type ?type ; - FILTER (lang(?label) = %s). - FILTER NOT EXISTS { [skos:member ?uri] } -} -ORDER BY ?label -""", -'childs' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label ?type -WHERE { - ?uri skos:inScheme . - { ?uri a ?type - FILTER (?type = skos:Collection || ?type = skos:Concept) }. - ?root skos:narrower|skos:member ?uri. - ?uri skos:prefLabel|rdfs:label ?label. - FILTER (lang(?label) = %s). -} -ORDER BY ?label -""", -'child-count' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT (COUNT(?uri) as ?nb) -WHERE { - ?uri skos:inScheme . - ?root skos:narrower|skos:member ?uri. -} -""" -} -SPARQL_COUNTRY_QUERIES = { -'filter' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label -WHERE { - ?uri a skos:Concept. - ?uri skos:inScheme . - ?uri skos:prefLabel ?label. - FILTER (lang(?label) = %s). - ?uri skos:prefLabel ?lab. - FILTER regex (str(?lab), ?reg, 'i'). - FILTER (lang (?lab) = %s). - BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). - BIND (STRLEN(STR(?lab)) AS ?len) -} -ORDER BY ?place ?len ?lab -""", -'root' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label -WHERE { - ?uri a skos:Concept ; - skos:inScheme ; - skos:prefLabel ?label . - FILTER (lang(?label) = %s). - FILTER NOT EXISTS { [skos:narrower ?uri] } -} -ORDER BY ?label -""", -'childs' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label -WHERE { - ?uri skos:inScheme . - { ?uri a ?type - FILTER (?type = skos:Collection || ?type = skos:Concept) }. - ?root skos:narrower|skos:member ?uri. - ?uri skos:prefLabel|rdfs:label ?label. - FILTER (lang(?label) = %s). -} -ORDER BY ?label -""", -'child-count' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT (COUNT(?uri) as ?nb) -WHERE { - ?uri skos:inScheme . - ?root skos:narrower|skos:member ?uri. -} -""" -} -SPARQL_LANGUAGE_QUERIES = { -'filter' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label -WHERE { - ?uri a skos:Concept. - ?uri skos:inScheme . - ?uri skos:prefLabel ?label. - FILTER (lang(?label) = %s). - ?uri skos:prefLabel ?lab. - FILTER regex (str(?lab), ?reg, 'i'). - FILTER (lang (?lab) = %s). - BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). - BIND (STRLEN(STR(?lab)) AS ?len) -} -ORDER BY ?place ?len ?lab -""", -'root' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label -WHERE { - ?uri a skos:Concept ; - skos:inScheme ; - skos:prefLabel ?label . - FILTER (lang(?label) = %s). - FILTER NOT EXISTS { [skos:narrower ?uri] } -} -ORDER BY ?label -""" -} -SPARQL_PROJECT_QUERIES = { -'filter' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label ?acro -WHERE { - ?uri a skos:Concept. - ?uri skos:inScheme . - ?uri skos:prefLabel ?label. - ?uri skos:prefLabel ?lab. - OPTIONAL { ?uri skos:altLabel ?acro }. - FILTER regex (str(?lab), ?reg, 'i'). - BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). - BIND (STRLEN(STR(?lab)) AS ?len) -} -ORDER BY ?place ?len ?lab -""", -'root' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label ?acro -WHERE { - ?uri a skos:Concept ; - skos:inScheme ; - skos:prefLabel ?label . - OPTIONAL { ?uri skos:altLabel ?acro } -} -ORDER BY ?label -""" -} -SPARQL_ORGANIZATION_QUERIES = { -'filter' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label ?acro -WHERE { - ?uri a skos:Concept. - ?uri skos:inScheme . - ?uri skos:prefLabel ?label. - ?uri skos:prefLabel ?lab. - OPTIONAL { ?uri skos:altLabel ?acro }. - FILTER regex (str(?lab), ?reg, 'i'). - BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). - BIND (STRLEN(STR(?lab)) AS ?len) -} -ORDER BY ?place ?len ?lab -""", -'root' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label ?acro -WHERE { - ?uri a skos:Concept ; - skos:inScheme ; - skos:prefLabel ?label . - OPTIONAL { ?uri skos:altLabel ?acro } -} -ORDER BY ?label -""" -} -SPARQL_TYPE_QUERIES = { -'filter' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label -WHERE { - ?uri a skos:Concept. - ?uri skos:inScheme . - ?uri skos:prefLabel ?label. - FILTER (lang(?label) = %s). - ?uri skos:prefLabel ?lab. - FILTER regex (str(?lab), ?reg, 'i'). - FILTER (lang (?lab) = %s). - BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). - BIND (STRLEN(STR(?lab)) AS ?len) -} -ORDER BY ?place ?len ?lab -""", -'root' : """ -PREFIX skos: -PREFIX rdf: -PREFIX owl: -PREFIX rdfs: -SELECT DISTINCT ?uri ?label -WHERE { - ?uri a skos:Concept ; - skos:inScheme ; - skos:prefLabel ?label . - FILTER (lang(?label) = %s). - FILTER NOT EXISTS { [skos:narrower ?uri] } -} -ORDER BY ?label -""" -} -SPARQL_AUDIENCE_QUERIES = { -"filter" : "", -"root" : "", -"childs" : "", -"child-count" : "" -} + -RDF_SCHEMES = { - 'organization': 'http://www.iiep.unesco.org/plan4learning/scheme/Organizations', - 'audience': '', - 'language': 'http://www.iiep.unesco.org/plan4learning/scheme/Languages', - 'type': 'http://www.iiep.unesco.org/plan4learning/scheme/DocumentType', - 'subject': 'http://skos.um.es/unescothes/CS000', - 'theme': 'http://www.iiep.unesco.org/plan4learning/scheme/Themes', - 'country': 'http://skos.um.es/unescothes/CS000/Countries', - 'project': 'http://www.iiep.unesco.org/plan4learning/scheme/Projects' +RDF_SCHEMES = { + 'organizations': 'http://www.iiep.unesco.org/plan4learning/scheme/Organizations', + 'audiences': '', + 'languages': 'http://www.iiep.unesco.org/plan4learning/scheme/Languages', + 'types': 'http://www.iiep.unesco.org/plan4learning/scheme/DocumentType', + 'subjects': 'http://skos.um.es/unescothes/CS000', + 'themes': 'http://www.iiep.unesco.org/plan4learning/scheme/Themes', + 'countries': 'http://skos.um.es/unescothes/CS000/Countries', + 'projects': 'http://www.iiep.unesco.org/plan4learning/scheme/Projects' } REST_FRAMEWORK = { @@ -566,195 +229,195 @@ } LANGUAGES_LIST = [ -(u"French","fr"), -(u"English","en"), -(u"Spanish; Castilian","es"), -(u"",""), -(u"Abkhaz","ab"), -(u"Afar","aa"), -(u"Afrikaans","af"), -(u"Akan","ak"), -(u"Albanian","sq"), -(u"Amharic","am"), -(u"Arabic","ar"), -(u"Aragonese","an"), -(u"Armenian","hy"), -(u"Assamese","as"), -(u"Avaric","av"), -(u"Avestan","ae"), -(u"Aymara","ay"), -(u"Azerbaijani","az"), -(u"Bambara","bm"), -(u"Bashkir","ba"), -(u"Basque","eu"), -(u"Belarusian","be"), -(u"Bengali; Bangla","bn"), -(u"Bihari","bh"), -(u"Bislama","bi"), -(u"Bosnian","bs"), -(u"Breton","br"), -(u"Bulgarian","bg"), -(u"Burmese","my"), -(u"Catalan","ca"), -(u"Chamorro","ch"), -(u"Chechen","ce"), -(u"Chichewa; Chewa; Nyanja","ny"), -(u"Chinese","zh"), -(u"Chuvash","cv"), -(u"Cornish","kw"), -(u"Corsican","co"), -(u"Cree","cr"), -(u"Croatian","hr"), -(u"Czech","cs"), -(u"Danish","da"), -(u"Divehi; Dhivehi; Maldivian;","dv"), -(u"Dutch","nl"), -(u"Dzongkha","dz"), -(u"English","en"), -(u"Esperanto","eo"), -(u"Estonian","et"), -(u"Ewe","ee"), -(u"Faroese","fo"), -(u"Fijian","fj"), -(u"Finnish","fi"), -(u"French","fr"), -(u"Fula; Fulah; Pulaar; Pular","ff"), -(u"Galician","gl"), -(u"Ganda","lg"), -(u"Georgian","ka"), -(u"German","de"), -(u"Greek Modern","el"), -(u"Guarani","gn"), -(u"Gujarati","gu"), -(u"Haitian; Haitian Creole","ht"), -(u"Hausa","ha"), -(u"Hebrew","he"), -(u"Herero","hz"), -(u"Hindi","hi"), -(u"Hiri Motu","ho"), -(u"Hungarian","hu"), -(u"Icelandic","is"), -(u"Ido","io"), -(u"Igbo","ig"), -(u"Indonesian","id"), -(u"Interlingua","ia"), -(u"Interlingue","ie"), -(u"Inuktitut","iu"), -(u"Inupiaq","ik"), -(u"Irish","ga"), -(u"Italian","it"), -(u"Japanese","ja"), -(u"Javanese","jv"), -(u"Kalaallisut; Greenlandic","kl"), -(u"Kannada","kn"), -(u"Kanuri","kr"), -(u"Kashmiri","ks"), -(u"Kazakh","kk"), -(u"Khmer","km"), -(u"Kikuyu; Gikuyu","ki"), -(u"Kinyarwanda","rw"), -(u"Kirundi","rn"), -(u"Komi","kv"), -(u"Kongo","kg"), -(u"Korean","ko"), -(u"Kurdish","ku"), -(u"Kwanyama; Kuanyama","kj"), -(u"Kyrgyz","ky"), -(u"Lao","lo"), -(u"Latin","la"), -(u"Latvian","lv"), -(u"Limburgish; Limburgan; Limburger","li"), -(u"Lingala","ln"), -(u"Lithuanian","lt"), -(u"Luba-Katanga","lu"), -(u"Luxembourgish; Letzeburgesch","lb"), -(u"Macedonian","mk"), -(u"Malagasy","mg"), -(u"Malay","ms"), -(u"Malayalam","ml"), -(u"Maltese","mt"), -(u"Manx","gv"), -(u"Marathi","mr"), -(u"Marshallese","mh"), -(u"Mongolian","mn"), -(u"Maori","mi"), -(u"Nauru","na"), -(u"Navajo; Navaho","nv"), -(u"Ndonga","ng"), -(u"Nepali","ne"), -(u"North Ndebele","nd"), -(u"Northern Sami","se"), -(u"Norwegian","no"), -(u"Norwegian Bokmal","nb"), -(u"Norwegian Nynorsk","nn"), -(u"Nuosu","ii"), -(u"Occitan","oc"), -(u"Ojibwe; Ojibwa","oj"), -(u"Church Slavic; Church Slavonic","cu"), -(u"Oriya","or"), -(u"Oromo","om"), -(u"Ossetian; Ossetic","os"), -(u"Panjabi; Punjabi","pa"), -(u"Pashto; Pushto","ps"), -(u"Persian","fa"), -(u"Polish","pl"), -(u"Portuguese","pt"), -(u"Pali","pi"), -(u"Quechua","qu"), -(u"Romanian; Moldavian","ro"), -(u"Romansh","rm"), -(u"Russian","ru"), -(u"Samoan","sm"), -(u"Sango","sg"), +(u"French", "fr"), +(u"English", "en"), +(u"Spanish; Castilian", "es"), +(u"", ""), +(u"Abkhaz", "ab"), +(u"Afar", "aa"), +(u"Afrikaans", "af"), +(u"Akan", "ak"), +(u"Albanian", "sq"), +(u"Amharic", "am"), +(u"Arabic", "ar"), +(u"Aragonese", "an"), +(u"Armenian", "hy"), +(u"Assamese", "as"), +(u"Avaric", "av"), +(u"Avestan", "ae"), +(u"Aymara", "ay"), +(u"Azerbaijani", "az"), +(u"Bambara", "bm"), +(u"Bashkir", "ba"), +(u"Basque", "eu"), +(u"Belarusian", "be"), +(u"Bengali; Bangla", "bn"), +(u"Bihari", "bh"), +(u"Bislama", "bi"), +(u"Bosnian", "bs"), +(u"Breton", "br"), +(u"Bulgarian", "bg"), +(u"Burmese", "my"), +(u"Catalan", "ca"), +(u"Chamorro", "ch"), +(u"Chechen", "ce"), +(u"Chichewa; Chewa; Nyanja", "ny"), +(u"Chinese", "zh"), +(u"Chuvash", "cv"), +(u"Cornish", "kw"), +(u"Corsican", "co"), +(u"Cree", "cr"), +(u"Croatian", "hr"), +(u"Czech", "cs"), +(u"Danish", "da"), +(u"Divehi; Dhivehi; Maldivian;", "dv"), +(u"Dutch", "nl"), +(u"Dzongkha", "dz"), +(u"English", "en"), +(u"Esperanto", "eo"), +(u"Estonian", "et"), +(u"Ewe", "ee"), +(u"Faroese", "fo"), +(u"Fijian", "fj"), +(u"Finnish", "fi"), +(u"French", "fr"), +(u"Fula; Fulah; Pulaar; Pular", "ff"), +(u"Galician", "gl"), +(u"Ganda", "lg"), +(u"Georgian", "ka"), +(u"German", "de"), +(u"Greek Modern", "el"), +(u"Guarani", "gn"), +(u"Gujarati", "gu"), +(u"Haitian; Haitian Creole", "ht"), +(u"Hausa", "ha"), +(u"Hebrew", "he"), +(u"Herero", "hz"), +(u"Hindi", "hi"), +(u"Hiri Motu", "ho"), +(u"Hungarian", "hu"), +(u"Icelandic", "is"), +(u"Ido", "io"), +(u"Igbo", "ig"), +(u"Indonesian", "id"), +(u"Interlingua", "ia"), +(u"Interlingue", "ie"), +(u"Inuktitut", "iu"), +(u"Inupiaq", "ik"), +(u"Irish", "ga"), +(u"Italian", "it"), +(u"Japanese", "ja"), +(u"Javanese", "jv"), +(u"Kalaallisut; Greenlandic", "kl"), +(u"Kannada", "kn"), +(u"Kanuri", "kr"), +(u"Kashmiri", "ks"), +(u"Kazakh", "kk"), +(u"Khmer", "km"), +(u"Kikuyu; Gikuyu", "ki"), +(u"Kinyarwanda", "rw"), +(u"Kirundi", "rn"), +(u"Komi", "kv"), +(u"Kongo", "kg"), +(u"Korean", "ko"), +(u"Kurdish", "ku"), +(u"Kwanyama; Kuanyama", "kj"), +(u"Kyrgyz", "ky"), +(u"Lao", "lo"), +(u"Latin", "la"), +(u"Latvian", "lv"), +(u"Limburgish; Limburgan; Limburger", "li"), +(u"Lingala", "ln"), +(u"Lithuanian", "lt"), +(u"Luba-Katanga", "lu"), +(u"Luxembourgish; Letzeburgesch", "lb"), +(u"Macedonian", "mk"), +(u"Malagasy", "mg"), +(u"Malay", "ms"), +(u"Malayalam", "ml"), +(u"Maltese", "mt"), +(u"Manx", "gv"), +(u"Marathi", "mr"), +(u"Marshallese", "mh"), +(u"Mongolian", "mn"), +(u"Maori", "mi"), +(u"Nauru", "na"), +(u"Navajo; Navaho", "nv"), +(u"Ndonga", "ng"), +(u"Nepali", "ne"), +(u"North Ndebele", "nd"), +(u"Northern Sami", "se"), +(u"Norwegian", "no"), +(u"Norwegian Bokmal", "nb"), +(u"Norwegian Nynorsk", "nn"), +(u"Nuosu", "ii"), +(u"Occitan", "oc"), +(u"Ojibwe; Ojibwa", "oj"), +(u"Church Slavic; Church Slavonic", "cu"), +(u"Oriya", "or"), +(u"Oromo", "om"), +(u"Ossetian; Ossetic", "os"), +(u"Panjabi; Punjabi", "pa"), +(u"Pashto; Pushto", "ps"), +(u"Persian", "fa"), +(u"Polish", "pl"), +(u"Portuguese", "pt"), +(u"Pali", "pi"), +(u"Quechua", "qu"), +(u"Romanian; Moldavian", "ro"), +(u"Romansh", "rm"), +(u"Russian", "ru"), +(u"Samoan", "sm"), +(u"Sango", "sg"), (u"Sanskrit (Samskrta),sa"), -(u"Sardinian","sc"), -(u"Scottish Gaelic; Gaelic","gd"), -(u"Serbian","sr"), -(u"Shona","sn"), -(u"Sindhi","sd"), -(u"Sinhala; Sinhalese","si"), -(u"Slovak","sk"), -(u"Slovene","sl"), -(u"Somali","so"), -(u"South Azerbaijani","az"), -(u"South Ndebele","nr"), -(u"Southern Sotho","st"), -(u"Spanish; Castilian","es"), -(u"Sundanese","su"), -(u"Swahili","sw"), -(u"Swati","ss"), -(u"Swedish","sv"), -(u"Tagalog","tl"), -(u"Tahitian","ty"), -(u"Tajik","tg"), -(u"Tamil","ta"), -(u"Tatar","tt"), -(u"Telugu","te"), -(u"Thai","th"), -(u"Tibetan","bo"), -(u"Tigrinya","ti"), -(u"Tonga","to"), -(u"Tsonga","ts"), -(u"Tswana","tn"), -(u"Turkish","tr"), -(u"Turkmen","tk"), -(u"Twi","tw"), -(u"Ukrainian","uk"), -(u"Urdu","ur"), -(u"Uyghur; Uighur","ug"), -(u"Uzbek","uz"), -(u"Venda","ve"), -(u"Vietnamese","vi"), -(u"Volapuk","vo"), -(u"Walloon","wa"), -(u"Welsh","cy"), -(u"Western Frisian","fy"), -(u"Wolof","wo"), -(u"Xhosa","xh"), -(u"Yiddish","yi"), -(u"Yoruba","yo"), -(u"Zhuang; Chuang","za"), -(u"Zulu","zu")] +(u"Sardinian", "sc"), +(u"Scottish Gaelic; Gaelic", "gd"), +(u"Serbian", "sr"), +(u"Shona", "sn"), +(u"Sindhi", "sd"), +(u"Sinhala; Sinhalese", "si"), +(u"Slovak", "sk"), +(u"Slovene", "sl"), +(u"Somali", "so"), +(u"South Azerbaijani", "az"), +(u"South Ndebele", "nr"), +(u"Southern Sotho", "st"), +(u"Spanish; Castilian", "es"), +(u"Sundanese", "su"), +(u"Swahili", "sw"), +(u"Swati", "ss"), +(u"Swedish", "sv"), +(u"Tagalog", "tl"), +(u"Tahitian", "ty"), +(u"Tajik", "tg"), +(u"Tamil", "ta"), +(u"Tatar", "tt"), +(u"Telugu", "te"), +(u"Thai", "th"), +(u"Tibetan", "bo"), +(u"Tigrinya", "ti"), +(u"Tonga", "to"), +(u"Tsonga", "ts"), +(u"Tswana", "tn"), +(u"Turkish", "tr"), +(u"Turkmen", "tk"), +(u"Twi", "tw"), +(u"Ukrainian", "uk"), +(u"Urdu", "ur"), +(u"Uyghur; Uighur", "ug"), +(u"Uzbek", "uz"), +(u"Venda", "ve"), +(u"Vietnamese", "vi"), +(u"Volapuk", "vo"), +(u"Walloon", "wa"), +(u"Welsh", "cy"), +(u"Western Frisian", "fy"), +(u"Wolof", "wo"), +(u"Xhosa", "xh"), +(u"Yiddish", "yi"), +(u"Yoruba", "yo"), +(u"Zhuang; Chuang", "za"), +(u"Zulu", "zu")] from config import * # @UnusedWildImport @@ -767,4 +430,356 @@ if not "LOGIN_REDIRECT_URL" in locals(): LOGIN_REDIRECT_URL = SRC_BASE_URL if not "LOGOUT_REDIRECT_URL" in locals(): - LOGOUT_REDIRECT_URL = SRC_BASE_URL + 'auth/login' + LOGOUT_REDIRECT_URL = SRC_BASE_URL + 'auth/login' + +if not "SPARQL_QUERY_ENDPOINT" in locals(): + SPARQL_QUERY_ENDPOINT = "http://localhost:8080/openrdf-sesame/repositories/plan4learning" + +if not "SPARQL_REF_QUERIES" in locals(): + SPARQL_REF_QUERIES = { + 'subjects': { + 'url' : SPARQL_QUERY_ENDPOINT, + 'filter' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label + WHERE {{ + ?uri a skos:Concept. + ?uri skos:inScheme . + ?uri skos:prefLabel ?label. + FILTER (lang(?label) = {lang}). + ?uri skos:prefLabel ?lab. + FILTER regex (str(?lab), ?reg, 'i'). + FILTER (lang (?lab) = {lang}). + BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). + BIND (STRLEN(STR(?lab)) AS ?len) + }} + ORDER BY ?place ?len ?lab + """, + "root" : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label ?type + WHERE {{ + ?uri a skos:Collection ; + skos:inScheme ; + skos:prefLabel|rdfs:label ?label ; + rdf:type ?type . + FILTER (lang(?label) = {lang}). + FILTER NOT EXISTS {{ [skos:member ?uri] }}. + }} + ORDER BY ?label + """, + "childs" : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label ?type + WHERE {{ + ?uri skos:inScheme . + {{ ?uri a ?type + FILTER (?type = skos:Collection || ?type = skos:Concept) }}. + ?root skos:narrower|skos:member ?uri. + ?uri skos:prefLabel|rdfs:label ?label. + FILTER (lang(?label) = {lang}). + }} + ORDER BY ?label + """, + "child-count" : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT (COUNT(?uri) as ?nb) + WHERE {{ + ?uri skos:inScheme . + ?root skos:narrower|skos:member ?uri. + }} + """ + }, + 'themes': { + 'url' : SPARQL_QUERY_ENDPOINT, + 'filter' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label + WHERE {{ + ?uri a skos:Concept. + ?uri skos:inScheme . + ?uri skos:prefLabel ?label. + FILTER (lang(?label) = {lang}). + ?uri skos:prefLabel ?lab. + FILTER regex (str(?lab), ?reg, 'i'). + FILTER (lang (?lab) = {lang}). + BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). + BIND (STRLEN(STR(?lab)) AS ?len) + }} + ORDER BY ?place ?len ?lab + """, + 'root' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label ?type + WHERE {{ + ?uri a skos:Collection ; + skos:inScheme ; + skos:prefLabel|rdfs:label ?label ; + rdf:type ?type . + FILTER (lang(?label) = {lang}). + FILTER NOT EXISTS {{ [skos:member ?uri] }} + }} + ORDER BY ?label + """, + 'childs' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label ?type + WHERE {{ + ?uri skos:inScheme . + {{ ?uri a ?type + FILTER (?type = skos:Collection || ?type = skos:Concept) }}. + ?root skos:narrower|skos:member ?uri. + ?uri skos:prefLabel|rdfs:label ?label. + FILTER (lang(?label) = {lang}). + }} + ORDER BY ?label + """, + 'child-count' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT (COUNT(?uri) as ?nb) + WHERE {{ + ?uri skos:inScheme . + ?root skos:narrower|skos:member ?uri. + }} + """ + }, + 'countries': { + 'url' : SPARQL_QUERY_ENDPOINT, + 'filter' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label + WHERE {{ + ?uri a skos:Concept. + ?uri skos:inScheme . + ?uri skos:prefLabel ?label. + FILTER (lang(?label) = {lang}). + ?uri skos:prefLabel ?lab. + FILTER regex (str(?lab), ?reg, 'i'). + FILTER (lang (?lab) = {lang}). + BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). + BIND (STRLEN(STR(?lab)) AS ?len) + }} + ORDER BY ?place ?len ?lab + """, + 'root' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label + WHERE {{ + ?uri a skos:Concept ; + skos:inScheme ; + skos:prefLabel ?label . + FILTER (lang(?label) = {lang}). + FILTER NOT EXISTS {{ [skos:narrower ?uri] }} + }} + ORDER BY ?label + """, + 'childs' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label + WHERE {{ + ?uri skos:inScheme . + {{ ?uri a ?type + FILTER (?type = skos:Collection || ?type = skos:Concept) }}. + ?root skos:narrower|skos:member ?uri. + ?uri skos:prefLabel|rdfs:label ?label. + FILTER (lang(?label) = {lang}). + }} + ORDER BY ?label + """, + 'child-count' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT (COUNT(?uri) as ?nb) + WHERE {{ + ?uri skos:inScheme . + ?root skos:narrower|skos:member ?uri. + }} + """ + }, + 'languages': { + 'url' : SPARQL_QUERY_ENDPOINT, + 'filter' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label + WHERE {{ + ?uri a skos:Concept. + ?uri skos:inScheme . + ?uri skos:prefLabel ?label. + FILTER (lang(?label) = {lang}). + ?uri skos:prefLabel ?lab. + FILTER regex (str(?lab), ?reg, 'i'). + FILTER (lang (?lab) = {lang}). + BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). + BIND (STRLEN(STR(?lab)) AS ?len) + }} + ORDER BY ?place ?len ?lab + """, + 'root' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label + WHERE {{ + ?uri a skos:Concept ; + skos:inScheme ; + skos:prefLabel ?label . + FILTER (lang(?label) = {lang}). + FILTER NOT EXISTS {{ [skos:narrower ?uri] }} + }} + ORDER BY ?label + """ + }, + 'projects': { + 'url' : SPARQL_QUERY_ENDPOINT, + 'filter' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label ?acro + WHERE {{ + ?uri a skos:Concept. + ?uri skos:inScheme . + ?uri skos:prefLabel ?label. + ?uri skos:prefLabel ?lab. + OPTIONAL {{ ?uri skos:altLabel ?acro }}. + FILTER regex (str(?lab), ?reg, 'i'). + BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). + BIND (STRLEN(STR(?lab)) AS ?len) + }} + ORDER BY ?place ?len ?lab + """, + 'root' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label ?acro + WHERE {{ + ?uri a skos:Concept ; + skos:inScheme ; + skos:prefLabel ?label . + OPTIONAL {{ ?uri skos:altLabel ?acro }} + }} + ORDER BY ?label + """ + }, + 'organizations': { + 'url' : SPARQL_QUERY_ENDPOINT, + 'filter' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label ?acro + WHERE {{ + ?uri a skos:Concept. + ?uri skos:inScheme . + ?uri skos:prefLabel ?label. + ?uri skos:prefLabel ?lab. + OPTIONAL {{ ?uri skos:altLabel ?acro }}. + FILTER regex (str(?lab), ?reg, 'i'). + BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). + BIND (STRLEN(STR(?lab)) AS ?len) + }} + ORDER BY ?place ?len ?lab + """, + 'root' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label ?acro + WHERE {{ + ?uri a skos:Concept ; + skos:inScheme ; + skos:prefLabel ?label . + OPTIONAL {{ ?uri skos:altLabel ?acro }} + }} + ORDER BY ?label + """ + }, + 'types': { + 'url' : SPARQL_QUERY_ENDPOINT, + 'filter' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label + WHERE {{ + ?uri a skos:Concept. + ?uri skos:inScheme . + ?uri skos:prefLabel ?label. + FILTER (lang(?label) = {lang}). + ?uri skos:prefLabel ?lab. + FILTER regex (str(?lab), ?reg, 'i'). + FILTER (lang (?lab) = {lang}). + BIND (STRLEN(STRBEFORE (str(?lab), ?reg)) AS ?place). + BIND (STRLEN(STR(?lab)) AS ?len) + }} + ORDER BY ?place ?len ?lab + """, + 'root' : """ + PREFIX skos: + PREFIX rdf: + PREFIX owl: + PREFIX rdfs: + SELECT DISTINCT ?uri ?label + WHERE {{ + ?uri a skos:Concept ; + skos:inScheme ; + skos:prefLabel ?label . + FILTER (lang(?label) = {lang}). + FILTER NOT EXISTS {{ [skos:narrower ?uri] }} + }} + ORDER BY ?label + """ + }, + 'audiences': { + 'url' : SPARQL_QUERY_ENDPOINT, + "filter" : "", + "root" : "", + "childs" : "", + "child-count" : "" + } + } diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/static/p4l/js/p4l.js --- a/src/p4l/static/p4l/js/p4l.js Mon Sep 23 00:38:16 2013 +0200 +++ b/src/p4l/static/p4l/js/p4l.js Wed Sep 25 22:14:51 2013 +0200 @@ -5,7 +5,7 @@ app.service("Api", function($resource, context) { this.record = $resource(context.urls.record_api, - {}, + {recordId: context.record_id}, { get: { method: "GET", @@ -20,7 +20,12 @@ }); app.service("RecordModel", function(Api, context) { - this.record = Api.record.get({recordId: context.record_id}); + if(context.record == null) { + this.record = Api.record.get(); + } + else { + this.record = new Api.record(context.record); + } this.uriLabels = context.uri_labels; }); @@ -174,11 +179,9 @@ }, link: function($scope, $element, $attrs) { // Get queries attributes from $scope listname and context query dict - var attr_dict = context.query_dicts[$scope.listname]; + var attr_dict = context.query_dicts[$scope.listname]; for (var k in attr_dict){ - if (attr_dict.hasOwnProperty(k)) { - $scope[k] = attr_dict[k]; - } + $scope[k] = attr_dict[k]; } $scope.formVisible = false; // initalize autocomplete and browse thesaurus events diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/templates/p4l/base.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/p4l/templates/p4l/base.html Wed Sep 25 22:14:51 2013 +0200 @@ -0,0 +1,68 @@ +{% load static %} +{% load i18n %} + + + + + + + {% block head %} + + {% endblock %} + Plan4Learning - {% block page_title %}{% endblock %} + {% block css_common %} + + + {% endblock %} + {% block css_page %} + {% endblock %} + + +{% block body %} + +
+ {% block content %} + {% endblock %} +
+
+ {% block footer %} +
+
+ {% csrf_token %} + {% get_language_info_list for LANGUAGES as languages %} + {% for language in languages %} + + {% endfor %} +
+
+ {% endblock %} +
+ {% block js_common %} + + {% endblock %} + {% block js_page %} + {% endblock %} +{% endblock %} + + \ No newline at end of file diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/templates/p4l/home.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/p4l/templates/p4l/home.html Wed Sep 25 22:14:51 2013 +0200 @@ -0,0 +1,78 @@ +{% extends "p4l/base.html" %} +{% load static %} +{% load i18n %} +{% load p4lstringfilters %} + +{% block page_title %}{% trans 'Record List' %} - {% trans 'Page' %} {{ page.number }}{% endblock %} + +{% block content %} +
+

{% trans 'Record List' %}

+
+
+
+ +
+
+ +
+ - {% trans 'New record' %} +
+
+
+ + + + + + + + {% for result in page.object_list %} + + + + + + + {% empty %} + + {% endfor %} + +
{% trans 'identifier' %}{% trans 'titles' %}{% trans 'dates' %}{% trans 'actions' %}
{{ result.get_stored_fields.identifier }}
    {% for t in result.get_stored_fields.titles_src %} +
  • {{ t }}
  • + {% endfor %}
{{ result.get_stored_fields.years|join:", "}} + + +
{% trans 'No record' %}
+{% if is_paginated %} + +{% endif %} +{% endblock %} \ No newline at end of file diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/templates/p4l/p4l_base.html --- a/src/p4l/templates/p4l/p4l_base.html Mon Sep 23 00:38:16 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -{% load static %} -{% load i18n %} - - - - - - - {% block head %} - - {% endblock %} - Plan4Learning - {% block page_title %}{% endblock %} - {% block css_common %} - - - {% endblock %} - {% block css_page %} - {% endblock %} - - -{% block body %} - -
- {% block content %} - {% endblock %} -
-
- {% block footer %} -
-
- {% csrf_token %} - {% get_language_info_list for LANGUAGES as languages %} - {% for language in languages %} - - {% endfor %} -
-
- {% endblock %} -
- {% block js_common %} - - {% endblock %} - {% block js_page %} - {% endblock %} -{% endblock %} - - \ No newline at end of file diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/templates/p4l/p4l_home.html --- a/src/p4l/templates/p4l/p4l_home.html Mon Sep 23 00:38:16 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -{% extends "p4l/p4l_base.html" %} -{% load static %} -{% load i18n %} -{% load p4lstringfilters %} - -{% block page_title %}{% trans 'Record List' %} - {% trans 'Page' %} {{ page.number }}{% endblock %} - -{% block content %} -
-

{% trans 'Record List' %}

-
-
-
- -
-
- -
- - {% trans 'New record' %} -
-
-
- - - - - - - - {% for result in page.object_list %} - - - - - - - {% empty %} - - {% endfor %} - -
{% trans 'identifier' %}{% trans 'titles' %}{% trans 'dates' %}{% trans 'actions' %}
{{ result.get_stored_fields.identifier }}
    {% for t in result.get_stored_fields.titles_src %} -
  • {{ t }}
  • - {% endfor %}
{{ result.get_stored_fields.years|join:", "}} - - -
{% trans 'No record' %}
-{% if is_paginated %} - -{% endif %} -{% endblock %} \ No newline at end of file diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/templates/p4l/p4l_record_view.html --- a/src/p4l/templates/p4l/p4l_record_view.html Mon Sep 23 00:38:16 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,239 +0,0 @@ -{% extends "p4l/p4l_base.html" %} -{% load static %} -{% load i18n %} -{% load p4lstringfilters %} - -{% block page_title %}{% trans 'Record' %} {{ record.identifier }} - {% trans 'View' %}{% endblock %} - -{% block content %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% trans 'property' %}{% trans 'value' %}
URI{{ record.uri|default:'' }}
{% trans 'subjects' %}
    {% for k,v in subjects_labels.items %}
  • {{ v }} ({{ k }})
  • {% endfor %}
{% trans 'themes' %}
    {% for k,v in themes_labels.items %}
  • {{ v }} ({{ k }})
  • {% endfor %}
{% trans 'countries' %}
    {% for k,v in countries_labels.items %}
  • {{ v }} ({{ k }})
  • {% endfor %}
{% trans 'identifier' %}{{ record.identifier }}
{% trans 'notes' %}{{ record.notes|default:'' }}
{% trans 'issns' %}
    {% for i in record.issns.all %}
  • {{ i.issn|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
  • {% endfor %}
{% trans 'isbns' %}
    {% for i in record.isbns.all %}
  • {{ i.isbn|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
  • {% endfor %}
{% trans 'document code' %}
    {% for i in record.documentCodes.all %}
  • {{ i.documentCode|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
  • {% endfor %}
{% trans 'language' %}{% if record.language %}{{ language_label }} ({{ record.language.uri|default:'' }}){% endif %}
{% trans 'other languages' %}
    {% for k,v in otherLanguages_labels.items %}
  • {{ v }} ({{ k }})
  • {% endfor %}
{% trans 'titles' %}
    {% for i in record.titles.all %}
  • {{ i.title|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
  • {% endfor %}
{% trans 'abstracts' %}
    {% for i in record.abstracts.all %}
  • {{ i.abstract|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
  • {% endfor %}
{% trans 'added titles' %}
    {% for i in record.addedTitles.all %}
  • {{ i.title|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
  • {% endfor %}
{% trans 'titles main document' %}
    {% for i in record.titlesMainDocument.all %}
  • {{ i.title|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
  • {% endfor %}
{% trans 'edition statement' %}{{ record.editionStatement|default:'' }}
{% trans 'imprints' %} -
    - {% for i in record.imprints.all %} -
  • -
      -
    • {% trans 'City' %} : {{ i.imprintCity|default:'' }}
    • -
    • {% trans 'Publisher' %} : {{ i.publisher|default:'' }}
    • -
    • {% trans 'Date' %} : {{ i.imprintDate|default:'' }}
    • -
    • {% trans 'Language' %} : {{ i.lang|default:'' }}
    • -
    -
  • - {% endfor %} -
-
{% trans 'collations' %}
    {% for i in record.collations.all %}
  • {{ i.collation|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
  • {% endfor %}
{% trans 'volume issues' %} -
    - {% for i in record.volumeIssues.all %} -
  • -
      -
    • {% trans 'Volume' %} : {{ i.volume|default:'' }}
    • -
    • {% trans 'Number' %} : {{ i.number|default:'' }}
    • -
    • {% trans 'Language' %} : {{ i.lang|default:'' }}
    • -
    -
  • - {% endfor %} -
-
{% trans 'project names' %}
    {% for k,v in projects_labels.items %}
  • {{ v }} ({{ k }})
  • {% endfor %}
{% trans 'periodicals' %}
    {% for i in record.periodicals.all %}
  • {{ i.label|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
  • {% endfor %}
{% trans 'meetings' %} -
    - {% for i in record.meetings.all %} -
  • -
      -
    • {{ i.label|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
    • -
    • {% trans 'Number' %} : {{ i.meetingNumber|default:'' }}
    • -
    • {% trans 'Place' %} : {{ i.meetingPlace|default:'' }}
    • -
    • {% trans 'Date' %} : {{ i.meetingDate|default:'' }}
    • -
    • {% trans 'Year' %} : {{ i.meetingYear|default:'' }}
    • -
    -
  • - {% endfor %} -
-
{% trans 'series' %} -
    - {% for i in record.series.all %} -
  • -
      -
    • {{ i.title|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
    • - {% if i.volume %}
    • {% trans 'Volume' %} : {{ i.volume|default:'' }}
    • {% endif %} -
    -
  • - {% endfor %} -
-
{% trans 'authors' %}
    {% for i in record.authors.all %}
  • {{ i.name|default:'' }}
  • {% endfor %}
{% trans 'subject persons' %}
    {% for i in record.subjectPersons.all %}
  • {{ i.name|default:'' }}
  • {% endfor %}
{% trans 'subject corporate bodies' %}
    {% for k,v in subjectCorporateBodies_labels.items %}
  • {{ v }} ({{ k }})
  • {% endfor %}
{% trans 'subject meetings' %} -
    - {% for i in record.subjectMeetings.all %} -
  • -
      -
    • {{ i.label|default:'' }}
    • -
    • {% trans 'Number' %} : {{ i.meetingNumber|default:'' }}
    • -
    • {% trans 'Place' %} : {{ i.meetingPlace|default:'' }}
    • -
    • {% trans 'Date' %} : {{ i.meetingDate|default:'' }}
    • -
    • {% trans 'Year' %} : {{ i.meetingYear|default:'' }}
    • -
    -
  • - {% endfor %} -
-
{% trans 'corporate authors' %}
    {% for k,v in corporateAuthors_labels.items %}
  • {{ v }} ({{ k }})
  • {% endfor %}
{% trans 'corporate author label' %}{{ record.corporateAuthorLabel|default:'' }}
{% trans 'Urls' %} -
    - {% for i in record.urls.all %} -
  • -
      -
    • {% trans 'Address' %} : {% if i.address %}{{ i.address }}{% endif %}
    • -
    • {% trans 'Display' %} : {{ i.display|default:'' }}
    • -
    -
  • - {% endfor %} -
-
{% trans 'record type' %}{{ recordType_label }} ({{ record.recordType|default:'' }})
{% trans 'audiences' %}
    {% for k,v in audiences_labels.items %}
  • {{ v }} ({{ k }})
  • {% endfor %}
{% trans 'is document part' %}
{% trans 'is hidden' %}
{% trans 'is restricted' %}
- -{% endblock %} \ No newline at end of file diff -r 0a6c7c8f8490 -r 0a4e7d6ebe80 src/p4l/templates/p4l/record_update_form.html --- a/src/p4l/templates/p4l/record_update_form.html Mon Sep 23 00:38:16 2013 +0200 +++ b/src/p4l/templates/p4l/record_update_form.html Wed Sep 25 22:14:51 2013 +0200 @@ -1,4 +1,4 @@ -{% extends "p4l/p4l_base.html" %} +{% extends "p4l/base.html" %} {% load static %} {% load i18n %} @@ -23,6 +23,7 @@