Commit cbb2af4d authored by Piotr Gawron's avatar Piotr Gawron

Merge branch '1201-author-list' into 'devel_14.0.x'

Resolve "list of authors"

See merge request !1097
parents f5d1a5af 1601acaa
Pipeline #23872 passed with stage
in 14 minutes
......@@ -9,6 +9,8 @@ minerva (14.0.11) stable; urgency=medium
minerva (#1202)
* Bug fix: infinity value in kinetic parameter could not be parsed from
CellDesigner file minerva (#1203)
* Bug fix: author list inproperly presented author data when some fields were
missing (#1201)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 30 Mar 2020 10:00:00 +0200
......
......@@ -453,17 +453,26 @@ GuiUtils.prototype.createAuthorsList = function (authors) {
className: "minerva-annotation-body"
});
var desc = author.firstName + " " + author.lastName;
var desc = "";
if (author.firstName !== null && author.firstName !== undefined) {
desc = author.firstName + " ";
}
if (author.lastName !== null && author.lastName !== undefined) {
desc += author.lastName;
}
if (desc === "") {
desc = author.email;
}
var link;
if (author.email !== undefined) {
if (author.email !== undefined && author.email !== null) {
link = Functions.createElement({type: "a", href: "mailto:" + author.email, content: desc});
} else {
link = Functions.createElement({type: "span", content: desc});
}
body.appendChild(link);
if (author.organisation !== undefined) {
if (author.organisation !== undefined && author.organisation !== null) {
body.appendChild(Functions.createElement({type: "span", content: ", " + author.organisation}));
}
......
......@@ -13,10 +13,10 @@ var Reaction = require('./Reaction');
/**
* @typedef {Object} Author
* @property {string} firstName
* @property {string} lastName
* @property {string} [organisation]
* @property {string} [email]
* @property {?null|string} firstName
* @property {?null|string} lastName
* @property {?null|string} [organisation]
* @property {?null|string} [email]
*/
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment