@{ var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string; var cImg = _cImgOpt.Value; } @using DigitalData.Core.Abstraction.Application; @using EnvelopeGenerator.Application.Dto; @using EnvelopeGenerator.Application.Dto.EnvelopeReceiver @using EnvelopeGenerator.Application.Dto.EnvelopeReceiverReadOnly @using EnvelopeGenerator.Web.Extensions @using Newtonsoft.Json @using Newtonsoft.Json.Serialization @model EnvelopeReceiverDto; @{ var userCulture = ViewData["UserCulture"] as Culture; var envelope = Model.Envelope; var receiver_name = Model.Name; var document = Model.Envelope?.Documents?.FirstOrDefault(); var sender = Model.Envelope?.User; var pages = document?.Elements?.Select(e => e.Page) ?? Array.Empty(); int? signatureCount = document?.Elements?.Count(); var stPageIndexes = string.Join(pages.Count() > 1 ? ", " : "", pages.Take(pages.Count() - 1)) + (pages.Count() > 1 ? $" {_localizer.And()} " : "") + pages.LastOrDefault(); var isReadOnly = false; if (ViewData["IsReadOnly"] is bool isReadOnly_bool) isReadOnly = isReadOnly_bool; ViewData["Title"] = isReadOnly ? _localizer.ViewDoc() : _localizer.SignDoc(); }
@if (!isReadOnly) {
}
@if (!isReadOnly) {
0/@signatureCount Unterschriften
}

@($"{envelope?.Title}")

@if (isReadOnly) { var dateTimeSt = string.Empty; if (ViewData["ReadOnly"] is EnvelopeReceiverReadOnlyDto readOnly) dateTimeSt = readOnly.DateValid.ToLongDateString();
@string.Format(_localizer["ReadOnlyMessage"], receiver_name, dateTimeSt)
} else {
@($"{@envelope?.Message}")
}

@Html.Raw(_localizer.EnvelopeInfo2().Format( envelope?.AddedWhen.ToString(userCulture?.Info?.DateTimeFormat), $"{sender?.Prename} {sender?.Name}", sender?.Email, envelope?.Title, sender?.Prename, sender?.Name, sender?.Email))

@if (!isReadOnly) { }
@if (!isReadOnly) { }