View.cshtml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. @using GreenTree.Nachtragsmanagement.Web.Models.Global;
  2. @{
  3. Layout = "~/Views/Shared/_FunctionLayout.cshtml";
  4. }
  5. @{
  6. var userContext = GreenTree.Nachtragsmanagement.Core.CommonHelper.UserContext();
  7. }
  8. @model GreenTree.Nachtragsmanagement.Web.Models.Admin.AppInfo.AppInfoDataModel
  9. <script>
  10. function checkUpdate() {
  11. devLoadingPanelUpdate.Show();
  12. $.ajax({
  13. method: "POST",
  14. url: '@Url.Action("PartialCheckUpdate", "Admin")',
  15. success: function (response) {
  16. if (!response) return;
  17. setTimeout(function () {
  18. devLoadingPanelUpdate.Hide();
  19. $(".updateContainer").remove();
  20. $("body").append(response);
  21. }, 200);
  22. },
  23. error: function () {
  24. devLoadingPanelUpdate.Hide();
  25. alert("error occured");
  26. }
  27. });
  28. }
  29. </script>
  30. <img src="@Url.Content("~/Content/Images/appInfo.png")" style="width: 90%; margin: 38px 5%" />
  31. <table style="margin: 0 5%; width: 90%">
  32. <tbody>
  33. <tr>
  34. <td style="width: 49%">
  35. <div style="margin-bottom: 6px; vertical-align: top">
  36. <b>Verwendete Bibliotheken</b>
  37. </div>
  38. @Html.DevExpress().ListBox(t =>
  39. {
  40. t.Name = "devListBoxAssemblies";
  41. t.Width = new Unit(100, UnitType.Percentage);
  42. t.Height = new Unit(260, UnitType.Pixel);
  43. t.Properties.Columns.Add("Manufacturer", "Hersteller", new Unit(75, UnitType.Percentage));
  44. t.Properties.Columns.Add("Name", "Bibliothek", new Unit(75, UnitType.Percentage));
  45. t.Properties.Columns.Add("Version", "Version", new Unit(25, UnitType.Percentage));
  46. }).BindList(Model.Assemblies).GetHtml()
  47. </td>
  48. <td style="width: 51%; padding-left: 18px; vertical-align: top">
  49. <div style="padding-bottom: 3px; margin-bottom: 3px; vertical-align: top; border-bottom: 1px solid #009688">
  50. <b>Sonstige Informationen</b>
  51. </div>
  52. Basisverzeichnis:<br/>
  53. <i>@Model.BaseDirectory</i>
  54. <div style="width: 90%; margin: 0 5%; text-align: center">
  55. <h3 style="color: #009688">
  56. Aktuelle Programmpaketversion
  57. </h3>
  58. <div style="font-size: 40px; margin: 12px 0">
  59. v<span>@GreenTree.Nachtragsmanagement.Core.AppendixVersion.CurrentVersion</span>
  60. </div>
  61. @if (userContext.CurrentUser.HasFunction("Administration-AppInfo-Update"))
  62. {
  63. Html.DevExpress().Button(t =>
  64. {
  65. t.Name = "devButtonUpdate";
  66. t.Text = "Auf Update prüfen";
  67. t.ClientSideEvents.Click = "function (s, e) { checkUpdate(); }";
  68. }).GetHtml();
  69. }
  70. @if (Model.IsUpdate)
  71. {
  72. <div style="margin-top: 12px; color: green; font-size: 28px">
  73. Update erfolgreich!
  74. </div>
  75. }
  76. </div>
  77. </td>
  78. </tr>
  79. </tbody>
  80. </table>
  81. @Html.DevExpress().LoadingPanel(t =>
  82. {
  83. t.Name = "devLoadingPanelUpdate";
  84. t.Text = "Es wird nach Updates geprüft... bitte warten!";
  85. t.Modal = true;
  86. t.Styles.LoadingDiv.Opacity = 0;
  87. }).GetHtml()