_Modal.cshtml 1.2 KB

123456789101112131415161718192021222324252627282930
  1. @using VberZero.Tools.StringModel
  2. @model VberAdmin.Web.Models.Modals.VmModal
  3. @if (Model != null)
  4. {
  5. string width = Model.Width == null || Model.Width <= 50 ? "" : "max-width:" + Model.Width + "px";
  6. string size = string.IsNullOrEmpty(Model.SizeClass) ? "" : Model.SizeClass.Sw("modal-");
  7. <!-- MODAL @(Model.Id) START-->
  8. <section>
  9. <div class="modal fade @(Model.Class)" id="@Model.Id" @Html.Raw(Model.Other)>
  10. <div class="modal-dialog @(Model.DialogClass) @(size)" style="@width">
  11. <div class="modal-content rounded">
  12. @if (Model.Header != null)
  13. {
  14. @await Html.PartialAsync("Modals/_Header", Model.Header)
  15. }
  16. @if (Model.Body != null)
  17. {
  18. @await Html.PartialAsync("Modals/_Body", Model.Body)
  19. }
  20. @if (Model.Footer != null)
  21. {
  22. @await Html.PartialAsync("Modals/_Footer", Model.Footer ?? 0)
  23. }
  24. </div>
  25. </div>
  26. </div>
  27. </section>
  28. <!-- MODAL @(Model.Id) END-->
  29. }