_Modal.cshtml 949 B

1234567891011121314151617181920212223
  1. @using IwbZero.ToolCommon.StringModel
  2. @model ContractService.Views.Shared.Modals.ModalViewModel
  3. @{
  4. string width = Model.Width == null || Model.Width <= 500 ? "" : "max-width:" + Model.Width + "px";
  5. string size = string.IsNullOrEmpty(Model.SizeClass) ? "" : Model.SizeClass.Sw("modal-");
  6. string center = Model.IsCenter ? "modal-dialog-centered" : "";
  7. }
  8. <!-- MODAL @(Model.ModalId) START-->
  9. <section>
  10. <div class="modal fade" id="@Model.ModalId" >
  11. <div class="modal-dialog @(center) @(size)" style="@width">
  12. <div class="modal-content">
  13. @Html.Partial("Modals/_ModalHeader", Model.Header)
  14. @if (Model.Body != null)
  15. {
  16. @Html.Partial("Modals/_ModalBody", Model.Body)
  17. }
  18. @Html.Partial("Modals/_ModalFooter", Model.Footer??"")
  19. </div>
  20. </div>
  21. </div>
  22. </section>
  23. <!-- MODAL @(Model.ModalId) END-->