Changeset 3447
- Timestamp:
- Jun 5, 2007, 8:39:03 AM (16 years ago)
- Location:
- branches/2.3.1
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3.1/src/clients/web/net/sf/basedb/clients/web/taglib/table/PresetSelector.java
r2637 r3447 78 78 79 79 /** 80 If the header should be visible or not.80 If the preset selector should be visible or not. 81 81 */ 82 82 private boolean visible = true; 83 84 /** 85 If the 'removed' option should be included in the preset selector or not. 86 If the list contains items that are not removable, the option is never included. 87 */ 88 private boolean disableRemoved = false; 89 90 /** 91 If the 'owned by me' option should be included in the preset selector or not. 92 If the list contains items that are not ownable, the option is never included. 93 */ 94 private boolean disableOwnedBy = false; 95 96 /** 97 If the 'shared to me' option should be included in the preset selector or not. 98 If the list contains items that are not shareable, the option is never included. 99 */ 100 private boolean disableSharedTo = false; 101 102 /** 103 If the 'in project' option should be included in the preset selector or not. 104 If the list contains items that are not removable, the option is never included. 105 */ 106 private boolean disableInProject = false; 107 108 /** 109 If the 'owned by others' option should be included in the preset selector or not. 110 If the list contains items that are not ownable, the option is never included. 111 */ 112 private boolean disableOthers = false; 83 113 84 114 private String onChange = "presetOnChange()"; … … 132 162 } 133 163 164 public void setDisableremoved(boolean disable) 165 { 166 this.disableRemoved = disable; 167 } 168 public boolean getDisableremoved() 169 { 170 return disableRemoved; 171 } 172 173 public void setDisableownedby(boolean disable) 174 { 175 this.disableOwnedBy = disable; 176 } 177 public boolean getDisableownedby() 178 { 179 return disableOwnedBy; 180 } 181 182 public void setDisablesharedto(boolean disable) 183 { 184 this.disableSharedTo = disable; 185 } 186 public boolean getDisablesharedto() 187 { 188 return disableSharedTo; 189 } 190 191 public void setDisableinproject(boolean disable) 192 { 193 this.disableInProject = disable; 194 } 195 public boolean getDisableinproject() 196 { 197 return disableInProject; 198 } 199 200 public void setDisableothers(boolean disable) 201 { 202 this.disableOthers = disable; 203 } 204 public boolean getDisableothers() 205 { 206 return disableOthers; 207 } 208 134 209 /* 135 210 Display methods … … 194 269 if (dataClass != null) 195 270 { 196 if (RemovableData.class.isAssignableFrom(dataClass) )271 if (RemovableData.class.isAssignableFrom(dataClass) && !disableRemoved) 197 272 { 198 273 boolean current = cc.getInclude().contains(Include.REMOVED); … … 203 278 numOptions++; 204 279 } 205 if (OwnableData.class.isAssignableFrom(dataClass) )280 if (OwnableData.class.isAssignableFrom(dataClass) && !disableOwnedBy) 206 281 { 207 282 boolean current = cc.getInclude().contains(Include.MINE); … … 216 291 ) 217 292 { 218 boolean current = cc.getInclude().contains(Include.SHARED); 219 sb.append("<option value=\"option:shared:").append(current ? "0" : "1").append("\""); 220 sb.append(" title=\"Show/hide items shared to me\">"); 221 sb.append(current ? "× " : " ").append("Shared to me\n"); 222 table.addHidden("shared", Boolean.toString(current)); 223 numOptions++; 293 if (!disableSharedTo) 294 { 295 boolean current = cc.getInclude().contains(Include.SHARED); 296 sb.append("<option value=\"option:shared:").append(current ? "0" : "1").append("\""); 297 sb.append(" title=\"Show/hide items shared to me\">"); 298 sb.append(current ? "× " : " ").append("Shared to me\n"); 299 table.addHidden("shared", Boolean.toString(current)); 300 numOptions++; 301 } 224 302 225 if (sc.getActiveProjectId() != 0 && !ProjectData.class.isAssignableFrom(dataClass) )303 if (sc.getActiveProjectId() != 0 && !ProjectData.class.isAssignableFrom(dataClass) && !disableInProject) 226 304 { 227 current = cc.getInclude().contains(Include.IN_PROJECT);305 boolean current = cc.getInclude().contains(Include.IN_PROJECT); 228 306 sb.append("<option value=\"option:inproject:").append(current ? "0" : "1").append("\""); 229 307 sb.append(" title=\"Show/hide items in current project\">"); … … 234 312 } 235 313 236 if (sc.hasPermission(Permission.READ, itemType) && 314 if (sc.hasPermission(Permission.READ, itemType) && !disableOthers && 237 315 ( 238 316 OwnableData.class.isAssignableFrom(dataClass) || -
branches/2.3.1/www/WEB-INF/table.tld
r2942 r3447 312 312 <rtexprvalue>true</rtexprvalue> 313 313 </attribute> 314 <attribute> 315 <name>disableremoved</name> 316 <required>false</required> 317 <rtexprvalue>true</rtexprvalue> 318 </attribute> 319 <attribute> 320 <name>disableownedby</name> 321 <required>false</required> 322 <rtexprvalue>true</rtexprvalue> 323 </attribute> 324 <attribute> 325 <name>disablesharedto</name> 326 <required>false</required> 327 <rtexprvalue>true</rtexprvalue> 328 </attribute> 329 <attribute> 330 <name>disableinproject</name> 331 <required>false</required> 332 <rtexprvalue>true</rtexprvalue> 333 </attribute> 334 <attribute> 335 <name>disableothers</name> 336 <required>false</required> 337 <rtexprvalue>true</rtexprvalue> 338 </attribute> 314 339 </tag> 315 340 -
branches/2.3.1/www/admin/diskusage/details/view_details.jsp
r3443 r3447 421 421 colspan="3" 422 422 onchange="presetOnChange()" 423 disableremoved="true" 423 424 /> 424 425 </tbl:columns>
Note: See TracChangeset
for help on using the changeset viewer.