RoleGroups.cshtml
4.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
@*
-----------------------------------------
User - RoleGroups.cshtml
-----------------------------------------
*@
@using VRH.Log4Pro.MultiLanguageManager
@using Vrh.Web.Common.Lib
@using Vrh.Web.Membership.Areas.UserAdministration.Controllers
@model UserManagerModel
@{
object routeVal = new { area = WebConst.AREA, editMode = Model.EditMode };
string dataNewInputId = "newdatainputid-rolegroups";
string dataRowsPlaceId = "datarowsplaceid-rolegroups";
}
@*
-----------------------------------------
User - RoleGroups.cshtml
-----------------------------------------
*@
<h2>@Html.Raw(Model.Trans(typeof(WordCodes.MvcMembership.Titles.RoleGroupManagement)))</h2>
<div class="table-responsive" style="max-height:500px;overflow-y:auto;">
<table class="table table-sm table-dark table-hover">
<thead>
<tr>
<th style="text-align:center;width:30px;">#</th>
<th>@Html.Raw(Model.Trans(typeof(WordCodes.MvcMembership.Labels.RoleGroupName)))</th>
</tr>
</thead>
<tbody id="@(dataRowsPlaceId)"></tbody>
</table>
</div>
<table class="table" style="margin-bottom:0px;">
<tr>
<td>
@if (Model.EditMode != EditModes.Select)
{
<div class="input-group" style="width:300px;">
<input id="@(dataNewInputId)" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-success ml-1" onclick="handler.addData();">
@(Html.Raw(Model.Trans(typeof(GeneralWordCodes.MLM.General.Words.Add))))
</button>
</span>
</div>
}
</td>
<td style="text-align:right;">
<button type="button" class="btn btn-secondary" style="" onclick="vrhct.bootbox.hide('@(Model.BootboxId)');">
@(Html.Raw(Model.Trans(typeof(GeneralWordCodes.MLM.General.Words.Cancel))))
</button>
</td>
</tr>
</table>
<script type="text/javascript">
var handler;
$(document).ready(function () {
'use strict';
var thisfn = 'RoleGroups.cshtml: document.ready: ';
console.log(thisfn + 'PING');
handler = new VrhIdNameHandler({
AllowAdd: @((Model.EditMode != EditModes.Select).ToString().ToLower()),
AllowDelete: @((Model.EditMode != EditModes.Select && Model.EditMode != EditModes.Add).ToString().ToLower()),
AllowUpdate: @((Model.EditMode != EditModes.Select).ToString().ToLower()),
Confirm: {
Delete: '@Html.Raw(Model.Trans(typeof(WordCodes.MvcMembership.Messages.Confirmations.RoleGroupDelete)))'
},
Id: {
Editor: '@(Model.BootboxId)',
DataRows: '@(dataRowsPlaceId)',
DataNew: '@(dataNewInputId)',
},
Label: {
Button: {
No: '@Html.Raw(Model.Trans(typeof(GeneralWordCodes.MLM.General.Words.No)))',
Yes: '@Html.Raw(Model.Trans(typeof(GeneralWordCodes.MLM.General.Words.Yes)))',
},
Data: '@Html.Raw(Model.Trans(typeof(WordCodes.MvcMembership.Labels.RoleGroupName)))',
},
LCID: '@(Model.LCID)',
Message: {
Delete: '@Html.Raw(Model.Trans(typeof(WordCodes.MvcMembership.Messages.Warnings.RoleGroupDelete)))',
Wait: '@Html.Raw(Model.Trans(typeof(GeneralWordCodes.MLM.General.Messages.PleaseWait)))',
},
Title: {
Confirm: '@Html.Raw(Model.Trans(typeof(GeneralWordCodes.MLM.General.Titles.Confirmation)))',
IconPencil: '@Html.Raw(Model.Trans(typeof(WordCodes.MvcMembership.Titles.RoleGroupEdit)))',
IconTrash: '@Html.Raw(Model.Trans(typeof(WordCodes.MvcMembership.Titles.RoleGroupEdit)))',
},
Url: {
Add: '@Html.Raw(Url.Action(nameof(UserController.RoleGroupAdd), WebConst.CONTROLLER_USER, routeVal))',
Delete: '@Html.Raw(Url.Action(nameof(UserController.RoleGroupDelete), WebConst.CONTROLLER_USER, routeVal))',
List: '@Html.Raw(Url.Action(nameof(UserController.RoleGroupList), WebConst.CONTROLLER_USER, routeVal))',
Update: '@Html.Raw(Url.Action(nameof(UserController.RoleGroupUpdate), WebConst.CONTROLLER_USER, routeVal))'
}
});
console.log(thisfn + 'handler=', handler);
});// $(document).ready event VÉGE
</script>
@*
-----------------------------------------
User - RoleGroups.cshtml
-----------------------------------------
*@