summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role.html
blob: 12d8df707c6ea3230676736f188ab9eb024722c8 (plain)
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
<div id="page-content">
	<div>
		<h1 class="heading-page" id="Roles">Manage Roles</h1>
	</div>
	<div>
		<h2 class="heading-small-content">Please edit the role details below: </h2>
	</div>
	
	<div>
		<label>*Name: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
			<input type="text" ng-model="role.name"
				maxlength="30" />
		</label>
	</div>
	
	<div>
		<label>Priority: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
			<input type="text" ng-model="role.priority"
				maxlength="30"/>
		</label>
	</div>
	
	<div>
		<button style="margin-left: 105px;" class="btn btn-small" onClick="window.location='admin'">Cancel</button>
		<button class="btn btn-alt btn-small" ng-click="saveRole();">Save</button>
	</div> 
	<br/>
	<div ng-if="routeRoleId != 0">
		<div>
			<h3 class="heading-small-emphasis">Role Functions</h3>    		
			<button class="btn btn-alt btn-small" ng-click="addNewRoleFunctionModalPopup(role.roleFunctions,role.name, role);">Manage Role Functions</button>
			
			<table class="striped" ng-if="role.roleFunctions.length">
						<thead>
							<tr>
								<th>Role Function Name</th>						
								<th>Remove</th>
							</tr>
						</thead>
						<tbody type="body" ng-repeat="roleFunction in role.roleFunctions">
							<tr>
								<td width="70%">{{ roleFunction.name }}</td>						
								<td width="10%">
						    		<div ng-click="removeRoleFunction(roleFunction);"><a href="javascript:void(0)" class="icon-misc-trash"></a></div>
						    	</td>
							</tr>			  
						</tbody>
			</table>
		</div>
		<br/>
		
		<div>
			<h4 class="heading-small-emphasis">Child Roles</h4>    
			<button class="btn btn-alt btn-small" ng-click="addNewChildRoleFunctionModalPopup(role.roleFunctions,role.name, role);">Manage Child Roles</button>
			
			<table class="striped" ng-if="role.childRoles.length">
						<thead>
							<tr>
								<th>Name</th>						
								<th>Remove?</th>
							</tr>
						</thead>
						<tbody type="body" ng-repeat="role in role.childRoles">
							<tr>
								<td width="70%">{{ role.name }}</td>						
								<td width="10%">
						    		<div ng-click="removeChildRole(role);"><a href="javascript:void(0)" class="icon-misc-trash"></a></div>
						    	</td>
							</tr>					   
						</tbody>
			</table>
		</div>
		<br/>
		<div>
			<a href="admin#/role_function_list">Manage Role Functions</a><br><br>
		</div>
		<!-- <table class="striped" table-data="availableRoles">
					<thead>
						<tr>
							<th></th>						
							<th>Role</th>
						</tr>
					</thead>
					<tbody type="body" ng-repeat="availableRole in availableRoles">
						<tr>
							<td width="70%">
								<div ng-click="toggleChildRole(availableRole.selected,availableRole);">
				    				<input type="checkbox" ng-model="availableRole.selected" />
				    		</div>
							</td>						
							<td> {{ availableRole.name }} </td>
						</tr>					   
					</tbody>
		</table> -->
	</div>
</div>