# HG changeset patch
# User cavaliet
# Date 1378202964 -7200
# Node ID dad1f8de08a90135b73335c4f4efc384ca8a337a
# Parent fa466993084ae0697836ac4f240c12af16585e90
Enhance language display for record. Remove useless commands
diff -r fa466993084a -r dad1f8de08a9 src/p4l/management/commands/get_country_label.py
--- a/src/p4l/management/commands/get_country_label.py Mon Sep 02 17:49:41 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-# -*- coding: utf-8 -*-
-from django.core.management import BaseCommand
-from p4l.models import Country
-from p4l.utils import fill_label_for_model
-
-
-class Command(BaseCommand):
-
- def handle(self, *args, **options):
- fill_label_for_model(Country, 'country', 'http://skos.um.es/unescothes/CS000/Countries')
-
diff -r fa466993084a -r dad1f8de08a9 src/p4l/management/commands/get_language_label.py
--- a/src/p4l/management/commands/get_language_label.py Mon Sep 02 17:49:41 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-# -*- coding: utf-8 -*-
-from django.core.management import BaseCommand
-from p4l.models import Language
-from p4l.utils import fill_label_for_model
-
-
-class Command(BaseCommand):
-
- def handle(self, *args, **options):
- fill_label_for_model(Language, 'language', 'http://www.iiep.unesco.org/plan4learning/scheme/Languages')
diff -r fa466993084a -r dad1f8de08a9 src/p4l/management/commands/get_subject_label.py
--- a/src/p4l/management/commands/get_subject_label.py Mon Sep 02 17:49:41 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-# -*- coding: utf-8 -*-
-from django.core.management import BaseCommand
-from p4l.models import Subject
-from p4l.utils import fill_label_for_model
-
-
-class Command(BaseCommand):
-
- def handle(self, *args, **options):
- fill_label_for_model(Subject, 'subject', 'http://skos.um.es/unescothes/CS000')
-
diff -r fa466993084a -r dad1f8de08a9 src/p4l/management/commands/get_theme_label.py
--- a/src/p4l/management/commands/get_theme_label.py Mon Sep 02 17:49:41 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-# -*- coding: utf-8 -*-
-from django.core.management import BaseCommand
-from p4l.models import Theme
-from p4l.utils import fill_label_for_model
-
-
-class Command(BaseCommand):
-
- def handle(self, *args, **options):
- fill_label_for_model(Theme, 'theme', 'http://www.iiep.unesco.org/plan4learning/scheme/Themes')
-
diff -r fa466993084a -r dad1f8de08a9 src/p4l/templates/p4l/p4l_record_view.html
--- a/src/p4l/templates/p4l/p4l_record_view.html Mon Sep 02 17:49:41 2013 +0200
+++ b/src/p4l/templates/p4l/p4l_record_view.html Tue Sep 03 12:09:24 2013 +0200
@@ -37,15 +37,15 @@
| {% trans 'issns' %} |
- {% for i in record.issns.all %}- {{ i.issn|default:'' }}
{% endfor %} |
+ {% 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:'' }}
{% endfor %} |
+ {% 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:'' }}
{% endfor %} |
+ {% for i in record.documentCodes.all %}- {{ i.documentCode|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
{% endfor %} |
| {% trans 'language' %} |
@@ -57,15 +57,19 @@
| {% trans 'titles' %} |
- {% for i in record.titles.all %}- {{ i.title|default:'' }}
{% endfor %} |
+ {% 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:'' }}
{% endfor %} |
+ {% 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:'' }}
{% endfor %} |
+ {% for i in record.titlesMainDocument.all %}- {{ i.title|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
{% endfor %} |
| {% trans 'edition statement' %} |
@@ -81,6 +85,7 @@
{% trans 'City' %} : {{ i.imprintCity|default:'' }}
{% trans 'Publisher' %} : {{ i.publisher|default:'' }}
{% trans 'Date' %} : {{ i.imprintDate|default:'' }}
+ {% trans 'Language' %} : {{ i.lang|default:'' }}
{% endfor %}
@@ -89,7 +94,7 @@
| {% trans 'collations' %} |
- {% for i in record.collations.all %}- {{ i.collation|default:'' }}
{% endfor %} |
+ {% for i in record.collations.all %}- {{ i.collation|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
{% endfor %} |
| {% trans 'volume issues' %} |
@@ -100,6 +105,7 @@
- {% trans 'Volume' %} : {{ i.volume|default:'' }}
- {% trans 'Number' %} : {{ i.number|default:'' }}
+ - {% trans 'Language' %} : {{ i.lang|default:'' }}
{% endfor %}
@@ -111,17 +117,17 @@
{% for k,v in projects_labels.items %}- {{ v }} ({{ k }})
{% endfor %} |
- | {% trans 'periodicals' %} | {# ajouter langue #}
- {% for i in record.periodicals.all %}- {{ i.label|default:'' }}
{% endfor %} |
+ {% trans 'periodicals' %} |
+ {% for i in record.periodicals.all %}- {{ i.label|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
{% endfor %} |
- | {% trans 'meetings' %} | {# ajouter langue #}
+ {% trans 'meetings' %} |
{% for i in record.meetings.all %}
-
- - {{ i.label|default:'' }}
+ - {{ i.label|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
- {% trans 'Number' %} : {{ i.meetingNumber|default:'' }}
- {% trans 'Place' %} : {{ i.meetingPlace|default:'' }}
- {% trans 'Date' %} : {{ i.meetingDate|default:'' }}
@@ -133,13 +139,13 @@
|
- | {% trans 'series' %} | {# ajouter langue #}
+ {% trans 'series' %} |
{% for i in record.series.all %}
-
- - {{ i.title|default:'' }}
+ - {{ i.title|default:'' }}{% if i.lang %} ({{ i.lang }}){% endif %}
{% if i.volume %}- {% trans 'Volume' %} : {{ i.volume|default:'' }}
{% endif %}
@@ -160,7 +166,7 @@
{% for k,v in subjectCorporateBodies_labels.items %}- {{ v }} ({{ k }})
{% endfor %} |
|
- | {% trans 'subject meetings' %} | {# ajouter langue #}
+ {% trans 'subject meetings' %} |
{% for i in record.subjectMeetings.all %}
@@ -182,7 +188,7 @@
{% for k,v in corporateAuthors_labels.items %}- {{ v }} ({{ k }})
{% endfor %} |
|
- | {% trans 'Urls' %} | {# ajouter langue #}
+ {% trans 'Urls' %} |
{% for i in record.urls.all %}
|