fix external url details display
This commit is contained in:
parent
617c810f93
commit
2c0965795a
2 changed files with 4 additions and 4 deletions
|
@ -241,10 +241,10 @@ class SpecificLocation(Location, models.Model):
|
|||
))
|
||||
|
||||
if self.external_url:
|
||||
result['display'].insert(3, (_('External URL'), tuple({
|
||||
result['display'].insert(3, (_('External URL'), {
|
||||
'title': _('Open'),
|
||||
'url': self.external_url,
|
||||
})))
|
||||
}))
|
||||
|
||||
return result
|
||||
|
||||
|
|
|
@ -445,9 +445,9 @@ c3nav = {
|
|||
elem.append($('<dd>').text(line[1]));
|
||||
} else if (line[1] === null || line.length === 0) {
|
||||
elem.append($('<dd>').text('-'));
|
||||
} else if (line[0].length === undefined && line[1].url !== undefined) {
|
||||
} else if (line.length === 2 && line[1].url !== undefined) {
|
||||
loclist = $('<dd>');
|
||||
loclist.append($('<a>').attr('href', line[2].url).attr('target', '_blank').text(line[2].title));
|
||||
loclist.append($('<a>').attr('href', line[1].url).attr('target', '_blank').text(line[1].title));
|
||||
elem.append(loclist);
|
||||
} else {
|
||||
sublocations = (line[1].length === undefined) ? [line[1]] : line[1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue