Warning: This page has not been updated in over over a year and may be outdated or deprecated.
expanded_driver_func
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
expanded_driver_func [2010/02/11 12:14] – l.osullivan | expanded_driver_func [2010/02/11 12:21] – l.osullivan | ||
---|---|---|---|
Line 5: | Line 5: | ||
**%%https:// | **%%https:// | ||
+ | |||
+ | |||
+ | |||
===== Purpose ===== | ===== Purpose ===== | ||
- | To create a flexible and gracefully degrading solution for the Item Loan Renewals, Placing Hold and cancelling Holds. | + | To create a flexible and gracefully degrading solution for Item Loan Renewals, Placing Hold and cancelling Holds. |
- | // | + | //**NB:**// |
- | driver.ini refers to the ILS-specific configuration file found in the config directory. E.g. voyager.ini | + | //driver.ini refers to the ILS-specific configuration file found in the config directory. E.g. voyager.ini// |
- | driver.php refers to the ILS-specific driver e.g. Voyager.php// | + | //driver.php refers to the ILS-specific driver e.g. Voyager.php// |
===== New Functions ===== | ===== New Functions ===== | ||
Line 652: | Line 655: | ||
If enabled, the Cancel Holds method allows vufind users to cancel their holds. If it is not enabled, then none of the functionality is displayed. | If enabled, the Cancel Holds method allows vufind users to cancel their holds. If it is not enabled, then none of the functionality is displayed. | ||
+ | |||
Line 659: | Line 663: | ||
[cancelHolds] | [cancelHolds] | ||
+ | |||
enabled = true | enabled = true | ||
+ | |||
link = item_id: | link = item_id: | ||
+ | |||
opacurl = %%http:// | opacurl = %%http:// | ||
+ | |||
The enabled field determines whether or not Cancel Holds is in use. | The enabled field determines whether or not Cancel Holds is in use. | ||
Line 898: | Line 906: | ||
{/if} | {/if} | ||
</ | </ | ||
+ | |||
==== New Smarty Variables / Text ==== | ==== New Smarty Variables / Text ==== | ||
Cancel All Holds | Cancel All Holds | ||
+ | |||
Cancel Selected Holds | Cancel Selected Holds | ||
+ | |||
Cancel Hold | Cancel Hold | ||
Line 919: | Line 930: | ||
If enabled, the Renew Items method allows vufind users to renew their transactions. If it is not enabled, then none of the functionality is displayed. | If enabled, the Renew Items method allows vufind users to renew their transactions. If it is not enabled, then none of the functionality is displayed. | ||
+ | |||
==== Process ==== | ==== Process ==== | ||
Line 924: | Line 936: | ||
conf/ | conf/ | ||
- | Renewals] | + | [Renewals] |
enabled = true | enabled = true | ||
+ | |||
link = item_id | link = item_id | ||
- | opacurl = http:// | + | |
+ | opacurl = %%http:// | ||
The enabled field determines whether or not Renewals is in use. | The enabled field determines whether or not Renewals is in use. | ||
Line 941: | Line 956: | ||
// Is Renewing Items allowed? | // Is Renewing Items allowed? | ||
$this-> | $this-> | ||
+ | |||
==== CheckedOut.php ==== | ==== CheckedOut.php ==== | ||
Line 946: | Line 962: | ||
CheckedOut.php begins as usual by confirming that the driver is available and that the user is logged | CheckedOut.php begins as usual by confirming that the driver is available and that the user is logged | ||
+ | <code | ||
// Get My Transactions | // Get My Transactions | ||
if ($this-> | if ($this-> | ||
Line 952: | Line 969: | ||
if (PEAR:: | if (PEAR:: | ||
PEAR:: | PEAR:: | ||
+ | </ | ||
It then proceeds to get a list of user transactions. All the data assigned by the driver (duedate and item_id in this instance) is stored in an array with a key of “ils_details” so that system specific values will not have to be added to CheckedOut.php: | It then proceeds to get a list of user transactions. All the data assigned by the driver (duedate and item_id in this instance) is stored in an array with a key of “ils_details” so that system specific values will not have to be added to CheckedOut.php: | ||
- | + | ||
+ | < | ||
$result = $this-> | $result = $this-> | ||
if (!PEAR:: | if (!PEAR:: | ||
Line 969: | Line 988: | ||
| | ||
} | } | ||
+ | </ | ||
Once the transaction list has been established, | Once the transaction list has been established, | ||
+ | < | ||
if($this-> | if($this-> | ||
| | ||
Line 1010: | Line 1031: | ||
} | } | ||
} | } | ||
+ | </ | ||
If renewals are enabled, it then checks to see if it has received any POST data. If it has, it adds it to the $gatheredDetails[' | If renewals are enabled, it then checks to see if it has received any POST data. If it has, it adds it to the $gatheredDetails[' | ||
+ | < | ||
// Rewew Items | // Rewew Items | ||
| | ||
Line 1033: | Line 1056: | ||
$interface-> | $interface-> | ||
} | } | ||
+ | </ | ||
In this instance, the $_POST data is an array of item ids. The driver returns an array with two main keys. The first, “details” contains an array of details for each renew attempt. In this instance, that includes a Boolean success key (true or false), the item_id and a sysmessage key which holds any message returned by the system (e.g. Items with hold requests may not be renewed.) The second main key is id_array which contains a list of all the item_ids for which a renewal has been attempted. It is included for convenient use in the checkedout template. | In this instance, the $_POST data is an array of item ids. The driver returns an array with two main keys. The first, “details” contains an array of details for each renew attempt. In this instance, that includes a Boolean success key (true or false), the item_id and a sysmessage key which holds any message returned by the system (e.g. Items with hold requests may not be renewed.) The second main key is id_array which contains a list of all the item_ids for which a renewal has been attempted. It is included for convenient use in the checkedout template. | ||
- | checkedout.tpl | + | ==== checkedout.tpl |
checkedout.tpl first determines if vufind is being used to renew items. If it is, it will create two forms which POST data back to checkedout.php. The first renews all items and uses information in the ils_details array assigned by the driver: | checkedout.tpl first determines if vufind is being used to renew items. If it is, it will create two forms which POST data back to checkedout.php. The first renews all items and uses information in the ils_details array assigned by the driver: | ||
+ | < | ||
{if $renewOption == " | {if $renewOption == " | ||
<form name=" | <form name=" | ||
Line 1056: | Line 1081: | ||
<form name=" | <form name=" | ||
{/if} | {/if} | ||
+ | </ | ||
The second uses checkboxes to give users the option of selecting individual items to renew. It is generated as part of the transaction list operation. | The second uses checkboxes to give users the option of selecting individual items to renew. It is generated as part of the transaction list operation. | ||
+ | < | ||
<ul class=" | <ul class=" | ||
{foreach from=$transList item=resource name=" | {foreach from=$transList item=resource name=" | ||
Line 1138: | Line 1165: | ||
{/foreach} | {/foreach} | ||
</ul> | </ul> | ||
+ | </ | ||
checkedout.tpl finally determines if vufind is being to renew items, supplies a submit button and finishes the form. | checkedout.tpl finally determines if vufind is being to renew items, supplies a submit button and finishes the form. | ||
- | | + | |
+ | < | ||
{if $renewOption == " | {if $renewOption == " | ||
<br /> | <br /> | ||
Line 1146: | Line 1175: | ||
</ | </ | ||
{/if} | {/if} | ||
+ | </ | ||
==== New Smarty Variables / Text ==== | ==== New Smarty Variables / Text ==== |
expanded_driver_func.txt · Last modified: 2014/06/13 13:14 by 127.0.0.1