SysSettings.cshtml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. @using WeApp
  2. @using WeApp.Authorization
  3. @using WeApp.Configuration
  4. @using WeApp.Views.Shared.Modals
  5. @using WeApp.Views.Shared.SearchForm
  6. @using WeApp.Views.Shared.Table
  7. @{
  8. ViewBag.Title = L("SettingTitle");
  9. string activeMenu = PermissionNames.PagesSystemMgSettingMg; //The menu item will be active for this page.
  10. ViewBag.ActiveMenu = activeMenu;
  11. var table = new TableViewModel(IwbConsts.ApiAppUrl + "Settings/GetAll", activeMenu, new SearchFormViewModel(new List<SearchItem>()
  12. {
  13. new SearchItem("name", L("settingName")),
  14. new SearchItem("displayName", L("settingDisplayName")),
  15. })).SetFields(new List<FieldItem>()
  16. {
  17. new FieldItem("name", L("settingName")),
  18. new FieldItem("displayName", L("settingDisplayName")),
  19. new FieldItem("value", L("settingValue")),
  20. });
  21. }
  22. @Html.Partial("Table/_Table", table)
  23. @section modal{
  24. <!--Main Modal-->
  25. @{
  26. var modal = new ModalViewModel(L("setting"), new ModalBodyViewModel(new List<Input>()
  27. {
  28. new InputHide("id"),
  29. new Input("name", L("settingName")).SetDisabled(),
  30. new Input("displayName", L("settingDisplayName")).SetDisabled(),
  31. //new Input("type", L("settingType")),
  32. new Input("value", L("settingValue")),
  33. new InputTextarea("description",L("settingDescription")).SetDisabled(),
  34. }));
  35. }
  36. @Html.Partial("Modals/_Modal", modal)
  37. }
  38. @section scripts
  39. {
  40. @*<script src="~/Content/Plugins/PrintPreView/print-preview.js"></script>*@
  41. <script type="text/javascript">
  42. $(function () {
  43. LoadTable();
  44. var funs = window.iwbfuns || { none: function () { console.log("No type"); } };
  45. funs["btnUpdate"] = function () { BtnUpdate({ disabled: "name" }); };
  46. });
  47. </script>
  48. <script id="formatter" type="text/javascript">
  49. </script>
  50. }