From: Mike Taylor Date: Wed, 20 Nov 2013 16:23:59 +0000 (+0000) Subject: renderDetails() now includes a line of the sources of the merged records. X-Git-Tag: 0.9.1~148^2~74 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=7fc684231ef7c9dbc4e5141c1c536712183f2751;p=mkws-moved-to-github.git renderDetails() now includes a line of the sources of the merged records. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index b86e413..c98b17d 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -557,6 +557,18 @@ function renderDetails(data, marker) var details = '
'; if (marker) details += ''; + var sources = []; + for (var i in data.location) { + sources.push(data.location[i]['@name']); + } + if (sources.length == 0) { + details += ''; + } else if (sources.length == 1) { + details += renderField("Source", sources[0]); + } 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"]);
'+ marker + '
No sources for record!