fix external url details display

This commit is contained in:
Laura Klünder 2023-12-26 00:12:06 +01:00
parent 617c810f93
commit 2c0965795a
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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];