feat(ShowEnvelope-View): ReadOnlyMessage wurde für verschiedene Kulturen erstellt. Zu View hinzugefügt.
- View-Benutzernachrichten sind so organisiert, dass sie davon abhängen, ob der Umschlag schreibgeschützt ist oder nicht.
This commit is contained in:
parent
62b54d6e75
commit
1919c562cc
@ -177,6 +177,9 @@
|
||||
<data name="LockedTitle" xml:space="preserve">
|
||||
<value>Dokument erfordert einen Zugriffscode</value>
|
||||
</data>
|
||||
<data name="ReadOnlyMessage" xml:space="preserve">
|
||||
<value>Weitergeleitet von {0}. Gültig bis {1}.</value>
|
||||
</data>
|
||||
<data name="Reject" xml:space="preserve">
|
||||
<value>Ablehnen</value>
|
||||
</data>
|
||||
|
||||
@ -177,6 +177,9 @@
|
||||
<data name="LockedTitle" xml:space="preserve">
|
||||
<value>Document requires an access code</value>
|
||||
</data>
|
||||
<data name="ReadOnlyMessage" xml:space="preserve">
|
||||
<value>Forwarded by {0}. Valid until {1}.</value>
|
||||
</data>
|
||||
<data name="Reject" xml:space="preserve">
|
||||
<value>Reject</value>
|
||||
</data>
|
||||
|
||||
@ -344,6 +344,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
ViewData["EnvelopeKey"] = envelopeKey;
|
||||
ViewData["DocumentBytes"] = bytes;
|
||||
ViewData["IsReadOnly"] = true;
|
||||
ViewData["ReadOnly"] = erro;
|
||||
ViewData["PSPDFKitLicenseKey"] = _configuration["PSPDFKitLicenseKey"];
|
||||
return View("ShowEnvelope", er);
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
@using DigitalData.Core.DTO;
|
||||
@using EnvelopeGenerator.Application.DTOs;
|
||||
@using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
|
||||
@using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly
|
||||
@using Newtonsoft.Json
|
||||
@using Newtonsoft.Json.Serialization
|
||||
@model EnvelopeReceiverDto;
|
||||
@ -15,12 +16,16 @@
|
||||
@{
|
||||
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>();
|
||||
int? signatureCount = document?.Elements?.Count();
|
||||
var stPageIndexes = string.Join(pages.Count() > 1 ? ", " : "", pages.Take(pages.Count() - 1))
|
||||
+ (pages.Count() > 1 ? $" {_localizer[WebKey.and].TrySanitize(_sanitizer)} " : "") + pages.LastOrDefault();
|
||||
var isReadOnly = false;
|
||||
if (ViewData["IsReadOnly"] is bool isReadOnly_bool)
|
||||
isReadOnly = isReadOnly_bool;
|
||||
}
|
||||
<div class="envelope-view">
|
||||
<div id="flex-action-panel" class="btn-group btn_group position-fixed bottom-0 end-0 d-flex align-items-center" role="group" aria-label="Basic mixed styles example">
|
||||
@ -57,7 +62,17 @@
|
||||
<img class="@logo.ShowPageClass" src="@logo.Src" alt="logo">
|
||||
</div>
|
||||
<h2>@($"{envelope?.Title}".TrySanitize(_sanitizer))</h2>
|
||||
@if (isReadOnly)
|
||||
{
|
||||
var dateTimeSt = string.Empty;
|
||||
if (ViewData["ReadOnly"] is EnvelopeReceiverReadOnlyDto readOnly)
|
||||
dateTimeSt = readOnly.DateValid.ToLongDateString() + " - " + readOnly.DateValid.ToShortTimeString();
|
||||
<h6>@string.Format(_localizer["ReadOnlyMessage"], receiver_name, dateTimeSt)</h6>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h6>@($"{@envelope?.Message}".TrySanitize(_sanitizer))</h6>
|
||||
}
|
||||
<p>
|
||||
<small class="text-body-secondary">
|
||||
@Html.Raw(string.Format(_localizer[WebKey.EnvelopeInfo2], /* sanitize separately but don't sanitize the URI */
|
||||
@ -70,12 +85,15 @@
|
||||
sender?.Email.TrySanitize(_sanitizer)))
|
||||
</small>
|
||||
</p>
|
||||
@if (!isReadOnly)
|
||||
{
|
||||
<div class="progress-container">
|
||||
<div id="signed-count-bar" class="progress"></div>
|
||||
<span class="progress-text">
|
||||
<span id="signed-count">0</span>/<span id="signature-count">@signatureCount</span> Unterschriften
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user