Changeset 5941
- Timestamp:
- Feb 1, 2012, 2:26:23 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/clients/web/net/sf/basedb/clients/web/taglib/tab/TabControl.java
r5935 r5941 312 312 } 313 313 314 public void setNotabs(boolean noTabs) 315 { 316 this.noTabs = noTabs; 317 } 318 314 319 void addTab(TabAction tab) 315 320 { -
trunk/www/admin/annotationtypecategories/view_category.jsp
r5937 r5941 140 140 </base:head> 141 141 <base:body> 142 <p> 143 <p:path> 144 <p:pathelement title="Annotation type categories" href="<%="index.jsp?ID="+ID%>" /> 145 <p:pathelement title="<%=HTML.encodeTags(annotationTypeCategory.getName())%>" /> 146 </p:path> 142 <p:path><p:pathelement 143 title="Annotation type categories" href="<%="index.jsp?ID="+ID%>" 144 /><p:pathelement title="<%=HTML.encodeTags(annotationTypeCategory.getName())%>" 145 /></p:path> 147 146 148 <t:tabcontrol id="main" active="properties"> 147 <t:tabcontrol 148 id="main" 149 subclass="content mastertabcontrol" 150 active="properties"> 149 151 <t:tab id="properties" title="Properties"> 150 151 <tbl:toolbar 152 > 153 <tbl:button 154 disabled="<%=writePermission ? false : true%>" 155 image="edit.gif" 156 onclick="editItem()" 157 title="Edit…" 158 tooltip="<%=writePermission ? "Edit this category" : "You do not have permission to edit this category"%>" 159 /> 160 <tbl:button 161 disabled="<%=deletePermission ? false : true%>" 162 image="delete.gif" 163 onclick="deleteItem()" 164 title="Delete" 165 visible="<%=!annotationTypeCategory.isRemoved()%>" 166 tooltip="<%=deletePermission ? "Delete this category" : "You do not have permission to delete this category"%>" 167 /> 168 <tbl:button 169 disabled="<%=writePermission ? false : true%>" 170 image="restore.gif" 171 onclick="restoreItem()" 172 title="Restore" 173 visible="<%=annotationTypeCategory.isRemoved()%>" 174 tooltip="<%=writePermission ? "Restore this category" : "You do not have permission to restore this category"%>" 175 /> 176 <tbl:button 177 disabled="<%=sharePermission ? false : true%>" 178 image="share.gif" 179 onclick="shareItem()" 180 title="Share…" 181 tooltip="<%=sharePermission ? "Share this annotation type category to other user, groups and projects" : "You do not have permission to share this annotation type"%>" 182 /> 183 <tbl:button 184 disabled="<%=setOwnerPermission ? false : true%>" 185 image="take_ownership.png" 186 onclick="setOwner()" 187 title="Set owner…" 188 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change owner of this item"%>" 189 /> 190 <tbl:button 191 image="import.gif" 192 onclick="runPlugin('ImportItem')" 193 title="Import…" 194 tooltip="Import data" 195 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 196 /> 197 <tbl:button 198 image="export.gif" 199 onclick="runPlugin('ExportItem')" 200 title="Export…" 201 tooltip="Export data" 202 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 203 /> 204 <tbl:button 205 image="runplugin.gif" 206 onclick="runPlugin('RunPlugin')" 207 title="Run plugin…" 208 tooltip="Run a plugin" 209 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 210 /> 211 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 212 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 213 <tbl:button 214 image="help.png" 215 onclick="<%="Main.openHelp('" + ID +"', 'annotationtypecategory.view.properties')"%>" 216 title="Help…" 217 tooltip="Get help about this page" 218 /> 219 </tbl:toolbar> 220 <div class="boxedbottom"> 221 <% 222 if (annotationTypeCategory.isRemoved() || annotationTypeCategory.isShared()) 223 { 224 %> 225 <div class="itemstatus"> 152 <div> 153 <table class="fullform bottomborder"> 154 <tr> 155 <th class="itemstatus"> 226 156 <base:icon 227 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 228 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 229 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 230 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 157 image="shared.gif" 158 visible="<%=annotationTypeCategory.isShared()%>" 159 tooltip="This item is shared to other users, groups and/or projects" 160 /> 161 <base:icon 162 image="deleted.gif" 163 onclick="deleteItemPermanently()" 164 tooltip="This item has been flagged for deletion. Click to delete it now." 165 enabled="<%=deletePermanentlyPermission %>" 166 visible="<%=isRemoved%>" 167 /> 231 168 <base:icon image="used.gif" 232 169 onclick="showUsingItems()" 233 tooltip="Show the items that are using this one" 234 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 235 <base:icon image="shared.gif" 236 visible="<%=annotationTypeCategory.isShared()%>"> This item is shared to other users, groups and/or projects</base:icon> 237 </div> 238 <% 239 } 240 %> 241 <table class="form" cellspacing=0> 242 <tr> 243 <td class="prompt">Name</td> 170 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 171 visible="<%=isRemoved && isUsed%>" /> 172 </th> 173 <td style="padding: 0px;"> 174 <tbl:toolbar subclass="bottomborder"> 175 <tbl:button 176 disabled="<%=writePermission ? false : true%>" 177 image="edit.gif" 178 onclick="editItem()" 179 title="Edit…" 180 tooltip="<%=writePermission ? "Edit this category" : "You do not have permission to edit this category"%>" 181 /> 182 <tbl:button 183 disabled="<%=deletePermission ? false : true%>" 184 image="delete.gif" 185 onclick="deleteItem()" 186 title="Delete" 187 visible="<%=!annotationTypeCategory.isRemoved()%>" 188 tooltip="<%=deletePermission ? "Delete this category" : "You do not have permission to delete this category"%>" 189 /> 190 <tbl:button 191 disabled="<%=writePermission ? false : true%>" 192 image="restore.gif" 193 onclick="restoreItem()" 194 title="Restore" 195 visible="<%=annotationTypeCategory.isRemoved()%>" 196 tooltip="<%=writePermission ? "Restore this category" : "You do not have permission to restore this category"%>" 197 /> 198 <tbl:button 199 disabled="<%=sharePermission ? false : true%>" 200 image="share.gif" 201 onclick="shareItem()" 202 title="Share…" 203 tooltip="<%=sharePermission ? "Share this annotation type category to other user, groups and projects" : "You do not have permission to share this annotation type"%>" 204 /> 205 <tbl:button 206 disabled="<%=setOwnerPermission ? false : true%>" 207 image="take_ownership.png" 208 onclick="setOwner()" 209 title="Set owner…" 210 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change owner of this item"%>" 211 /> 212 <tbl:button 213 image="import.gif" 214 onclick="runPlugin('ImportItem')" 215 title="Import…" 216 tooltip="Import data" 217 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 218 /> 219 <tbl:button 220 image="export.gif" 221 onclick="runPlugin('ExportItem')" 222 title="Export…" 223 tooltip="Export data" 224 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 225 /> 226 <tbl:button 227 image="runplugin.gif" 228 onclick="runPlugin('RunPlugin')" 229 title="Run plugin…" 230 tooltip="Run a plugin" 231 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 232 /> 233 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 234 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 235 <tbl:button 236 image="help.png" 237 onclick="<%="Main.openHelp('" + ID +"', 'annotationtypecategory.view.properties')"%>" 238 title="Help…" 239 tooltip="Get help about this page" 240 /> 241 </tbl:toolbar> 242 </td> 243 </tr> 244 <tr> 245 <th>Name</th> 244 246 <td><%=HTML.encodeTags(annotationTypeCategory.getName())%></td> 245 247 </tr> 246 248 <tr> 247 <t d class="prompt">Registered</td>249 <th>Registered</th> 248 250 <td><%=dateFormatter.format(annotationTypeCategory.getEntryDate())%></td> 249 251 </tr> 250 252 <tr> 251 <td class="prompt">Description</td> 253 <th>Owner</th> 254 <td><base:propertyvalue item="<%=annotationTypeCategory%>" property="owner" /></td> 255 </tr> 256 <tr> 257 <th>Permissions</th> 258 <td><%=PermissionUtil.getFullPermissionNames(annotationTypeCategory)%></td> 259 </tr> 260 <tr> 261 <th>Description</th> 252 262 <td><%=HTML.niceFormat(annotationTypeCategory.getDescription())%></td> 253 263 </tr> 254 255 <tr>256 <td class="prompt">Owner</td>257 <td><base:propertyvalue item="<%=annotationTypeCategory%>" property="owner" /></td>258 </tr>259 264 </table> 265 </div> 260 266 261 267 <% 262 263 264 265 266 267 if (annotationTypes.size() == 0)268 {269 %>270 <h4>Annotation types</h4>271 There are no annotation types in this category (or, you don't have permission to view them).268 ItemQuery<AnnotationType> annotationTypeQuery = annotationTypeCategory.getAnnotationTypes(null); 269 annotationTypeQuery.include(Include.ALL); 270 annotationTypeQuery.order(Orders.asc(Hql.property("name"))); 271 ItemResultList<AnnotationType> annotationTypes = annotationTypeQuery.list(dc); 272 %> 273 <base:section 274 id="annotationTypes" 275 title="<%="Annotation types (" + annotationTypes.size() + ")"%>" 276 context="<%=cc%>" 277 > 272 278 <% 273 } 274 else 275 { 276 %> 277 <base:section 278 id="annotationTypes" 279 title="<%="Annotation types (" + annotationTypes.size() + ")"%>" 280 context="<%=cc%>" 281 > 279 if (annotationTypes.size() == 0) 280 { 281 %> 282 <div class="messagecontainer note"> 283 There are no annotation types in this category (or, you don't have permission to view them). 284 </div> 285 <% 286 } 287 else 288 { 289 %> 282 290 <tbl:table 283 291 id="members" 284 285 292 columns="all" 286 293 > … … 301 308 title="Required For Miame" 302 309 /> 303 304 310 <tbl:data> 305 <tbl:columns> 306 </tbl:columns> 311 <tbl:headers> 312 <tbl:headerrow> 313 <tbl:columnheaders /> 314 </tbl:headerrow> 315 </tbl:headers> 307 316 <tbl:rows> 308 317 <% … … 325 334 </tbl:rows> 326 335 </tbl:data> 327 </tbl:table> 328 </base:section> 336 </tbl:table> 329 337 <% 330 338 } 331 339 %> 340 </base:section> 332 341 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 333 342 <jsp:param name="ID" value="<%=ID%>" /> … … 336 345 <jsp:param name="title" value="Other items related to this category" /> 337 346 </jsp:include> 338 <% 339 // Tables with users/groups/projects that this item is shared to 340 MultiPermissions mp = new MultiPermissions(Collections.singleton(annotationTypeCategory)); 341 ItemResultList<User> users = mp.getUsers().list(dc); 342 ItemResultList<Group> groups = mp.getGroups().list(dc); 343 ItemResultList<Project> projects = mp.getProjects().list(dc); 344 int totalShare = users.size() + groups.size() + projects.size(); 345 346 if (totalShare > 0) 347 { 348 %> 349 <base:section 350 id="sharedTo" 351 title="<%="Shared to (" + totalShare + ")"%>" 352 context="<%=cc%>" 353 > 354 <tbl:table 355 id="itemsSharedTo" 356 357 columns="all" 358 > 359 <tbl:columndef 360 id="itemType" 361 title="Item type" 362 /> 363 <tbl:columndef 364 id="name" 365 title="Name" 366 /> 367 <tbl:columndef 368 id="permissions" 369 title="Permissions" 370 /> 371 <tbl:data> 372 <tbl:columns> 373 </tbl:columns> 374 <tbl:rows> 375 <% 376 for (Project project : projects) 377 { 378 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 379 %> 380 <tbl:row> 381 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 382 <tbl:cell column="name"><base:icon 383 image="deleted.gif" 384 tooltip="This item has been scheduled for deletion" 385 visible="<%=project.isRemoved()%>" 386 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 387 <tbl:cell column="permissions"> 388 <%=PermissionUtil.translatePermissionsToString(permissions)%> 389 </tbl:cell> 390 </tbl:row> 391 <% 392 } 393 for (Group group : groups) 394 { 395 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 396 %> 397 <tbl:row> 398 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 399 <tbl:cell column="name"><base:icon 400 image="deleted.gif" 401 tooltip="This item has been scheduled for deletion" 402 visible="<%=group.isRemoved()%>" 403 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 404 <tbl:cell column="permissions"> 405 <%=PermissionUtil.translatePermissionsToString(permissions)%> 406 </tbl:cell> 407 </tbl:row> 408 <% 409 } 410 for (User user : users) 411 { 412 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 413 %> 414 <tbl:row> 415 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 416 <tbl:cell column="name"><base:icon 417 image="deleted.gif" 418 tooltip="This item has been scheduled for deletion" 419 visible="<%=user.isRemoved()%>" 420 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 421 <tbl:cell column="permissions"> 422 <%=PermissionUtil.translatePermissionsToString(permissions)%> 423 </tbl:cell> 424 </tbl:row> 425 <% 426 } 427 %> 428 </tbl:rows> 429 </tbl:data> 430 </tbl:table> 431 </base:section> 432 <% 433 } 434 else 435 { 436 %> 437 <h4>Shared to</h4> 438 This annotation type category is not shared 439 (or, you don't have permission to view the ones it is shared to). 440 <% 441 } 442 %> 443 444 </div> 445 </t:tab> 446 </t:tabcontrol> 347 <jsp:include page="../../common/share/list_share.jsp"> 348 <jsp:param name="ID" value="<%=ID%>" /> 349 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 350 <jsp:param name="item_id" value="<%=itemId%>" /> 351 <jsp:param name="title" value="Shared to" /> 352 </jsp:include> 353 </t:tab> 354 </t:tabcontrol> 447 355 448 356 </base:body> -
trunk/www/admin/annotationtypes/view_annotationtype.jsp
r5937 r5941 157 157 </base:head> 158 158 <base:body> 159 <p> 160 <p:path> 161 <p:pathelement title="Annotation types" href="<%="index.jsp?ID="+ID%>" /> 162 <p:pathelement title="<%=HTML.encodeTags(annotationType.getName())%>" /> 163 </p:path> 159 <p:path><p:pathelement 160 title="Annotation types" href="<%="index.jsp?ID="+ID%>" 161 /><p:pathelement title="<%=HTML.encodeTags(annotationType.getName())%>" 162 /></p:path> 164 163 165 <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab" remember="false"> 164 <t:tabcontrol 165 id="main" 166 subclass="content mastertabcontrol" 167 active="<%=tab%>" switch="switchTab" remember="false"> 166 168 <t:tab id="properties" title="Properties"> 167 168 <tbl:toolbar 169 > 170 <tbl:button 171 disabled="<%=writePermission ? false : true%>" 172 image="edit.gif" 173 onclick="editItem()" 174 title="Edit…" 175 tooltip="<%=writePermission ? "Edit this annotation type" : "You do not have permission to edit this annotation type"%>" 176 /> 177 <tbl:button 178 disabled="<%=deletePermission ? false : true%>" 179 image="delete.gif" 180 onclick="deleteItem()" 181 title="Delete" 182 visible="<%=!annotationType.isRemoved()%>" 183 tooltip="<%=deletePermission ? "Delete this annotation type" : "You do not have permission to delete this annotation type"%>" 184 /> 185 <tbl:button 186 disabled="<%=writePermission ? false : true%>" 187 image="restore.gif" 188 onclick="restoreItem()" 189 title="Restore" 190 visible="<%=annotationType.isRemoved()%>" 191 tooltip="<%=writePermission ? "Restore this annotation type" : "You do not have permission to restore this annotation type"%>" 192 /> 193 <tbl:button 194 disabled="<%=sharePermission ? false : true%>" 195 image="share.gif" 196 onclick="shareItem()" 197 title="Share…" 198 tooltip="<%=sharePermission ? "Share this annotation type to other user, groups and projects" : "You do not have permission to share this annotation type"%>" 199 /> 200 <tbl:button 201 disabled="<%=setOwnerPermission ? false : true%>" 202 image="take_ownership.png" 203 onclick="setOwner()" 204 title="Set ownership…" 205 tooltip="<%=setOwnerPermission ? "Set owner of this item" : "You do not have permission to change ownership of this item"%>" 206 /> 207 <tbl:button 208 image="import.gif" 209 onclick="runPlugin('ImportItem')" 210 title="Import…" 211 tooltip="Import data" 212 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 213 /> 214 <tbl:button 215 image="export.gif" 216 onclick="runPlugin('ExportItem')" 217 title="Export…" 218 tooltip="Export data" 219 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 220 /> 221 <tbl:button 222 image="runplugin.gif" 223 onclick="runPlugin('RunPlugin')" 224 title="Run plugin…" 225 tooltip="Run a plugin" 226 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 227 /> 228 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 229 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 230 <tbl:button 231 image="help.png" 232 onclick="<%="Main.openHelp('" + ID +"', 'annotationtype.view.properties')"%>" 233 title="Help…" 234 tooltip="Get help about this page" 235 /> 236 </tbl:toolbar> 237 <div class="boxedbottom"> 238 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(annotationType)%></i></div> 239 <% 240 if (annotationType.isRemoved() || annotationType.isShared()) 241 { 242 %> 243 <div class="itemstatus"> 169 <div> 170 <table class="fullform bottomborder"> 171 <tr> 172 <th class="itemstatus"> 244 173 <base:icon 245 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 246 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 247 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 248 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 174 image="shared.gif" 175 visible="<%=annotationType.isShared()%>" 176 tooltip="This item is shared to other users, groups and/or projects" 177 /> 178 <base:icon 179 image="deleted.gif" 180 onclick="deleteItemPermanently()" 181 tooltip="This item has been flagged for deletion. Click to delete it now." 182 enabled="<%=deletePermanentlyPermission %>" 183 visible="<%=isRemoved%>" 184 /> 249 185 <base:icon image="used.gif" 250 186 onclick="showUsingItems()" 251 tooltip="Show the items that are using this one" 252 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 253 <base:icon image="shared.gif" 254 visible="<%=annotationType.isShared()%>"> This item is shared to other users, groups and/or projects</base:icon> 255 </div> 256 <% 257 } 258 %> 259 <table class="form" cellspacing=0> 260 <tr> 261 <td class="prompt">Name</td> 187 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 188 visible="<%=isRemoved && isUsed%>" /> 189 </th> 190 <td style="padding: 0px;"> 191 <tbl:toolbar subclass="bottomborder"> 192 <tbl:button 193 disabled="<%=writePermission ? false : true%>" 194 image="edit.gif" 195 onclick="editItem()" 196 title="Edit…" 197 tooltip="<%=writePermission ? "Edit this annotation type" : "You do not have permission to edit this annotation type"%>" 198 /> 199 <tbl:button 200 disabled="<%=deletePermission ? false : true%>" 201 image="delete.gif" 202 onclick="deleteItem()" 203 title="Delete" 204 visible="<%=!annotationType.isRemoved()%>" 205 tooltip="<%=deletePermission ? "Delete this annotation type" : "You do not have permission to delete this annotation type"%>" 206 /> 207 <tbl:button 208 disabled="<%=writePermission ? false : true%>" 209 image="restore.gif" 210 onclick="restoreItem()" 211 title="Restore" 212 visible="<%=annotationType.isRemoved()%>" 213 tooltip="<%=writePermission ? "Restore this annotation type" : "You do not have permission to restore this annotation type"%>" 214 /> 215 <tbl:button 216 disabled="<%=sharePermission ? false : true%>" 217 image="share.gif" 218 onclick="shareItem()" 219 title="Share…" 220 tooltip="<%=sharePermission ? "Share this annotation type to other user, groups and projects" : "You do not have permission to share this annotation type"%>" 221 /> 222 <tbl:button 223 disabled="<%=setOwnerPermission ? false : true%>" 224 image="take_ownership.png" 225 onclick="setOwner()" 226 title="Set ownership…" 227 tooltip="<%=setOwnerPermission ? "Set owner of this item" : "You do not have permission to change ownership of this item"%>" 228 /> 229 <tbl:button 230 image="import.gif" 231 onclick="runPlugin('ImportItem')" 232 title="Import…" 233 tooltip="Import data" 234 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 235 /> 236 <tbl:button 237 image="export.gif" 238 onclick="runPlugin('ExportItem')" 239 title="Export…" 240 tooltip="Export data" 241 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 242 /> 243 <tbl:button 244 image="runplugin.gif" 245 onclick="runPlugin('RunPlugin')" 246 title="Run plugin…" 247 tooltip="Run a plugin" 248 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 249 /> 250 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 251 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 252 <tbl:button 253 image="help.png" 254 onclick="<%="Main.openHelp('" + ID +"', 'annotationtype.view.properties')"%>" 255 title="Help…" 256 tooltip="Get help about this page" 257 /> 258 </tbl:toolbar> 259 </td> 260 </tr> 261 <tr> 262 <th>Name</th> 262 263 <td><%=HTML.encodeTags(annotationType.getName())%></td> 263 264 </tr> 264 265 <tr> 265 <t d class="prompt">Registered</td>266 <th>Registered</th> 266 267 <td><%=dateFormatter.format(annotationType.getEntryDate())%></td> 267 268 </tr> 268 269 <tr> 269 <t d class="prompt">External ID</td>270 <th>External ID</th> 270 271 <td><%=HTML.encodeTags(annotationType.getExternalId())%></td> 271 272 </tr> 272 273 <tr> 273 <t d class="prompt">Value type</td>274 <th>Value type</th> 274 275 <td><%=annotationType.getValueType()%></td> 275 276 </tr> 276 277 <tr> 277 <td class="prompt">Default unit</td> 278 <td><base:propertyvalue item="<%=annotationType%>" property="quantity" /> 279 <base:icon image="submenu.gif" style="vertical-align: baseline;"/> 280 <base:propertyvalue item="<%=annotationType%>" property="defaultUnit" /> 278 <th>Default unit</th> 279 <td> 280 <% 281 if (annotationType.supportUnits()) 282 { 283 %> 284 <base:propertyvalue item="<%=annotationType%>" property="quantity" /> 285 › 286 <base:propertyvalue item="<%=annotationType%>" property="defaultUnit" /> 287 <% 288 } 289 else 290 { 291 %> 292 <i>- none -</i> 293 <% 294 } 295 %> 281 296 </td> 282 297 </tr> 283 298 <tr> 284 <t d class="prompt">Enumeration</td>299 <th>Enumeration</th> 285 300 <td><%=annotationType.isEnumeration() ? 286 301 HTML.encodeTags(Values.getString((List)annotationType.getValues(), ", ", true, … … 288 303 </tr> 289 304 <tr> 290 <t d class="prompt">Default value</td>305 <th>Default value</th> 291 306 <td><%=HTML.encodeTags(annotationType.getDefaultValue())%></td> 292 307 </tr> 293 308 <tr> 294 <t d class="prompt">Multiplicity</td>309 <th>Multiplicity</th> 295 310 <td><%=annotationType.getMultiplicity() == 0 ? "<i>- unlimited -</i>" : annotationType.getMultiplicity()%></td> 296 311 </tr> 297 312 <tr> 298 <t d class="prompt">Required by MIAME</td>313 <th>Required by MIAME</th> 299 314 <td><%=annotationType.isRequiredForMiame() ? "yes" : "no"%></td> 300 315 </tr> 301 316 <tr> 302 <t d class="prompt">Protocol parameter</td>317 <th>Protocol parameter</th> 303 318 <td><%=annotationType.isProtocolParameter() ? "yes" : "no"%></td> 304 319 </tr> 305 320 <tr> 306 <t d class="prompt">Items</td>321 <th>Items</th> 307 322 <td><%=Values.getString(annotationType.getEnabledItems(), ", ", true)%></td> 308 323 </tr> 309 324 <tr> 310 <t d class="prompt">Owner</td>325 <th>Owner</th> 311 326 <td><base:propertyvalue item="<%=annotationType%>" property="owner" /></td> 312 327 </tr> 328 <tr> 329 <th>Permissions</th> 330 <td><%=PermissionUtil.getFullPermissionNames(annotationType)%></td> 331 </tr> 313 332 <tr > 314 <t d class="prompt">Description</td>333 <th>Description</th> 315 334 <td><%=HTML.niceFormat(annotationType.getDescription())%></td> 316 335 </tr> 317 336 </table> 318 319 337 </div> 320 338 <% 321 339 ItemQuery<AnnotationTypeCategory> categoryQuery = … … 324 342 categoryQuery.order(Orders.asc(Hql.property("name"))); 325 343 ItemResultList<AnnotationTypeCategory> categories = categoryQuery.list(dc); 326 327 if (categories.size() == 0)328 {329 %>330 <h4>Categories</h4>331 This annotation type isn't a member of any category (or, you don't have permission to view them).344 %> 345 <base:section 346 id="categories" 347 title="<%="Categories (" + categories.size() + ")"%>" 348 context="<%=cc%>" 349 > 332 350 <% 333 } 334 else 335 { 336 %> 337 <base:section 338 id="categories" 339 title="<%="Categories (" + categories.size() + ")"%>" 340 context="<%=cc%>" 341 > 351 if (categories.size() == 0) 352 { 353 %> 354 <div class="messagecontainer note"> 355 This annotation type isn't a member of any category (or, you don't have permission to view them). 356 </div> 357 <% 358 } 359 else 360 { 361 %> 342 362 <tbl:table 343 363 id="members" 344 345 364 columns="all" 346 365 > … … 354 373 /> 355 374 <tbl:data> 356 <tbl:columns> 357 </tbl:columns> 375 <tbl:headers> 376 <tbl:headerrow> 377 <tbl:columnheaders /> 378 </tbl:headerrow> 379 </tbl:headers> 358 380 <tbl:rows> 359 381 <% 360 361 382 for (AnnotationTypeCategory category : categories) 362 383 { … … 376 397 </tbl:data> 377 398 </tbl:table> 378 </base:section>379 <%380 }381 %>399 <% 400 } 401 %> 402 </base:section> 382 403 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 383 404 <jsp:param name="ID" value="<%=ID%>" /> … … 386 407 <jsp:param name="title" value="Other items related to this annotation type" /> 387 408 </jsp:include> 388 <% 389 // Tables with users/groups/projects that this item is shared to 390 MultiPermissions mp = new MultiPermissions(Collections.singleton(annotationType)); 391 ItemResultList<User> users = mp.getUsers().list(dc); 392 ItemResultList<Group> groups = mp.getGroups().list(dc); 393 ItemResultList<Project> projects = mp.getProjects().list(dc); 394 int totalShare = users.size() + groups.size() + projects.size(); 395 396 if (totalShare > 0) 397 { 398 %> 399 <base:section 400 id="sharedTo" 401 title="<%="Shared to (" + totalShare + ")"%>" 402 context="<%=cc%>" 403 > 404 <tbl:table 405 id="itemsSharedTo" 406 407 columns="all" 408 > 409 <tbl:columndef 410 id="itemType" 411 title="Item type" 412 /> 413 <tbl:columndef 414 id="name" 415 title="Name" 416 /> 417 <tbl:columndef 418 id="permissions" 419 title="Permissions" 420 /> 421 <tbl:data> 422 <tbl:columns> 423 </tbl:columns> 424 <tbl:rows> 425 <% 426 for (Project project : projects) 427 { 428 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 429 %> 430 <tbl:row> 431 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 432 <tbl:cell column="name"><base:icon 433 image="deleted.gif" 434 tooltip="This item has been scheduled for deletion" 435 visible="<%=project.isRemoved()%>" 436 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 437 <tbl:cell column="permissions"> 438 <%=PermissionUtil.translatePermissionsToString(permissions)%> 439 </tbl:cell> 440 </tbl:row> 441 <% 442 } 443 for (Group group : groups) 444 { 445 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 446 %> 447 <tbl:row> 448 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 449 <tbl:cell column="name"><base:icon 450 image="deleted.gif" 451 tooltip="This item has been scheduled for deletion" 452 visible="<%=group.isRemoved()%>" 453 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 454 <tbl:cell column="permissions"> 455 <%=PermissionUtil.translatePermissionsToString(permissions)%> 456 </tbl:cell> 457 </tbl:row> 458 <% 459 } 460 for (User user : users) 461 { 462 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 463 %> 464 <tbl:row> 465 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 466 <tbl:cell column="name"><base:icon 467 image="deleted.gif" 468 tooltip="This item has been scheduled for deletion" 469 visible="<%=user.isRemoved()%>" 470 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 471 <tbl:cell column="permissions"> 472 <%=PermissionUtil.translatePermissionsToString(permissions)%> 473 </tbl:cell> 474 </tbl:row> 475 <% 476 } 477 %> 478 </tbl:rows> 479 </tbl:data> 480 </tbl:table> 481 </base:section> 482 <% 483 } 484 else 485 { 486 %> 487 <h4>Shared to</h4> 488 This annotation type is not shared 489 (or, you don't have permission to view the ones it is shared to). 490 <% 491 } 492 %> 493 494 </div> 409 <jsp:include page="../../common/share/list_share.jsp"> 410 <jsp:param name="ID" value="<%=ID%>" /> 411 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 412 <jsp:param name="item_id" value="<%=itemId%>" /> 413 <jsp:param name="title" value="Shared to" /> 414 </jsp:include> 495 415 </t:tab> 496 416 <t:tab id="history" title="Change history" -
trunk/www/admin/clients/help/view_help.jsp
r5937 r5941 103 103 </base:head> 104 104 <base:body> 105 <p> 106 <p:path> 107 <p:pathelement title="Client applications" href="<%="../index.jsp?ID="+ID%>" /> 108 <p:pathelement 105 <p:path><p:pathelement 106 title="Client applications" href="<%="../index.jsp?ID="+ID%>" 107 /><p:pathelement 109 108 title="<%=HTML.encodeTags(client.getName())%>" 110 href="<%="index.jsp?ID="+ID+"&client_id="+clientId%>" />111 <p:pathelement title="<%=HTML.encodeTags(help.getName())%>" />112 </p:path>109 href="<%="index.jsp?ID="+ID+"&client_id="+clientId%>" 110 /><p:pathelement title="<%=HTML.encodeTags(help.getName())%>" 111 /></p:path> 113 112 114 <t:tabcontrol id="main" active="properties"> 113 <t:tabcontrol 114 id="main" 115 subclass="content mastertabcontrol" 116 active="properties"> 115 117 <t:tab id="properties" title="Properties"> 116 117 <tbl:toolbar 118 > 119 <tbl:button 120 disabled="<%=writePermission ? false : true%>" 121 image="edit.gif" 122 onclick="editItem()" 123 title="Edit…" 124 tooltip="<%=writePermission ? "Edit this help text" : "You do not have permission to edit this help text"%>" 125 /> 126 <tbl:button 127 disabled="<%=deletePermission ? false : true%>" 128 image="delete.gif" 129 onclick="deleteItem()" 130 title="Delete" 131 tooltip="<%=deletePermission ? "Delete this help text" : "You do not have permission to event this help text"%>" 132 /> 133 <tbl:button 134 image="import.gif" 135 onclick="runPlugin('ImportItem')" 136 title="Import…" 137 tooltip="Import data" 138 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 139 /> 140 <tbl:button 141 image="export.gif" 142 onclick="runPlugin('ExportItem')" 143 title="Export…" 144 tooltip="Export data" 145 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 146 /> 147 <tbl:button 148 image="runplugin.gif" 149 onclick="runPlugin('RunPlugin')" 150 title="Run plugin…" 151 tooltip="Run a plugin" 152 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 153 /> 154 <tbl:button 155 image="help.png" 156 onclick="<%="Main.openHelp('" + ID + "', '"+HTML.javaScriptEncode(help.getExternalId())+"')"%>" 157 title="Preview…" 158 tooltip="Check how this help will look like when viewed by the users" 159 /> 160 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 161 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 162 <tbl:button 163 image="help.png" 164 onclick="<%="Main.openHelp('" + ID +"', 'help.view.properties')"%>" 165 title="Help…" 166 tooltip="Get help about this page" 167 /> 168 </tbl:toolbar> 169 <div class="boxedbottom"> 170 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(help)%></i></div> 171 <table class="form" cellspacing=0> 172 <tr> 173 <td class="prompt">Name</td> 118 <div> 119 <table class="fullform bottomborder"> 120 <tr> 121 <th class="itemstatus"></th> 122 <td style="padding: 0px;"> 123 <tbl:toolbar subclass="bottomborder"> 124 <tbl:button 125 disabled="<%=writePermission ? false : true%>" 126 image="edit.gif" 127 onclick="editItem()" 128 title="Edit…" 129 tooltip="<%=writePermission ? "Edit this help text" : "You do not have permission to edit this help text"%>" 130 /> 131 <tbl:button 132 disabled="<%=deletePermission ? false : true%>" 133 image="delete.gif" 134 onclick="deleteItem()" 135 title="Delete" 136 tooltip="<%=deletePermission ? "Delete this help text" : "You do not have permission to event this help text"%>" 137 /> 138 <tbl:button 139 image="import.gif" 140 onclick="runPlugin('ImportItem')" 141 title="Import…" 142 tooltip="Import data" 143 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 144 /> 145 <tbl:button 146 image="export.gif" 147 onclick="runPlugin('ExportItem')" 148 title="Export…" 149 tooltip="Export data" 150 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 151 /> 152 <tbl:button 153 image="runplugin.gif" 154 onclick="runPlugin('RunPlugin')" 155 title="Run plugin…" 156 tooltip="Run a plugin" 157 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 158 /> 159 <tbl:button 160 image="help.png" 161 onclick="<%="Main.openHelp('" + ID + "', '"+HTML.javaScriptEncode(help.getExternalId())+"')"%>" 162 title="Preview…" 163 tooltip="Check how this help will look like when viewed by the users" 164 /> 165 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 166 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 167 <tbl:button 168 image="help.png" 169 onclick="<%="Main.openHelp('" + ID +"', 'help.view.properties')"%>" 170 title="Help…" 171 tooltip="Get help about this page" 172 /> 173 </tbl:toolbar> 174 </td> 175 </tr> 176 <tr> 177 <th>Name</th> 174 178 <td><%=HTML.encodeTags(help.getName())%></td> 175 179 </tr> 176 180 <tr> 177 <t d class="prompt">External ID</td>181 <th>External ID</th> 178 182 <td><%=help.getExternalId()%></td> 179 183 </tr> 180 <tr > 181 <td class="prompt">Description</td> 184 <tr> 185 <th>Permissions</th> 186 <td><%=PermissionUtil.getFullPermissionNames(help)%></td> 187 </tr> 188 <tr class="big"> 189 <th>Description</th> 182 190 <td><%=HTML.formatLineBreaks(HTML.encodeTags(help.getDescription()))%></td> 183 191 </tr> 184 192 </table> 193 </div> 185 194 <jsp:include page="../../../common/anytoany/list_anytoany.jsp"> 186 195 <jsp:param name="ID" value="<%=ID%>" /> … … 189 198 <jsp:param name="title" value="Other items related to this help" /> 190 199 </jsp:include> 191 </div> 192 </t:tab> 193 </t:tabcontrol> 194 200 </t:tab> 201 </t:tabcontrol> 195 202 </base:body> 196 203 </base:page> -
trunk/www/admin/clients/view_client.jsp
r5937 r5941 151 151 </base:head> 152 152 <base:body> 153 <p> 154 <p:path> 155 <p:pathelement title="Client applications" href="<%="index.jsp?ID="+ID%>" /> 156 <p:pathelement title="<%=HTML.encodeTags(client.getName())%>" /> 157 </p:path> 153 <p:path><p:pathelement 154 title="Client applications" href="<%="index.jsp?ID="+ID%>" 155 /><p:pathelement title="<%=HTML.encodeTags(client.getName())%>" 156 /></p:path> 158 157 159 <t:tabcontrol id="main" active="properties" switch="switchTab"> 158 <t:tabcontrol 159 id="main" 160 subclass="content mastertabcontrol" 161 active="properties" switch="switchTab"> 160 162 <t:tab id="properties" title="Properties"> 161 162 <tbl:toolbar 163 > 164 <tbl:button 165 disabled="<%=writePermission ? false : true%>" 166 image="edit.gif" 167 onclick="editItem()" 168 title="Edit…" 169 tooltip="<%=writePermission ? "Edit this client application" : "You do not have permission to edit this client application"%>" 170 /> 171 <tbl:button 172 disabled="<%=deletePermission ? false : true%>" 173 image="delete.gif" 174 onclick="deleteItem()" 175 title="Delete" 176 visible="<%=!client.isRemoved()%>" 177 tooltip="<%=deletePermission ? "Delete this client application" : "You do not have permission to delete this client application"%>" 178 /> 179 <tbl:button 180 disabled="<%=writePermission ? false : true%>" 181 image="restore.gif" 182 onclick="restoreItem()" 183 title="Restore" 184 visible="<%=client.isRemoved()%>" 185 tooltip="<%=writePermission ? "Restore this client application" : "You do not have permission to restore this client application"%>" 186 /> 187 <tbl:button 188 disabled="<%=sharePermission ? false : true%>" 189 image="share.gif" 190 onclick="shareItem()" 191 title="Share…" 192 tooltip="<%=sharePermission ? "Share this client application to other user, groups and projects" : "You do not have permission to share this client application"%>" 193 /> 194 <tbl:button 195 disabled="<%=setOwnerPermission ? false : true%>" 196 image="take_ownership.png" 197 onclick="setOwner()" 198 title="Set owner…" 199 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" 200 /> 201 <tbl:button 202 image="import.gif" 203 onclick="runPlugin('ImportItem')" 204 title="Import…" 205 tooltip="Import data" 206 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 207 /> 208 <tbl:button 209 image="export.gif" 210 onclick="runPlugin('ExportItem')" 211 title="Export…" 212 tooltip="Export data" 213 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 214 /> 215 <tbl:button 216 image="runplugin.gif" 217 onclick="runPlugin('RunPlugin')" 218 title="Run plugin…" 219 tooltip="Run a plugin" 220 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 221 /> 222 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 223 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 224 <tbl:button 225 image="help.png" 226 onclick="<%="Main.openHelp('" + ID +"', 'client.view.properties')"%>" 227 title="Help…" 228 tooltip="Get help about this page" 229 /> 230 </tbl:toolbar> 231 <div class="boxedbottom"> 232 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(client)%></i></div> 233 <% 234 if (client.isRemoved() || client.isShared()) 235 { 236 %> 237 <div class="itemstatus"> 163 <div> 164 <table class="fullform bottomborder"> 165 <tr> 166 <th class="itemstatus"> 238 167 <base:icon 239 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 240 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 241 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 242 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 168 image="shared.gif" 169 visible="<%=client.isShared()%>" 170 tooltip="This item is shared to other users, groups and/or projects" 171 /> 172 <base:icon 173 image="deleted.gif" 174 onclick="deleteItemPermanently()" 175 tooltip="This item has been flagged for deletion. Click to delete it now." 176 enabled="<%=deletePermanentlyPermission %>" 177 visible="<%=isRemoved%>" 178 /> 243 179 <base:icon image="used.gif" 244 180 onclick="showUsingItems()" 245 tooltip="Show the items that are using this one" 246 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 247 <base:icon image="shared.gif" 248 visible="<%=client.isShared()%>"> This item is shared to other users, groups and/or projects</base:icon> 249 </div> 250 <% 251 } 252 %> 253 <table class="form" cellspacing="0"> 254 <tr> 255 <td class="prompt">Name</td> 181 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 182 visible="<%=isRemoved && isUsed%>" /> 183 </th> 184 <td style="padding: 0px;"> 185 <tbl:toolbar subclass="bottomborder"> 186 <tbl:button 187 disabled="<%=writePermission ? false : true%>" 188 image="edit.gif" 189 onclick="editItem()" 190 title="Edit…" 191 tooltip="<%=writePermission ? "Edit this client application" : "You do not have permission to edit this client application"%>" 192 /> 193 <tbl:button 194 disabled="<%=deletePermission ? false : true%>" 195 image="delete.gif" 196 onclick="deleteItem()" 197 title="Delete" 198 visible="<%=!client.isRemoved()%>" 199 tooltip="<%=deletePermission ? "Delete this client application" : "You do not have permission to delete this client application"%>" 200 /> 201 <tbl:button 202 disabled="<%=writePermission ? false : true%>" 203 image="restore.gif" 204 onclick="restoreItem()" 205 title="Restore" 206 visible="<%=client.isRemoved()%>" 207 tooltip="<%=writePermission ? "Restore this client application" : "You do not have permission to restore this client application"%>" 208 /> 209 <tbl:button 210 disabled="<%=sharePermission ? false : true%>" 211 image="share.gif" 212 onclick="shareItem()" 213 title="Share…" 214 tooltip="<%=sharePermission ? "Share this client application to other user, groups and projects" : "You do not have permission to share this client application"%>" 215 /> 216 <tbl:button 217 disabled="<%=setOwnerPermission ? false : true%>" 218 image="take_ownership.png" 219 onclick="setOwner()" 220 title="Set owner…" 221 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" 222 /> 223 <tbl:button 224 image="import.gif" 225 onclick="runPlugin('ImportItem')" 226 title="Import…" 227 tooltip="Import data" 228 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 229 /> 230 <tbl:button 231 image="export.gif" 232 onclick="runPlugin('ExportItem')" 233 title="Export…" 234 tooltip="Export data" 235 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 236 /> 237 <tbl:button 238 image="runplugin.gif" 239 onclick="runPlugin('RunPlugin')" 240 title="Run plugin…" 241 tooltip="Run a plugin" 242 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 243 /> 244 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 245 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 246 <tbl:button 247 image="help.png" 248 onclick="<%="Main.openHelp('" + ID +"', 'client.view.properties')"%>" 249 title="Help…" 250 tooltip="Get help about this page" 251 /> 252 </tbl:toolbar> 253 </td> 254 </tr> 255 <tr> 256 <th>Name</th> 256 257 <td><%=HTML.encodeTags(client.getName())%></td> 257 258 </tr> 258 259 <tr> 259 <t d class="prompt">Registered</td>260 <th>Registered</th> 260 261 <td><%=dateFormatter.format(client.getEntryDate())%></td> 261 262 </tr> 262 263 <tr> 263 <t d class="prompt">External ID</td>264 <th>External ID</th> 264 265 <td><%=HTML.encodeTags(client.getExternalId())%></td> 265 266 </tr> 266 267 <tr> 267 <t d class="prompt">Owner</td>268 <th>Owner</th> 268 269 <td><base:propertyvalue item="<%=client%>" property="owner" /></td> 269 270 </tr> 270 271 <tr> 271 <td class="prompt">Description</td> 272 <th>Permissions</th> 273 <td><%=PermissionUtil.getFullPermissionNames(client)%></td> 274 </tr> 275 <tr> 276 <th>Description</th> 272 277 <td><%=HTML.niceFormat(client.getDescription())%></td> 273 278 </tr> 274 279 </table> 280 </div> 281 275 282 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 276 283 <jsp:param name="ID" value="<%=ID%>" /> … … 279 286 <jsp:param name="title" value="Other items related to this client application" /> 280 287 </jsp:include> 281 < %282 // Tables with users/groups/projects that this item is shared to283 MultiPermissions mp = new MultiPermissions(Collections.singleton(client));284 ItemResultList<User> users = mp.getUsers().list(dc);285 ItemResultList<Group> groups = mp.getGroups().list(dc);286 ItemResultList<Project> projects = mp.getProjects().list(dc);287 int totalShare = users.size() + groups.size() + projects.size();288 <jsp:include page="../../common/share/list_share.jsp"> 289 <jsp:param name="ID" value="<%=ID%>" /> 290 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 291 <jsp:param name="item_id" value="<%=itemId%>" /> 292 <jsp:param name="title" value="Shared to" /> 293 </jsp:include> 294 </t:tab> 288 295 289 if (totalShare > 0) 290 { 291 %> 292 <base:section 293 id="sharedTo" 294 title="<%="Shared to (" + totalShare + ")"%>" 295 context="<%=cc%>" 296 > 297 <tbl:table 298 id="itemsSharedTo" 299 300 columns="all" 301 > 302 <tbl:columndef 303 id="itemType" 304 title="Item type" 305 /> 306 <tbl:columndef 307 id="name" 308 title="Name" 309 /> 310 <tbl:columndef 311 id="permissions" 312 title="Permissions" 313 /> 314 <tbl:data> 315 <tbl:columns> 316 </tbl:columns> 317 <tbl:rows> 318 <% 319 for (Project project : projects) 320 { 321 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 322 %> 323 <tbl:row> 324 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 325 <tbl:cell column="name"><base:icon 326 image="deleted.gif" 327 tooltip="This item has been scheduled for deletion" 328 visible="<%=project.isRemoved()%>" 329 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 330 <tbl:cell column="permissions"> 331 <%=PermissionUtil.translatePermissionsToString(permissions)%> 332 </tbl:cell> 333 </tbl:row> 334 <% 335 } 336 for (Group group : groups) 337 { 338 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 339 %> 340 <tbl:row> 341 <tbl:cell column="itemType"><%=group.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="<%=group.isRemoved()%>" 346 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 347 <tbl:cell column="permissions"> 348 <%=PermissionUtil.translatePermissionsToString(permissions)%> 349 </tbl:cell> 350 </tbl:row> 351 <% 352 } 353 for (User user : users) 354 { 355 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 356 %> 357 <tbl:row> 358 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 359 <tbl:cell column="name"><base:icon 360 image="deleted.gif" 361 tooltip="This item has been scheduled for deletion" 362 visible="<%=user.isRemoved()%>" 363 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 364 <tbl:cell column="permissions"> 365 <%=PermissionUtil.translatePermissionsToString(permissions)%> 366 </tbl:cell> 367 </tbl:row> 368 <% 369 } 370 %> 371 </tbl:rows> 372 </tbl:data> 373 </tbl:table> 374 </base:section> 375 <% 376 } 377 else 378 { 379 %> 380 <h4>Shared to</h4> 381 This client is not shared 382 (or, you don't have permission to view the ones it is shared to). 383 <% 384 } 385 %> 386 387 </div> 388 </t:tab> 389 390 <t:tab id="help" title="Help texts" 391 tooltip="View and manage help texts for this client application" /> 392 </t:tabcontrol> 393 394 296 <t:tab id="help" title="Help texts" 297 tooltip="View and manage help texts for this client application" /> 298 </t:tabcontrol> 395 299 </base:body> 396 300 </base:page> -
trunk/www/admin/datafiletypes/view_filetype.jsp
r5937 r5941 124 124 </base:head> 125 125 <base:body> 126 <p> 127 <p:path> 128 <p:pathelement title="Data file types" href="<%="index.jsp?ID="+ID%>" /> 129 <p:pathelement title="<%=HTML.encodeTags(fileType.getName())%>" /> 130 </p:path> 126 <p:path><p:pathelement 127 title="Data file types" href="<%="index.jsp?ID="+ID%>" 128 /><p:pathelement title="<%=HTML.encodeTags(fileType.getName())%>" 129 /></p:path> 131 130 132 <t:tabcontrol id="main" active="properties"> 131 <t:tabcontrol 132 id="main" 133 subclass="content mastertabcontrol" 134 active="properties"> 133 135 <t:tab id="properties" title="Properties"> 134 135 <tbl:toolbar 136 > 137 <tbl:button 138 disabled="<%=writePermission ? false : true%>" 139 image="edit.gif" 140 onclick="editItem()" 141 title="Edit…" 142 tooltip="<%=writePermission ? "Edit this data file type" : "You do not have permission to edit this data file type"%>" 143 /> 144 <tbl:button 145 disabled="<%=deletePermission ? false : true%>" 146 image="delete.gif" 147 onclick="deleteItem()" 148 title="Delete" 149 visible="<%=!fileType.isRemoved()%>" 150 tooltip="<%=deletePermission ? "Delete this data file type" : "You do not have permission to delete this data file type"%>" 151 /> 152 <tbl:button 153 disabled="<%=writePermission ? false : true%>" 154 image="restore.gif" 155 onclick="restoreItem()" 156 title="Restore" 157 visible="<%=fileType.isRemoved()%>" 158 tooltip="<%=writePermission ? "Restore this data file type" : "You do not have permission to restore this data file type"%>" 159 /> 160 <tbl:button 161 image="import.gif" 162 onclick="runPlugin('ImportItem')" 163 title="Import…" 164 tooltip="Import data" 165 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 166 /> 167 <tbl:button 168 image="export.gif" 169 onclick="runPlugin('ExportItem')" 170 title="Export…" 171 tooltip="Export data" 172 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 173 /> 174 <tbl:button 175 image="runplugin.gif" 176 onclick="runPlugin('RunPlugin')" 177 title="Run plugin…" 178 tooltip="Run a plugin" 179 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 180 /> 181 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 182 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 183 <tbl:button 184 image="help.png" 185 onclick="<%="Main.openHelp('" + ID +"', 'datafiletype.view.properties')"%>" 186 title="Help…" 187 tooltip="Get help about this page" 188 /> 189 </tbl:toolbar> 190 <div class="boxedbottom"> 191 <div class="itemstatus"> 192 Permissions on this item: 193 <i><%=PermissionUtil.getFullPermissionNames(fileType)%></i> 194 </div> 195 <% 196 if (fileType.isRemoved()) 197 { 198 %> 199 <div class="itemstatus"> 136 <div> 137 <table class="fullform bottomborder"> 138 <tr> 139 <th class="itemstatus"> 200 140 <base:icon 201 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 202 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 203 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 204 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 141 image="deleted.gif" 142 onclick="deleteItemPermanently()" 143 tooltip="This item has been flagged for deletion. Click to delete it now." 144 enabled="<%=deletePermanentlyPermission %>" 145 visible="<%=isRemoved%>" 146 /> 205 147 <base:icon image="used.gif" 206 148 onclick="showUsingItems()" 207 tooltip="Show the items that are using this one" 208 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 209 </div> 210 <% 211 } 212 %> 213 <table class="form" cellspacing=0> 214 <tr> 215 <td class="prompt">Name</td> 149 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 150 visible="<%=isRemoved && isUsed%>" /> 151 </th> 152 <td style="padding: 0px;"> 153 <tbl:toolbar subclass="bottomborder"> 154 <tbl:button 155 disabled="<%=writePermission ? false : true%>" 156 image="edit.gif" 157 onclick="editItem()" 158 title="Edit…" 159 tooltip="<%=writePermission ? "Edit this data file type" : "You do not have permission to edit this data file type"%>" 160 /> 161 <tbl:button 162 disabled="<%=deletePermission ? false : true%>" 163 image="delete.gif" 164 onclick="deleteItem()" 165 title="Delete" 166 visible="<%=!fileType.isRemoved()%>" 167 tooltip="<%=deletePermission ? "Delete this data file type" : "You do not have permission to delete this data file type"%>" 168 /> 169 <tbl:button 170 disabled="<%=writePermission ? false : true%>" 171 image="restore.gif" 172 onclick="restoreItem()" 173 title="Restore" 174 visible="<%=fileType.isRemoved()%>" 175 tooltip="<%=writePermission ? "Restore this data file type" : "You do not have permission to restore this data file type"%>" 176 /> 177 <tbl:button 178 image="import.gif" 179 onclick="runPlugin('ImportItem')" 180 title="Import…" 181 tooltip="Import data" 182 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 183 /> 184 <tbl:button 185 image="export.gif" 186 onclick="runPlugin('ExportItem')" 187 title="Export…" 188 tooltip="Export data" 189 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 190 /> 191 <tbl:button 192 image="runplugin.gif" 193 onclick="runPlugin('RunPlugin')" 194 title="Run plugin…" 195 tooltip="Run a plugin" 196 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 197 /> 198 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 199 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 200 <tbl:button 201 image="help.png" 202 onclick="<%="Main.openHelp('" + ID +"', 'datafiletype.view.properties')"%>" 203 title="Help…" 204 tooltip="Get help about this page" 205 /> 206 </tbl:toolbar> 207 </td> 208 </tr> 209 <tr> 210 <th>Name</th> 216 211 <td><%=HTML.encodeTags(fileType.getName())%></td> 217 212 </tr> 218 213 <tr> 219 <t d class="prompt">External ID</td>214 <th>External ID</th> 220 215 <td><%=HTML.encodeTags(fileType.getExternalId())%></td> 221 216 </tr> 222 217 <tr> 223 <t d class="prompt">Item type</td>218 <th>Item type</th> 224 219 <td><%=fileType.getItemType()%></td> 225 220 </tr> 226 221 <tr> 227 <t d class="prompt">File extension</td>222 <th>File extension</th> 228 223 <td><%=HTML.encodeTags(fileType.getExtension())%></td> 229 224 </tr> 230 225 <tr> 231 <t d class="prompt">Generic file type</td>226 <th>Generic file type</th> 232 227 <td><base:propertyvalue item="<%=fileType%>" property="genericType" /></td> 233 228 </tr> 229 <tr> 230 <th>Permissions</th> 231 <td><%=PermissionUtil.getFullPermissionNames(fileType)%></td> 232 </tr> 234 233 <tr > 235 <t d class="prompt">Description</td>234 <th>Description</th> 236 235 <td><%=HTML.niceFormat(fileType.getDescription())%></td> 237 236 </tr> 238 237 </table> 239 238 </div> 240 239 <% 241 240 ItemQuery<PlatformFileType> platformQuery = fileType.getPlatforms(); … … 243 242 platformQuery.order(Orders.asc(Hql.property("platform.name"))); 244 243 ItemResultList<PlatformFileType> platforms = platformQuery.list(dc); 245 if (platforms.size() == 0) 246 { 244 %> 245 <base:section 246 id="platforms" 247 title="<%="Used on platforms (" + platforms.size() + ")"%>" 248 context="<%=cc%>" 249 > 250 <% 251 if (platforms.size() == 0) 252 { 253 %> 254 <div class="messagecontainer note"> 255 This file type is not used by any platforms or variants 256 (or, you don't have permission to view them). 257 </div> 258 <% 259 } 260 else 261 { 262 %> 263 <tbl:table 264 id="platforms" 265 columns="all" 266 > 267 <tbl:columndef 268 id="platform" 269 title="Platform" 270 /> 271 <tbl:columndef 272 id="variant" 273 title="Variant" 274 /> 275 <tbl:columndef 276 id="required" 277 title="Required" 278 /> 279 <tbl:columndef 280 id="multiple" 281 title="Multiple files" 282 /> 283 <tbl:data> 284 <tbl:headers> 285 <tbl:headerrow> 286 <tbl:columnheaders /> 287 </tbl:headerrow> 288 </tbl:headers> 289 <tbl:rows> 290 <% 291 for (PlatformFileType item : platforms) 292 { 293 Platform p = item.getPlatform(); 294 PlatformVariant v = item.getVariant(); 295 %> 296 <tbl:row> 297 <tbl:cell column="platform"><base:icon 298 image="deleted.gif" 299 tooltip="This item has been scheduled for deletion" 300 visible="<%=p.isRemoved()%>" 301 /><%=Base.getLinkedName(ID, p, false, true)%></tbl:cell> 302 <tbl:cell column="variant"><base:icon 303 image="deleted.gif" 304 tooltip="This item has been scheduled for deletion" 305 visible="<%=v!= null && v.isRemoved()%>" 306 /><%=v == null ? "<i>- all -</i>" : Base.getLinkedName(ID, v, false, true)%></tbl:cell> 307 <tbl:cell column="required"><%=item.isRequired() ? "yes" : "no"%></tbl:cell> 308 <tbl:cell column="multiple"><%=item.getAllowMultiple() ? "yes" : "no"%></tbl:cell> 309 </tbl:row> 310 <% 311 } 312 %> 313 </tbl:rows> 314 </tbl:data> 315 </tbl:table> 316 <% 317 } 247 318 %> 248 <h4>Platforms</h4> 249 This file type is not used by any platforms or variants 250 (or, you don't have permission to view them). 251 <% 252 } 253 else 254 { 255 %> 256 <h4 class="docked">Used on platforms</h4> 257 <tbl:table 258 id="platforms" 259 260 columns="all" 261 > 262 <tbl:columndef 263 id="platform" 264 title="Platform" 265 /> 266 <tbl:columndef 267 id="variant" 268 title="Variant" 269 /> 270 <tbl:columndef 271 id="required" 272 title="Required" 273 /> 274 <tbl:columndef 275 id="multiple" 276 title="Multiple files" 277 /> 278 <tbl:data> 279 <tbl:columns> 280 </tbl:columns> 281 <tbl:rows> 282 <% 283 for (PlatformFileType item : platforms) 284 { 285 Platform p = item.getPlatform(); 286 PlatformVariant v = item.getVariant(); 287 %> 288 <tbl:row> 289 <tbl:cell column="platform"><base:icon 290 image="deleted.gif" 291 tooltip="This item has been scheduled for deletion" 292 visible="<%=p.isRemoved()%>" 293 /><%=Base.getLinkedName(ID, p, false, true)%></tbl:cell> 294 <tbl:cell column="variant"><base:icon 295 image="deleted.gif" 296 tooltip="This item has been scheduled for deletion" 297 visible="<%=v!= null && v.isRemoved()%>" 298 /><%=v == null ? "<i>- all -</i>" : Base.getLinkedName(ID, v, false, true)%></tbl:cell> 299 <tbl:cell column="required"><%=item.isRequired() ? "yes" : "no"%></tbl:cell> 300 <tbl:cell column="multiple"><%=item.getAllowMultiple() ? "yes" : "no"%></tbl:cell> 301 </tbl:row> 302 <% 303 } 304 %> 305 </tbl:rows> 306 </tbl:data> 307 </tbl:table> 308 <% 309 } 310 %> 319 </base:section> 311 320 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 312 321 <jsp:param name="ID" value="<%=ID%>" /> … … 316 325 </jsp:include> 317 326 318 </div>319 327 </t:tab> 320 328 </t:tabcontrol> -
trunk/www/admin/extravaluetypes/view_extravaluetype.jsp
r5937 r5941 119 119 </base:head> 120 120 <base:body> 121 <p> 122 <p:path> 123 <p:pathelement title="Extra value types" href="<%="index.jsp?ID="+ID%>" /> 124 <p:pathelement title="<%=HTML.encodeTags(extraValueType.getName())%>" /> 125 </p:path> 121 <p:path><p:pathelement 122 title="Extra value types" href="<%="index.jsp?ID="+ID%>" 123 /><p:pathelement title="<%=HTML.encodeTags(extraValueType.getName())%>" 124 /></p:path> 126 125 127 <t:tabcontrol id="main" active="properties"> 126 <t:tabcontrol 127 id="main" 128 subclass="content mastertabcontrol" 129 active="properties"> 128 130 <t:tab id="properties" title="Properties"> 129 130 <tbl:toolbar 131 > 132 <tbl:button 133 disabled="<%=writePermission ? false : true%>" 134 image="edit.gif" 135 onclick="editItem()" 136 title="Edit…" 137 tooltip="<%=writePermission ? "Edit this extra value type" : "You do not have permission to edit this extra value type"%>" 138 /> 139 <tbl:button 140 disabled="<%=deletePermission ? false : true%>" 141 image="delete.gif" 142 onclick="deleteItem()" 143 title="Delete" 144 visible="<%=!extraValueType.isRemoved()%>" 145 tooltip="<%=deletePermission ? "Delete this extra value type" : "You do not have permission to delete this extra value type"%>" 146 /> 147 <tbl:button 148 disabled="<%=writePermission ? false : true%>" 149 image="restore.gif" 150 onclick="restoreItem()" 151 title="Restore" 152 visible="<%=extraValueType.isRemoved()%>" 153 tooltip="<%=writePermission ? "Restore this extra value type" : "You do not have permission to restore this extra value type"%>" 154 /> 155 <tbl:button 156 image="import.gif" 157 onclick="runPlugin('ImportItem')" 158 title="Import…" 159 tooltip="Import data" 160 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 161 /> 162 <tbl:button 163 image="export.gif" 164 onclick="runPlugin('ExportItem')" 165 title="Export…" 166 tooltip="Export data" 167 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 168 /> 169 <tbl:button 170 image="runplugin.gif" 171 onclick="runPlugin('RunPlugin')" 172 title="Run plugin…" 173 tooltip="Run a plugin" 174 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 175 /> 176 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 177 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 178 <tbl:button 179 image="help.png" 180 onclick="<%="Main.openHelp('" + ID +"', 'extravaluetype.view.properties')"%>" 181 title="Help…" 182 tooltip="Get help about this page" 183 /> 184 </tbl:toolbar> 185 <div class="boxedbottom"> 186 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(extraValueType)%></i></div> 131 <div> 132 <table class="fullform bottomborder"> 133 <tr> 134 <th class="itemstatus"> 135 <base:icon 136 image="deleted.gif" 137 onclick="deleteItemPermanently()" 138 tooltip="This item has been flagged for deletion. Click to delete it now." 139 enabled="<%=deletePermanentlyPermission %>" 140 visible="<%=isRemoved%>" 141 /> 142 <base:icon image="used.gif" 143 onclick="showUsingItems()" 144 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 145 visible="<%=isRemoved && isUsed%>" /> 146 </th> 147 <td style="padding: 0px;"> 148 <tbl:toolbar subclass="bottomborder"> 149 <tbl:button 150 disabled="<%=writePermission ? false : true%>" 151 image="edit.gif" 152 onclick="editItem()" 153 title="Edit…" 154 tooltip="<%=writePermission ? "Edit this extra value type" : "You do not have permission to edit this extra value type"%>" 155 /> 156 <tbl:button 157 disabled="<%=deletePermission ? false : true%>" 158 image="delete.gif" 159 onclick="deleteItem()" 160 title="Delete" 161 visible="<%=!extraValueType.isRemoved()%>" 162 tooltip="<%=deletePermission ? "Delete this extra value type" : "You do not have permission to delete this extra value type"%>" 163 /> 164 <tbl:button 165 disabled="<%=writePermission ? false : true%>" 166 image="restore.gif" 167 onclick="restoreItem()" 168 title="Restore" 169 visible="<%=extraValueType.isRemoved()%>" 170 tooltip="<%=writePermission ? "Restore this extra value type" : "You do not have permission to restore this extra value type"%>" 171 /> 172 <tbl:button 173 image="import.gif" 174 onclick="runPlugin('ImportItem')" 175 title="Import…" 176 tooltip="Import data" 177 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 178 /> 179 <tbl:button 180 image="export.gif" 181 onclick="runPlugin('ExportItem')" 182 title="Export…" 183 tooltip="Export data" 184 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 185 /> 186 <tbl:button 187 image="runplugin.gif" 188 onclick="runPlugin('RunPlugin')" 189 title="Run plugin…" 190 tooltip="Run a plugin" 191 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 192 /> 193 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 194 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 195 <tbl:button 196 image="help.png" 197 onclick="<%="Main.openHelp('" + ID +"', 'extravaluetype.view.properties')"%>" 198 title="Help…" 199 tooltip="Get help about this page" 200 /> 201 </tbl:toolbar> 202 </td> 203 </tr> 204 <tr> 205 <th>Name</th> 206 <td><%=HTML.encodeTags(extraValueType.getName())%></td> 207 </tr> 208 <tr> 209 <th>Registered</th> 210 <td><%=dateFormatter.format(extraValueType.getEntryDate())%></td> 211 </tr> 212 <tr> 213 <th>External ID</th> 214 <td><%=HTML.encodeTags(extraValueType.getExternalId())%></td> 215 </tr> 216 <tr> 217 <th>Value type</th> 218 <td><%=extraValueType.getValueType()%></td> 219 </tr> 220 <tr> 221 <th>Avg. method</th> 222 <td><%=extraValueType.getAverageMethod().toString()%></td> 223 </tr> 224 <tr> 225 <th>Use coloring</th> 226 <td><%=coloring.isUsingColors() ? "yes" : "no"%></td> 227 </tr> 187 228 <% 188 if ( extraValueType.isRemoved())229 if (coloring.isUsingColors()) 189 230 { 190 231 %> 191 < div class="itemstatus">192 < base:icon193 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>"194 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>"195 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>"196 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon>197 <base:icon image="used.gif"198 onclick="showUsingItems()"199 tooltip="Show the items that are using this one"200 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon>201 </ div>232 <tr> 233 <th class="subprompt">- range</th> 234 <td>[<%=Values.formatNumber(coloring.getMinValue(), 2)%>, 235 <%=Values.formatNumber(coloring.getMidValue(), 2)%>, 236 <%=Values.formatNumber(coloring.getMaxValue(), 2)%>] 237 </td> 238 </tr> 239 <tr> 240 <th class="subprompt">- logarithmic</th> 241 <td><%=coloring.isLogarithmic() ? "yes" : "no" %></td> 242 </tr> 202 243 <% 203 244 } 204 245 %> 205 <table class="form" cellspacing=0> 206 <tr> 207 <td class="prompt">Name</td> 208 <td><%=HTML.encodeTags(extraValueType.getName())%></td> 209 </tr> 210 <tr> 211 <td class="prompt">Registered</td> 212 <td><%=dateFormatter.format(extraValueType.getEntryDate())%></td> 213 </tr> 214 <tr> 215 <td class="prompt">External ID</td> 216 <td><%=HTML.encodeTags(extraValueType.getExternalId())%></td> 217 </tr> 218 <tr> 219 <td class="prompt">Value type</td> 220 <td><%=extraValueType.getValueType()%></td> 221 </tr> 222 <tr> 223 <td class="prompt">Avg. method</td> 224 <td><%=extraValueType.getAverageMethod().toString()%></td> 225 </tr> 226 <tr> 227 <td class="prompt">Use coloring</td> 228 <td> 229 <%=coloring.isUsingColors() ? "yes" : "no"%> 230 <% 231 if (coloring.isUsingColors()) 232 { 233 %> 234 <b>Range</b> 235 [<%=Values.formatNumber(coloring.getMinValue(), 2)%>, 236 <%=Values.formatNumber(coloring.getMidValue(), 2)%>, 237 <%=Values.formatNumber(coloring.getMaxValue(), 2)%>] 238 <b>Logarithmic</b> <%=coloring.isLogarithmic() ? "yes" : "no" %> 239 <% 240 } 241 %> 242 </td> 243 </tr> 244 <tr> 245 <td class="prompt">Description</td> 246 <tr> 247 <th>Permissions</th> 248 <td><%=PermissionUtil.getFullPermissionNames(extraValueType)%></td> 249 </tr> 250 <tr> 251 <th>Description</th> 246 252 <td><%=HTML.niceFormat(extraValueType.getDescription())%></td> 247 253 </tr> 248 254 </table> 255 </div> 249 256 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 250 257 <jsp:param name="ID" value="<%=ID%>" /> … … 253 260 <jsp:param name="title" value="Other items related to this extra value type" /> 254 261 </jsp:include> 255 256 </div> 257 </t:tab> 258 </t:tabcontrol> 259 262 </t:tab> 263 </t:tabcontrol> 260 264 </base:body> 261 265 </base:page> -
trunk/www/admin/groups/view_group.jsp
r5937 r5941 125 125 </base:head> 126 126 <base:body> 127 <p> 128 <p:path> 129 <p:pathelement title="Groups" href="<%="index.jsp?ID="+ID%>" /> 130 <p:pathelement title="<%=HTML.encodeTags(group.getName())%>" /> 131 </p:path> 127 <p:path><p:pathelement 128 title="Groups" href="<%="index.jsp?ID="+ID%>" 129 /><p:pathelement title="<%=HTML.encodeTags(group.getName())%>" 130 /></p:path> 132 131 133 <t:tabcontrol id="main" active="properties"> 132 <t:tabcontrol 133 id="main" 134 subclass="content mastertabcontrol" 135 active="properties"> 134 136 <t:tab id="properties" title="Properties"> 135 136 <tbl:toolbar 137 > 138 <tbl:button 139 disabled="<%=writePermission ? false : true%>" 140 image="edit.gif" 141 onclick="editItem()" 142 title="Edit…" 143 tooltip="<%=writePermission ? "Edit this group" : "You do not have permission to edit this group"%>" 144 /> 145 <tbl:button 146 disabled="<%=deletePermission ? false : true%>" 147 image="delete.gif" 148 onclick="deleteItem()" 149 title="Delete" 150 visible="<%=!group.isRemoved()%>" 151 tooltip="<%=deletePermission ? "Delete this group" : "You do not have permission to delete this group"%>" 152 /> 153 <tbl:button 154 disabled="<%=writePermission ? false : true%>" 155 image="restore.gif" 156 onclick="restoreItem()" 157 title="Restore" 158 visible="<%=group.isRemoved()%>" 159 tooltip="<%=writePermission ? "Restore this group" : "You do not have permission to restore this group"%>" 160 /> 161 <tbl:button 162 image="import.gif" 163 onclick="runPlugin('ImportItem')" 164 title="Import…" 165 tooltip="Import data" 166 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 167 /> 168 <tbl:button 169 image="export.gif" 170 onclick="runPlugin('ExportItem')" 171 title="Export…" 172 tooltip="Export data" 173 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 174 /> 175 <tbl:button 176 image="runplugin.gif" 177 onclick="runPlugin('RunPlugin')" 178 title="Run plugin…" 179 tooltip="Run a plugin" 180 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 181 /> 182 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 183 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 184 <tbl:button 185 image="help.png" 186 onclick="<%="Main.openHelp('" + ID +"', 'group.view.properties')"%>" 187 title="Help…" 188 tooltip="Get help about this page" 189 /> 190 </tbl:toolbar> 191 <div class="boxedbottom"> 192 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(group)%></i></div> 193 <% 194 if (group.isRemoved()) 195 { 196 %> 197 <div class="itemstatus"> 137 <div> 138 <table class="fullform bottomborder"> 139 <tr> 140 <th class="itemstatus"> 198 141 <base:icon 199 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 200 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 201 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 202 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 142 image="deleted.gif" 143 onclick="deleteItemPermanently()" 144 tooltip="This item has been flagged for deletion. Click to delete it now." 145 enabled="<%=deletePermanentlyPermission %>" 146 visible="<%=isRemoved%>" 147 /> 203 148 <base:icon image="used.gif" 204 149 onclick="showUsingItems()" 205 tooltip="Show the items that are using this one" 206 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 207 </div> 208 <% 209 } 210 %> 211 <table class="form" cellspacing=0> 212 <tr> 213 <td class="prompt">Name</td> 150 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 151 visible="<%=isRemoved && isUsed%>" /> 152 </th> 153 <td style="padding: 0px;"> 154 <tbl:toolbar subclass="bottomborder"> 155 <tbl:button 156 disabled="<%=writePermission ? false : true%>" 157 image="edit.gif" 158 onclick="editItem()" 159 title="Edit…" 160 tooltip="<%=writePermission ? "Edit this group" : "You do not have permission to edit this group"%>" 161 /> 162 <tbl:button 163 disabled="<%=deletePermission ? false : true%>" 164 image="delete.gif" 165 onclick="deleteItem()" 166 title="Delete" 167 visible="<%=!group.isRemoved()%>" 168 tooltip="<%=deletePermission ? "Delete this group" : "You do not have permission to delete this group"%>" 169 /> 170 <tbl:button 171 disabled="<%=writePermission ? false : true%>" 172 image="restore.gif" 173 onclick="restoreItem()" 174 title="Restore" 175 visible="<%=group.isRemoved()%>" 176 tooltip="<%=writePermission ? "Restore this group" : "You do not have permission to restore this group"%>" 177 /> 178 <tbl:button 179 image="import.gif" 180 onclick="runPlugin('ImportItem')" 181 title="Import…" 182 tooltip="Import data" 183 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 184 /> 185 <tbl:button 186 image="export.gif" 187 onclick="runPlugin('ExportItem')" 188 title="Export…" 189 tooltip="Export data" 190 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 191 /> 192 <tbl:button 193 image="runplugin.gif" 194 onclick="runPlugin('RunPlugin')" 195 title="Run plugin…" 196 tooltip="Run a plugin" 197 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 198 /> 199 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 200 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 201 <tbl:button 202 image="help.png" 203 onclick="<%="Main.openHelp('" + ID +"', 'group.view.properties')"%>" 204 title="Help…" 205 tooltip="Get help about this page" 206 /> 207 </tbl:toolbar> 208 </td> 209 </tr> 210 <tr> 211 <th>Name</th> 214 212 <td><%=HTML.encodeTags(group.getName())%></td> 215 213 </tr> 216 214 <tr> 217 <t d class="prompt">Registered</td>215 <th>Registered</th> 218 216 <td><%=dateFormatter.format(group.getEntryDate())%></td> 219 217 </tr> 220 218 <tr> 221 <t d class="prompt">System ID</td>219 <th>System ID</th> 222 220 <td><%=HTML.encodeTags(group.getSystemId())%></td> 223 221 </tr> 224 222 <tr> 225 <t d class="prompt">Quota</td>223 <th>Quota</th> 226 224 <td><base:propertyvalue item="<%=group%>" property="quota" /></td> 227 225 </tr> 228 226 <tr> 229 <t d class="prompt">Is default</td>227 <th>Is default</th> 230 228 <td><%=group.isDefault() ? "yes" : "no"%></td> 231 229 </tr> 232 230 <tr> 233 <t d class="prompt">Hidden members</td>231 <th>Hidden members</th> 234 232 <td><%=group.hasHiddenMembers() ? "yes" : "no"%></td> 235 233 </tr> 236 234 <tr> 237 <td class="prompt">Description</td> 235 <th>Permissions</th> 236 <td><%=PermissionUtil.getFullPermissionNames(group)%></td> 237 </tr> 238 <tr> 239 <th>Description</th> 238 240 <td><%=HTML.niceFormat(group.getDescription())%></td> 239 241 </tr> 240 242 </table> 243 </div> 241 244 242 245 <% … … 250 253 groupQuery.order(Orders.asc(Hql.property("name"))); 251 254 ItemResultList<Group> groups = groupQuery.list(dc); 252 253 if (groups.size() == 0 && users.size() == 0) 254 { 255 %> 256 <h4>Members</h4> 257 There are no members of this group (or, you don't have permission to view them). 255 int numMembers = groups.size() + users.size(); 256 %> 257 <base:section 258 id="members" 259 title="<%="Members (" + (users.size() + groups.size()) + ")"%>" 260 context="<%=cc%>" 261 > 258 262 <% 259 } 260 else 261 { 262 %> 263 <base:section 264 id="members" 265 title="<%="Members (" + (users.size() + groups.size()) + ")"%>" 266 context="<%=cc%>" 267 > 263 if (numMembers == 0) 264 { 265 %> 266 <div class="messagecontainer note"> 267 There are no members in this group (or, you don't have permission to view them). 268 </div> 269 <% 270 } 271 else 272 { 273 %> 268 274 <tbl:table 269 275 id="members" 270 271 276 columns="all" 272 277 > … … 284 289 /> 285 290 <tbl:data> 286 <tbl:columns> 287 </tbl:columns> 291 <tbl:headers> 292 <tbl:headerrow> 293 <tbl:columnheaders /> 294 </tbl:headerrow> 295 </tbl:headers> 288 296 <tbl:rows> 289 297 <% … … 320 328 </tbl:data> 321 329 </tbl:table> 322 </base:section>323 <%324 }325 %>330 <% 331 } 332 %> 333 </base:section> 326 334 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 327 335 <jsp:param name="ID" value="<%=ID%>" /> … … 330 338 <jsp:param name="title" value="Other items related to this group" /> 331 339 </jsp:include> 332 </div> 333 </t:tab> 334 </t:tabcontrol> 335 340 </t:tab> 341 </t:tabcontrol> 336 342 </base:body> 337 343 </base:page> -
trunk/www/admin/hardware/view_hardware.jsp
r5937 r5941 136 136 </base:head> 137 137 <base:body> 138 <p> 139 <p:path> 140 <p:pathelement title="Hardware" href="<%="index.jsp?ID="+ID%>" /> 141 <p:pathelement title="<%=HTML.encodeTags(hardware.getName())%>" /> 142 </p:path> 138 <p:path><p:pathelement 139 title="Hardware" href="<%="index.jsp?ID="+ID%>" 140 /><p:pathelement title="<%=HTML.encodeTags(hardware.getName())%>" 141 /></p:path> 143 142 144 <t:tabcontrol id="main" active="properties"> 143 <t:tabcontrol 144 id="main" 145 subclass="content mastertabcontrol" 146 active="properties"> 145 147 <t:tab id="properties" title="Properties"> 146 147 <tbl:toolbar 148 > 149 <tbl:button 150 disabled="<%=writePermission ? false : true%>" 151 image="edit.gif" 152 onclick="editItem()" 153 title="Edit…" 154 tooltip="<%=writePermission ? "Edit this hardware" : "You do not have permission to edit this hardware"%>" 155 /> 156 <tbl:button 157 disabled="<%=deletePermission ? false : true%>" 158 image="delete.gif" 159 onclick="deleteItem()" 160 title="Delete" 161 visible="<%=!hardware.isRemoved()%>" 162 tooltip="<%=deletePermission ? "Delete this hardware" : "You do not have permission to delete this hardware"%>" 163 /> 164 <tbl:button 165 disabled="<%=writePermission ? false : true%>" 166 image="restore.gif" 167 onclick="restoreItem()" 168 title="Restore" 169 visible="<%=hardware.isRemoved()%>" 170 tooltip="<%=writePermission ? "Restore this hardware" : "You do not have permission to restore this hardware"%>" 171 /> 172 <tbl:button 173 disabled="<%=sharePermission ? false : true%>" 174 image="share.gif" 175 onclick="shareItem()" 176 title="Share…" 177 tooltip="<%=sharePermission ? "Share this hardware to other user, groups and projects" : "You do not have permission to share this hardware"%>" 178 /> 179 <tbl:button 180 disabled="<%=setOwnerPermission ? false : true%>" 181 image="take_ownership.png" 182 onclick="setOwner()" 183 title="Set owner…" 184 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" 185 /> 186 <tbl:button 187 image="import.gif" 188 onclick="runPlugin('ImportItem')" 189 title="Import…" 190 tooltip="Import data" 191 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 192 /> 193 <tbl:button 194 image="export.gif" 195 onclick="runPlugin('ExportItem')" 196 title="Export…" 197 tooltip="Export data" 198 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 199 /> 200 <tbl:button 201 image="runplugin.gif" 202 onclick="runPlugin('RunPlugin')" 203 title="Run plugin…" 204 tooltip="Run a plugin" 205 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 206 /> 207 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 208 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 209 <tbl:button 210 image="help.png" 211 onclick="<%="Main.openHelp('" + ID +"', 'hardware.view.properties')"%>" 212 title="Help…" 213 tooltip="Get help about this page" 214 /> 215 </tbl:toolbar> 216 <div class="boxedbottom"> 217 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(hardware)%></i></div> 218 <% 219 if (hardware.isRemoved() || hardware.isShared()) 220 { 221 %> 222 <div class="itemstatus"> 148 <div> 149 <table class="fullform bottomborder"> 150 <tr> 151 <th class="itemstatus"> 223 152 <base:icon 224 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 225 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 226 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 227 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 153 image="shared.gif" 154 visible="<%=hardware.isShared()%>" 155 tooltip="This item is shared to other users, groups and/or projects" 156 /> 157 <base:icon 158 image="deleted.gif" 159 onclick="deleteItemPermanently()" 160 tooltip="This item has been flagged for deletion. Click to delete it now." 161 enabled="<%=deletePermanentlyPermission %>" 162 visible="<%=isRemoved%>" 163 /> 228 164 <base:icon image="used.gif" 229 165 onclick="showUsingItems()" 230 tooltip="Show the items that are using this one" 231 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 232 <base:icon image="shared.gif" 233 visible="<%=hardware.isShared()%>"> This item is shared to other users, groups and/or projects</base:icon> 234 </div> 235 <% 236 } 237 %> 238 <table class="form" cellspacing=0> 239 <tr> 240 <td class="prompt">Name</td> 166 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 167 visible="<%=isRemoved && isUsed%>" /> 168 </th> 169 <td style="padding: 0px;"> 170 <tbl:toolbar subclass="bottomborder"> 171 <tbl:button 172 disabled="<%=writePermission ? false : true%>" 173 image="edit.gif" 174 onclick="editItem()" 175 title="Edit…" 176 tooltip="<%=writePermission ? "Edit this hardware" : "You do not have permission to edit this hardware"%>" 177 /> 178 <tbl:button 179 disabled="<%=deletePermission ? false : true%>" 180 image="delete.gif" 181 onclick="deleteItem()" 182 title="Delete" 183 visible="<%=!hardware.isRemoved()%>" 184 tooltip="<%=deletePermission ? "Delete this hardware" : "You do not have permission to delete this hardware"%>" 185 /> 186 <tbl:button 187 disabled="<%=writePermission ? false : true%>" 188 image="restore.gif" 189 onclick="restoreItem()" 190 title="Restore" 191 visible="<%=hardware.isRemoved()%>" 192 tooltip="<%=writePermission ? "Restore this hardware" : "You do not have permission to restore this hardware"%>" 193 /> 194 <tbl:button 195 disabled="<%=sharePermission ? false : true%>" 196 image="share.gif" 197 onclick="shareItem()" 198 title="Share…" 199 tooltip="<%=sharePermission ? "Share this hardware to other user, groups and projects" : "You do not have permission to share this hardware"%>" 200 /> 201 <tbl:button 202 disabled="<%=setOwnerPermission ? false : true%>" 203 image="take_ownership.png" 204 onclick="setOwner()" 205 title="Set owner…" 206 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" 207 /> 208 <tbl:button 209 image="import.gif" 210 onclick="runPlugin('ImportItem')" 211 title="Import…" 212 tooltip="Import data" 213 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 214 /> 215 <tbl:button 216 image="export.gif" 217 onclick="runPlugin('ExportItem')" 218 title="Export…" 219 tooltip="Export data" 220 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 221 /> 222 <tbl:button 223 image="runplugin.gif" 224 onclick="runPlugin('RunPlugin')" 225 title="Run plugin…" 226 tooltip="Run a plugin" 227 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 228 /> 229 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 230 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 231 <tbl:button 232 image="help.png" 233 onclick="<%="Main.openHelp('" + ID +"', 'hardware.view.properties')"%>" 234 title="Help…" 235 tooltip="Get help about this page" 236 /> 237 </tbl:toolbar> 238 </td> 239 </tr> 240 <tr> 241 <th>Name</th> 241 242 <td><%=HTML.encodeTags(hardware.getName())%></td> 242 243 </tr> 243 244 <tr> 244 <t d class="prompt">Type</td>245 <th>Type</th> 245 246 <td><base:propertyvalue item="<%=hardware%>" property="itemSubtype" /></td> 246 247 </tr> 247 248 <tr> 248 <t d class="prompt">Registered</td>249 <th>Registered</th> 249 250 <td><%=dateFormatter.format(hardware.getEntryDate())%></td> 250 251 </tr> 251 252 <tr> 252 <t d class="prompt">Version</td>253 <th>Version</th> 253 254 <td><%=HTML.encodeTags(hardware.getVersionString())%></td> 254 255 </tr> 255 256 <tr> 256 <t d class="prompt">Owner</td>257 <th>Owner</th> 257 258 <td><base:propertyvalue item="<%=hardware%>" property="owner" /></td> 258 259 </tr> 259 260 <tr> 260 <td class="prompt">Description</td> 261 <th>Permissions</th> 262 <td><%=PermissionUtil.getFullPermissionNames(hardware)%></td> 263 </tr> 264 <tr> 265 <th>Description</th> 261 266 <td><%=HTML.niceFormat(hardware.getDescription())%></td> 262 267 </tr> 263 268 </table> 269 </div> 264 270 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 265 271 <jsp:param name="ID" value="<%=ID%>" /> … … 268 274 <jsp:param name="title" value="Other items related to this hardware" /> 269 275 </jsp:include> 270 <% 271 // Tables with users/groups/projects that this item is shared to 272 MultiPermissions mp = new MultiPermissions(Collections.singleton(hardware)); 273 ItemResultList<User> users = mp.getUsers().list(dc); 274 ItemResultList<Group> groups = mp.getGroups().list(dc); 275 ItemResultList<Project> projects = mp.getProjects().list(dc); 276 int totalShare = (users.size() + groups.size() + projects.size()); 277 278 if (totalShare > 0) 279 { 280 %> 281 <base:section 282 id="sharedTo" 283 title="<%="Shared to (" + totalShare + ")"%>" 284 context="<%=cc%>" 285 > 286 <tbl:table 287 id="itemsSharedTo" 288 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 for (Project project : projects) 309 { 310 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 311 %> 312 <tbl:row> 313 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 314 <tbl:cell column="name"><base:icon 315 image="deleted.gif" 316 tooltip="This item has been scheduled for deletion" 317 visible="<%=project.isRemoved()%>" 318 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 319 <tbl:cell column="permissions"> 320 <%=PermissionUtil.translatePermissionsToString(permissions)%> 321 </tbl:cell> 322 </tbl:row> 323 <% 324 } 325 for (Group group : groups) 326 { 327 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 328 %> 329 <tbl:row> 330 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 331 <tbl:cell column="name"><base:icon 332 image="deleted.gif" 333 tooltip="This item has been scheduled for deletion" 334 visible="<%=group.isRemoved()%>" 335 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 336 <tbl:cell column="permissions"> 337 <%=PermissionUtil.translatePermissionsToString(permissions)%> 338 </tbl:cell> 339 </tbl:row> 340 <% 341 } 342 for (User user : users) 343 { 344 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 345 %> 346 <tbl:row> 347 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 348 <tbl:cell column="name"><base:icon 349 image="deleted.gif" 350 tooltip="This item has been scheduled for deletion" 351 visible="<%=user.isRemoved()%>" 352 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 353 <tbl:cell column="permissions"> 354 <%=PermissionUtil.translatePermissionsToString(permissions)%> 355 </tbl:cell> 356 </tbl:row> 357 <% 358 } 359 %> 360 </tbl:rows> 361 </tbl:data> 362 </tbl:table> 363 </base:section> 364 <% 365 } 366 else 367 { 368 %> 369 <h4>Shared to</h4> 370 This hardware is not shared 371 (or, you don't have permission to view the ones it is shared to). 372 <% 373 } 374 %> 375 </div> 376 </t:tab> 377 </t:tabcontrol> 378 379 276 <jsp:include page="../../common/share/list_share.jsp"> 277 <jsp:param name="ID" value="<%=ID%>" /> 278 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 279 <jsp:param name="item_id" value="<%=itemId%>" /> 280 <jsp:param name="title" value="Shared to" /> 281 </jsp:include> 282 </t:tab> 283 </t:tabcontrol> 380 284 </base:body> 381 285 </base:page> -
trunk/www/admin/itemsubtypes/view_subtype.jsp
r5937 r5941 125 125 </base:head> 126 126 <base:body> 127 <p> 128 <p:path> 129 <p:pathelement title="Item subtypes" href="<%="index.jsp?ID="+ID%>" /> 130 <p:pathelement title="<%=HTML.encodeTags(subtype.getName())%>" /> 131 </p:path> 127 <p:path><p:pathelement 128 title="Item subtypes" href="<%="index.jsp?ID="+ID%>" 129 /><p:pathelement title="<%=HTML.encodeTags(subtype.getName())%>" 130 /></p:path> 132 131 133 <t:tabcontrol id="main" active="properties"> 132 <t:tabcontrol 133 id="main" 134 subclass="content mastertabcontrol" 135 active="properties"> 134 136 <t:tab id="properties" title="Properties"> 135 136 <tbl:toolbar 137 > 138 <tbl:button 139 disabled="<%=writePermission ? false : true%>" 140 image="edit.gif" 141 onclick="editItem()" 142 title="Edit…" 143 tooltip="<%=writePermission ? "Edit this item subtype" : "You do not have permission to edit this item subtype"%>" 144 /> 145 <tbl:button 146 disabled="<%=deletePermission ? false : true%>" 147 image="delete.gif" 148 onclick="deleteItem()" 149 title="Delete" 150 visible="<%=!subtype.isRemoved()%>" 151 tooltip="<%=deletePermission ? "Delete this item subtype" : "You do not have permission to delete this item subtype"%>" 152 /> 153 <tbl:button 154 disabled="<%=writePermission ? false : true%>" 155 image="restore.gif" 156 onclick="restoreItem()" 157 title="Restore" 158 visible="<%=subtype.isRemoved()%>" 159 tooltip="<%=writePermission ? "Restore this item subtype" : "You do not have permission to restore this item subtype"%>" 160 /> 161 <tbl:button 162 image="export.gif" 163 onclick="runPlugin('ExportItem')" 164 title="Export…" 165 tooltip="Export data" 166 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 167 /> 168 <tbl:button 169 image="runplugin.gif" 170 onclick="runPlugin('RunPlugin')" 171 title="Run plugin…" 172 tooltip="Run a plugin" 173 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 174 /> 175 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 176 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 177 <tbl:button 178 image="help.png" 179 onclick="<%="Main.openHelp('" + ID +"', 'itemsubtype.view.properties')"%>" 180 title="Help…" 181 tooltip="Get help about this page" 182 /> 183 </tbl:toolbar> 184 <div class="boxedbottom"> 185 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(subtype)%></i></div> 186 <% 187 if (subtype.isRemoved()) 188 { 189 %> 190 <div class="itemstatus"> 137 <div> 138 <table class="fullform bottomborder"> 139 <tr> 140 <th class="itemstatus"> 191 141 <base:icon 192 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 193 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 194 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 195 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 142 image="deleted.gif" 143 onclick="deleteItemPermanently()" 144 tooltip="This item has been flagged for deletion. Click to delete it now." 145 enabled="<%=deletePermanentlyPermission %>" 146 visible="<%=isRemoved%>" 147 /> 196 148 <base:icon image="used.gif" 197 149 onclick="showUsingItems()" 198 tooltip="Show the items that are using this one" 199 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 200 </div> 201 <% 202 } 203 %> 204 <table class="form" cellspacing=0> 205 <tr> 206 <td class="prompt">Name</td> 150 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 151 visible="<%=isRemoved && isUsed%>" /> 152 </th> 153 <td style="padding: 0px;"> 154 <tbl:toolbar subclass="bottomborder"> 155 <tbl:button 156 disabled="<%=writePermission ? false : true%>" 157 image="edit.gif" 158 onclick="editItem()" 159 title="Edit…" 160 tooltip="<%=writePermission ? "Edit this item subtype" : "You do not have permission to edit this item subtype"%>" 161 /> 162 <tbl:button 163 disabled="<%=deletePermission ? false : true%>" 164 image="delete.gif" 165 onclick="deleteItem()" 166 title="Delete" 167 visible="<%=!subtype.isRemoved()%>" 168 tooltip="<%=deletePermission ? "Delete this item subtype" : "You do not have permission to delete this item subtype"%>" 169 /> 170 <tbl:button 171 disabled="<%=writePermission ? false : true%>" 172 image="restore.gif" 173 onclick="restoreItem()" 174 title="Restore" 175 visible="<%=subtype.isRemoved()%>" 176 tooltip="<%=writePermission ? "Restore this item subtype" : "You do not have permission to restore this item subtype"%>" 177 /> 178 <tbl:button 179 image="export.gif" 180 onclick="runPlugin('ExportItem')" 181 title="Export…" 182 tooltip="Export data" 183 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 184 /> 185 <tbl:button 186 image="runplugin.gif" 187 onclick="runPlugin('RunPlugin')" 188 title="Run plugin…" 189 tooltip="Run a plugin" 190 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 191 /> 192 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 193 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 194 <tbl:button 195 image="help.png" 196 onclick="<%="Main.openHelp('" + ID +"', 'itemsubtype.view.properties')"%>" 197 title="Help…" 198 tooltip="Get help about this page" 199 /> 200 </tbl:toolbar> 201 </td> 202 </tr> 203 <tr> 204 <th>Name</th> 207 205 <td><%=HTML.encodeTags(subtype.getName())%></td> 208 206 </tr> 209 207 <tr> 210 <t d class="prompt">Main item type</td>208 <th>Main item type</th> 211 209 <td><%=subtype.getMainItemType()%></td> 212 210 </tr> 213 211 <tr> 214 <t d class="prompt">Registered</td>212 <th>Registered</th> 215 213 <td><%=dateFormatter.format(subtype.getEntryDate())%></td> 216 214 </tr> 217 215 <tr> 218 <t d class="prompt">System ID</td>216 <th>System ID</th> 219 217 <td><%=HTML.encodeTags(subtype.getSystemId())%></td> 220 218 </tr> 221 219 <tr> 222 <td class="prompt">Description</td> 220 <th>Permissions</th> 221 <td><%=PermissionUtil.getFullPermissionNames(subtype)%></td> 222 </tr> 223 <tr> 224 <th>Description</th> 223 225 <td><%=HTML.niceFormat(subtype.getDescription())%></td> 224 226 </tr> 225 227 <tr> 226 <t d class="prompt">Related subtypes</td>228 <th>Related subtypes</th> 227 229 <td></td> 228 230 </tr> … … 242 244 %> 243 245 <tr> 244 <t d class="subprompt"><%=relatedItem%></td>246 <th class="subprompt">- <%=relatedItem%></th> 245 247 <td><%=Base.getLinkedName(ID, related, deniedRelated, true)%></td> 246 248 </tr> … … 249 251 %> 250 252 </table> 253 </div> 251 254 252 255 <% … … 255 258 parentQuery.order(Orders.asc(Hql.property("name"))); 256 259 ItemResultList<ItemSubtype> parents = parentQuery.list(dc); 257 if (parents.size() == 0) 258 { 259 %> 260 <h4>Subtypes with relation to this subtype</h4> 261 There are no subtypes (or, you don't have permission to view them). 260 %> 261 <base:section 262 id="parents" 263 title="<%="Subtypes with relation to this subtype (" + parents.size() + ")"%>" 264 context="<%=cc%>" 265 > 262 266 <% 263 } 264 else 265 { 266 %> 267 <base:section 268 id="parents" 269 title="<%="Subtypes with relation to this subtype (" + parents.size() + ")"%>" 270 context="<%=cc%>" 271 > 267 if (parents.size() == 0) 268 { 269 %> 270 <div class="messagecontainer note"> 271 There are no subtypes (or, you don't have permission to view them). 272 </div> 273 <% 274 } 275 else 276 { 277 %> 272 278 <tbl:table 273 279 id="parents" 274 275 280 columns="all" 276 281 > … … 288 293 /> 289 294 <tbl:data> 290 <tbl:columns> 291 </tbl:columns> 295 <tbl:headers> 296 <tbl:headerrow> 297 <tbl:columnheaders /> 298 </tbl:headerrow> 299 </tbl:headers> 292 300 <tbl:rows> 293 301 <% … … 310 318 </tbl:data> 311 319 </tbl:table> 312 </base:section>313 <%314 }315 %>320 <% 321 } 322 %> 323 </base:section> 316 324 317 325 <% … … 320 328 fileTypeQuery.order(Orders.asc(Hql.property("itemSubtype.name"))); 321 329 ItemResultList<ItemSubtypeFileType> fileTypes = fileTypeQuery.list(dc); 322 if (fileTypes.size() == 0) 323 { 324 %> 325 <h4>File types associated with this subtype</h4> 326 There are no file types (or, you don't have permission to view them). 330 %> 331 <base:section 332 id="fileTypes" 333 title="<%="File types associated with this subtype (" + fileTypes.size() + ")"%>" 334 context="<%=cc%>" 335 > 327 336 <% 328 } 329 else 330 { 331 %> 332 <base:section 333 id="fileTypes" 334 title="<%="File types associated with this subtype (" + fileTypes.size() + ")"%>" 335 context="<%=cc%>" 336 > 337 if (fileTypes.size() == 0) 338 { 339 %> 340 <div class="messagecontainer note"> 341 There are no file types (or, you don't have permission to view them). 342 </div> 343 <% 344 } 345 else 346 { 347 %> 337 348 <tbl:table 338 349 id="fileTypes" 339 340 350 columns="all" 341 351 > … … 365 375 /> 366 376 <tbl:data> 367 <tbl:columns> 368 </tbl:columns> 377 <tbl:headers> 378 <tbl:headerrow> 379 <tbl:columnheaders /> 380 </tbl:headerrow> 381 </tbl:headers> 369 382 <tbl:rows> 370 383 <% … … 391 404 </tbl:data> 392 405 </tbl:table> 393 </base:section> 394 <% 395 } 396 %> 397 398 406 <% 407 } 408 %> 409 </base:section> 399 410 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 400 411 <jsp:param name="ID" value="<%=ID%>" /> … … 403 414 <jsp:param name="title" value="Other items related to this item subtype" /> 404 415 </jsp:include> 405 406 </div>407 416 </t:tab> 408 </t:tabcontrol> 409 417 </t:tabcontrol> 410 418 </base:body> 411 419 </base:page> -
trunk/www/admin/jobagents/view_agent.jsp
r5937 r5941 154 154 </base:head> 155 155 <base:body> 156 <p> 157 <p:path> 158 <p:pathelement title="Job agents" href="<%="index.jsp?ID="+ID%>" /> 159 <p:pathelement title="<%=HTML.encodeTags(agent.getName())%>" /> 160 </p:path> 156 <p:path><p:pathelement 157 title="Job agents" href="<%="index.jsp?ID="+ID%>" 158 /><p:pathelement title="<%=HTML.encodeTags(agent.getName())%>" 159 /></p:path> 161 160 162 <t:tabcontrol id="main" active="properties"> 161 <t:tabcontrol 162 id="main" 163 subclass="content mastertabcontrol" 164 active="properties"> 163 165 <t:tab id="properties" title="Properties"> 164 165 <tbl:toolbar 166 > 167 <tbl:button 168 disabled="<%=writePermission ? false : true%>" 169 image="edit.gif" 170 onclick="editItem()" 171 title="Edit…" 172 tooltip="<%=writePermission ? "Edit this job agent" : "You do not have permission to edit this job agent"%>" 173 /> 174 <tbl:button 175 disabled="<%=deletePermission ? false : true%>" 176 image="delete.gif" 177 onclick="deleteItem()" 178 title="Delete" 179 visible="<%=!agent.isRemoved()%>" 180 tooltip="<%=deletePermission ? "Delete this job agent" : "You do not have permission to delete this job agent"%>" 181 /> 182 <tbl:button 183 disabled="<%=writePermission ? false : true%>" 184 image="restore.gif" 185 onclick="restoreItem()" 186 title="Restore" 187 visible="<%=agent.isRemoved()%>" 188 tooltip="<%=writePermission ? "Restore this job agent" : "You do not have permission to restore this job agent"%>" 189 /> 190 <tbl:button 191 disabled="<%=sharePermission ? false : true%>" 192 image="share.gif" 193 onclick="shareItem()" 194 title="Share…" 195 tooltip="<%=sharePermission ? "Share this job agent to other user, groups and projects" : "You do not have permission to share this job agent"%>" 196 /> 197 <tbl:button 198 disabled="<%=setOwnerPermission ? false : true%>" 199 image="take_ownership.png" 200 onclick="setOwner()" 201 title="Set owner…" 202 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" 203 /> 204 <tbl:button 205 image="import.gif" 206 onclick="runPlugin('ImportItem')" 207 title="Import…" 208 tooltip="Import data" 209 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 210 /> 211 <tbl:button 212 image="export.gif" 213 onclick="runPlugin('ExportItem')" 214 title="Export…" 215 tooltip="Export data" 216 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 217 /> 218 <tbl:button 219 image="runplugin.gif" 220 onclick="runPlugin('RunPlugin')" 221 title="Run plugin…" 222 tooltip="Run a plugin" 223 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 224 /> 225 <tbl:button 226 image="start.png" 227 onclick="controlJobAgent('Start')" 228 title="Start" 229 tooltip="Start the job agent" 230 visible="<%=writePermission && paused != null && paused == true%>" 231 /> 232 <tbl:button 233 image="pause.png" 234 onclick="controlJobAgent('Pause')" 235 title="Pause" 236 tooltip="Pause the job agent" 237 visible="<%=writePermission && paused != null && paused == false%>" 238 /> 239 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 240 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 241 <tbl:button 242 image="help.png" 243 onclick="<%="Main.openHelp('" + ID +"', 'jobagent.view.properties')"%>" 244 title="Help…" 245 tooltip="Get help about this page" 246 /> 247 </tbl:toolbar> 248 <div class="boxedbottom"> 166 <div> 167 <table class="fullform bottomborder"> 168 <tr> 169 <th class="itemstatus"> 170 <base:icon 171 image="shared.gif" 172 visible="<%=agent.isShared()%>" 173 tooltip="This item is shared to other users, groups and/or projects" 174 /> 175 <base:icon image="warning.gif" 176 visible="<%=!agent.isShared()%>" 177 tooltip="This item is NOT shared to other users, groups or projects. Only the owner will be able to run jobs on this agent" 178 /> 179 <base:icon 180 image="deleted.gif" 181 onclick="deleteItemPermanently()" 182 tooltip="This item has been flagged for deletion. Click to delete it now." 183 enabled="<%=deletePermanentlyPermission %>" 184 visible="<%=isRemoved%>" 185 /> 186 <base:icon image="used.gif" 187 onclick="showUsingItems()" 188 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 189 visible="<%=isRemoved && isUsed%>" /> 190 </th> 191 <td style="padding: 0px;"> 192 <tbl:toolbar subclass="bottomborder"> 193 <tbl:button 194 disabled="<%=writePermission ? false : true%>" 195 image="edit.gif" 196 onclick="editItem()" 197 title="Edit…" 198 tooltip="<%=writePermission ? "Edit this job agent" : "You do not have permission to edit this job agent"%>" 199 /> 200 <tbl:button 201 disabled="<%=deletePermission ? false : true%>" 202 image="delete.gif" 203 onclick="deleteItem()" 204 title="Delete" 205 visible="<%=!agent.isRemoved()%>" 206 tooltip="<%=deletePermission ? "Delete this job agent" : "You do not have permission to delete this job agent"%>" 207 /> 208 <tbl:button 209 disabled="<%=writePermission ? false : true%>" 210 image="restore.gif" 211 onclick="restoreItem()" 212 title="Restore" 213 visible="<%=agent.isRemoved()%>" 214 tooltip="<%=writePermission ? "Restore this job agent" : "You do not have permission to restore this job agent"%>" 215 /> 216 <tbl:button 217 disabled="<%=sharePermission ? false : true%>" 218 image="share.gif" 219 onclick="shareItem()" 220 title="Share…" 221 tooltip="<%=sharePermission ? "Share this job agent to other user, groups and projects" : "You do not have permission to share this job agent"%>" 222 /> 223 <tbl:button 224 disabled="<%=setOwnerPermission ? false : true%>" 225 image="take_ownership.png" 226 onclick="setOwner()" 227 title="Set owner…" 228 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" 229 /> 230 <tbl:button 231 image="import.gif" 232 onclick="runPlugin('ImportItem')" 233 title="Import…" 234 tooltip="Import data" 235 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 236 /> 237 <tbl:button 238 image="export.gif" 239 onclick="runPlugin('ExportItem')" 240 title="Export…" 241 tooltip="Export data" 242 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 243 /> 244 <tbl:button 245 image="runplugin.gif" 246 onclick="runPlugin('RunPlugin')" 247 title="Run plugin…" 248 tooltip="Run a plugin" 249 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 250 /> 251 <tbl:button 252 image="start.png" 253 onclick="controlJobAgent('Start')" 254 title="Start" 255 tooltip="Start the job agent" 256 visible="<%=writePermission && paused != null && paused == true%>" 257 /> 258 <tbl:button 259 image="pause.png" 260 onclick="controlJobAgent('Pause')" 261 title="Pause" 262 tooltip="Pause the job agent" 263 visible="<%=writePermission && paused != null && paused == false%>" 264 /> 265 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 266 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 267 <tbl:button 268 image="help.png" 269 onclick="<%="Main.openHelp('" + ID +"', 'jobagent.view.properties')"%>" 270 title="Help…" 271 tooltip="Get help about this page" 272 /> 273 </tbl:toolbar> 274 </td> 275 </tr> 276 <tr> 277 <th>Name</th> 278 <td><%=HTML.encodeTags(agent.getName())%></td> 279 </tr> 280 <tr> 281 <th>External ID</th> 282 <td><%=HTML.encodeTags(agent.getExternalId())%></td> 283 </tr> 284 <tr> 285 <th>Server</th> 286 <td><%=HTML.encodeTags(agent.getServer())%></td> 287 </tr> 288 <tr> 289 <th class="subprompt">- port</th> 290 <td><%=agent.getPort() == null ? "" : agent.getPort().toString()%></td> 291 </tr> 292 <tr> 293 <th>Status</th> 294 <td> 295 <%=paused == null ? "<i>- unknown -</i>" : paused == true ? "Paused" : "Running"%> 296 </td> 297 </tr> 298 <tr> 299 <th class="subprompt">- CPU usage</th> 300 <td><%=info.getCpuUsage() == null ? "" : info.getCpuUsage() + "%"%></td> 301 </tr> 302 <tr> 303 <th class="subprompt">- total memory</th> 304 <td> 305 <%=info.getTotalMemory() == null ? "" : Values.formatBytes(info.getTotalMemory())%> 306 </td> 307 </tr> 308 <tr> 309 <th class="subprompt">- used memory</th> 310 <td> 311 <%=info.getUsedMemory() == null ? "" : Values.formatBytes(info.getUsedMemory())%> 312 </td> 313 </tr> 314 <tr> 315 <th>Owner</th> 316 <td><base:propertyvalue item="<%=agent%>" property="owner" /></td> 317 </tr> 318 <tr> 319 <th>Permissions</th> 320 <td><%=PermissionUtil.getFullPermissionNames(agent)%></td> 321 </tr> 322 <tr> 323 <th>Description</th> 324 <td><%=HTML.niceFormat(agent.getDescription())%></td> 325 </tr> 326 </table> 327 </div> 249 328 <% 250 329 if (cc.getMessage() != null) 251 330 { 252 331 %> 253 <div class=" error"><%=cc.getMessage()%></div>332 <div class="messagecontainer error"><%=cc.getMessage()%></div> 254 333 <% 255 334 cc.setMessage(null); 256 335 } 257 336 %> 258 259 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(agent)%></i></div>260 <div class="itemstatus">261 <base:icon262 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>"263 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>"264 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>"265 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon>266 <base:icon image="used.gif"267 onclick="showUsingItems()"268 tooltip="Show the items that are using this one"269 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon>270 <base:icon image="shared.gif"271 visible="<%=agent.isShared()%>"> This item is shared to other user, groups and/or projects</base:icon>272 <base:icon image="warning.gif"273 visible="<%=!agent.isShared()%>"> This item is NOT shared to other users, groups or projects. Only the274 owner will be able to run jobs on this agent</base:icon>275 </div>276 <table class="form" cellspacing=0>277 <tr>278 <td class="prompt">Name</td>279 <td><%=HTML.encodeTags(agent.getName())%></td>280 </tr>281 <tr>282 <td class="prompt">External ID</td>283 <td><%=HTML.encodeTags(agent.getExternalId())%></td>284 </tr>285 <tr>286 <td class="prompt">Server</td>287 <td><%=HTML.encodeTags(agent.getServer())%></td>288 </tr>289 <tr>290 <td class="prompt">Port</td>291 <td><%=agent.getPort() == null ? "" : agent.getPort().toString()%></td>292 </tr>293 <tr>294 <td class="prompt">Status</td>295 <td>296 <%=paused == null ? "<i>- unknown -</i>" : paused == true ? "Paused" : "Running"%>297 </td>298 </tr>299 <tr>300 <td class="prompt">CPU usage</td>301 <td><%=info.getCpuUsage() == null ? "<i>- unknown -</i>" : info.getCpuUsage() + "%"%></td>302 </tr>303 <tr>304 <td class="prompt">Memory</td>305 <td>306 Total: <%=info.getTotalMemory() == null ? "<i>- unknown -</i>" : Values.formatBytes(info.getTotalMemory())%>,307 Used: <%=info.getUsedMemory() == null ? "<i>- unknown -</i>" : Values.formatBytes(info.getUsedMemory())%>308 </td>309 </tr>310 <tr>311 <td class="prompt">Owner</td>312 <td><base:propertyvalue item="<%=agent%>" property="owner" /></td>313 </tr>314 <tr>315 <td class="prompt">Description</td>316 <td><%=HTML.niceFormat(agent.getDescription())%></td>317 </tr>318 </table>319 320 321 337 <% 322 338 ItemQuery<JobAgentSettings> query = agent.getSettings(); … … 324 340 query.order(Orders.asc(Hql.property("pluginDefinition.name"))); 325 341 ItemResultList<JobAgentSettings> plugins = query.list(dc); 326 327 if (plugins.size() == 0)328 {329 %>330 <h4>Installed plugins</h4>331 This job agent has no installed plugins (or, you don't have permission to view them).342 %> 343 <base:section 344 id="plugins" 345 title="<%="Plugins (" + plugins.size() + ")"%>" 346 context="<%=cc%>" 347 > 332 348 <% 333 } 334 else 335 { 336 %> 337 <base:section 338 id="plugins" 339 title="<%="Plugins (" + plugins.size() + ")"%>" 340 context="<%=cc%>" 341 > 349 if (plugins.size() == 0) 350 { 351 %> 352 <div class="messagecontainer note"> 353 This job agent has no installed plugins (or, you don't have permission to view them). 354 </div> 355 <% 356 } 357 else 358 { 359 %> 342 360 <tbl:table 343 361 id="plugins" 344 345 362 columns="all" 346 363 > … … 366 383 /> 367 384 <tbl:data> 368 <tbl:columns> 369 </tbl:columns> 385 <tbl:headers> 386 <tbl:headerrow> 387 <tbl:columnheaders /> 388 </tbl:headerrow> 389 </tbl:headers> 370 390 <tbl:rows> 371 391 <% … … 412 432 </tbl:data> 413 433 </tbl:table> 414 </base:section> 415 <% 416 } 417 %> 418 434 <% 435 } 436 %> 437 </base:section> 419 438 <% 420 439 Set<JobInfo> jobs = agent.getInfo().getJobInfo(); 421 if (jobs == null || jobs.size() == 0) 422 { 423 %> 424 <h4>Executing jobs</h4> 440 %> 441 <base:section 442 id="executingJobs" 443 title="<%="Executing jobs (" + (jobs == null ? "unknown" : jobs.size()) + ")"%>" 444 context="<%=cc%>" 445 > 425 446 <% 426 447 if (jobs == null) 427 448 { 428 449 %> 429 Unknown 450 <div class="messagecontainer note"> 451 Could not find information about running jobs from the agent. 452 </div> 453 <% 454 } 455 else if (jobs.size() == 0) 456 { 457 %> 458 <div class="messagecontainer note"> 459 No jobs are currently executing on this job agent. 460 </div> 430 461 <% 431 462 } … … 433 464 { 434 465 %> 435 No jobs are currently executing on this job agent436 <%437 }438 }439 else440 {441 %>442 <base:section443 id="executingJobs"444 title="<%="Executing jobs (" + jobs.size() + ")"%>"445 context="<%=cc%>"446 >447 466 <tbl:table 448 467 id="jobs" 449 450 468 columns="all" 451 469 > … … 475 493 /> 476 494 <tbl:data> 477 <tbl:columns> 478 </tbl:columns> 495 <tbl:headers> 496 <tbl:headerrow> 497 <tbl:columnheaders /> 498 </tbl:headerrow> 499 </tbl:headers> 479 500 <tbl:rows> 480 501 <% … … 548 569 </tbl:data> 549 570 </tbl:table> 550 </base:section>551 <%552 }553 %>571 <% 572 } 573 %> 574 </base:section> 554 575 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 555 576 <jsp:param name="ID" value="<%=ID%>" /> … … 558 579 <jsp:param name="title" value="Other items related to this job agent" /> 559 580 </jsp:include> 560 <% 561 // Tables with users/groups/projects that this item is shared to 562 MultiPermissions mp = new MultiPermissions(Collections.singleton(agent)); 563 List<User> users = mp.getUsers().list(dc); 564 List<Group> groups = mp.getGroups().list(dc); 565 List<Project> projects = mp.getProjects().list(dc); 566 int totalShare = users.size() + groups.size() + projects.size(); 567 568 if (totalShare > 0) 569 { 570 %> 571 <base:section 572 id="sharedTo" 573 title="<%="Shared to (" + totalShare + ")"%>" 574 context="<%=cc%>" 575 > 576 <tbl:table 577 id="itemsSharedTo" 578 579 columns="all" 580 > 581 <tbl:columndef 582 id="itemType" 583 title="Item type" 584 /> 585 <tbl:columndef 586 id="name" 587 title="Name" 588 /> 589 <tbl:columndef 590 id="permissions" 591 title="Permissions" 592 /> 593 <tbl:data> 594 <tbl:columns> 595 </tbl:columns> 596 <tbl:rows> 597 <% 598 for (Project project : projects) 599 { 600 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 601 %> 602 <tbl:row> 603 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 604 <tbl:cell column="name"><base:icon 605 image="deleted.gif" 606 tooltip="This item has been scheduled for deletion" 607 visible="<%=project.isRemoved()%>" 608 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 609 <tbl:cell column="permissions"> 610 <%=PermissionUtil.translatePermissionsToString(permissions)%> 611 </tbl:cell> 612 </tbl:row> 613 <% 614 } 615 for (Group group : groups) 616 { 617 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 618 %> 619 <tbl:row> 620 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 621 <tbl:cell column="name"><base:icon 622 image="deleted.gif" 623 tooltip="This item has been scheduled for deletion" 624 visible="<%=group.isRemoved()%>" 625 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 626 <tbl:cell column="permissions"> 627 <%=PermissionUtil.translatePermissionsToString(permissions)%> 628 </tbl:cell> 629 </tbl:row> 630 <% 631 } 632 for (User user : users) 633 { 634 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 635 %> 636 <tbl:row> 637 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 638 <tbl:cell column="name"><base:icon 639 image="deleted.gif" 640 tooltip="This item has been scheduled for deletion" 641 visible="<%=user.isRemoved()%>" 642 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 643 <tbl:cell column="permissions"> 644 <%=PermissionUtil.translatePermissionsToString(permissions)%> 645 </tbl:cell> 646 </tbl:row> 647 <% 648 } 649 %> 650 </tbl:rows> 651 </tbl:data> 652 </tbl:table> 653 </base:section> 654 <% 655 } 656 else 657 { 658 %> 659 <h4>Shared to</h4> 660 This job agent is not shared 661 (or, you don't have permission to view the ones it is shared to). 662 <% 663 } 664 %> 665 666 </div> 581 <jsp:include page="../../common/share/list_share.jsp"> 582 <jsp:param name="ID" value="<%=ID%>" /> 583 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 584 <jsp:param name="item_id" value="<%=itemId%>" /> 585 <jsp:param name="title" value="Shared to" /> 586 </jsp:include> 667 587 </t:tab> 668 588 </t:tabcontrol> -
trunk/www/admin/mimetypes/view_mimetype.jsp
r5937 r5941 117 117 </base:head> 118 118 <base:body> 119 <p> 120 <p:path> 121 <p:pathelement title="MIME types" href="<%="index.jsp?ID="+ID%>" /> 122 <p:pathelement title="<%=HTML.encodeTags(mimeType.getName() + " (" + mimeType.getExtension() + ")")%>" /> 123 </p:path> 119 <p:path><p:pathelement 120 title="MIME types" href="<%="index.jsp?ID="+ID%>" 121 /><p:pathelement title="<%=HTML.encodeTags(mimeType.getName() + " (" + mimeType.getExtension() + ")")%>" 122 /></p:path> 124 123 125 <t:tabcontrol id="main" active="properties"> 124 <t:tabcontrol 125 id="main" 126 subclass="content mastertabcontrol" 127 active="properties"> 126 128 <t:tab id="properties" title="Properties"> 127 128 <tbl:toolbar 129 > 130 <tbl:button 131 disabled="<%=writePermission ? false : true%>" 132 image="edit.gif" 133 onclick="editItem()" 134 title="Edit…" 135 tooltip="<%=writePermission ? "Edit this MIME type" : "You do not have permission to edit this MIME type"%>" 136 /> 137 <tbl:button 138 disabled="<%=deletePermission ? false : true%>" 139 image="delete.gif" 140 onclick="deleteItem()" 141 title="Delete" 142 visible="<%=!mimeType.isRemoved()%>" 143 tooltip="<%=deletePermission ? "Delete this MIME type" : "You do not have permission to delete this MIME type"%>" 144 /> 145 <tbl:button 146 disabled="<%=writePermission ? false : true%>" 147 image="restore.gif" 148 onclick="restoreItem()" 149 title="Restore" 150 visible="<%=mimeType.isRemoved()%>" 151 tooltip="<%=writePermission ? "Restore this MIME type" : "You do not have permission to restore this MIME type"%>" 152 /> 153 <tbl:button 154 image="import.gif" 155 onclick="runPlugin('ImportItem')" 156 title="Import…" 157 tooltip="Import data" 158 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 159 /> 160 <tbl:button 161 image="export.gif" 162 onclick="runPlugin('ExportItem')" 163 title="Export…" 164 tooltip="Export data" 165 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 166 /> 167 <tbl:button 168 image="runplugin.gif" 169 onclick="runPlugin('RunPlugin')" 170 title="Run plugin…" 171 tooltip="Run a plugin" 172 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 173 /> 174 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 175 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 176 <tbl:button 177 image="help.png" 178 onclick="<%="Main.openHelp('" + ID +"', 'mimetype.view.properties')"%>" 179 title="Help…" 180 tooltip="Get help about this page" 181 /> 182 </tbl:toolbar> 183 <div class="boxedbottom"> 184 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(mimeType)%></i></div> 185 <% 186 if (mimeType.isRemoved()) 187 { 188 %> 189 <div class="itemstatus"> 129 <div> 130 <table class="fullform bottomborder"> 131 <tr> 132 <th class="itemstatus"> 190 133 <base:icon 191 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 192 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 193 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 194 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 134 image="deleted.gif" 135 onclick="deleteItemPermanently()" 136 tooltip="This item has been flagged for deletion. Click to delete it now." 137 enabled="<%=deletePermanentlyPermission %>" 138 visible="<%=isRemoved%>" 139 /> 195 140 <base:icon image="used.gif" 196 141 onclick="showUsingItems()" 197 tooltip="Show the items that are using this one" 198 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 199 </div> 200 <% 201 } 202 %> 203 <table class="form" cellspacing=0> 204 <tr> 205 <td class="prompt">File extension</td> 142 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 143 visible="<%=isRemoved && isUsed%>" /> 144 </th> 145 <td style="padding: 0px;"> 146 <tbl:toolbar subclass="bottomborder"> 147 <tbl:button 148 disabled="<%=writePermission ? false : true%>" 149 image="edit.gif" 150 onclick="editItem()" 151 title="Edit…" 152 tooltip="<%=writePermission ? "Edit this MIME type" : "You do not have permission to edit this MIME type"%>" 153 /> 154 <tbl:button 155 disabled="<%=deletePermission ? false : true%>" 156 image="delete.gif" 157 onclick="deleteItem()" 158 title="Delete" 159 visible="<%=!mimeType.isRemoved()%>" 160 tooltip="<%=deletePermission ? "Delete this MIME type" : "You do not have permission to delete this MIME type"%>" 161 /> 162 <tbl:button 163 disabled="<%=writePermission ? false : true%>" 164 image="restore.gif" 165 onclick="restoreItem()" 166 title="Restore" 167 visible="<%=mimeType.isRemoved()%>" 168 tooltip="<%=writePermission ? "Restore this MIME type" : "You do not have permission to restore this MIME type"%>" 169 /> 170 <tbl:button 171 image="import.gif" 172 onclick="runPlugin('ImportItem')" 173 title="Import…" 174 tooltip="Import data" 175 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 176 /> 177 <tbl:button 178 image="export.gif" 179 onclick="runPlugin('ExportItem')" 180 title="Export…" 181 tooltip="Export data" 182 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 183 /> 184 <tbl:button 185 image="runplugin.gif" 186 onclick="runPlugin('RunPlugin')" 187 title="Run plugin…" 188 tooltip="Run a plugin" 189 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 190 /> 191 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 192 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 193 <tbl:button 194 image="help.png" 195 onclick="<%="Main.openHelp('" + ID +"', 'mimetype.view.properties')"%>" 196 title="Help…" 197 tooltip="Get help about this page" 198 /> 199 </tbl:toolbar> 200 </td> 201 </tr> 202 <tr> 203 <th>File extension</th> 206 204 <td><%=HTML.encodeTags(mimeType.getExtension())%></td> 207 205 </tr> 208 206 <tr> 209 <t d class="prompt">Registered</td>207 <th>Registered</th> 210 208 <td><%=dateFormatter.format(mimeType.getEntryDate())%></td> 211 209 </tr> 212 210 <tr> 213 <t d class="prompt">MIME type</td>211 <th>MIME type</th> 214 212 <td><%=HTML.encodeTags(mimeType.getName())%></td> 215 213 </tr> 216 214 <tr> 217 <t d class="prompt">File type</td>215 <th>File type</th> 218 216 <td><base:propertyvalue item="<%=mimeType%>" property="fileType" /></td> 219 217 </tr> 220 218 <tr> 221 <t d class="prompt">Auto compress</td>219 <th>Auto compress</th> 222 220 <td><%=mimeType.getAutoCompress() ? "yes" : "no"%></td> 223 221 </tr> 224 222 <tr> 225 <td class="prompt">Description</td> 223 <th>Permissions</th> 224 <td><%=PermissionUtil.getFullPermissionNames(mimeType)%></td> 225 </tr> 226 <tr> 227 <th>Description</th> 226 228 <td><%=HTML.niceFormat(mimeType.getDescription())%></td> 227 229 </tr> 228 230 </table> 231 </div> 229 232 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 230 233 <jsp:param name="ID" value="<%=ID%>" /> … … 232 235 <jsp:param name="item_id" value="<%=itemId%>" /> 233 236 <jsp:param name="title" value="Other items related to this sample" /> 234 </jsp:include> 235 236 </div> 237 </t:tab> 238 </t:tabcontrol> 237 </jsp:include> 238 </t:tab> 239 </t:tabcontrol> 239 240 240 241 </base:body> -
trunk/www/admin/news/view_news.jsp
r5937 r5941 117 117 </base:head> 118 118 <base:body> 119 <p> 120 <p:path> 121 <p:pathelement title="News" href="<%="index.jsp?ID="+ID%>" /> 122 <p:pathelement title="<%=HTML.encodeTags(news.getName())%>" /> 123 </p:path> 119 <p:path><p:pathelement 120 title="News" href="<%="index.jsp?ID="+ID%>" 121 /><p:pathelement title="<%=HTML.encodeTags(news.getName())%>" 122 /></p:path> 124 123 125 <t:tabcontrol id="main" active="properties"> 124 <t:tabcontrol 125 id="main" 126 subclass="content mastertabcontrol" 127 active="properties"> 126 128 <t:tab id="properties" title="Properties"> 127 128 <tbl:toolbar 129 > 130 <tbl:button 131 disabled="<%=writePermission ? false : true%>" 132 image="edit.gif" 133 onclick="editItem()" 134 title="Edit…" 135 tooltip="<%=writePermission ? "Edit this news" : "You do not have permission to edit news"%>" 136 /> 137 <tbl:button 138 disabled="<%=deletePermission ? false : true%>" 139 image="delete.gif" 140 onclick="deleteItem()" 141 title="Delete" 142 visible="<%=!news.isRemoved()%>" 143 tooltip="<%=deletePermission ? "Delete this news" : "You do not have permission to delete this news"%>" 144 /> 145 <tbl:button 146 disabled="<%=writePermission ? false : true%>" 147 image="restore.gif" 148 onclick="restoreItem()" 149 title="Restore" 150 visible="<%=news.isRemoved()%>" 151 tooltip="<%=writePermission ? "Restore this news" : "You do not have permission to restore this news"%>" 152 /> 153 <tbl:button 154 image="import.gif" 155 onclick="runPlugin('ImportItem')" 156 title="Import…" 157 tooltip="Import data" 158 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 159 /> 160 <tbl:button 161 image="export.gif" 162 onclick="runPlugin('ExportItem')" 163 title="Export…" 164 tooltip="Export data" 165 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 166 /> 167 <tbl:button 168 image="runplugin.gif" 169 onclick="runPlugin('RunPlugin')" 170 title="Run plugin…" 171 tooltip="Run a plugin" 172 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 173 /> 174 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 175 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 176 <tbl:button 177 image="help.png" 178 onclick="<%="Main.openHelp('" + ID +"', 'news.view.properties')"%>" 179 title="Help…" 180 tooltip="Get help about this page" 181 /> 182 </tbl:toolbar> 183 <div class="boxedbottom"> 184 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(news)%></i></div> 185 <% 186 if (news.isRemoved()) 187 { 188 %> 189 <div class="itemstatus"> 129 <div> 130 <table class="fullform bottomborder"> 131 <tr> 132 <th class="itemstatus"> 190 133 <base:icon 191 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 192 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 193 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 194 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 134 image="deleted.gif" 135 onclick="deleteItemPermanently()" 136 tooltip="This item has been flagged for deletion. Click to delete it now." 137 enabled="<%=deletePermanentlyPermission %>" 138 visible="<%=isRemoved%>" 139 /> 195 140 <base:icon image="used.gif" 196 141 onclick="showUsingItems()" 197 tooltip="Show the items that are using this one" 198 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 199 </div> 200 <% 201 } 202 %> 203 <table class="form" cellspacing=0> 204 <tr> 205 <td class="prompt">Name</td> 142 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 143 visible="<%=isRemoved && isUsed%>" /> 144 </th> 145 <td style="padding: 0px;"> 146 <tbl:toolbar subclass="bottomborder"> 147 <tbl:button 148 disabled="<%=writePermission ? false : true%>" 149 image="edit.gif" 150 onclick="editItem()" 151 title="Edit…" 152 tooltip="<%=writePermission ? "Edit this news" : "You do not have permission to edit news"%>" 153 /> 154 <tbl:button 155 disabled="<%=deletePermission ? false : true%>" 156 image="delete.gif" 157 onclick="deleteItem()" 158 title="Delete" 159 visible="<%=!news.isRemoved()%>" 160 tooltip="<%=deletePermission ? "Delete this news" : "You do not have permission to delete this news"%>" 161 /> 162 <tbl:button 163 disabled="<%=writePermission ? false : true%>" 164 image="restore.gif" 165 onclick="restoreItem()" 166 title="Restore" 167 visible="<%=news.isRemoved()%>" 168 tooltip="<%=writePermission ? "Restore this news" : "You do not have permission to restore this news"%>" 169 /> 170 <tbl:button 171 image="import.gif" 172 onclick="runPlugin('ImportItem')" 173 title="Import…" 174 tooltip="Import data" 175 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 176 /> 177 <tbl:button 178 image="export.gif" 179 onclick="runPlugin('ExportItem')" 180 title="Export…" 181 tooltip="Export data" 182 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 183 /> 184 <tbl:button 185 image="runplugin.gif" 186 onclick="runPlugin('RunPlugin')" 187 title="Run plugin…" 188 tooltip="Run a plugin" 189 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 190 /> 191 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 192 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 193 <tbl:button 194 image="help.png" 195 onclick="<%="Main.openHelp('" + ID +"', 'news.view.properties')"%>" 196 title="Help…" 197 tooltip="Get help about this page" 198 /> 199 </tbl:toolbar> 200 </td> 201 </tr> 202 <tr> 203 <th>Name</th> 206 204 <td><%=HTML.encodeTags(news.getName())%></td> 207 205 </tr> 208 206 <tr> 209 <t d class="prompt">Registered</td>207 <th>Registered</th> 210 208 <td><%=dateFormatter.format(news.getEntryDate())%></td> 211 209 </tr> 212 210 <tr> 213 <t d class="prompt">Start date</td>211 <th>Start date</th> 214 212 <td><%=dateFormatter.format(news.getStartDate())%></td> 215 213 </tr> 216 214 <tr> 217 <t d class="prompt">News date</td>215 <th>News date</th> 218 216 <td><%=dateFormatter.format(news.getNewsDate())%></td> 219 217 </tr> 220 218 <tr> 221 <t d class="prompt">End date</td>219 <th>End date</th> 222 220 <td><%=dateFormatter.format(news.getEndDate())%></td> 223 221 </tr> 224 <tr > 225 <td class="prompt">Description</td> 222 <tr> 223 <th>Permissions</th> 224 <td><%=PermissionUtil.getFullPermissionNames(news)%></td> 225 </tr> 226 <tr class="big"> 227 <th>Description</th> 226 228 <td><%=HTML.niceFormat(news.getDescription())%></td> 227 229 </tr> 228 230 </table> 231 </div> 229 232 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 230 233 <jsp:param name="ID" value="<%=ID%>" /> … … 233 236 <jsp:param name="title" value="Other items related to this news" /> 234 237 </jsp:include> 235 236 </div> 237 </t:tab> 238 </t:tabcontrol> 239 238 </t:tab> 239 </t:tabcontrol> 240 240 </base:body> 241 241 </base:page> -
trunk/www/admin/platforms/variants/view_variant.jsp
r5937 r5941 126 126 </base:head> 127 127 <base:body> 128 <p> 129 <p:path> 130 <p:pathelement title="Platforms" href="<%="../index.jsp?ID="+ID%>" /> 131 <p:pathelement 128 <p:path><p:pathelement 129 title="Platforms" href="<%="../index.jsp?ID="+ID%>" 130 /><p:pathelement 132 131 title="<%=HTML.encodeTags(platform.getName())%>" 133 href="<%="index.jsp?ID="+ID+"&platform_id="+platformId%>" />134 <p:pathelement title="<%=HTML.encodeTags(variant.getName())%>" />135 </p:path>132 href="<%="index.jsp?ID="+ID+"&platform_id="+platformId%>" 133 /><p:pathelement title="<%=HTML.encodeTags(variant.getName())%>" 134 /></p:path> 136 135 137 <t:tabcontrol id="main" active="properties"> 136 <t:tabcontrol 137 id="main" 138 subclass="content mastertabcontrol" 139 active="properties"> 138 140 <t:tab id="properties" title="Properties"> 139 140 <tbl:toolbar 141 > 142 <tbl:button 143 disabled="<%=writePermission ? false : true%>" 144 image="edit.gif" 145 onclick="editItem()" 146 title="Edit…" 147 tooltip="<%=writePermission ? "Edit this platform variant" : "You do not have permission to edit this variant"%>" 148 /> 149 <tbl:button 150 disabled="<%=deletePermission ? false : true%>" 151 image="delete.gif" 152 onclick="deleteItem()" 153 title="Delete" 154 visible="<%=!variant.isRemoved()%>" 155 tooltip="<%=deletePermission ? "Delete this platform variant" : "You do not have permission to delete this platform variant"%>" 156 /> 157 <tbl:button 158 disabled="<%=writePermission ? false : true%>" 159 image="restore.gif" 160 onclick="restoreItem()" 161 title="Restore" 162 visible="<%=variant.isRemoved()%>" 163 tooltip="<%=writePermission ? "Restore this platform" : "You do not have permission to restore this platform variant"%>" 164 /> 165 <tbl:button 166 image="import.gif" 167 onclick="runPlugin('ImportItem')" 168 title="Import…" 169 tooltip="Import data" 170 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 171 /> 172 <tbl:button 173 image="export.gif" 174 onclick="runPlugin('ExportItem')" 175 title="Export…" 176 tooltip="Export data" 177 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 178 /> 179 <tbl:button 180 image="runplugin.gif" 181 onclick="runPlugin('RunPlugin')" 182 title="Run plugin…" 183 tooltip="Run a plugin" 184 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 185 /> 186 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 187 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 188 <tbl:button 189 image="help.png" 190 onclick="<%="Main.openHelp('" + ID +"', 'platformvariant.view.properties')"%>" 191 title="Help…" 192 tooltip="Get help about this page" 193 /> 194 </tbl:toolbar> 195 <div class="boxedbottom"> 196 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(platform)%></i></div> 197 <% 198 if (variant.isRemoved()) 199 { 200 %> 201 <div class="itemstatus"> 141 <div> 142 <table class="fullform bottomborder"> 143 <tr> 144 <th class="itemstatus"> 202 145 <base:icon 203 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 204 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 205 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 206 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 146 image="deleted.gif" 147 onclick="deleteItemPermanently()" 148 tooltip="This item has been flagged for deletion. Click to delete it now." 149 enabled="<%=deletePermanentlyPermission %>" 150 visible="<%=isRemoved%>" 151 /> 207 152 <base:icon image="used.gif" 208 153 onclick="showUsingItems()" 209 tooltip="Show the items that are using this one" 210 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 211 </div> 212 <% 213 } 214 %> 215 <table class="form" cellspacing=0> 216 <tr> 217 <td class="prompt">Name</td> 154 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 155 visible="<%=isRemoved && isUsed%>" /> 156 </th> 157 <td style="padding: 0px;"> 158 <tbl:toolbar subclass="bottomborder"> 159 <tbl:button 160 disabled="<%=writePermission ? false : true%>" 161 image="edit.gif" 162 onclick="editItem()" 163 title="Edit…" 164 tooltip="<%=writePermission ? "Edit this platform variant" : "You do not have permission to edit this variant"%>" 165 /> 166 <tbl:button 167 disabled="<%=deletePermission ? false : true%>" 168 image="delete.gif" 169 onclick="deleteItem()" 170 title="Delete" 171 visible="<%=!variant.isRemoved()%>" 172 tooltip="<%=deletePermission ? "Delete this platform variant" : "You do not have permission to delete this platform variant"%>" 173 /> 174 <tbl:button 175 disabled="<%=writePermission ? false : true%>" 176 image="restore.gif" 177 onclick="restoreItem()" 178 title="Restore" 179 visible="<%=variant.isRemoved()%>" 180 tooltip="<%=writePermission ? "Restore this platform" : "You do not have permission to restore this platform variant"%>" 181 /> 182 <tbl:button 183 image="import.gif" 184 onclick="runPlugin('ImportItem')" 185 title="Import…" 186 tooltip="Import data" 187 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 188 /> 189 <tbl:button 190 image="export.gif" 191 onclick="runPlugin('ExportItem')" 192 title="Export…" 193 tooltip="Export data" 194 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 195 /> 196 <tbl:button 197 image="runplugin.gif" 198 onclick="runPlugin('RunPlugin')" 199 title="Run plugin…" 200 tooltip="Run a plugin" 201 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 202 /> 203 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 204 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 205 <tbl:button 206 image="help.png" 207 onclick="<%="Main.openHelp('" + ID +"', 'platformvariant.view.properties')"%>" 208 title="Help…" 209 tooltip="Get help about this page" 210 /> 211 </tbl:toolbar> 212 </td> 213 </tr> 214 <tr> 215 <th>Name</th> 218 216 <td><%=HTML.encodeTags(variant.getName())%></td> 219 217 </tr> 220 218 <tr> 221 <t d class="prompt">External ID</td>219 <th>External ID</th> 222 220 <td><%=HTML.encodeTags(variant.getExternalId())%></td> 223 221 </tr> 224 222 <tr> 225 <t d class="prompt">File-only</td>223 <th>File-only</th> 226 224 <td><%=variant.isFileOnly() ? "yes" : "no"%></td> 227 225 </tr> … … 232 230 %> 233 231 <tr> 234 <t d class="prompt">Raw data type</td>232 <th class="subprompt">- raw data type</th> 235 233 <td><%=rdt == null ? "<i>- any -</i>" : rdt.getName()%></td> 236 234 </tr> … … 241 239 %> 242 240 <tr> 243 <t d class="prompt">Channels</td>241 <th class="subprompt">- channels</th> 244 242 <td><%=rdt.getChannels()%></td> 245 243 </tr> … … 247 245 } 248 246 %> 247 <tr> 248 <th>Permissions</th> 249 <td><%=PermissionUtil.getFullPermissionNames(variant)%></td> 250 </tr> 249 251 <tr > 250 <t d class="prompt">Description</td>252 <th>Description</th> 251 253 <td><%=HTML.niceFormat(variant.getDescription())%></td> 252 254 </tr> 253 255 </table> 256 </div> 254 257 255 258 <% … … 260 263 fileTypeQuery.order(Orders.asc(Hql.property("dataFileType.name"))); 261 264 ItemResultList<PlatformFileType> fileTypes = fileTypeQuery.list(dc); 262 263 if (fileTypes.size() == 0) 264 { 265 %> 266 <h4>Data file types</h4> 267 This platform variant has no associated data file types (or, you don't have permission to view them). 268 <% 269 } 270 else 271 { 272 %> 273 <base:section 274 id="fileTypes" 275 title="<%="Data file type (" + fileTypes.size() + ")"%>" 276 context="<%=cc%>" 277 > 265 %> 266 <base:section 267 id="fileTypes" 268 title="<%="Data file type (" + fileTypes.size() + ")"%>" 269 context="<%=cc%>" 270 > 271 <% 272 if (fileTypes.size() == 0) 273 { 274 %> 275 <div class="messagecontainer note"> 276 This platform variant has no associated data file types (or, you don't have permission to view them). 277 </div> 278 <% 279 } 280 else 281 { 282 %> 278 283 <tbl:table 279 284 id="fileTypes" 280 281 285 columns="all" 282 286 > … … 306 310 /> 307 311 <tbl:data> 308 <tbl:columns> 309 </tbl:columns> 312 <tbl:headers> 313 <tbl:headerrow> 314 <tbl:columnheaders /> 315 </tbl:headerrow> 316 </tbl:headers> 310 317 <tbl:rows> 311 318 <% … … 337 344 </tbl:data> 338 345 </tbl:table> 339 </base:section>340 <%341 }342 %>346 <% 347 } 348 %> 349 </base:section> 343 350 <jsp:include page="../../../common/anytoany/list_anytoany.jsp"> 344 351 <jsp:param name="ID" value="<%=ID%>" /> … … 347 354 <jsp:param name="title" value="Other items related to this variant" /> 348 355 </jsp:include> 349 </div>350 356 </t:tab> 351 357 </t:tabcontrol> -
trunk/www/admin/platforms/view_platform.jsp
r5937 r5941 144 144 </base:head> 145 145 <base:body> 146 <p> 147 <p:path> 148 <p:pathelement title="Platforms" href="<%="index.jsp?ID="+ID%>" /> 149 <p:pathelement title="<%=HTML.encodeTags(platform.getName())%>" /> 150 </p:path> 146 <p:path><p:pathelement 147 title="Platforms" href="<%="index.jsp?ID="+ID%>" 148 /><p:pathelement title="<%=HTML.encodeTags(platform.getName())%>" 149 /></p:path> 151 150 152 <t:tabcontrol id="main" active="properties" switch="switchTab"> 151 <t:tabcontrol 152 id="main" 153 subclass="content mastertabcontrol" 154 active="properties" switch="switchTab"> 153 155 <t:tab id="properties" title="Properties"> 154 155 <tbl:toolbar 156 > 157 <tbl:button 158 disabled="<%=writePermission ? false : true%>" 159 image="edit.gif" 160 onclick="editItem()" 161 title="Edit…" 162 tooltip="<%=writePermission ? "Edit this platform" : "You do not have permission to edit this platform"%>" 163 /> 164 <tbl:button 165 disabled="<%=deletePermission ? false : true%>" 166 image="delete.gif" 167 onclick="deleteItem()" 168 title="Delete" 169 visible="<%=!platform.isRemoved()%>" 170 tooltip="<%=deletePermission ? "Delete this platform" : "You do not have permission to delete this platform"%>" 171 /> 172 <tbl:button 173 disabled="<%=writePermission ? false : true%>" 174 image="restore.gif" 175 onclick="restoreItem()" 176 title="Restore" 177 visible="<%=platform.isRemoved()%>" 178 tooltip="<%=writePermission ? "Restore this platform" : "You do not have permission to restore this platform"%>" 179 /> 180 <tbl:button 181 image="add.png" 182 onclick="newVariant()" 183 title="New variant…" 184 tooltip="Create a new variant of this platform" 185 visible="<%=writePermission%>" 186 /> 187 <tbl:button 188 image="import.gif" 189 onclick="runPlugin('ImportItem')" 190 title="Import…" 191 tooltip="Import data" 192 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 193 /> 194 <tbl:button 195 image="export.gif" 196 onclick="runPlugin('ExportItem')" 197 title="Export…" 198 tooltip="Export data" 199 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 200 /> 201 <tbl:button 202 image="runplugin.gif" 203 onclick="runPlugin('RunPlugin')" 204 title="Run plugin…" 205 tooltip="Run a plugin" 206 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 207 /> 208 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 209 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 210 <tbl:button 211 image="help.png" 212 onclick="<%="Main.openHelp('" + ID +"', 'platform.view.properties')"%>" 213 title="Help…" 214 tooltip="Get help about this page" 215 /> 216 </tbl:toolbar> 217 <div class="boxedbottom"> 218 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(platform)%></i></div> 219 <% 220 if (platform.isRemoved()) 221 { 222 %> 223 <div class="itemstatus"> 156 <div> 157 <table class="fullform bottomborder"> 158 <tr> 159 <th class="itemstatus"> 224 160 <base:icon 225 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 226 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 227 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 228 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 161 image="deleted.gif" 162 onclick="deleteItemPermanently()" 163 tooltip="This item has been flagged for deletion. Click to delete it now." 164 enabled="<%=deletePermanentlyPermission %>" 165 visible="<%=isRemoved%>" 166 /> 229 167 <base:icon image="used.gif" 230 168 onclick="showUsingItems()" 231 tooltip="Show the items that are using this one" 232 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 233 </div> 234 <% 235 } 236 %> 237 <table class="form" cellspacing=0> 238 <tr> 239 <td class="prompt">Name</td> 169 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 170 visible="<%=isRemoved && isUsed%>" /> 171 </th> 172 <td style="padding: 0px;"> 173 <tbl:toolbar subclass="bottomborder"> 174 <tbl:button 175 disabled="<%=writePermission ? false : true%>" 176 image="edit.gif" 177 onclick="editItem()" 178 title="Edit…" 179 tooltip="<%=writePermission ? "Edit this platform" : "You do not have permission to edit this platform"%>" 180 /> 181 <tbl:button 182 disabled="<%=deletePermission ? false : true%>" 183 image="delete.gif" 184 onclick="deleteItem()" 185 title="Delete" 186 visible="<%=!platform.isRemoved()%>" 187 tooltip="<%=deletePermission ? "Delete this platform" : "You do not have permission to delete this platform"%>" 188 /> 189 <tbl:button 190 disabled="<%=writePermission ? false : true%>" 191 image="restore.gif" 192 onclick="restoreItem()" 193 title="Restore" 194 visible="<%=platform.isRemoved()%>" 195 tooltip="<%=writePermission ? "Restore this platform" : "You do not have permission to restore this platform"%>" 196 /> 197 <tbl:button 198 image="add.png" 199 onclick="newVariant()" 200 title="New variant…" 201 tooltip="Create a new variant of this platform" 202 visible="<%=writePermission%>" 203 /> 204 <tbl:button 205 image="import.gif" 206 onclick="runPlugin('ImportItem')" 207 title="Import…" 208 tooltip="Import data" 209 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 210 /> 211 <tbl:button 212 image="export.gif" 213 onclick="runPlugin('ExportItem')" 214 title="Export…" 215 tooltip="Export data" 216 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 217 /> 218 <tbl:button 219 image="runplugin.gif" 220 onclick="runPlugin('RunPlugin')" 221 title="Run plugin…" 222 tooltip="Run a plugin" 223 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 224 /> 225 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 226 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 227 <tbl:button 228 image="help.png" 229 onclick="<%="Main.openHelp('" + ID +"', 'platform.view.properties')"%>" 230 title="Help…" 231 tooltip="Get help about this page" 232 /> 233 </tbl:toolbar> 234 </td> 235 </tr> 236 <tr> 237 <th>Name</th> 240 238 <td><%=HTML.encodeTags(platform.getName())%></td> 241 239 </tr> 242 240 <tr> 243 <t d class="prompt">External ID</td>241 <th>External ID</th> 244 242 <td><%=HTML.encodeTags(platform.getExternalId())%></td> 245 243 </tr> 246 244 <tr> 247 <t d class="prompt">File-only</td>245 <th>File-only</th> 248 246 <td><%=platform.isFileOnly() ? "yes" : "no"%></td> 249 247 </tr> … … 254 252 %> 255 253 <tr> 256 <t d class="prompt">Raw data type</td>254 <th class="subprompt">raw data type</th> 257 255 <td><%=rdt == null ? "<i>- any -</i>" : rdt.getName()%></td> 258 256 </tr> … … 263 261 %> 264 262 <tr> 265 <t d class="prompt">Channels</td>263 <th class="subprompt">- channels</th> 266 264 <td><%=rdt.getChannels()%></td> 267 265 </tr> … … 269 267 } 270 268 %> 269 <tr> 270 <th>Permissions</th> 271 <td><%=PermissionUtil.getFullPermissionNames(platform)%></td> 272 </tr> 271 273 <tr > 272 <t d class="prompt">Description</td>274 <th>Description</th> 273 275 <td><%=HTML.niceFormat(platform.getDescription())%></td> 274 276 </tr> 275 277 </table> 278 </div> 276 279 277 280 <% … … 282 285 fileTypeQuery.order(Orders.asc(Hql.property("dataFileType.name"))); 283 286 ItemResultList<PlatformFileType> fileTypes = fileTypeQuery.list(dc); 284 285 if (fileTypes.size() == 0)286 {287 %>288 <h4>Data file types</h4>289 This platform has no associated data file types (or, you don't have permission to view them).287 %> 288 <base:section 289 id="dataFileTypes" 290 title="<%="Data file types (" + fileTypes.size() + ")"%>" 291 context="<%=cc%>" 292 > 290 293 <% 291 } 292 else 293 { 294 %> 295 <base:section 296 id="dataFileTypes" 297 title="<%="Data file types (" + fileTypes.size() + ")"%>" 298 context="<%=cc%>" 299 > 294 if (fileTypes.size() == 0) 295 { 296 %> 297 <div class="messagecontainer note"> 298 This platform has no associated data file types (or, you don't have permission to view them). 299 </div> 300 <% 301 } 302 else 303 { 304 %> 300 305 <tbl:table 301 306 id="fileTypes" 302 303 307 columns="all" 304 308 > … … 328 332 /> 329 333 <tbl:data> 330 <tbl:columns> 331 </tbl:columns> 334 <tbl:headers> 335 <tbl:headerrow> 336 <tbl:columnheaders /> 337 </tbl:headerrow> 338 </tbl:headers> 332 339 <tbl:rows> 333 340 <% … … 359 366 </tbl:data> 360 367 </tbl:table> 361 </base:section>362 <%363 }364 %>368 <% 369 } 370 %> 371 </base:section> 365 372 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 366 373 <jsp:param name="ID" value="<%=ID%>" /> … … 369 376 <jsp:param name="title" value="Other items related to this platform" /> 370 377 </jsp:include> 371 </div>372 378 </t:tab> 373 379 <t:tab id="variants" title="Variants" -
trunk/www/admin/pluginconfigurations/view_configuration.jsp
r5937 r5941 46 46 import="net.sf.basedb.core.plugin.Plugin" 47 47 import="net.sf.basedb.core.Project" 48 import="net.sf.basedb.core.Type" 48 49 import="net.sf.basedb.util.JarClassLoader" 49 50 import="net.sf.basedb.util.ToStringComparator" … … 122 123 ExtensionsInvoker invoker = ToolbarUtil.useExtensions(jspContext); 123 124 %> 124 125 <%@page import="net.sf.basedb.core.Type"%><base:page title="<%=title%>"> 125 <base:page title="<%=title%>"> 126 126 <base:head scripts="table.js,tabcontrol.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css"> 127 127 <ext:scripts context="<%=jspContext%>" /> … … 187 187 </base:head> 188 188 <base:body> 189 <p> 190 <p:path> 191 <p:pathelement title="Plugin configurations" href="<%="index.jsp?ID="+ID%>" /> 192 <p:pathelement title="<%=HTML.encodeTags(configuration.getName())%>" /> 193 </p:path> 189 <p:path><p:pathelement 190 title="Plugin configurations" href="<%="index.jsp?ID="+ID%>" 191 /><p:pathelement title="<%=HTML.encodeTags(configuration.getName())%>" 192 /></p:path> 194 193 195 <t:tabcontrol id="main" active="<%=tab%>" switch="switchTab" remember="false"> 194 <t:tabcontrol 195 id="main" 196 subclass="content mastertabcontrol" 197 active="<%=tab%>" switch="switchTab" remember="false"> 196 198 <t:tab id="properties" title="Properties"> 197 <tbl:toolbar 198 > 199 <tbl:button 200 disabled="<%=writePermission ? false : true%>" 201 image="edit.gif" 202 onclick="editItem()" 203 title="Edit…" 204 tooltip="<%=writePermission ? "Edit this plugin configuration" : "You do not have permission to edit this plugin configuration"%>" 205 /> 206 <tbl:button 207 disabled="<%=!createPermission%>" 208 image="<%=createPermission ? "copy.gif" : "copy_disabled.gif"%>" 209 onclick="copyItem()" 210 title="Copy…" 211 tooltip="<%=createPermission ? "Create a copy of this configuration" : "You do not have permission to create new configurations"%>" 212 /> 213 <tbl:button 214 disabled="<%=deletePermission ? false : true%>" 215 image="delete.gif" 216 onclick="deleteItem()" 217 title="Delete" 218 visible="<%=!configuration.isRemoved()%>" 219 tooltip="<%=deletePermission ? "Delete this plugin configuration" : "You do not have permission to delete this plugin configuration"%>" 220 /> 221 <tbl:button 222 disabled="<%=writePermission ? false : true%>" 223 image="restore.gif" 224 onclick="restoreItem()" 225 title="Restore" 226 visible="<%=configuration.isRemoved()%>" 227 tooltip="<%=writePermission ? "Restore this plugin configuration" : "You do not have permission to restore this plugin configuration"%>" 228 /> 229 <tbl:button 230 disabled="<%=sharePermission ? false : true%>" 231 image="share.gif" 232 onclick="shareItem()" 233 title="Share…" 234 tooltip="<%=sharePermission ? "Share this plugin configuration to other user, groups and projects" : "You do not have permission to share this plugin configuration"%>" 235 /> 236 <tbl:button 237 disabled="<%=setOwnerPermission ? false : true%>" 238 image="take_ownership.png" 239 onclick="setOwner()" 240 title="Set owner…" 241 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" 242 /> 243 <tbl:button 244 image="import.gif" 245 onclick="runPlugin('ImportItem')" 246 title="Import…" 247 tooltip="Import data" 248 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 249 /> 250 <tbl:button 251 image="export.gif" 252 onclick="runPlugin('ExportItem')" 253 title="Export…" 254 tooltip="Export data" 255 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 256 /> 257 <tbl:button 258 image="runplugin.gif" 259 onclick="runPlugin('RunPlugin')" 260 title="Run plugin…" 261 tooltip="Run a plugin" 262 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 263 /> 264 <tbl:button 265 image="runplugin.gif" 266 onclick="configure()" 267 title="Configure…" 268 tooltip="Configure this plugin" 269 visible="<%=configurable && writePermission%>" 270 /> 271 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 272 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 273 <tbl:button 274 image="help.png" 275 onclick="<%="Main.openHelp('" + ID +"', 'pluginconfiguration.view.properties')"%>" 276 title="Help…" 277 tooltip="Get help about this page" 278 /> 279 </tbl:toolbar> 280 <div class="boxedbottom"> 281 <div class="itemstatus">Permissions on this item: <i><%=PermissionUtil.getFullPermissionNames(configuration)%></i></div> 282 <% 283 if (configuration.isRemoved() || configuration.isShared()) 284 { 285 %> 286 <div class="itemstatus"> 199 <div> 200 <table class="fullform bottomborder"> 201 <tr> 202 <th class="itemstatus"> 287 203 <base:icon 288 image="<%=deletePermanentlyPermission ? "deleted.gif" : "deleted_disabled.gif"%>" 289 onclick="<%=deletePermanentlyPermission ? "deleteItemPermanently()" : null%>" 290 tooltip="<%=deletePermanentlyPermission ? "Permanently delete this item" : null%>" 291 visible="<%=isRemoved%>"> This item has been flagged for deletion<br></base:icon> 204 image="shared.gif" 205 visible="<%=configuration.isShared()%>" 206 tooltip="This item is shared to other users, groups and/or projects" 207 /> 208 <base:icon 209 image="deleted.gif" 210 onclick="deleteItemPermanently()" 211 tooltip="This item has been flagged for deletion. Click to delete it now." 212 enabled="<%=deletePermanentlyPermission %>" 213 visible="<%=isRemoved%>" 214 /> 292 215 <base:icon image="used.gif" 293 216 onclick="showUsingItems()" 294 tooltip="Show the items that are using this one" 295 visible="<%=isUsed%>"> This item is used by other items and can't be permanently deleted<br></base:icon> 296 <base:icon image="shared.gif" 297 visible="<%=configuration.isShared()%>"> This item is shared to other users, groups and/or projects</base:icon> 298 </div> 217 tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" 218 visible="<%=isRemoved && isUsed%>" /> 219 </th> 220 <td style="padding: 0px;"> 221 <tbl:toolbar subclass="bottomborder"> 222 <tbl:button 223 disabled="<%=writePermission ? false : true%>" 224 image="edit.gif" 225 onclick="editItem()" 226 title="Edit…" 227 tooltip="<%=writePermission ? "Edit this plugin configuration" : "You do not have permission to edit this plugin configuration"%>" 228 /> 229 <tbl:button 230 disabled="<%=!createPermission%>" 231 image="copy.gif" 232 onclick="copyItem()" 233 title="Copy…" 234 tooltip="<%=createPermission ? "Create a copy of this configuration" : "You do not have permission to create new configurations"%>" 235 /> 236 <tbl:button 237 disabled="<%=deletePermission ? false : true%>" 238 image="delete.gif" 239 onclick="deleteItem()" 240 title="Delete" 241 visible="<%=!configuration.isRemoved()%>" 242 tooltip="<%=deletePermission ? "Delete this plugin configuration" : "You do not have permission to delete this plugin configuration"%>" 243 /> 244 <tbl:button 245 disabled="<%=writePermission ? false : true%>" 246 image="restore.gif" 247 onclick="restoreItem()" 248 title="Restore" 249 visible="<%=configuration.isRemoved()%>" 250 tooltip="<%=writePermission ? "Restore this plugin configuration" : "You do not have permission to restore this plugin configuration"%>" 251 /> 252 <tbl:button 253 disabled="<%=sharePermission ? false : true%>" 254 image="share.gif" 255 onclick="shareItem()" 256 title="Share…" 257 tooltip="<%=sharePermission ? "Share this plugin configuration to other user, groups and projects" : "You do not have permission to share this plugin configuration"%>" 258 /> 259 <tbl:button 260 disabled="<%=setOwnerPermission ? false : true%>" 261 image="take_ownership.png" 262 onclick="setOwner()" 263 title="Set owner…" 264 tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" 265 /> 266 <tbl:button 267 image="import.gif" 268 onclick="runPlugin('ImportItem')" 269 title="Import…" 270 tooltip="Import data" 271 visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" 272 /> 273 <tbl:button 274 image="export.gif" 275 onclick="runPlugin('ExportItem')" 276 title="Export…" 277 tooltip="Export data" 278 visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" 279 /> 280 <tbl:button 281 image="runplugin.gif" 282 onclick="runPlugin('RunPlugin')" 283 title="Run plugin…" 284 tooltip="Run a plugin" 285 visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" 286 /> 287 <tbl:button 288 image="runplugin.gif" 289 onclick="configure()" 290 title="Configure…" 291 tooltip="Configure this plugin" 292 visible="<%=configurable && writePermission%>" 293 /> 294 <ext:render extensions="<%=invoker%>" context="<%=jspContext%>" 295 wrapper="<%=new PrefixSuffixRenderer(jspContext, "<td>", "</td>") %>"/> 296 <tbl:button 297 image="help.png" 298 onclick="<%="Main.openHelp('" + ID +"', 'pluginconfiguration.view.properties')"%>" 299 title="Help…" 300 tooltip="Get help about this page" 301 /> 302 </tbl:toolbar> 303 </td> 304 </tr> 305 <tr> 306 <th>Name</th> 307 <td><%=HTML.encodeTags(configuration.getName())%></td> 308 </tr> 309 <tr> 310 <th>Registered</th> 311 <td><%=dateFormatter.format(configuration.getEntryDate())%></td> 312 </tr> 313 <tr> 314 <th>Plugin</th> 315 <td><%=Base.getLinkedName(ID, plugin, plugin == null, true)%></td> 316 </tr> 317 <tr> 318 <th>Type</th> 319 <td><%=plugin == null ? "<i>- denied -</i>" : plugin.getMainType().toString()%></td> 320 </tr> 321 <tr> 322 <th>Owner</th> 323 <td><base:propertyvalue item="<%=configuration%>" property="owner" /></td> 324 </tr> 325 <tr> 326 <th>Permissions</th> 327 <td><%=PermissionUtil.getFullPermissionNames(configuration)%></td> 328 </tr> 329 <tr > 330 <th>Description</th> 331 <td><%=HTML.niceFormat(configuration.getDescription())%></td> 332 </tr> 333 </table> 334 </div> 335 336 <% 337 if (plugin != null) 338 { 339 List<String> names = new java.util.ArrayList<String>(configuration.getParameterNames()); 340 %> 341 <base:section 342 id="parameters" 343 title="Configuration parameters" 344 context="<%=cc %>" 345 > 346 <% 347 if (names == null || names.size() == 0) 348 { 349 %> 350 <div class="messagecontainer note"> 351 No parameters has been specified. 352 </div> 353 <% 354 } 355 else 356 { 357 Collections.sort(names); 358 %> 359 <table class="fullform fullborder"> 360 <% 361 for (String name : names) 362 { 363 StringBuilder sb = new StringBuilder(); 364 String displayValue = ""; 365 String description = ""; 366 try 367 { 368 ParameterInfo pi = configuration.getParameterInfo(name); 369 if (pi.getLabel() != null) name = HTML.encodeTags(pi.getLabel()); 370 description = HTML.encodeTags(pi.getDescription()); 371 List<?> values = pi.getValues(); 372 int i = 0; 373 for (Object value : values) 374 { 375 if (value != null) 376 { 377 if (i > 0) sb.append(", "); 378 i++; 379 if (value instanceof BasicItem) 380 { 381 BasicItem item = (BasicItem)value; 382 String itemName = ""; 383 if (item instanceof File) 384 { 385 sb.append(Base.getLinkedFile(ID, (File)item, false, true, true, root)); 386 } 387 else 388 { 389 if (item instanceof Nameable) 390 { 391 itemName = ((Nameable)item).getName(); 392 } 393 else 394 { 395 itemName = item.toString(); 396 } 397 sb.append(Base.getLink(ID, HTML.encodeTags(itemName), 398 item.getType(), item.getId(), item.hasPermission(Permission.WRITE))); 399 } 400 } 401 else if (value instanceof Date) 402 { 403 if (pi.getValueType() == Type.TIMESTAMP) 404 { 405 sb.append(dateTimeFormatter.format((Date)value)); 406 } 407 else 408 { 409 sb.append(dateFormatter.format((Date)value)); 410 } 411 } 412 else 413 { 414 sb.append(HTML.encodeTags(value.toString())); 415 } 416 } 417 } 418 displayValue = sb.toString(); 419 } 420 catch (Throwable ex) 421 { 422 displayValue = "<i>ERROR: "+ex.getMessage()+"</i>"; 423 } 424 %> 425 <tr> 426 <th><span title="<%=description%>"><%=name%></span></th> 427 <td><%=displayValue%></td> 428 </tr> 429 <% 430 } 431 %> 432 </table> 433 <% 434 } 435 %> 436 </base:section> 299 437 <% 300 438 } 301 439 %> 302 <table class="form" cellspacing="0"> 303 <tr> 304 <td class="prompt">Name</td> 305 <td><%=HTML.encodeTags(configuration.getName())%></td> 306 </tr> 307 <tr> 308 <td class="prompt">Registered</td> 309 <td><%=dateFormatter.format(configuration.getEntryDate())%></td> 310 </tr> 311 <tr> 312 <td class="prompt">Plugin</td> 313 <td> 314 <%=Base.getLinkedName(ID, plugin, plugin == null, true)%> 315 </td> 316 </tr> 317 <tr> 318 <td class="prompt">Type</td> 319 <td><%=plugin == null ? "<i>- denied -</i>" : plugin.getMainType().toString()%></td> 320 </tr> 321 <tr> 322 <td class="prompt">Owner</td> 323 <td><base:propertyvalue item="<%=configuration%>" property="owner" /></td> 324 </tr> 325 <tr > 326 <td class="prompt">Description</td> 327 <td><%=HTML.niceFormat(configuration.getDescription())%></td> 328 </tr> 329 </table> 440 330 441 <jsp:include page="../../common/anytoany/list_anytoany.jsp"> 331 442 <jsp:param name="ID" value="<%=ID%>" /> … … 334 445 <jsp:param name="title" value="Other items related to this plugin configuration" /> 335 446 </jsp:include> 336 337 <% 338 // Tables with users/groups/projects that this item is shared to 339 MultiPermissions mp = new MultiPermissions(Collections.singleton(configuration)); 340 List<User> users = mp.getUsers().list(dc); 341 List<Group> groups = mp.getGroups().list(dc); 342 List<Project> projects = mp.getProjects().list(dc); 343 int totalShare = users.size() + groups.size() + projects.size(); 344 345 if (totalShare > 0) 346 { 347 %> 348 <base:section 349 id="sharedTo" 350 title="<%="Shared to (" + totalShare + ")"%>" 351 context="<%=cc%>" 352 > 353 <tbl:table 354 id="itemsSharedTo" 355 356 columns="all" 357 > 358 <tbl:columndef 359 id="itemType" 360 title="Item type" 361 /> 362 <tbl:columndef 363 id="name" 364 title="Name" 365 /> 366 <tbl:columndef 367 id="permissions" 368 title="Permissions" 369 /> 370 <tbl:data> 371 <tbl:columns> 372 </tbl:columns> 373 <tbl:rows> 374 <% 375 for (Project project : projects) 376 { 377 Set<Permission> permissions = mp.getPermissions(project).values().iterator().next(); 378 %> 379 <tbl:row> 380 <tbl:cell column="itemType"><%=project.getType()%></tbl:cell> 381 <tbl:cell column="name"><base:icon 382 image="deleted.gif" 383 tooltip="This item has been scheduled for deletion" 384 visible="<%=project.isRemoved()%>" 385 /><%=Base.getLinkedName(ID, project, false, true)%></tbl:cell> 386 <tbl:cell column="permissions"> 387 <%=PermissionUtil.translatePermissionsToString(permissions)%> 388 </tbl:cell> 389 </tbl:row> 390 <% 391 } 392 for (Group group : groups) 393 { 394 Set<Permission> permissions = mp.getPermissions(group).values().iterator().next(); 395 %> 396 <tbl:row> 397 <tbl:cell column="itemType"><%=group.getType()%></tbl:cell> 398 <tbl:cell column="name"><base:icon 399 image="deleted.gif" 400 tooltip="This item has been scheduled for deletion" 401 visible="<%=group.isRemoved()%>" 402 /><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> 403 <tbl:cell column="permissions"> 404 <%=PermissionUtil.translatePermissionsToString(permissions)%> 405 </tbl:cell> 406 </tbl:row> 407 <% 408 } 409 for (User user : users) 410 { 411 Set<Permission> permissions = mp.getPermissions(user).values().iterator().next(); 412 %> 413 <tbl:row> 414 <tbl:cell column="itemType"><%=user.getType()%></tbl:cell> 415 <tbl:cell column="name"><base:icon 416 image="deleted.gif" 417 tooltip="This item has been scheduled for deletion" 418 visible="<%=user.isRemoved()%>" 419 /><%=Base.getLinkedName(ID, user, false, true)%></tbl:cell> 420 <tbl:cell column="permissions"> 421 <%=PermissionUtil.translatePermissionsToString(permissions)%> 422 </tbl:cell> 423 </tbl:row> 424 <% 425 } 426 %> 427 </tbl:rows> 428 </tbl:data> 429 </tbl:table> 430 </base:section> 431 <% 432 } 433 else 434 { 435 %> 436 <h4>Shared to</h4> 437 This configuration is not shared 438 (or, you don't have permission to view the ones it is shared to). 439 <% 440 } 441 %> 442 </div> 443 444 </t:tab> 445 446 <t:tab id="parameters" title="Configuration parameters" > 447 <div class="boxed"> 448 <table class="form" cellspacing="0"> 449 <% 450 if (plugin != null) 451 { 452 List<String> names = new java.util.ArrayList<String>(configuration.getParameterNames()); 453 if (names == null || names.size() == 0) 454 { 455 %> 456 No parameters has been specified. 457 <% 458 } 459 else 460 { 461 Collections.sort(names); 462 for (String name : names) 463 { 464 StringBuilder sb = new StringBuilder(); 465 String displayValue = ""; 466 String description = ""; 467 try 468 { 469 ParameterInfo pi = configuration.getParameterInfo(name); 470 if (pi.getLabel() != null) name = HTML.encodeTags(pi.getLabel()); 471 description = HTML.encodeTags(pi.getDescription()); 472 List<?> values = pi.getValues(); 473 int i = 0; 474 for (Object value : values) 475 { 476 if (value != null) 477 { 478 if (i > 0) sb.append(", "); 479 i++; 480 if (value instanceof BasicItem) 481 { 482 BasicItem item = (BasicItem)value; 483 String itemName = ""; 484 if (item instanceof File) 485 { 486 sb.append(Base.getLinkedFile(ID, (File)item, false, true, true, root)); 487 } 488 else 489 { 490 if (item instanceof Nameable) 491 { 492 itemName = ((Nameable)item).getName(); 493 } 494 else 495 { 496 itemName = item.toString(); 497 } 498 sb.append(Base.getLink(ID, HTML.encodeTags(itemName), 499 item.getType(), item.getId(), item.hasPermission(Permission.WRITE))); 500 } 501 } 502 else if (value instanceof Date) 503 { 504 if (pi.getValueType() == Type.TIMESTAMP) 505 { 506 sb.append(dateTimeFormatter.format((Date)value)); 507 } 508 else 509 { 510 sb.append(dateFormatter.format((Date)value)); 511 } 512 } 513 else 514 { 515 sb.append(HTML.encodeTags(value.toString())); 516 } 517 } 518 } 519 displayValue = sb.toString(); 520 } 521 catch (Throwable ex) 522 { 523 displayValue = "<i>ERROR: "+ex.getMessage()+"</i>"; 524 } 525 %> 526 <tr> 527 <td class="prompt"><span title="<%=description%>"><%=name%></span></td> 528 <td> 529 <%=displayValue%> 530 </td> 531 </tr> 532 <% 533 } 534 } 535 } 536 %> 537 </table> 538 </div> 447 <jsp:include page="../../common/share/list_share.jsp"> 448 <jsp:param name="ID" value="<%=ID%>" /> 449 <jsp:param name="item_type" value="<%=itemType.name()%>" /> 450 <jsp:param name="item_id" value="<%=itemId%>" /> 451 <jsp:param name="title" value="Shared to" /> 452 </jsp:include> 539 453 </t:tab> 540 454 541 455 <t:tab id="annotations" title="Annotations" 542 tooltip="View annotation values" 456 tooltip="View annotation values" clazz="white" 543 457 visible="<%=plugin != null && plugin.supports("net.sf.basedb.core.plugin.AnnotationSetterPlugin") %>"> 544 <div class="boxed">545 458 <jsp:include page="../../common/annotations/list_annotations.jsp"> 546 459 <jsp:param name="item_type" value="<%=itemType.name()%>" /> … … 548 461 <jsp:param name="ID" value="<%=ID%>" /> 549 462 </jsp:include> 550 </div>551 463 </t:tab> 552 464 <t:tab id="history" title="Change history" -
trunk/www/admin/plugindefinitions/view_plugin.jsp
r5937 r5941 216 216 </base:head> 217 217 <base:body> 218 <p>219 218 <% 220 219 if (!iFrame) 221 220 { 222 221 %> 223 <p:path> 224 <p:pathelement title="Plugins" href="<%="index.jsp?ID="+ID%>" />225 <p:pathelement title="<%=HTML.encodeTags(plugin.getName())%>" />226 </p:path>222 <p:path><p:pathelement 223 title="Plugins" href="<%="index.jsp?ID="+ID%>" 224 /><p:pathelement title="<%=HTML.encodeTags(plugin.getName())%>" 225 /></p:path> 227 226 <% 228 227 } 229 228 %> 230 <t:tabcontrol id="main" active="properties" > 229 <t:tabcontrol 230 id="main" 231 subclass="content mastertabcontrol" 232 active="properties" 233 notabs="<%=iFrame%>"> 231 234 <t:tab id="properties" title="Properties"> 232 <tbl:toolbar 233 > 234 <tbl:button 235 disabled="<%=writePermission ? false : true%>" 236 image="edit.gif" 237 onclick="editItem()" 238 title="Edit…" 239 tooltip="<%=writePermission ? "Edit this plugin" : "You do not have permission to edit this plugin"%>" 240 /> 241 <tbl:button 242 image="joust/plugin.png" 243 onclick="toggleDisabled()" 244 title="<%=plugin.isDisabled() ? "Enable" : "Disable"%>" 245 visible="<%=writePermission%>" 246 tooltip="Disable/enable this plugin" 247 /> 248 <tbl:button 249 disabled="<%=deletePermission ? false : true%>" 250 image="delete.gif" 251 onclick="deleteItem()" 252 title="Delete" 253 visible="<%=!plugin.isRemoved()%>" 254 tooltip="<%=deletePermission ? "Delete this plugin" : "You do not have permission to delete this plugin"%>" 255 /> 256 <tbl:button 257 disabled="<%=writePermission ? false : true%>" 258 image="restore.gif" 259 onclick="restoreItem()" 260 title="Restore" 261 visible="<%=plugin.isRemoved()%>" 262 tooltip="<%=writePermission ? "Restore this plugin" : "You do not have permission to restore this plugin"%>" 263 /> 264 <tbl:button 265 disabled="<%=sharePermission ? false : true%>" 266 image="share.gif" 267 onclick="shareItem()" 268 title="Share…" 269 tooltip="<%=sharePermission ? "Share this plugin to other user, groups and projects" : "You do not have permission to share this plugin"%>" 270 /> 271 <tbl:button 272 disabled="<%=setOwnerPermission ? false : true%>" 273 image="take_ownership.png" 274