A few thoughts/comments:
1.) Before we should commit UI changes to the trunk, we should get the underlying infrastructure done -- I think standardization of the driver methods for renewal and addition of the item_id field should be the first steps. Perhaps somebody can get started on those issues while we discuss the UI details. Do any NCIP/Virtual people have comments on this? (Those are the two drivers that currently contain non-standardized renewal features).
2.) Rather than basing display of renewal functionality on a config file setting, would it be better to base it on the presence of a driver method to support renewal? That way, there's no chance of showing the option if it won't work, and programmers looking to enable it for their ILS will have a useful clue about where to start looking. You can look at the Hold.php module to see how method_exists is used for graceful degradation elsewhere in VuFind.
3.) Looks to me like the template is always going to display the message "Your Item was Successfully Renewed." Maybe I'm misreading something, but I'm guessing this is a typo or bug.
4.) Regarding your UI questions, I don't have any strong preferences apart from maintaining internal consistency whenever possible -- ideally, similar functions should look similar. I don't know that there's a good precedent here, though. If you go the checkbox route, a POST is probably better than a GET just because it can accommodate more information, though I don't realisitically expect somebody to renew so many books that they overflow the GET length limits. If you stick with individual links, GET may be preferable just for its simplicity. It may also be worth considering the possibility that some ILS drivers won't be able to handle renewal processing inside VuFind but may instead need to link into the legacy catalog (just speculating... but this is the case for holds, so it seems it might also affect renewals). In this case, checkboxes (and probably "renew all") would be impossible, but plain links could still work.
From: Osullivan L. [mailto:L.Osullivan@...]
Sent: Tuesday, September 22, 2009 7:40 AM
Subject: [VuFind-Tech] Renews
I'd like to submit the attached files for consideration for inclusion in the VuFind Trunk.
It a few simple mods to add a renewal function to the CheckedOut Items Page.
config.ini has a new "renew" field under Site which can be set to true or false
checkedout.php has two new sections - The first checks to see if the "renewall" get method has been selected and submits a request to a new RenewMyItems function in the driver with the 'all' option. The second checks to see if an item id has been posted and if so, it submits a request to the RenewMyItems function with the item id. A message is then assigned to the checkedout template with the response.
The item_id field has been added to the transList array (drivers will need to be updated to supply this) and a renewoption field which contains the config setting has also been assigned.
checkedout.tpl contains if statements which display the options to renew an individual item or all items if renew is set to true.
styles.css contains three new styles required for checkedout.tpl
Items for discussion:
1) Should both methods use Get or Post
2) Should a button be used for both methods
3) Should a tick box be added so that a user can select a group of items to renew
4) Should items have individual messages relating the success / failure of the renewal