_Footer.cshtml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. @model GreenTree.Nachtragsmanagement.Web.Models.Global.FooterModel
  2. <script>
  3. function acceptFooterRoleSelection() {
  4. window.location = "@Url.Action("SetRole", "Global")?roleId=" + devListBoxRoles.GetValue();
  5. }
  6. </script>
  7. @Html.DevExpress().PopupControl(s =>
  8. {
  9. s.Name = "devPopupControlRoles";
  10. s.HeaderText = "Rolle wechseln";
  11. s.ShowFooter = false;
  12. s.ShowMaximizeButton = false;
  13. s.Modal = true;
  14. s.Width = new Unit(350, UnitType.Pixel);
  15. s.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
  16. s.PopupVerticalAlign = PopupVerticalAlign.WindowCenter;
  17. s.CloseAction = CloseAction.CloseButton;
  18. s.SetContent(() =>
  19. {
  20. Html.DevExpress().ListBox(l =>
  21. {
  22. l.Name = "devListBoxRoles";
  23. l.Properties.TextField = "Description";
  24. l.Properties.ValueField = "ID";
  25. l.Width = new Unit(100, UnitType.Percentage);
  26. l.Height = new Unit(250, UnitType.Pixel);
  27. l.Properties.RootStyle.Border.BorderStyle = BorderStyle.None;
  28. }).BindList(ViewData["Roles"]).GetHtml();
  29. Html.RenderPartial(
  30. "~/Views/Shared/_PopupButtonPanel.cshtml",
  31. new GreenTree.Nachtragsmanagement.Web.Models.Global.PopupModel
  32. {
  33. PopupName = "devPopupControlRoles",
  34. AcceptFunction = "function (s, e) { acceptFooterRoleSelection(); }"
  35. });
  36. });
  37. s.Styles.Content.Paddings.Padding = new Unit(0);
  38. }).GetHtml()
  39. <div class="globalFooter">
  40. <div class="innerFooter">
  41. @if (Model != null)
  42. {
  43. <div class="linkContainer">
  44. @Html.DevExpress().Button(s =>
  45. {
  46. s.Name = "devButtonLogout";
  47. s.RenderMode = ButtonRenderMode.Link;
  48. s.Text = "Ausloggen";
  49. s.ClientSideEvents.Click = "function (s, e) { window.location = \"" + Url.Action("logout", "login") + "\" }";
  50. s.Style.Add("color", "white");
  51. }).GetHtml()
  52. </div>
  53. <div class="seperator">
  54. </div>
  55. <span class="userInfo">
  56. @String.Format("{0}, {1} ({2})", Model.Lastname, Model.Forename, Model.CustomNumber)
  57. </span>
  58. <div class="seperator">
  59. </div>
  60. <div class="linkContainer">
  61. @Html.DevExpress().Button(s =>
  62. {
  63. s.Name = "devButtonRole";
  64. s.RenderMode = ButtonRenderMode.Link;
  65. s.Text = Model.RoleDescription;
  66. s.ToolTip = "Rolle wechseln";
  67. s.ClientSideEvents.Click = "function (s, e) { devPopupControlRoles.Show(); }";
  68. s.Style.Add("color", "white");
  69. }).GetHtml()
  70. </div>
  71. <div class="linkContainer popupPanel">
  72. </div>
  73. }
  74. <span class="versionInfo">
  75. @String.Format("v{0}", GreenTree.Nachtragsmanagement.Core.AppendixVersion.CurrentVersion)
  76. </span>
  77. </div>
  78. </div>