Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
@using Grand.Domain.Media
@model QueuedEmailModel
@{
ViewData["DownloadType"] = DownloadType.QueuedEmail;
ViewData["ReferenceId"] = Model.Id;
}
<div asp-validation-summary="All"></div>
<input asp-for="Id" type="hidden"/>
<vc:admin-widget widget-zone="queued_email_details_top" additional-data="Model"/>
@* what the e-mail is, read-only, above the addresses and the message that can still be edited
before it is sent; the send-date field sits beside the switch that hides it *@
<admin-card>
<div class="grand-facts">
<div>
<admin-label asp-for="PriorityName" asp-display-hint="false" class="grand-fact__label"/>
<div class="grand-fact__value">@Model.PriorityName</div>
</div>
<div>
<admin-label asp-for="CreatedOn" asp-display-hint="false" class="grand-fact__label"/>
<div class="grand-fact__value">@Model.CreatedOn</div>
</div>
<div>
<admin-label asp-for="SentOn" asp-display-hint="false" class="grand-fact__label"/>
<div class="grand-fact__value">
@if (Model.SentOn.HasValue)
{
@Model.SentOn
}
else
{
@Loc["Admin.System.QueuedEmails.Fields.SentOn.NotSent"]
}
</div>
</div>
<div>
<admin-label asp-for="ReadOn" asp-display-hint="false" class="grand-fact__label"/>
<div class="grand-fact__value">
@if (Model.ReadOn.HasValue)
{
@Model.ReadOn
}
else
{
@Loc["Admin.System.QueuedEmails.Fields.ReadOn.NotRead"]
}
</div>
</div>
<div>
<admin-label asp-for="EmailAccountName" asp-display-hint="false" class="grand-fact__label"/>
<div class="grand-fact__value">@Model.EmailAccountName</div>
</div>
@if (!string.IsNullOrEmpty(Model.ObjectId))
{
<div>
<admin-label asp-for="Reference" asp-display-hint="false" class="grand-fact__label"/>
<div class="grand-fact__value">@Model.Reference - @Model.ObjectId</div>
</div>
}
@if (!string.IsNullOrEmpty(Model.AttachmentFilePath))
{
<div>
<admin-label asp-for="AttachmentFilePath" asp-display-hint="false" class="grand-fact__label"/>
<div class="grand-fact__value text-break">@Model.AttachmentFilePath</div>
</div>
}
</div>
</admin-card>
<admin-card>
<div class="grand-fields grand-fields--2col">
<admin-field asp-for="From"/>
<admin-field asp-for="FromName"/>
<admin-field asp-for="To"/>
<admin-field asp-for="ToName"/>
<admin-field asp-for="ReplyTo"/>
<admin-field asp-for="ReplyToName"/>
<admin-field asp-for="CC"/>
<admin-field asp-for="Bcc"/>
</div>
</admin-card>
<admin-card>
<div class="grand-fields">
<admin-field asp-for="Subject"/>
<admin-field asp-for="Body" asp-template="Editor"/>
@if (!string.IsNullOrEmpty(Model.AttachedDownloadId))
{
//Static file attachments do not support URLs yet
//A store owner have to upload a file
//we store a value into "ViewData" and then use it in the Download.cshtml file
ViewData["Grand.DownloadEditor.DisableUrl"] = true;
<admin-field asp-for="AttachedDownloadId"/>
}
</div>
</admin-card>
<admin-card>
<div class="grand-fields grand-fields--2col">
<admin-field asp-for="SendImmediately"/>
<admin-field asp-for="DontSendBeforeDate" id="pnl-send-date"/>
<admin-field asp-for="SentTries" size="sm"/>
</div>
</admin-card>
<vc:admin-widget widget-zone="queued_email_details_bottom" additional-data="Model"/>
<script>
$(document).ready(function () {
$("#@Html.IdFor(model => model.SendImmediately)").click(sendImmediately);
sendImmediately();
});
function sendImmediately() {
if ($('#@Html.IdFor(model => model.SendImmediately)').is(':checked'))
$('#pnl-send-date').hide();
else
$('#pnl-send-date').show();
}
</script>