From: Mike Taylor Date: Wed, 20 Nov 2013 16:48:49 +0000 (+0000) Subject: Move new sources display down to replace old single-location display X-Git-Tag: 0.9.1~148^2~69 X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=commitdiff_plain;h=451a039238c07a618679fe14ad1784180fcbc857;p=mkws-moved-to-github.git Move new sources display down to replace old single-location display --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index e41e165..eb88ebd 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -561,20 +561,19 @@ function renderDetails(data, marker) for (var i in data.location) { sources.push(data.location[i]['@name']); } - if (sources.length == 0) { - details += 'No sources for record!'; - } else if (sources.length == 1) { - details += renderField("Source", sources); - } else { - details += renderField("Sources", sources); - } details += renderField("Title", data["md-title"], data["md-title-remainder"], data["md-title-responsibility"]); details += renderField("Date", data["md-date"]); details += renderField("Author", data["md-author"]); details += renderField("URL", data["md-electronic-url"]); details += renderField("Subject", data["location"][0]["md-subject"]); - details += renderField("Location", data["location"][0]["@name"], data["location"][0]["@id"]); + if (sources.length == 0) { + details += 'No locations for record!'; + } else if (sources.length == 1) { + details += renderField("Location", sources); + } else { + details += renderField("Locations", sources); + } details += ''; return details;