_Layout.None.cshtml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. @using System.Globalization
  2. @using System.Web.Optimization
  3. @using Abp.Configuration
  4. @using Abp.Timing
  5. @using WeApp.Configuration
  6. @using Abp.Web.Mvc.Extensions
  7. @using WeApp.Helpers
  8. @{
  9. Layout = null;
  10. SetAntiForgeryCookie();
  11. // var uiTheme = SettingManager.GetSettingValue(IwbSettingNames.UiTheme);
  12. var lang= CultureInfo.CurrentUICulture.Name == "zh-Hans" ? "zh-cn" : CultureInfo.CurrentUICulture.Name;
  13. string title = !string.IsNullOrEmpty(ViewBag.YxTitle) ? ViewBag.YxTitle :
  14. (bool) (ViewBag.NoSuffix ?? false) ? ViewBag.Title :
  15. string.IsNullOrEmpty(ViewBag.Suffix) ? ViewBag.Title + "-JY" :
  16. ViewBag.Title + ViewBag.Suffix;
  17. }
  18. <!DOCTYPE html>
  19. <html lang="zh-CN">
  20. <head>
  21. <meta charset="utf-8">
  22. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  23. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  24. <meta name="description" content="Iwb.Admin.System">
  25. <meta name="author" content="Iwb.Yue">
  26. <title>@(title)</title>
  27. <link rel="shortcut icon" href="~/favicon.ico">
  28. @Styles.Render("~/Bundles/Base/Css")
  29. <link id="flag" />
  30. <!-- View specific styles -->
  31. @RenderSection("styles", false)
  32. @Styles.Render("~/Bundles/Site/Css")
  33. @RenderSection("css", false)
  34. </head>
  35. <body class="hold-transition sidebar-mini sidebar-collapse text-sm">
  36. @Html.Partial("Layout/_PreLoader")
  37. @RenderBody()
  38. @Scripts.Render("~/Bundles/Iwb-Exercise/Js")
  39. <script>
  40. var lang = '@(lang)';
  41. // Localizing moment.js
  42. moment.locale(lang);
  43. var abp = abp || {};
  44. abp.appPath = '@ApplicationPath';
  45. abp.appUrl = '@Path.Combine(ApplicationPath, IwbConsts.ApiAppUrl)';
  46. </script>
  47. <!-- Dynamic scripts of ABP system (They are created on runtime and can not be bundled) -->
  48. <script src="~/AbpScripts/GetScripts?v=@(Clock.Now.Ticks)" type="text/javascript"></script>
  49. <!-- View specific scripts -->
  50. @RenderSection("js", false)
  51. @Scripts.Render("~/Bundles/Iwb-Account/Js")
  52. <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
  53. <!-- SignalR scripts -->
  54. @Html.IncludeScript("~/Content/Libs/signalr/jquery.signalR.min.js")
  55. <script src="~/signalr/hubs"></script>
  56. <script>
  57. abp.signalr = abp.signalr || {};
  58. abp.signalr.autoConnect = false;
  59. </script>
  60. @Html.IncludeScript("~/Content/Libs/Abp/abp.signalr.js")
  61. <script>
  62. abp.signalr.hubs = abp.signalr.hubs || {};
  63. abp.signalr.hubs.iwbHub = $.connection.iwbHub;
  64. var iwbHub = abp.signalr.hubs.iwbHub;
  65. //Connect to the server
  66. abp.signalr.connect = function (names,fun) {
  67. $.connection.hub.start().done(function () {
  68. abp.log.debug('IwbHub Connected to SignalR server!');
  69. abp.event.trigger('abp.signalr.connected');
  70. if (names && iwbHub) {
  71. if (typeof names == 'string') {
  72. iwbHub.server.register(names).done(function() {
  73. abp.log.debug(names + ' Registered to the SignalR server!');
  74. if (fun) {
  75. fun.call();
  76. }
  77. });
  78. } else if(names.length) {
  79. names.forEach(function(v) {
  80. iwbHub.server.register(v).done(function() {
  81. abp.log.debug(v + ' Registered to the SignalR server!');
  82. if (fun) {
  83. fun.call();
  84. }
  85. });
  86. });
  87. }
  88. }
  89. });
  90. };
  91. </script>
  92. @RenderSection("scripts", false)
  93. <!-- Model -->
  94. @RenderSection("modal", false)
  95. @Html.PartialViewScripts()
  96. </body>
  97. </html>