use internationalTitle and new alternative title format: fixes #947 and #963

This commit is contained in:
j 2012-09-22 22:00:32 +02:00
parent bc2c3b65ad
commit 20d1119b75
2 changed files with 6 additions and 6 deletions

View file

@ -591,7 +591,7 @@ class Item(models.Model):
i = key['id']
if i == 'title':
save(i, u'\n'.join([self.get('title', 'Untitled'),
self.get('originalTitle', '')]))
self.get('internationalTitle', '')]))
elif i == 'rightslevel':
save(i, self.level)
elif i == 'filename':
@ -834,7 +834,7 @@ class Item(models.Model):
current_values = [current_values]
else:
current_values = []
ot = self.get('originalTitle')
ot = self.get('internationalTitle')
if ot:
current_values.append(ot)
elif key == 'character':

View file

@ -264,8 +264,8 @@ pandora.ui.infoView = function(data) {
.html(
formatKey('Alternative Title' + (data.alternativeTitles.length == 1 ? '' : 's'))
+ data.alternativeTitles.map(function(value) {
return value[0] + (value[1] ? ' '
+ formatLight('(' + value[1] + ')') : '');
return value[0] + (Ox.isArray(value[1]) ? ' '
+ formatLight('(' + value[1].join(', ') + ')') : '');
}).join(', ')
)
.appendTo($text);
@ -574,8 +574,8 @@ pandora.ui.infoView = function(data) {
title = title.replace(match[0], formatLight(match[0]));
}
return title + (
data.originalTitle && data.originalTitle != title
? ' ' + formatLight('(' + data.originalTitle + ')') : ''
data.internationalTitle && data.internationalTitle != title
? ' ' + formatLight('(' + data.internationalTitle + ')') : ''
);
}