projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0afab23
)
Simplify plural code.
author
Mike Taylor
<mike@indexdata.com>
Wed, 20 Nov 2013 16:50:37 +0000
(16:50 +0000)
committer
Mike Taylor
<mike@indexdata.com>
Wed, 20 Nov 2013 16:50:37 +0000
(16:50 +0000)
tools/htdocs/mkws.js
patch
|
blob
|
history
diff --git
a/tools/htdocs/mkws.js
b/tools/htdocs/mkws.js
index
3769422
..
a369f2d
100644
(file)
--- a/
tools/htdocs/mkws.js
+++ b/
tools/htdocs/mkws.js
@@
-569,10
+569,8
@@
function renderDetails(data, marker)
details += renderField("Subject", data["location"][0]["md-subject"]);
if (locations.length == 0) {
details += '<tr><td colspan="2">No locations for record!</td></tr>';
- } else if (locations.length == 1) {
- details += renderField("Location", locations);
} else {
- details += renderField("Locations", locations);
+ details += renderField("Location" + (locations.length == 1 ? "" : "s"), locations);
}
details += '</table></div>';