123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- @using System.Web.Mvc.Html
- @using WeApp
- @using WeApp.Authorization
- @using WeApp.Configuration
- @using WeApp.Views.Shared.Modals
- @using WeApp.Views.Shared.SearchForm
- @using WeApp.Views.Shared.Table
- @{
- string activeMenu = PermissionNames.PagesSystemMgHelpMg; //The menu item will be active for this page.
- ViewBag.ActiveMenu = activeMenu;
- // List<SelectListItem> classification = ViewBag.Classification;
- List<SelectListItem> classification = new List<SelectListItem>();
- }
- @section css
- {
- }
- <section style="display:none">
- @Html.DropDownList("hid-classification", classification)
- </section>
- @{
- /**/
- ViewBag.Title = "系统帮助管理";
- var table = new TableViewModel(IwbConsts.ApiAppUrl + "Helps/GetAll", activeMenu, new SearchFormViewModel(new List<SearchItem>()
- {
- new SearchItem("classification", "帮助类别").SetSelectItem(classification)
- })).SetFields(new List<FieldItem>()
- {
- new FieldItem("helpTitle", "标题"),
- new FieldItem("helpKeyWords", "关键字信息"),
- new FieldItem("classification", "帮助类别", "ClassificationFormatter"),
- new FieldItem("sequence", "排序"),
- });
- }
- @Html.Partial("Table/_Table", table)
- @section modal{
- <!--Main Modal-->
- @{
- /**/
- var modal = new ModalViewModel("帮助", new ModalBodyViewModel(new List<Input>()
- {
- new Input("id", hide: true),
- new Input("helpTitle", "标题"),
- new Input("helpKeyWords", "关键字"),
- new Input("sequence", "序列"),
- new Input("classification", "帮助类别").SetSelectOptions(classification),
- new InputKindeditor("helpContent","帮助内容").SetLayout("col-sm-2","col-sm-12").SetNotRequired(),
- }), width: 700);
- @Html.Partial("Modals/_Modal", modal)
- }
- }
- @section scripts
- {
- <script type="text/javascript">
- $(function () {
- var $table= LoadTable();
- var funs = window.iwbfuns || { none: function () { console.log("No type"); } };
-
- });
- </script>
- <script>
- function ClassificationFormatter(v) {
- var name = $('#hid-classification option[value="' + v + '"]').text();
- return '<span class="label label-info">' + name + '</span>';
- }
- </script>
- }
|