@@ -163,44 +163,57 @@ <h1><i class="icon icon-edit"></i> Edit user »@username«</h1>
163163 }
164164 </ div >
165165 </ div >
166+
166167 @if(isPermitted(USERS_PERMISSIONSEDIT)) {
167168 < div class ="row-fluid ">
168169 < h2 > < h2 > < i class ="icon icon-bolt "> </ i > Change Permissions</ h2 >
169170
170171 < form class ="form form-horizontal " action ="@routes.UsersController.resetPermissions(user.getName) " method ="POST ">
171- < button class ="btn btn-danger " type ="submit " data-confirm ="Really reset permissions for @user.getName? " style ="margin-top: 10px; margin-bottom: 10px; ">
172- Reset Permissions
173- </ button >
174172
175- < label class ="checkbox ">
176- < input type ="checkbox " id ="admin " name ="admin " @if(isPermitted(user, "*")) {selected} />
177- Assign administrator permissions?
173+ < label class ="radio " style ="margin-top: 5px; ">
174+ < input type ="radio " name ="permissiontype " value ="admin " @if(isPermitted(user, "*")) { checked="checked " } />
175+ Set to administrator permissions
176+ </ label >
177+
178+ < label class ="radio ">
179+ < input type ="radio " name ="permissiontype " value ="reader " @if(!isPermitted(user, "*")) { checked="checked " } />
180+ Set to reader permissions
178181 </ label >
179182
180- All permissions will be reset, assigned stream permissions will be lost!
183+ < button class ="btn btn-warning btn-small " type ="submit " data-confirm ="Really reset permissions for @user.getName? " style ="margin-top: 10px; margin-bottom: 10px; ">
184+ Set default permissions
185+ </ button >
186+
187+ < p >
188+ Previously assigned stream and dashboard permissions will be lost!
189+ </ p >
181190 </ form >
182191
183192 </ div >
184193 }
194+
185195 < div class ="row-fluid ">
186- < form action ="@routes.StartpageController.reset(user.getName) " method ="POST " class ="pull-right ">
187- < button type ="submit " class ="btn btn-danger btn-small " data-confirm ="Really reset startpage? ">
196+ < h2 > < i class ="icon icon-circle-arrow-right "> </ i > Custom startpage</ h2 >
197+
198+ < p >
199+ @if(user.getStartpage == null) {
200+ No custom startpage configured yet.
201+ } else {
202+ The startpage is currently set to
203+ < em > @user.getStartpage.getType.toString.toLowerCase</ em > with ID
204+ < em > @user.getStartpage.getId</ em > .
205+
206+ < a href ="@user.getStartpage.getCall ">
207+ < i class ="icon icon-angle-right "> </ i > Open
208+ </ a >
209+
210+ }
211+ </ p >
212+
213+ < form action ="@routes.StartpageController.reset(user.getName) " method ="POST ">
214+ < button type ="submit " class ="btn btn-primary btn-small " data-confirm ="Really reset startpage? ">
188215 Reset custom startpage
189216 </ button >
190217 </ form >
191-
192- < h2 > < i class ="icon icon-circle-arrow-right "> </ i > Custom startpage</ h2 >
193- @if(user.getStartpage == null) {
194- No custom startpage configured yet.
195- } else {
196- The startpage is currently set to
197- < em > @user.getStartpage.getType.toString.toLowerCase</ em > with ID
198- < em > @user.getStartpage.getId</ em > .
199-
200- < a href ="@user.getStartpage.getCall ">
201- < i class ="icon icon-angle-right "> </ i > Open
202- </ a >
203-
204- }
205218 </ div >
206219}
0 commit comments