Changeset 5042
- Timestamp:
- Aug 11, 2009, 12:48:42 PM (13 years ago)
- Location:
- trunk/www/admin
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/admin/annotationtypecategories/view_category.jsp
r4886 r5042 32 32 import="net.sf.basedb.core.ItemContext" 33 33 import="net.sf.basedb.core.ItemQuery" 34 import="net.sf.basedb.core.ItemResultIterator"35 34 import="net.sf.basedb.core.ItemResultList" 36 35 import="net.sf.basedb.core.AnnotationTypeCategory" … … 276 275 { 277 276 %> 278 <h4 class="docked">Annotation types</h4> 279 <tbl:table 280 id="members" 281 clazz="itemlist" 282 columns="all" 277 <base:section 278 id="annotationTypes" 279 title="<%="Annotation types (" + annotationTypes.size() + ")"%>" 280 context="<%=cc%>" 283 281 > 284 <tbl:columndef 285 id="name" 286 title="Name" 287 /> 288 <tbl:columndef 289 id="valuetype" 290 title="Value Type" 291 /> 292 <tbl:columndef 293 id="description" 294 title="Description" 295 /> 296 <tbl:columndef 297 id="requiredForMiame" 298 title="Required For Miame" 299 /> 300 301 <tbl:data> 302 <tbl:columns> 303 </tbl:columns> 304 <tbl:rows> 305 <% 306 for (AnnotationType annotationType : annotationTypes) 307 { 308 %> 309 <tbl:row> 310 <tbl:cell column="name"><base:icon 311 image="deleted.gif" 312 tooltip="This item has been scheduled for deletion" 313 visible="<%=annotationType.isRemoved()%>" 314 /><%=Base.getLinkedName(ID, annotationType, false, true)%></tbl:cell> 315 <tbl:cell column="valuetype"><%=annotationType.getValueType()%></tbl:cell> 316 <tbl:cell column="description"><%=HTML.encodeTags(annotationType.getDescription())%></tbl:cell> 317 <tbl:cell column="requiredForMiame"><%=annotationType.isRequiredForMiame() ? "yes" : "no"%></tbl:cell> 318 </tbl:row> 319 <% 320 } 321 %> 322 </tbl:rows> 323 </tbl:data> 324 </tbl:table> 325 <% 326 } 327 328 // Tables with users/groups/projects that this item is shared to 329 MultiPermissions mp = new MultiPermissions(Collections.singleton(annotationTypeCategory)); 330 ItemResultIterator<User> users = mp.getUsers().iterate(dc); 331 ItemResultIterator<Group> groups = mp.getGroups().iterate(dc); 332 ItemResultIterator<Project> projects = mp.getProjects().iterate(dc); 333 334 if (users.hasNext() || groups.hasNext() || projects.hasNext()) 335 { 336 %> 337 <h4 class="docked">Shared to</h4> 338 <tbl:table 339 id="itemsSharedTo" 340 clazz="itemlist" 341 columns="all" 342 > 343 <tbl:columndef 344 id="itemType" 345 title="Item type" 346 /> 282 <tbl:table 283 id="members" 284 clazz="itemlist" 285 columns="all" 286 > 347 287 <tbl:columndef 348 288 id="name" … … 350 290 /> 351 291 <tbl:columndef 352 id=" permissions"353 title=" Permissions"292 id="valuetype" 293 title="Value Type" 354 294 /> 295 <tbl:columndef 296 id="description" 297 title="Description" 298 /> 299 <tbl:columndef 300 id="requiredForMiame" 301 title="Required For Miame" 302 /> 303 355 304 <tbl:data> 356 305 <tbl:columns> … … 358 307 <tbl:rows> 359 308 <% 360 while(projects.hasNext())309 for (AnnotationType annotationType : annotationTypes) 361 310 { 362 Project project = projects.next(); 363 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 364 %> 311 %> 365 312 <tbl:row> 366 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell>367 313 <tbl:cell column="name"><base:icon 368 image="deleted.gif" 369 tooltip="This item has been scheduled for deletion" 370 visible="<%=project.isRemoved()%>" 371 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 372 <tbl:cell column="permissions"> 373 <%=PermissionUtil.translatePermissionsToString(permissions)%> 374 </tbl:cell> 375 </tbl:row> 376 <% 377 } 378 while(groups.hasNext()) 379 { 380 Group group = groups.next(); 381 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 382 %> 383 <tbl:row> 384 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 385 <tbl:cell column="name"><base:icon 386 image="deleted.gif" 387 tooltip="This item has been scheduled for deletion" 388 visible="<%=group.isRemoved()%>" 389 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 390 <tbl:cell column="permissions"> 391 <%=PermissionUtil.translatePermissionsToString(permissions)%> 392 </tbl:cell> 393 </tbl:row> 394 <% 395 } 396 while (users.hasNext()) 397 { 398 User user = users.next(); 399 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 400 %> 401 <tbl:row> 402 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 403 <tbl:cell column="name"><base:icon 404 image="deleted.gif" 405 tooltip="This item has been scheduled for deletion" 406 visible="<%=user.isRemoved()%>" 407 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 408 <tbl:cell column="permissions"> 409 <%=PermissionUtil.translatePermissionsToString(permissions)%> 410 </tbl:cell> 314 image="deleted.gif" 315 tooltip="This item has been scheduled for deletion" 316 visible="<%=annotationType.isRemoved()%>" 317 /><%=Base.getLinkedName(ID, annotationType, false, true)%></tbl:cell> 318 <tbl:cell column="valuetype"><%=annotationType.getValueType()%></tbl:cell> 319 <tbl:cell column="description"><%=HTML.encodeTags(annotationType.getDescription())%></tbl:cell> 320 <tbl:cell column="requiredForMiame"><%=annotationType.isRequiredForMiame() ? "yes" : "no"%></tbl:cell> 411 321 </tbl:row> 412 322 <% … … 415 325 </tbl:rows> 416 326 </tbl:data> 417 </tbl:table> 327 </tbl:table> 328 </base:section> 329 <% 330 } 331 332 // Tables with users/groups/projects that this item is shared to 333 MultiPermissions mp = new MultiPermissions(Collections.singleton(annotationTypeCategory)); 334 ItemResultList<User> users = mp.getUsers().list(dc); 335 ItemResultList<Group> groups = mp.getGroups().list(dc); 336 ItemResultList<Project> projects = mp.getProjects().list(dc); 337 int totalShare = users.size() + groups.size() + projects.size(); 338 339 if (totalShare > 0) 340 { 341 %> 342 <base:section 343 id="sharedTo" 344 title="<%="Shared to (" + totalShare + ")"%>" 345 context="<%=cc%>" 346 > 347 <tbl:table 348 id="itemsSharedTo" 349 clazz="itemlist" 350 columns="all" 351 > 352 <tbl:columndef 353 id="itemType" 354 title="Item type" 355 /> 356 <tbl:columndef 357 id="name" 358 title="Name" 359 /> 360 <tbl:columndef 361 id="permissions" 362 title="Permissions" 363 /> 364 <tbl:data> 365 <tbl:columns> 366 </tbl:columns> 367 <tbl:rows> 368 <% 369 for (Project project : projects) 370 { 371 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 372 %> 373 <tbl:row> 374 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 375 <tbl:cell column="name"><base:icon 376 image="deleted.gif" 377 tooltip="This item has been scheduled for deletion" 378 visible="<%=project.isRemoved()%>" 379 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 380 <tbl:cell column="permissions"> 381 <%=PermissionUtil.translatePermissionsToString(permissions)%> 382 </tbl:cell> 383 </tbl:row> 384 <% 385 } 386 for (Group group : groups) 387 { 388 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 389 %> 390 <tbl:row> 391 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 392 <tbl:cell column="name"><base:icon 393 image="deleted.gif" 394 tooltip="This item has been scheduled for deletion" 395 visible="<%=group.isRemoved()%>" 396 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 397 <tbl:cell column="permissions"> 398 <%=PermissionUtil.translatePermissionsToString(permissions)%> 399 </tbl:cell> 400 </tbl:row> 401 <% 402 } 403 for (User user : users) 404 { 405 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 406 %> 407 <tbl:row> 408 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 409 <tbl:cell column="name"><base:icon 410 image="deleted.gif" 411 tooltip="This item has been scheduled for deletion" 412 visible="<%=user.isRemoved()%>" 413 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 414 <tbl:cell column="permissions"> 415 <%=PermissionUtil.translatePermissionsToString(permissions)%> 416 </tbl:cell> 417 </tbl:row> 418 <% 419 } 420 %> 421 </tbl:rows> 422 </tbl:data> 423 </tbl:table> 424 </base:section> 418 425 <% 419 426 } -
trunk/www/admin/annotationtypes/view_annotationtype.jsp
r4889 r5042 38 38 import="net.sf.basedb.core.ItemQuery" 39 39 import="net.sf.basedb.core.ItemResultList" 40 import="net.sf.basedb.core.ItemResultIterator"41 40 import="net.sf.basedb.core.MultiPermissions" 42 41 import="net.sf.basedb.core.Group" … … 321 320 { 322 321 %> 323 <h4 class="docked">Categories</h4> 324 <tbl:table 325 id="members" 326 clazz="itemlist" 327 columns="all" 322 <base:section 323 id="categories" 324 title="<%="Categories (" + categories.size() + ")"%>" 325 context="<%=cc%>" 328 326 > 329 <tbl:columndef 330 id="name" 331 title="Name" 332 /> 333 <tbl:columndef 334 id="description" 335 title="Description" 336 /> 337 <tbl:data> 338 <tbl:columns> 339 </tbl:columns> 340 <tbl:rows> 341 <% 342 343 for (AnnotationTypeCategory category : categories) 344 { 345 %> 346 <tbl:row> 347 <tbl:cell column="name"><base:icon 348 image="deleted.gif" 349 tooltip="This item has been scheduled for deletion" 350 visible="<%=category.isRemoved()%>" 351 /><%=Base.getLinkedName(ID, category, false, true)%></tbl:cell> 352 <tbl:cell column="description"><%=HTML.encodeTags(category.getDescription())%></tbl:cell> 353 </tbl:row> 354 <% 355 } 356 %> 357 </tbl:rows> 358 </tbl:data> 359 </tbl:table> 360 <% 361 } 362 363 // Tables with users/groups/projects that this item is shared to 364 MultiPermissions mp = new MultiPermissions(Collections.singleton(annotationType)); 365 ItemResultIterator<User> users = mp.getUsers().iterate(dc); 366 ItemResultIterator<Group> groups = mp.getGroups().iterate(dc); 367 ItemResultIterator<Project> projects = mp.getProjects().iterate(dc); 368 369 if (users.hasNext() || groups.hasNext() || projects.hasNext()) 370 { 371 %> 372 <h4 class="docked">Shared to</h4> 373 <tbl:table 374 id="itemsSharedTo" 375 clazz="itemlist" 376 columns="all" 377 > 378 <tbl:columndef 379 id="itemType" 380 title="Item type" 381 /> 327 <tbl:table 328 id="members" 329 clazz="itemlist" 330 columns="all" 331 > 382 332 <tbl:columndef 383 333 id="name" … … 385 335 /> 386 336 <tbl:columndef 387 id=" permissions"388 title=" Permissions"337 id="description" 338 title="Description" 389 339 /> 390 340 <tbl:data> … … 393 343 <tbl:rows> 394 344 <% 395 while(projects.hasNext()) 345 346 for (AnnotationTypeCategory category : categories) 396 347 { 397 Project project = projects.next(); 398 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 399 %> 348 %> 400 349 <tbl:row> 401 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell>402 350 <tbl:cell column="name"><base:icon 403 image="deleted.gif" 404 tooltip="This item has been scheduled for deletion" 405 visible="<%=project.isRemoved()%>" 406 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 407 <tbl:cell column="permissions"> 408 <%=PermissionUtil.translatePermissionsToString(permissions)%> 409 </tbl:cell> 410 </tbl:row> 411 <% 412 } 413 while(groups.hasNext()) 414 { 415 Group group = groups.next(); 416 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 417 %> 418 <tbl:row> 419 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 420 <tbl:cell column="name"><base:icon 421 image="deleted.gif" 422 tooltip="This item has been scheduled for deletion" 423 visible="<%=group.isRemoved()%>" 424 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 425 <tbl:cell column="permissions"> 426 <%=PermissionUtil.translatePermissionsToString(permissions)%> 427 </tbl:cell> 428 </tbl:row> 429 <% 430 } 431 while (users.hasNext()) 432 { 433 User user = users.next(); 434 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 435 %> 436 <tbl:row> 437 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 438 <tbl:cell column="name"><base:icon 439 image="deleted.gif" 440 tooltip="This item has been scheduled for deletion" 441 visible="<%=user.isRemoved()%>" 442 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 443 <tbl:cell column="permissions"> 444 <%=PermissionUtil.translatePermissionsToString(permissions)%> 445 </tbl:cell> 351 image="deleted.gif" 352 tooltip="This item has been scheduled for deletion" 353 visible="<%=category.isRemoved()%>" 354 /><%=Base.getLinkedName(ID, category, false, true)%></tbl:cell> 355 <tbl:cell column="description"><%=HTML.encodeTags(category.getDescription())%></tbl:cell> 446 356 </tbl:row> 447 357 <% … … 450 360 </tbl:rows> 451 361 </tbl:data> 452 </tbl:table> 362 </tbl:table> 363 </base:section> 364 <% 365 } 366 367 // Tables with users/groups/projects that this item is shared to 368 MultiPermissions mp = new MultiPermissions(Collections.singleton(annotationType)); 369 ItemResultList<User> users = mp.getUsers().list(dc); 370 ItemResultList<Group> groups = mp.getGroups().list(dc); 371 ItemResultList<Project> projects = mp.getProjects().list(dc); 372 int totalShare = users.size() + groups.size() + projects.size(); 373 374 if (totalShare > 0) 375 { 376 %> 377 <base:section 378 id="sharedTo" 379 title="<%="Shared to (" + totalShare + ")"%>" 380 context="<%=cc%>" 381 > 382 <tbl:table 383 id="itemsSharedTo" 384 clazz="itemlist" 385 columns="all" 386 > 387 <tbl:columndef 388 id="itemType" 389 title="Item type" 390 /> 391 <tbl:columndef 392 id="name" 393 title="Name" 394 /> 395 <tbl:columndef 396 id="permissions" 397 title="Permissions" 398 /> 399 <tbl:data> 400 <tbl:columns> 401 </tbl:columns> 402 <tbl:rows> 403 <% 404 for (Project project : projects) 405 { 406 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 407 %> 408 <tbl:row> 409 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 410 <tbl:cell column="name"><base:icon 411 image="deleted.gif" 412 tooltip="This item has been scheduled for deletion" 413 visible="<%=project.isRemoved()%>" 414 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 415 <tbl:cell column="permissions"> 416 <%=PermissionUtil.translatePermissionsToString(permissions)%> 417 </tbl:cell> 418 </tbl:row> 419 <% 420 } 421 for (Group group : groups) 422 { 423 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 424 %> 425 <tbl:row> 426 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 427 <tbl:cell column="name"><base:icon 428 image="deleted.gif" 429 tooltip="This item has been scheduled for deletion" 430 visible="<%=group.isRemoved()%>" 431 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 432 <tbl:cell column="permissions"> 433 <%=PermissionUtil.translatePermissionsToString(permissions)%> 434 </tbl:cell> 435 </tbl:row> 436 <% 437 } 438 for (User user : users) 439 { 440 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 441 %> 442 <tbl:row> 443 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 444 <tbl:cell column="name"><base:icon 445 image="deleted.gif" 446 tooltip="This item has been scheduled for deletion" 447 visible="<%=user.isRemoved()%>" 448 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 449 <tbl:cell column="permissions"> 450 <%=PermissionUtil.translatePermissionsToString(permissions)%> 451 </tbl:cell> 452 </tbl:row> 453 <% 454 } 455 %> 456 </tbl:rows> 457 </tbl:data> 458 </tbl:table> 459 </base:section> 453 460 <% 454 461 } -
trunk/www/admin/clients/view_client.jsp
r4889 r5042 31 31 import="net.sf.basedb.core.Item" 32 32 import="net.sf.basedb.core.ItemContext" 33 import="net.sf.basedb.core.ItemResult Iterator"33 import="net.sf.basedb.core.ItemResultList" 34 34 import="net.sf.basedb.core.Permission" 35 35 import="net.sf.basedb.core.Client" … … 276 276 // Tables with users/groups/projects that this item is shared to 277 277 MultiPermissions mp = new MultiPermissions(Collections.singleton(client)); 278 ItemResultIterator<User> users = mp.getUsers().iterate(dc); 279 ItemResultIterator<Group> groups = mp.getGroups().iterate(dc); 280 ItemResultIterator<Project> projects = mp.getProjects().iterate(dc); 278 ItemResultList<User> users = mp.getUsers().list(dc); 279 ItemResultList<Group> groups = mp.getGroups().list(dc); 280 ItemResultList<Project> projects = mp.getProjects().list(dc); 281 int totalShare = users.size() + groups.size() + projects.size(); 281 282 282 if ( users.hasNext() || groups.hasNext() || projects.hasNext())283 if (totalShare > 0) 283 284 { 284 285 %> 285 <h4 class="docked">Shared to</h4> 286 <tbl:table 287 id="itemsSharedTo" 288 clazz="itemlist" 289 columns="all" 290 > 291 <tbl:columndef 292 id="itemType" 293 title="Item type" 294 /> 295 <tbl:columndef 296 id="name" 297 title="Name" 298 /> 299 <tbl:columndef 300 id="permissions" 301 title="Permissions" 302 /> 303 <tbl:data> 304 <tbl:columns> 305 </tbl:columns> 306 <tbl:rows> 307 <% 308 while(projects.hasNext()) 309 { 310 Project project = projects.next(); 311 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 312 %> 313 <tbl:row> 314 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 315 <tbl:cell column="name"><base:icon 316 image="deleted.gif" 317 tooltip="This item has been scheduled for deletion" 318 visible="<%=project.isRemoved()%>" 319 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 320 <tbl:cell column="permissions"> 321 <%=PermissionUtil.translatePermissionsToString(permissions)%> 322 </tbl:cell> 323 </tbl:row> 286 <base:section 287 id="sharedTo" 288 title="<%="Shared to (" + totalShare + ")"%>" 289 context="<%=cc%>" 290 > 291 <tbl:table 292 id="itemsSharedTo" 293 clazz="itemlist" 294 columns="all" 295 > 296 <tbl:columndef 297 id="itemType" 298 title="Item type" 299 /> 300 <tbl:columndef 301 id="name" 302 title="Name" 303 /> 304 <tbl:columndef 305 id="permissions" 306 title="Permissions" 307 /> 308 <tbl:data> 309 <tbl:columns> 310 </tbl:columns> 311 <tbl:rows> 324 312 <% 325 } 326 while(groups.hasNext()) 327 { 328 Group group = groups.next(); 329 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 313 for (Project project : projects) 314 { 315 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 316 %> 317 <tbl:row> 318 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 319 <tbl:cell column="name"><base:icon 320 image="deleted.gif" 321 tooltip="This item has been scheduled for deletion" 322 visible="<%=project.isRemoved()%>" 323 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 324 <tbl:cell column="permissions"> 325 <%=PermissionUtil.translatePermissionsToString(permissions)%> 326 </tbl:cell> 327 </tbl:row> 328 <% 329 } 330 for (Group group : groups) 331 { 332 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 333 %> 334 <tbl:row> 335 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 336 <tbl:cell column="name"><base:icon 337 image="deleted.gif" 338 tooltip="This item has been scheduled for deletion" 339 visible="<%=group.isRemoved()%>" 340 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 341 <tbl:cell column="permissions"> 342 <%=PermissionUtil.translatePermissionsToString(permissions)%> 343 </tbl:cell> 344 </tbl:row> 345 <% 346 } 347 for (User user : users) 348 { 349 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 350 %> 351 <tbl:row> 352 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 353 <tbl:cell column="name"><base:icon 354 image="deleted.gif" 355 tooltip="This item has been scheduled for deletion" 356 visible="<%=user.isRemoved()%>" 357 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 358 <tbl:cell column="permissions"> 359 <%=PermissionUtil.translatePermissionsToString(permissions)%> 360 </tbl:cell> 361 </tbl:row> 362 <% 363 } 330 364 %> 331 <tbl:row> 332 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 333 <tbl:cell column="name"><base:icon 334 image="deleted.gif" 335 tooltip="This item has been scheduled for deletion" 336 visible="<%=group.isRemoved()%>" 337 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 338 <tbl:cell column="permissions"> 339 <%=PermissionUtil.translatePermissionsToString(permissions)%> 340 </tbl:cell> 341 </tbl:row> 342 <% 343 } 344 while (users.hasNext()) 345 { 346 User user = users.next(); 347 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 348 %> 349 <tbl:row> 350 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 351 <tbl:cell column="name"><base:icon 352 image="deleted.gif" 353 tooltip="This item has been scheduled for deletion" 354 visible="<%=user.isRemoved()%>" 355 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 356 <tbl:cell column="permissions"> 357 <%=PermissionUtil.translatePermissionsToString(permissions)%> 358 </tbl:cell> 359 </tbl:row> 360 <% 361 } 362 %> 363 </tbl:rows> 364 </tbl:data> 365 </tbl:table> 365 </tbl:rows> 366 </tbl:data> 367 </tbl:table> 368 </base:section> 366 369 <% 367 370 } -
trunk/www/admin/groups/view_group.jsp
r4889 r5042 257 257 { 258 258 %> 259 <h4 class="docked">Members</h4> 260 <tbl:table 261 id="members" 262 clazz="itemlist" 263 columns="all" 264 > 265 <tbl:columndef 266 id="name" 267 title="Name" 268 /> 269 <tbl:columndef 270 id="type" 271 title="Type" 272 /> 273 <tbl:columndef 274 id="description" 275 title="Description" 276 /> 277 <tbl:data> 278 <tbl:columns> 279 </tbl:columns> 280 <tbl:rows> 281 <% 282 for (User user : users) 283 { 259 <base:section 260 id="members" 261 title="<%="Members (" + (users.size() + groups.size()) + ")"%>" 262 context="<%=cc%>" 263 > 264 <tbl:table 265 id="members" 266 clazz="itemlist" 267 columns="all" 268 > 269 <tbl:columndef 270 id="name" 271 title="Name" 272 /> 273 <tbl:columndef 274 id="type" 275 title="Type" 276 /> 277 <tbl:columndef 278 id="description" 279 title="Description" 280 /> 281 <tbl:data> 282 <tbl:columns> 283 </tbl:columns> 284 <tbl:rows> 285 <% 286 for (User user : users) 287 { 288 %> 289 <tbl:row> 290 <tbl:cell column="name"><base:icon 291 image="deleted.gif" 292 tooltip="This item has been scheduled for deletion" 293 visible="<%=user.isRemoved()%>" 294 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 295 <tbl:cell column="type">User</tbl:cell> 296 <tbl:cell column="description"><%=HTML.encodeTags(user.getDescription())%></tbl:cell> 297 </tbl:row> 298 <% 299 } 300 for (Group child : groups) 301 { 302 %> 303 <tbl:row> 304 <tbl:cell column="name"><base:icon 305 image="deleted.gif" 306 tooltip="This item has been scheduled for deletion" 307 visible="<%=child.isRemoved()%>" 308 /><%=Base.getLinkedName(ID, child, false, true)%></tbl:cell> 309 <tbl:cell column="type">Group</tbl:cell> 310 <tbl:cell column="description"><%=HTML.encodeTags(child.getDescription())%></tbl:cell> 311 </tbl:row> 312 <% 313 } 284 314 %> 285 <tbl:row> 286 <tbl:cell column="name"><base:icon 287 image="deleted.gif" 288 tooltip="This item has been scheduled for deletion" 289 visible="<%=user.isRemoved()%>" 290 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 291 <tbl:cell column="type">User</tbl:cell> 292 <tbl:cell column="description"><%=HTML.encodeTags(user.getDescription())%></tbl:cell> 293 </tbl:row> 294 <% 295 } 296 for (Group child : groups) 297 { 298 %> 299 <tbl:row> 300 <tbl:cell column="name"><base:icon 301 image="deleted.gif" 302 tooltip="This item has been scheduled for deletion" 303 visible="<%=child.isRemoved()%>" 304 /><%=Base.getLinkedName(ID, child, false, true)%></tbl:cell> 305 <tbl:cell column="type">Group</tbl:cell> 306 <tbl:cell column="description"><%=HTML.encodeTags(child.getDescription())%></tbl:cell> 307 </tbl:row> 308 <% 309 } 310 %> 311 </tbl:rows> 312 </tbl:data> 313 </tbl:table> 315 </tbl:rows> 316 </tbl:data> 317 </tbl:table> 318 </base:section> 314 319 <% 315 320 } -
trunk/www/admin/hardware/view_hardware.jsp
r4889 r5042 31 31 import="net.sf.basedb.core.Item" 32 32 import="net.sf.basedb.core.ItemContext" 33 import="net.sf.basedb.core.ItemResult Iterator"33 import="net.sf.basedb.core.ItemResultList" 34 34 import="net.sf.basedb.core.Permission" 35 35 import="net.sf.basedb.core.Hardware" … … 267 267 // Tables with users/groups/projects that this item is shared to 268 268 MultiPermissions mp = new MultiPermissions(Collections.singleton(hardware)); 269 ItemResultIterator<User> users = mp.getUsers().iterate(dc); 270 ItemResultIterator<Group> groups = mp.getGroups().iterate(dc); 271 ItemResultIterator<Project> projects = mp.getProjects().iterate(dc); 269 ItemResultList<User> users = mp.getUsers().list(dc); 270 ItemResultList<Group> groups = mp.getGroups().list(dc); 271 ItemResultList<Project> projects = mp.getProjects().list(dc); 272 int totalShare = (users.size() + groups.size() + projects.size()); 272 273 273 if ( users.hasNext() || groups.hasNext() || projects.hasNext())274 if (totalShare > 0) 274 275 { 275 276 %> 276 <h4 class="docked">Shared to</h4> 277 <tbl:table 278 id="itemsSharedTo" 279 clazz="itemlist" 280 columns="all" 281 > 282 <tbl:columndef 283 id="itemType" 284 title="Item type" 285 /> 286 <tbl:columndef 287 id="name" 288 title="Name" 289 /> 290 <tbl:columndef 291 id="permissions" 292 title="Permissions" 293 /> 294 <tbl:data> 295 <tbl:columns> 296 </tbl:columns> 297 <tbl:rows> 298 <% 299 while(projects.hasNext()) 300 { 301 Project project = projects.next(); 302 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 303 %> 304 <tbl:row> 305 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 306 <tbl:cell column="name"><base:icon 307 image="deleted.gif" 308 tooltip="This item has been scheduled for deletion" 309 visible="<%=project.isRemoved()%>" 310 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 311 <tbl:cell column="permissions"> 312 <%=PermissionUtil.translatePermissionsToString(permissions)%> 313 </tbl:cell> 314 </tbl:row> 277 <base:section 278 id="sharedTo" 279 title="<%="Shared to (" + totalShare + ")"%>" 280 context="<%=cc%>" 281 > 282 <tbl:table 283 id="itemsSharedTo" 284 clazz="itemlist" 285 columns="all" 286 > 287 <tbl:columndef 288 id="itemType" 289 title="Item type" 290 /> 291 <tbl:columndef 292 id="name" 293 title="Name" 294 /> 295 <tbl:columndef 296 id="permissions" 297 title="Permissions" 298 /> 299 <tbl:data> 300 <tbl:columns> 301 </tbl:columns> 302 <tbl:rows> 315 303 <% 316 } 317 while(groups.hasNext()) 318 { 319 Group group = groups.next(); 320 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 304 for (Project project : projects) 305 { 306 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 307 %> 308 <tbl:row> 309 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 310 <tbl:cell column="name"><base:icon 311 image="deleted.gif" 312 tooltip="This item has been scheduled for deletion" 313 visible="<%=project.isRemoved()%>" 314 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 315 <tbl:cell column="permissions"> 316 <%=PermissionUtil.translatePermissionsToString(permissions)%> 317 </tbl:cell> 318 </tbl:row> 319 <% 320 } 321 for (Group group : groups) 322 { 323 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 324 %> 325 <tbl:row> 326 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 327 <tbl:cell column="name"><base:icon 328 image="deleted.gif" 329 tooltip="This item has been scheduled for deletion" 330 visible="<%=group.isRemoved()%>" 331 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 332 <tbl:cell column="permissions"> 333 <%=PermissionUtil.translatePermissionsToString(permissions)%> 334 </tbl:cell> 335 </tbl:row> 336 <% 337 } 338 for (User user : users) 339 { 340 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 341 %> 342 <tbl:row> 343 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 344 <tbl:cell column="name"><base:icon 345 image="deleted.gif" 346 tooltip="This item has been scheduled for deletion" 347 visible="<%=user.isRemoved()%>" 348 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 349 <tbl:cell column="permissions"> 350 <%=PermissionUtil.translatePermissionsToString(permissions)%> 351 </tbl:cell> 352 </tbl:row> 353 <% 354 } 321 355 %> 322 <tbl:row> 323 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 324 <tbl:cell column="name"><base:icon 325 image="deleted.gif" 326 tooltip="This item has been scheduled for deletion" 327 visible="<%=group.isRemoved()%>" 328 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 329 <tbl:cell column="permissions"> 330 <%=PermissionUtil.translatePermissionsToString(permissions)%> 331 </tbl:cell> 332 </tbl:row> 333 <% 334 } 335 while (users.hasNext()) 336 { 337 User user = users.next(); 338 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 339 %> 340 <tbl:row> 341 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 342 <tbl:cell column="name"><base:icon 343 image="deleted.gif" 344 tooltip="This item has been scheduled for deletion" 345 visible="<%=user.isRemoved()%>" 346 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 347 <tbl:cell column="permissions"> 348 <%=PermissionUtil.translatePermissionsToString(permissions)%> 349 </tbl:cell> 350 </tbl:row> 351 <% 352 } 353 %> 354 </tbl:rows> 355 </tbl:data> 356 </tbl:table> 356 </tbl:rows> 357 </tbl:data> 358 </tbl:table> 359 </base:section> 357 360 <% 358 361 } -
trunk/www/admin/hardwaretypes/view_hardwaretype.jsp
r4889 r5042 247 247 { 248 248 %> 249 <h4 class="docked">Hardware</h4> 250 <tbl:table 249 <base:section 251 250 id="hardware" 252 clazz="itemlist"253 co lumns="all"251 title="<%="Hardware (" + hardware.size() + ")"%>" 252 context="<%=cc%>" 254 253 > 255 <tbl:columndef 256 id="name" 257 title="Name" 258 /> 259 <tbl:columndef 260 id="version" 261 title="Version" 262 /> 263 <tbl:columndef 264 id="description" 265 title="Description" 266 /> 267 <tbl:data> 268 <tbl:columns> 269 </tbl:columns> 270 <tbl:rows> 271 <% 272 for (Hardware item : hardware) 273 { 254 <tbl:table 255 id="hardware" 256 clazz="itemlist" 257 columns="all" 258 > 259 <tbl:columndef 260 id="name" 261 title="Name" 262 /> 263 <tbl:columndef 264 id="version" 265 title="Version" 266 /> 267 <tbl:columndef 268 id="description" 269 title="Description" 270 /> 271 <tbl:data> 272 <tbl:columns> 273 </tbl:columns> 274 <tbl:rows> 275 <% 276 for (Hardware item : hardware) 277 { 278 %> 279 <tbl:row> 280 <tbl:cell column="name"><base:icon 281 image="deleted.gif" 282 tooltip="This item has been scheduled for deletion" 283 visible="<%=item.isRemoved()%>" 284 /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 285 <tbl:cell column="version"><%=HTML.encodeTags(item.getVersionString())%></tbl:cell> 286 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 287 </tbl:row> 288 <% 289 } 274 290 %> 275 <tbl:row> 276 <tbl:cell column="name"><base:icon 277 image="deleted.gif" 278 tooltip="This item has been scheduled for deletion" 279 visible="<%=item.isRemoved()%>" 280 /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 281 <tbl:cell column="version"><%=HTML.encodeTags(item.getVersionString())%></tbl:cell> 282 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 283 </tbl:row> 284 <% 285 } 286 %> 287 </tbl:rows> 288 </tbl:data> 289 </tbl:table> 291 </tbl:rows> 292 </tbl:data> 293 </tbl:table> 294 </base:section> 290 295 <% 291 296 } -
trunk/www/admin/platforms/variants/view_variant.jsp
r4889 r5042 252 252 </tr> 253 253 </table> 254 </div> 255 </t:tab> 256 </t:tabcontrol> 257 254 258 255 <% 259 256 ItemQuery<PlatformFileType> fileTypeQuery = platform.getFileTypes(variant, false); … … 274 271 { 275 272 %> 276 <h4 class="docked">Data file types</h4> 277 <tbl:table 273 <base:section 278 274 id="fileTypes" 279 clazz="itemlist" 280 columns="all" 281 > 282 <tbl:columndef 283 id="name" 284 title="Name" 285 /> 286 <tbl:columndef 287 id="variant" 288 title="Variant" 289 /> 290 <tbl:columndef 291 id="required" 292 title="Required" 293 /> 294 <tbl:columndef 295 id="genericType" 296 title="Generic type" 297 /> 298 <tbl:columndef 299 id="description" 300 title="Description" 301 /> 302 <tbl:data> 303 <tbl:columns> 304 </tbl:columns> 305 <tbl:rows> 306 <% 307 for (PlatformFileType fileType : fileTypes) 308 { 309 DataFileType dft = fileType.getDataFileType(); 310 PlatformVariant thisVariant = fileType.getVariant(); 275 title="<%="Data file type (" + fileTypes.size() + ")"%>" 276 context="<%=cc%>" 277 > 278 <tbl:table 279 id="fileTypes" 280 clazz="itemlist" 281 columns="all" 282 > 283 <tbl:columndef 284 id="name" 285 title="Name" 286 /> 287 <tbl:columndef 288 id="variant" 289 title="Variant" 290 /> 291 <tbl:columndef 292 id="required" 293 title="Required" 294 /> 295 <tbl:columndef 296 id="genericType" 297 title="Generic type" 298 /> 299 <tbl:columndef 300 id="description" 301 title="Description" 302 /> 303 <tbl:data> 304 <tbl:columns> 305 </tbl:columns> 306 <tbl:rows> 307 <% 308 for (PlatformFileType fileType : fileTypes) 309 { 310 DataFileType dft = fileType.getDataFileType(); 311 PlatformVariant thisVariant = fileType.getVariant(); 312 %> 313 <tbl:row> 314 <tbl:cell column="variant"><base:icon 315 image="deleted.gif" 316 tooltip="This item has been scheduled for deletion" 317 visible="<%=thisVariant != null && thisVariant.isRemoved()%>" 318 /><%=thisVariant == null ? "<i>- all -</i>" : Base.getLinkedName(ID, thisVariant, false, true)%></tbl:cell> 319 <tbl:cell column="name"><base:icon 320 image="deleted.gif" 321 tooltip="This item has been scheduled for deletion" 322 visible="<%=dft != null && dft.isRemoved()%>" 323 /><%=Base.getLinkedName(ID, dft, false, true)%></tbl:cell> 324 <tbl:cell column="required"><%=fileType.isRequired() ? "yes" : "no"%></tbl:cell> 325 <tbl:cell column="genericType"><base:propertyvalue item="<%=dft%>" property="genericType" /></tbl:cell> 326 <tbl:cell column="description"><%=HTML.niceFormat(dft.getDescription())%></tbl:cell> 327 </tbl:row> 328 <% 329 } 311 330 %> 312 <tbl:row> 313 <tbl:cell column="variant"><base:icon 314 image="deleted.gif" 315 tooltip="This item has been scheduled for deletion" 316 visible="<%=thisVariant != null && thisVariant.isRemoved()%>" 317 /><%=thisVariant == null ? "<i>- all -</i>" : Base.getLinkedName(ID, thisVariant, false, true)%></tbl:cell> 318 <tbl:cell column="name"><base:icon 319 image="deleted.gif" 320 tooltip="This item has been scheduled for deletion" 321 visible="<%=dft != null && dft.isRemoved()%>" 322 /><%=Base.getLinkedName(ID, dft, false, true)%></tbl:cell> 323 <tbl:cell column="required"><%=fileType.isRequired() ? "yes" : "no"%></tbl:cell> 324 <tbl:cell column="genericType"><base:propertyvalue item="<%=dft%>" property="genericType" /></tbl:cell> 325 <tbl:cell column="description"><%=HTML.niceFormat(dft.getDescription())%></tbl:cell> 326 </tbl:row> 327 <% 328 } 329 %> 330 </tbl:rows> 331 </tbl:data> 332 </tbl:table> 331 </tbl:rows> 332 </tbl:data> 333 </tbl:table> 334 </base:section> 333 335 <% 334 336 } 335 337 %> 336 338 </div> 339 </t:tab> 340 </t:tabcontrol> 337 341 </base:body> 338 342 </base:page> -
trunk/www/admin/platforms/view_platform.jsp
r4889 r5042 275 275 </table> 276 276 277 </div>278 </t:tab>279 <t:tab id="variants" title="Variants"280 tooltip="View and manage variants of this platform" />281 </t:tabcontrol>282 283 277 <% 284 278 ItemQuery<PlatformFileType> fileTypeQuery = platform.getFileTypes(null, false); … … 299 293 { 300 294 %> 301 <h4 class="docked">Data file types</h4> 302 <tbl:table 303 id="fileTypes" 304 clazz="itemlist" 305 columns="all" 306 > 307 <tbl:columndef 308 id="name" 309 title="Name" 310 /> 311 <tbl:columndef 312 id="variant" 313 title="Variant" 314 /> 315 <tbl:columndef 316 id="required" 317 title="Required" 318 /> 319 <tbl:columndef 320 id="genericType" 321 title="Generic type" 322 /> 323 <tbl:columndef 324 id="description" 325 title="Description" 326 /> 327 <tbl:data> 328 <tbl:columns> 329 </tbl:columns> 330 <tbl:rows> 331 <% 332 for (PlatformFileType fileType : fileTypes) 333 { 334 DataFileType dft = fileType.getDataFileType(); 335 PlatformVariant variant = fileType.getVariant(); 295 <base:section 296 id="dataFileTypes" 297 title="<%="Data file types (" + fileTypes.size() + ")"%>" 298 context="<%=cc%>" 299 > 300 <tbl:table 301 id="fileTypes" 302 clazz="itemlist" 303 columns="all" 304 > 305 <tbl:columndef 306 id="name" 307 title="Name" 308 /> 309 <tbl:columndef 310 id="variant" 311 title="Variant" 312 /> 313 <tbl:columndef 314 id="required" 315 title="Required" 316 /> 317 <tbl:columndef 318 id="genericType" 319 title="Generic type" 320 /> 321 <tbl:columndef 322 id="description" 323 title="Description" 324 /> 325 <tbl:data> 326 <tbl:columns> 327 </tbl:columns> 328 <tbl:rows> 329 <% 330 for (PlatformFileType fileType : fileTypes) 331 { 332 DataFileType dft = fileType.getDataFileType(); 333 PlatformVariant variant = fileType.getVariant(); 334 %> 335 <tbl:row> 336 <tbl:cell column="variant"><base:icon 337 image="deleted.gif" 338 tooltip="This item has been scheduled for deletion" 339 visible="<%=variant != null && variant.isRemoved()%>" 340 /><%=variant == null ? "<i>- all -</i>" : Base.getLinkedName(ID, variant, false, true)%></tbl:cell> 341 <tbl:cell column="name"><base:icon 342 image="deleted.gif" 343 tooltip="This item has been scheduled for deletion" 344 visible="<%=dft != null && dft.isRemoved()%>" 345 /><%=Base.getLinkedName(ID, dft, false, true)%></tbl:cell> 346 <tbl:cell column="required"><%=fileType.isRequired() ? "yes" : "no"%></tbl:cell> 347 <tbl:cell column="genericType"><base:propertyvalue item="<%=dft%>" property="genericType" /></tbl:cell> 348 <tbl:cell column="description"><%=HTML.niceFormat(dft.getDescription())%></tbl:cell> 349 </tbl:row> 350 <% 351 } 336 352 %> 337 <tbl:row> 338 <tbl:cell column="variant"><base:icon 339 image="deleted.gif" 340 tooltip="This item has been scheduled for deletion" 341 visible="<%=variant != null && variant.isRemoved()%>" 342 /><%=variant == null ? "<i>- all -</i>" : Base.getLinkedName(ID, variant, false, true)%></tbl:cell> 343 <tbl:cell column="name"><base:icon 344 image="deleted.gif" 345 tooltip="This item has been scheduled for deletion" 346 visible="<%=dft != null && dft.isRemoved()%>" 347 /><%=Base.getLinkedName(ID, dft, false, true)%></tbl:cell> 348 <tbl:cell column="required"><%=fileType.isRequired() ? "yes" : "no"%></tbl:cell> 349 <tbl:cell column="genericType"><base:propertyvalue item="<%=dft%>" property="genericType" /></tbl:cell> 350 <tbl:cell column="description"><%=HTML.niceFormat(dft.getDescription())%></tbl:cell> 351 </tbl:row> 352 <% 353 } 354 %> 355 </tbl:rows> 356 </tbl:data> 357 </tbl:table> 353 </tbl:rows> 354 </tbl:data> 355 </tbl:table> 356 </base:section> 358 357 <% 359 358 } 360 359 %> 361 360 </div> 361 </t:tab> 362 <t:tab id="variants" title="Variants" 363 tooltip="View and manage variants of this platform" /> 364 </t:tabcontrol> 362 365 </base:body> 363 366 </base:page> -
trunk/www/admin/protocols/view_protocol.jsp
r4938 r5042 40 40 import="net.sf.basedb.core.PluginDefinition" 41 41 import="net.sf.basedb.core.ItemQuery" 42 import="net.sf.basedb.core.ItemResultIterator"43 42 import="net.sf.basedb.core.ItemResultList" 44 43 import="net.sf.basedb.core.Include" … … 287 286 { 288 287 %> 289 <h4 class="docked">Parameters</h4> 290 <tbl:table 288 <base:section 291 289 id="parameters" 292 clazz="itemlist" 293 columns="all" 294 > 295 <tbl:columndef 296 id="name" 297 title="Name" 298 /> 299 <tbl:columndef 300 id="values" 301 title="Values" 302 /> 303 <tbl:columndef 304 id="description" 305 title="Description" 306 /> 307 <tbl:data> 308 <tbl:columns> 309 </tbl:columns> 310 <tbl:rows> 311 <% 312 for (AnnotationType item : parameters) 313 { 314 %> 315 <tbl:row> 316 <tbl:cell column="name"><base:icon 317 image="deleted.gif" 318 tooltip="This item has been scheduled for deletion" 319 visible="<%=item.isRemoved()%>" 320 /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 321 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 322 <tbl:cell column="values"> 323 <%=item.isEnumeration() ? 324 "Enumeration: " + HTML.encodeTags(Values.getString(item.getValues(), ", ", true)) : 325 item.getValueType()%> 326 </tbl:cell> 327 </tbl:row> 328 <% 329 } 330 %> 331 </tbl:rows> 332 </tbl:data> 333 </tbl:table> 334 <% 335 } 336 337 // Tables with users/groups/projects that this item is shared to 338 MultiPermissions mp = new MultiPermissions(Collections.singleton(protocol)); 339 ItemResultIterator<User> users = mp.getUsers().iterate(dc); 340 ItemResultIterator<Group> groups = mp.getGroups().iterate(dc); 341 ItemResultIterator<Project> projects = mp.getProjects().iterate(dc); 342 343 if (users.hasNext() || groups.hasNext() || projects.hasNext()) 344 { 345 %> 346 <h4 class="docked">Shared to</h4> 347 <tbl:table 348 id="itemsSharedTo" 349 clazz="itemlist" 350 columns="all" 351 > 352 <tbl:columndef 353 id="itemType" 354 title="Item type" 355 /> 290 title="<%="Parameters (" + parameters.size() + ")"%>" 291 context="<%=cc%>" 292 > 293 <tbl:table 294 id="parameters" 295 clazz="itemlist" 296 columns="all" 297 > 356 298 <tbl:columndef 357 299 id="name" 358 300 title="Name" 359 301 /> 302 <tbl:columndef 303 id="values" 304 title="Values" 305 /> 360 306 <tbl:columndef 361 id=" permissions"362 title=" Permissions"307 id="description" 308 title="Description" 363 309 /> 364 310 <tbl:data> … … 367 313 <tbl:rows> 368 314 <% 369 while(projects.hasNext())315 for (AnnotationType item : parameters) 370 316 { 371 Project project = projects.next(); 372 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 373 %> 317 %> 374 318 <tbl:row> 375 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell>376 319 <tbl:cell column="name"><base:icon 377 image="deleted.gif" 378 tooltip="This item has been scheduled for deletion" 379 visible="<%=project.isRemoved()%>" 380 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 381 <tbl:cell column="permissions"> 382 <%=PermissionUtil.translatePermissionsToString(permissions)%> 383 </tbl:cell> 384 </tbl:row> 385 <% 386 } 387 while(groups.hasNext()) 388 { 389 Group group = groups.next(); 390 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 391 %> 392 <tbl:row> 393 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 394 <tbl:cell column="name"><base:icon 395 image="deleted.gif" 396 tooltip="This item has been scheduled for deletion" 397 visible="<%=group.isRemoved()%>" 398 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 399 <tbl:cell column="permissions"> 400 <%=PermissionUtil.translatePermissionsToString(permissions)%> 401 </tbl:cell> 402 </tbl:row> 403 <% 404 } 405 while (users.hasNext()) 406 { 407 User user = users.next(); 408 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 409 %> 410 <tbl:row> 411 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 412 <tbl:cell column="name"><base:icon 413 image="deleted.gif" 414 tooltip="This item has been scheduled for deletion" 415 visible="<%=user.isRemoved()%>" 416 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 417 <tbl:cell column="permissions"> 418 <%=PermissionUtil.translatePermissionsToString(permissions)%> 320 image="deleted.gif" 321 tooltip="This item has been scheduled for deletion" 322 visible="<%=item.isRemoved()%>" 323 /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 324 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 325 <tbl:cell column="values"> 326 <%=item.isEnumeration() ? 327 "Enumeration: " + HTML.encodeTags(Values.getString(item.getValues(), ", ", true)) : 328 item.getValueType()%> 419 329 </tbl:cell> 420 330 </tbl:row> … … 424 334 </tbl:rows> 425 335 </tbl:data> 426 </tbl:table> 336 </tbl:table> 337 </base:section> 338 <% 339 } 340 341 // Tables with users/groups/projects that this item is shared to 342 MultiPermissions mp = new MultiPermissions(Collections.singleton(protocol)); 343 ItemResultList<User> users = mp.getUsers().list(dc); 344 ItemResultList<Group> groups = mp.getGroups().list(dc); 345 ItemResultList<Project> projects = mp.getProjects().list(dc); 346 int totalShare = (users.size() + groups.size() + projects.size()); 347 if (totalShare > 0) 348 { 349 %> 350 <base:section 351 id="sharedTo" 352 title="<%="Shared to (" + totalShare + ")"%>" 353 context="<%=cc%>" 354 > 355 <tbl:table 356 id="itemsSharedTo" 357 clazz="itemlist" 358 columns="all" 359 > 360 <tbl:columndef 361 id="itemType" 362 title="Item type" 363 /> 364 <tbl:columndef 365 id="name" 366 title="Name" 367 /> 368 <tbl:columndef 369 id="permissions" 370 title="Permissions" 371 /> 372 <tbl:data> 373 <tbl:columns> 374 </tbl:columns> 375 <tbl:rows> 376 <% 377 for (Project project : projects) 378 { 379 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 380 %> 381 <tbl:row> 382 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 383 <tbl:cell column="name"><base:icon 384 image="deleted.gif" 385 tooltip="This item has been scheduled for deletion" 386 visible="<%=project.isRemoved()%>" 387 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 388 <tbl:cell column="permissions"> 389 <%=PermissionUtil.translatePermissionsToString(permissions)%> 390 </tbl:cell> 391 </tbl:row> 392 <% 393 } 394 for (Group group : groups) 395 { 396 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 397 %> 398 <tbl:row> 399 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 400 <tbl:cell column="name"><base:icon 401 image="deleted.gif" 402 tooltip="This item has been scheduled for deletion" 403 visible="<%=group.isRemoved()%>" 404 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 405 <tbl:cell column="permissions"> 406 <%=PermissionUtil.translatePermissionsToString(permissions)%> 407 </tbl:cell> 408 </tbl:row> 409 <% 410 } 411 for (User user : users) 412 { 413 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 414 %> 415 <tbl:row> 416 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 417 <tbl:cell column="name"><base:icon 418 image="deleted.gif" 419 tooltip="This item has been scheduled for deletion" 420 visible="<%=user.isRemoved()%>" 421 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 422 <tbl:cell column="permissions"> 423 <%=PermissionUtil.translatePermissionsToString(permissions)%> 424 </tbl:cell> 425 </tbl:row> 426 <% 427 } 428 %> 429 </tbl:rows> 430 </tbl:data> 431 </tbl:table> 432 </base:section> 427 433 <% 428 434 } -
trunk/www/admin/protocoltypes/view_protocoltype.jsp
r4889 r5042 254 254 { 255 255 %> 256 <h4 class="docked">Protocols</h4> 257 <tbl:table 258 id="protocols" 259 clazz="itemlist" 260 columns="all" 256 <base:section 257 id="protocols" 258 title="<%="Protocols (" + protocols.size() + ")"%>" 259 context="<%=cc%>" 261 260 > 262 <tbl:columndef 263 id="name" 264 title="Name" 265 /> 266 <tbl:columndef 267 id="file" 268 title="File" 269 /> 270 <tbl:columndef 271 id="description" 272 title="Description" 273 /> 274 <tbl:data> 275 <tbl:columns> 276 </tbl:columns> 277 <tbl:rows> 278 <% 279 for (Protocol item : protocols) 280 { 261 <tbl:table 262 id="protocols" 263 clazz="itemlist" 264 columns="all" 265 > 266 <tbl:columndef 267 id="name" 268 title="Name" 269 /> 270 <tbl:columndef 271 id="file" 272 title="File" 273 /> 274 <tbl:columndef 275 id="description" 276 title="Description" 277 /> 278 <tbl:data> 279 <tbl:columns> 280 </tbl:columns> 281 <tbl:rows> 282 <% 283 for (Protocol item : protocols) 284 { 285 %> 286 <tbl:row> 287 <tbl:cell column="name"><base:icon 288 image="deleted.gif" 289 tooltip="This item has been scheduled for deletion" 290 visible="<%=item.isRemoved()%>" 291 /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 292 <tbl:cell column="file"><base:propertyvalue item="<%=item%>" property="file" /></tbl:cell> 293 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 294 </tbl:row> 295 <% 296 } 281 297 %> 282 <tbl:row> 283 <tbl:cell column="name"><base:icon 284 image="deleted.gif" 285 tooltip="This item has been scheduled for deletion" 286 visible="<%=item.isRemoved()%>" 287 /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 288 <tbl:cell column="file"><base:propertyvalue item="<%=item%>" property="file" /></tbl:cell> 289 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 290 </tbl:row> 291 <% 292 } 293 %> 294 </tbl:rows> 295 </tbl:data> 296 </tbl:table> 298 </tbl:rows> 299 </tbl:data> 300 </tbl:table> 301 </base:section> 297 302 <% 298 303 } -
trunk/www/admin/quantities/view_quantity.jsp
r4889 r5042 253 253 { 254 254 %> 255 < h4 class="docked">Units</h4>256 <tbl:table257 id="units"258 c lazz="itemlist"259 columns="all"260 >261 <tbl:columndef262 id="name"263 title="Name"264 />265 <tbl:columndef266 id="symbols"267 title="Symbols"268 />269 <tbl:columndef270 id="formula"271 title="Conversion formula"272 />273 <tbl:columndef274 id="description"275 title="Description"276 />277 <tbl:data>278 <tbl:columns>279 </tbl:columns>280 <tbl:rows>281 < %282 for (Unit item : units)283 {284 StringBuilder formula = new StringBuilder();285 formula.append("1 ").append(item.getDisplaySymbol()).append(" = ");286 if (item.getReferenceFactor() != 1.0)255 <base:section 256 id="units" 257 title="<%="Units (" + units.size() + ")"%>" 258 context="<%=cc%>" 259 > 260 <tbl:table 261 id="units" 262 clazz="itemlist" 263 columns="all" 264 > 265 <tbl:columndef 266 id="name" 267 title="Name" 268 /> 269 <tbl:columndef 270 id="symbols" 271 title="Symbols" 272 /> 273 <tbl:columndef 274 id="formula" 275 title="Conversion formula" 276 /> 277 <tbl:columndef 278 id="description" 279 title="Description" 280 /> 281 <tbl:data> 282 <tbl:columns> 283 </tbl:columns> 284 <tbl:rows> 285 <% 286 for (Unit item : units) 287 287 { 288 formula.append(item.getReferenceFactor()).append(" × "); 288 StringBuilder formula = new StringBuilder(); 289 formula.append("1 ").append(item.getDisplaySymbol()).append(" = "); 290 if (item.getReferenceFactor() != 1.0) 291 { 292 formula.append(item.getReferenceFactor()).append(" × "); 293 } 294 formula.append(quantity.getReferenceUnit()); 295 if (item.getReferenceOffset() != 0.0) 296 { 297 formula.append(" + ").append(item.getReferenceOffset()); 298 } 299 Set<String> symbols = item.getSymbols(); 300 symbols.remove(item.getDisplaySymbol()); 301 symbols.add("<b>" + item.getDisplaySymbol() + "</b>"); 302 %> 303 <tbl:row> 304 <tbl:cell column="name"><base:icon 305 image="deleted.gif" 306 tooltip="This item has been scheduled for deletion" 307 visible="<%=item.isRemoved()%>" 308 /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 309 <tbl:cell column="symbols"><%=Values.getString(symbols, ", ", true) %></tbl:cell> 310 <tbl:cell column="formula"><%=formula.toString()%></tbl:cell> 311 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 312 </tbl:row> 313 <% 289 314 } 290 formula.append(quantity.getReferenceUnit());291 if (item.getReferenceOffset() != 0.0)292 {293 formula.append(" + ").append(item.getReferenceOffset());294 }295 Set<String> symbols = item.getSymbols();296 symbols.remove(item.getDisplaySymbol());297 symbols.add("<b>" + item.getDisplaySymbol() + "</b>");298 315 %> 299 <tbl:row> 300 <tbl:cell column="name"><base:icon 301 image="deleted.gif" 302 tooltip="This item has been scheduled for deletion" 303 visible="<%=item.isRemoved()%>" 304 /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 305 <tbl:cell column="symbols"><%=Values.getString(symbols, ", ", true) %></tbl:cell> 306 <tbl:cell column="formula"><%=formula.toString()%></tbl:cell> 307 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 308 </tbl:row> 309 <% 310 } 311 %> 312 </tbl:rows> 313 </tbl:data> 314 </tbl:table> 316 </tbl:rows> 317 </tbl:data> 318 </tbl:table> 319 </base:section> 315 320 <% 316 321 } -
trunk/www/admin/roles/view_role.jsp
r4889 r5042 265 265 </table> 266 266 267 <h4>Permissions</h4> 267 <base:section 268 id="permissions" 269 title="<%="Permissions"%>" 270 context="<%=cc%>" 271 > 268 272 <table class="form" cellspacing=0> 269 273 <tr> … … 353 357 </table> 354 358 </div> 355 </div> 359 </div> 356 360 <br> 361 </base:section> 357 362 <% 358 363 ItemQuery<User> userQuery = role.getUsers(); … … 371 376 { 372 377 %> 373 <h4 class="docked">Members</h4> 374 <tbl:table 375 id="members" 376 clazz="itemlist" 377 columns="all" 378 <base:section 379 id="members" 380 title="<%="Members (" + users.size() + ")"%>" 381 context="<%=cc%>" 378 382 > 379 <tbl:columndef 380 id="name" 381 title="Name" 382 /> 383 <tbl:columndef 384 id="type" 385 title="Type" 386 /> 387 <tbl:columndef 388 id="description" 389 title="Description" 390 /> 391 <tbl:data> 392 <tbl:columns> 393 </tbl:columns> 394 <tbl:rows> 395 <% 396 for (User user : users) 397 { 383 <tbl:table 384 id="members" 385 clazz="itemlist" 386 columns="all" 387 > 388 <tbl:columndef 389 id="name" 390 title="Name" 391 /> 392 <tbl:columndef 393 id="type" 394 title="Type" 395 /> 396 <tbl:columndef 397 id="description" 398 title="Description" 399 /> 400 <tbl:data> 401 <tbl:columns> 402 </tbl:columns> 403 <tbl:rows> 404 <% 405 for (User user : users) 406 { 407 %> 408 <tbl:row> 409 <tbl:cell column="name"><base:icon 410 image="deleted.gif" 411 tooltip="This item has been scheduled for deletion" 412 visible="<%=user.isRemoved()%>" 413 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 414 <tbl:cell column="type">User</tbl:cell> 415 <tbl:cell column="description"><%=HTML.encodeTags(user.getDescription())%></tbl:cell> 416 </tbl:row> 417 <% 418 } 398 419 %> 399 <tbl:row> 400 <tbl:cell column="name"><base:icon 401 image="deleted.gif" 402 tooltip="This item has been scheduled for deletion" 403 visible="<%=user.isRemoved()%>" 404 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 405 <tbl:cell column="type">User</tbl:cell> 406 <tbl:cell column="description"><%=HTML.encodeTags(user.getDescription())%></tbl:cell> 407 </tbl:row> 408 <% 409 } 410 %> 411 </tbl:rows> 412 </tbl:data> 413 </tbl:table> 420 </tbl:rows> 421 </tbl:data> 422 </tbl:table> 423 </base:section> 414 424 <% 415 425 } -
trunk/www/admin/software/view_software.jsp
r4889 r5042 31 31 import="net.sf.basedb.core.Item" 32 32 import="net.sf.basedb.core.ItemContext" 33 import="net.sf.basedb.core.ItemResult Iterator"33 import="net.sf.basedb.core.ItemResultList" 34 34 import="net.sf.basedb.core.Permission" 35 35 import="net.sf.basedb.core.Software" … … 54 54 import="net.sf.basedb.util.extensions.ExtensionsInvoker" 55 55 import="java.util.Date" 56 import="java.util.Collections" 56 import="java.util.Collections" 57 57 import="java.util.Map" 58 58 import="java.util.Set" … … 266 266 // Tables with users/groups/projects that this item is shared to 267 267 MultiPermissions mp = new MultiPermissions(Collections.singleton(software)); 268 ItemResultIterator<User> users = mp.getUsers().iterate(dc); 269 ItemResultIterator<Group> groups = mp.getGroups().iterate(dc); 270 ItemResultIterator<Project> projects = mp.getProjects().iterate(dc); 268 ItemResultList<User> users = mp.getUsers().list(dc); 269 ItemResultList<Group> groups = mp.getGroups().list(dc); 270 ItemResultList<Project> projects = mp.getProjects().list(dc); 271 int totalShare = (users.size() + groups.size() + projects.size()); 271 272 272 if ( users.hasNext() || groups.hasNext() || projects.hasNext())273 if (totalShare > 0) 273 274 { 274 275 %> 275 <h4 class="docked">Shared to</h4> 276 <tbl:table 277 id="itemsSharedTo" 278 clazz="itemlist" 279 columns="all" 280 > 281 <tbl:columndef 282 id="itemType" 283 title="Item type" 284 /> 285 <tbl:columndef 286 id="name" 287 title="Name" 288 /> 289 <tbl:columndef 290 id="permissions" 291 title="Permissions" 292 /> 293 <tbl:data> 294 <tbl:columns> 295 </tbl:columns> 296 <tbl:rows> 297 <% 298 while(projects.hasNext()) 299 { 300 Project project = projects.next(); 301 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 302 %> 303 <tbl:row> 304 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 305 <tbl:cell column="name"><base:icon 306 image="deleted.gif" 307 tooltip="This item has been scheduled for deletion" 308 visible="<%=project.isRemoved()%>" 309 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 310 <tbl:cell column="permissions"> 311 <%=PermissionUtil.translatePermissionsToString(permissions)%> 312 </tbl:cell> 313 </tbl:row> 276 <base:section 277 id="sharedTo" 278 title="<%="Shared to (" + totalShare + ")"%>" 279 context="<%=cc%>" 280 > 281 <tbl:table 282 id="itemsSharedTo" 283 clazz="itemlist" 284 columns="all" 285 > 286 <tbl:columndef 287 id="itemType" 288 title="Item type" 289 /> 290 <tbl:columndef 291 id="name" 292 title="Name" 293 /> 294 <tbl:columndef 295 id="permissions" 296 title="Permissions" 297 /> 298 <tbl:data> 299 <tbl:columns> 300 </tbl:columns> 301 <tbl:rows> 314 302 <% 315 } 316 while(groups.hasNext()) 317 { 318 Group group = groups.next(); 319 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 303 for (Project project : projects) 304 { 305 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 306 %> 307 <tbl:row> 308 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 309 <tbl:cell column="name"><base:icon 310 image="deleted.gif" 311 tooltip="This item has been scheduled for deletion" 312 visible="<%=project.isRemoved()%>" 313 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 314 <tbl:cell column="permissions"> 315 <%=PermissionUtil.translatePermissionsToString(permissions)%> 316 </tbl:cell> 317 </tbl:row> 318 <% 319 } 320 for (Group group : groups) 321 { 322 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 323 %> 324 <tbl:row> 325 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 326 <tbl:cell column="name"><base:icon 327 image="deleted.gif" 328 tooltip="This item has been scheduled for deletion" 329 visible="<%=group.isRemoved()%>" 330 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 331 <tbl:cell column="permissions"> 332 <%=PermissionUtil.translatePermissionsToString(permissions)%> 333 </tbl:cell> 334 </tbl:row> 335 <% 336 } 337 for (User user : users) 338 { 339 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 340 %> 341 <tbl:row> 342 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 343 <tbl:cell column="name"><base:icon 344 image="deleted.gif" 345 tooltip="This item has been scheduled for deletion" 346 visible="<%=user.isRemoved()%>" 347 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 348 <tbl:cell column="permissions"> 349 <%=PermissionUtil.translatePermissionsToString(permissions)%> 350 </tbl:cell> 351 </tbl:row> 352 <% 353 } 320 354 %> 321 <tbl:row> 322 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 323 <tbl:cell column="name"><base:icon 324 image="deleted.gif" 325 tooltip="This item has been scheduled for deletion" 326 visible="<%=group.isRemoved()%>" 327 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 328 <tbl:cell column="permissions"> 329 <%=PermissionUtil.translatePermissionsToString(permissions)%> 330 </tbl:cell> 331 </tbl:row> 332 <% 333 } 334 while (users.hasNext()) 335 { 336 User user = users.next(); 337 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 338 %> 339 <tbl:row> 340 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 341 <tbl:cell column="name"><base:icon 342 image="deleted.gif" 343 tooltip="This item has been scheduled for deletion" 344 visible="<%=user.isRemoved()%>" 345 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 346 <tbl:cell column="permissions"> 347 <%=PermissionUtil.translatePermissionsToString(permissions)%> 348 </tbl:cell> 349 </tbl:row> 350 <% 351 } 352 %> 353 </tbl:rows> 354 </tbl:data> 355 </tbl:table> 355 </tbl:rows> 356 </tbl:data> 357 </tbl:table> 358 </base:section> 356 359 <% 357 360 } -
trunk/www/admin/softwaretypes/view_softwaretype.jsp
r4889 r5042 189 189 { 190 190 %> 191 <h4 class="docked">Software</h4> 192 <tbl:table 191 <base:section 193 192 id="software" 194 clazz="itemlist"195 co lumns="all"193 title="<%="Software (" + software.size() + ")"%>" 194 context="<%=cc%>" 196 195 > 197 <tbl:columndef 198 id="name" 199 title="Name" 200 /> 201 <tbl:columndef 202 id="version" 203 title="Version" 204 /> 205 <tbl:columndef 206 id="description" 207 title="Description" 208 /> 209 <tbl:data> 210 <tbl:columns> 211 </tbl:columns> 212 <tbl:rows> 213 <% 214 for (Software item : software) 215 { 196 <tbl:table 197 id="software" 198 clazz="itemlist" 199 columns="all" 200 > 201 <tbl:columndef 202 id="name" 203 title="Name" 204 /> 205 <tbl:columndef 206 id="version" 207 title="Version" 208 /> 209 <tbl:columndef 210 id="description" 211 title="Description" 212 /> 213 <tbl:data> 214 <tbl:columns> 215 </tbl:columns> 216 <tbl:rows> 217 <% 218 for (Software item : software) 219 { 220 %> 221 <tbl:row> 222 <tbl:cell column="name"><base:icon 223 image="deleted.gif" 224 tooltip="This item has been scheduled for deletion" 225 visible="<%=item.isRemoved()%>" 226 /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 227 <tbl:cell column="version"><%=HTML.encodeTags(item.getVersionString())%></tbl:cell> 228 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 229 </tbl:row> 230 <% 231 } 216 232 %> 217 <tbl:row> 218 <tbl:cell column="name"><base:icon 219 image="deleted.gif" 220 tooltip="This item has been scheduled for deletion" 221 visible="<%=item.isRemoved()%>" 222 /><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> 223 <tbl:cell column="version"><%=HTML.encodeTags(item.getVersionString())%></tbl:cell> 224 <tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> 225 </tbl:row> 226 <% 227 } 228 %> 229 </tbl:rows> 230 </tbl:data> 231 </tbl:table> 233 </tbl:rows> 234 </tbl:data> 235 </tbl:table> 236 </base:section> 232 237 <% 233 238 } -
trunk/www/admin/users/view_user.jsp
r4889 r5042 289 289 { 290 290 %> 291 <h4>Additional information</h4> 292 <table class="form" cellspacing="0"> 293 <% 294 boolean needsTr = true; 295 for (ExtendedProperty ep : extendedProperties) 296 { 297 String name = ep.getName(); 298 Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 299 String value = f.format(user.getExtended(name)); 291 <base:section 292 id="extraInfo" 293 title="<%="Additional information (" + extendedProperties.size() + ")"%>" 294 > 295 296 <table class="form" cellspacing="0"> 297 <% 298 boolean needsTr = true; 299 for (ExtendedProperty ep : extendedProperties) 300 { 301 String name = ep.getName(); 302 Formatter f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); 303 String value = f.format(user.getExtended(name)); 304 %> 305 <%=needsTr ? "<tr valign=\"top\">" : "" %> 306 <td class="prompt" width="10%"><%=HTML.encodeTags(ep.getTitle())%></td> 307 <td width="40%"><%=value%></td> 308 <td> </td> 309 <%=needsTr ? "" : "</tr>"%> 310 <% 311 needsTr = !needsTr; 312 } 300 313 %> 301 <%=needsTr ? "<tr valign=\"top\">" : "" %> 302 <td class="prompt" width="10%"><%=HTML.encodeTags(ep.getTitle())%></td> 303 <td width="40%"><%=value%></td> 304 <td> </td> 305 <%=needsTr ? "" : "</tr>"%> 306 <% 307 needsTr = !needsTr; 308 } 309 %> 310 <%=needsTr ? "" : "</tr>"%> 311 </table> 314 <%=needsTr ? "" : "</tr>"%> 315 </table> 316 </base:section> 312 317 <% 313 318 } … … 340 345 { 341 346 %> 342 <h4 class="docked">Membership</h4> 343 <tbl:table 344 id="membership" 345 clazz="itemlist" 346 columns="all" 347 > 348 <tbl:columndef 349 id="name" 350 title="Name" 351 /> 352 <tbl:columndef 353 id="type" 354 title="Type" 355 /> 356 <tbl:columndef 357 id="description" 358 title="Description" 359 /> 360 <tbl:data> 361 <tbl:columns> 362 </tbl:columns> 363 <tbl:rows> 364 <% 365 for (Group group : groups) 366 { 347 <base:section 348 id="membership" 349 title="<%="Membership (" + (groups.size() + roles.size()) + ")"%>" 350 context="<%=cc%>" 351 > 352 <tbl:table 353 id="membership" 354 clazz="itemlist" 355 columns="all" 356 > 357 <tbl:columndef 358 id="name" 359 title="Name" 360 /> 361 <tbl:columndef 362 id="type" 363 title="Type" 364 /> 365 <tbl:columndef 366 id="description" 367 title="Description" 368 /> 369 <tbl:data> 370 <tbl:columns> 371 </tbl:columns> 372 <tbl:rows> 373 <% 374 for (Group group : groups) 375 { 376 %> 377 <tbl:row> 378 <tbl:cell column="name"><base:icon 379 image="deleted.gif" 380 tooltip="This item has been scheduled for deletion" 381 visible="<%=group.isRemoved()%>" 382 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 383 <tbl:cell column="type">Group</tbl:cell> 384 <tbl:cell column="description"><%=HTML.encodeTags(group.getDescription())%></tbl:cell> 385 </tbl:row> 386 <% 387 } 388 for (Role role : roles) 389 { 390 %> 391 <tbl:row> 392 <tbl:cell column="name"><base:icon 393 image="deleted.gif" 394 tooltip="This item has been scheduled for deletion" 395 visible="<%=role.isRemoved()%>" 396 /><%=Base.getLinkedName(ID, role, false, true)%></tbl:cell> 397 <tbl:cell column="type">Role</tbl:cell> 398 <tbl:cell column="description"><%=HTML.encodeTags(role.getDescription())%></tbl:cell> 399 </tbl:row> 400 <% 401 } 367 402 %> 368 <tbl:row> 369 <tbl:cell column="name"><base:icon 370 image="deleted.gif" 371 tooltip="This item has been scheduled for deletion" 372 visible="<%=group.isRemoved()%>" 373 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 374 <tbl:cell column="type">Group</tbl:cell> 375 <tbl:cell column="description"><%=HTML.encodeTags(group.getDescription())%></tbl:cell> 376 </tbl:row> 377 <% 378 } 379 for (Role role : roles) 380 { 381 %> 382 <tbl:row> 383 <tbl:cell column="name"><base:icon 384 image="deleted.gif" 385 tooltip="This item has been scheduled for deletion" 386 visible="<%=role.isRemoved()%>" 387 /><%=Base.getLinkedName(ID, role, false, true)%></tbl:cell> 388 <tbl:cell column="type">Role</tbl:cell> 389 <tbl:cell column="description"><%=HTML.encodeTags(role.getDescription())%></tbl:cell> 390 </tbl:row> 391 <% 392 } 393 %> 394 </tbl:rows> 395 </tbl:data> 396 </tbl:table> 403 </tbl:rows> 404 </tbl:data> 405 </tbl:table> 406 </base:section> 397 407 <% 398 408 }
Note: See TracChangeset
for help on using the changeset viewer.