Changeset 4588
- Timestamp:
- Oct 16, 2008, 12:13:47 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/src/docbook/admindoc/user_administration.xml
r4587 r4588 953 953 <simpara> 954 954 <guilabel>O</guilabel> 955 = Changeowner955 = Set owner 956 956 </simpara> 957 957 </listitem> -
trunk/doc/src/docbook/userdoc/webclient.xml
r4587 r4588 1206 1206 <listitem><simpara><guilabel>W</guilabel> = Write</simpara></listitem> 1207 1207 <listitem><simpara><guilabel>D</guilabel> = Delete</simpara></listitem> 1208 <listitem><simpara><guilabel>O</guilabel> = Changeowner</simpara></listitem>1208 <listitem><simpara><guilabel>O</guilabel> = Set owner</simpara></listitem> 1209 1209 <listitem><simpara><guilabel>P</guilabel> = Set permission</simpara></listitem> 1210 1210 </itemizedlist> … … 1332 1332 <title>Change owner of items</title> 1333 1333 <para> 1334 Sometime it may be necessary to change the owner of an item.1335 This can be done by everyone with < synopsis>Change owner</synopsis>1334 Sometimes it may be necessary to change the owner of an item. 1335 This can be done by everyone with <emphasis>Set owner</emphasis> 1336 1336 permission on the item. 1337 1337 For a user to have the rights to change owner of an item, the item must 1338 either be owned by or shared with < guilabel>Change owner</guilabel>1338 either be owned by or shared with <emphasis>Set owner</emphasis> 1339 1339 permission to the user . 1340 1340 See <xref linkend="webclient.items.share" />. … … 1342 1342 1343 1343 <para> 1344 An user with < synopsis>change owner</synopsis> permission can go to a list view1344 An user with <emphasis>Set owner</emphasis> permission can go to a list view 1345 1345 (or the single-item view), mark the checkboxes for the items to change owner of, 1346 and click on the <guibutton>Set owner</guibutton> button. 1347 A dialog appears where the new owner can be selected. By default the logged in 1348 user is selected in the drop-down list but another user can be choosen with the 1349 <guibutton>Select</guibutton> button. 1350 </para> 1346 and click on the <guibutton>Set owner</guibutton> button. 1347 A dialog window, like the screen-shot below, will appear. 1348 </para> 1349 <helptext external_id="ownership.configure" title="Change owner"> 1350 <variablelist> 1351 <varlistentry> 1352 <term><guilabel>New owner</guilabel></term> 1353 <listitem> 1354 <para> 1355 The user to be the new owner of selected item(s). 1356 By default the current user will be selected but other 1357 users can be picked from the <emphasis>currently used</emphasis> part of the drop-down 1358 list or by clicking on <guibutton>Select</guibutton>. 1359 </para> 1360 </listitem> 1361 </varlistentry> 1362 </variablelist> 1363 <para> 1364 Use the &gbSave; button to set the new owner 1365 or the &gbCancel; button to 1366 close the pop-up without saving. 1367 </para> 1368 </helptext> 1351 1369 <figure id="webclient.figures.selectowner"> 1352 1370 <title>Select a new owner</title> -
trunk/www/views/items/index.jsp
r4511 r4588 30 30 import="net.sf.basedb.core.BasicItem" 31 31 import="net.sf.basedb.core.SharedItem" 32 import="net.sf.basedb.core.OwnedItem" 32 33 import="net.sf.basedb.core.Removable" 33 34 import="net.sf.basedb.core.Permission" … … 216 217 redirect = "../../common/share/share.jsp?ID="+ID+"&item_type="+itemType.name()+"&subcontext="+subContext; 217 218 } 218 219 else if ("SetOwnerOfItems".equals(cmd)) 220 { 221 // Change owner of items selected on a list page 222 dc = sc.newDbControl(); 223 ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, pageContext, defaultContext); 224 Set<OwnedItem> items = new HashSet<OwnedItem>(); 225 Enumeration<String> names = (Enumeration<String>)request.getParameterNames(); 226 //User user = User.getById(dc, sc.getLoggedInUserId()); 227 while (names.hasMoreElements()) 228 { 229 String name = names.nextElement(); 230 if (name.startsWith("item:")) 231 { 232 Item itemType = Item.valueOf(name.substring(5)); 233 Integer[] ids = Values.getInt(request.getParameterValues(name)); 234 for (int itemId : ids) 235 { 236 BasicItem item = itemType.getById(dc, itemId); 237 if (item instanceof OwnedItem && item.hasPermission(Permission.SET_OWNER)) 238 { 239 items.add((OwnedItem)item); 240 } 241 } 242 } 243 } 244 dc.close(); 245 cc.setObject("OwnedItems", items); 246 redirect = "../../common/ownership/ownership.jsp?ID="+ID+"&item_type="+itemType.name(); 247 } 219 248 else 220 249 { -
trunk/www/views/items/list_items.jsp
r4511 r4588 155 155 Table.shareItems(submitPage, '<%=ID%>', formId, '<%=itemType.name()%>', 'ShareItems', /item:/); 156 156 } 157 function setOwner() 158 { 159 Table.setOwnerOfItems(submitPage, '<%=ID%>', formId, '<%=itemType.name()%>', 'SetOwnerOfItems', /item:/); 160 } 157 161 function configureColumns() 158 162 { … … 237 241 tooltip="Share the selected items" 238 242 disabled="<%=totalCount <= 0%>" 243 /> 244 <tbl:button 245 image="take_ownership.png" 246 onclick="setOwner()" 247 title="Set owner…" 248 tooltip="Change owner of the selected items" 239 249 /> 240 250 <tbl:button
Note: See TracChangeset
for help on using the changeset viewer.