@@ -127,6 +127,7 @@ export class SakaiPermissions extends SakaiElement {
127
127
</ sakai-group-picker >
128
128
</ div >
129
129
` : nothing }
130
+
130
131
< div class ="mb-1 pt-3 ">
131
132
< button class ="btn btn-secondary "
132
133
aria-label ="${ this . _i18n [ "per.lis.restoredef" ] } "
@@ -136,14 +137,19 @@ export class SakaiPermissions extends SakaiElement {
136
137
</ div >
137
138
138
139
< div id ="permissions-container " class ="container mt-4 ">
140
+
141
+ <!-- START HEADER -->
139
142
< div id ="permission-header " class ="row flex-nowrap ">
143
+ <!-- Add the button which toggles all the permissions -->
140
144
< div class ="col-md-6 p-3 ">
141
145
< button class ="btn btn-transparent "
142
146
title ="${ this . _i18n [ "per.lis.head.title" ] } "
143
147
@click =${ this . _handlePermissionClick } >
144
148
${ this . _i18n [ "per.lis.head" ] }
145
149
</ button >
146
150
</ div >
151
+
152
+ <!-- Now add all the role headers -->
147
153
${ this . roles . map ( role => html `
148
154
< div class ="col-sm role d-none d-md-block p-3 text-center "
149
155
data-role ="${ role } "
@@ -158,8 +164,13 @@ export class SakaiPermissions extends SakaiElement {
158
164
</ div >
159
165
` ) }
160
166
</ div >
167
+ <!-- END HEADER -->
168
+
169
+ <!-- For each available permission, add a row -->
161
170
${ this . available . map ( perm => html `
162
171
< div class ="row permission-row ">
172
+
173
+ <!-- Add the permission title. Clicking this will toggle this permission for each role -->
163
174
< div class ="col-md-6 p-3 fw-bolder fw-md-normal ">
164
175
< button class ="btn btn-transparent fw-bolder fw-md-normal text-start "
165
176
title ="${ this . _i18n [ "per.lis.perm.title" ] } "
@@ -168,6 +179,8 @@ export class SakaiPermissions extends SakaiElement {
168
179
${ this . _i18n [ perm ] }
169
180
</ button >
170
181
</ div >
182
+
183
+ <!-- Add a checkbox for each role. If this perm is in the this.on object, it is checked -->
171
184
${ this . roles . map ( role => html `
172
185
< div class ="col-md ${ role . replace ( " " , "_" ) } -checkbox-cell text-start text-md-center p-3 permission-cell border-left-1 ">
173
186
< label for ="${ role } : ${ perm } " class ="sr-only ">
0 commit comments