Multiple authors resolves #7
This commit is contained in:
parent
0e3c7f32d7
commit
4fcaca1a6e
@ -29,6 +29,18 @@ public readonly struct Publication
|
||||
|
||||
private static readonly Regex LegalCharacters = new Regex(@"[A-Z]*[a-z]*[0-9]* *\.*-*,*'*\'*\)*\(*~*!*");
|
||||
|
||||
[JsonConstructor] //Legacy
|
||||
public Publication(string sortName, string? author, string? description, Dictionary<string, string> altTitles,
|
||||
string[] tags, string? posterUrl, string? coverFileNameInCache, Dictionary<string, string>? links, int? year,
|
||||
string? originalLanguage, string status, string publicationId)
|
||||
{
|
||||
List<string> pAuthors = new();
|
||||
if(author is not null)
|
||||
pAuthors.Add(author);
|
||||
this = new Publication(sortName, pAuthors, description, altTitles, tags, posterUrl,
|
||||
coverFileNameInCache, links, year, originalLanguage, status, publicationId);
|
||||
}
|
||||
|
||||
public Publication(string sortName, List<string> authors, string? description, Dictionary<string,string> altTitles, string[] tags, string? posterUrl, string? coverFileNameInCache, Dictionary<string,string>? links, int? year, string? originalLanguage, string status, string publicationId)
|
||||
{
|
||||
this.sortName = sortName;
|
||||
|
@ -233,7 +233,7 @@ function ShowPublicationViewerWindow(publicationId, event, add){
|
||||
publicationViewerName.innerText = publication.sortName;
|
||||
publicationViewerTags.innerText = publication.tags.join(", ");
|
||||
publicationViewerDescription.innerText = publication.description;
|
||||
publicationViewerAuthor.innerText = publication.author;
|
||||
publicationViewerAuthor.innerText = publication.authors.join(',');
|
||||
pubviewcover.src = `imageCache/${publication.coverFileNameInCache}`;
|
||||
toEditId = publicationId;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user