Multiple authors resolves #7

This commit is contained in:
glax 2023-06-10 14:45:04 +02:00
parent 0e3c7f32d7
commit 4fcaca1a6e
2 changed files with 13 additions and 1 deletions

View File

@ -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;

View File

@ -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;