function library_transaction_view in Library 6
Same name and namespace in other branches
- 5.2 library.pages.inc \library_transaction_view()
- 6.2 library.pages.inc \library_transaction_view()
- 7 library.pages.inc \library_transaction_view()
1 string reference to 'library_transaction_view'
- library_menu in ./
library.module - Implementation of hook_menu().
File
- ./
library.pages.inc, line 263 - Functions for generating page displays related to the library module
Code
function library_transaction_view($tid) {
$transaction = library_get_transaction_by_tid($tid);
if (isset($transaction)) {
$list[] = t("Date: @action_date", array(
'@action_date' => format_date($transaction->created, 'custom', 'M j, Y'),
));
$list[] = t("Item: " . l($transaction->item_name, 'node/' . $transaction->nid));
$list[] = t("Action: @action", array(
'@action' => $transaction->action_name,
));
$list[] = t("Patron: " . l($transaction->name_first . ' ' . $transaction->name_last, 'node/' . $transaction->patron_id));
if (!empty($transaction->duedate)) {
$list[] = t('Due Date: @due_date', array(
'@due_date' => format_date($transaction->duedate, 'custom', 'M j, Y'),
));
}
if (!empty($transaction->notes)) {
$list[] = $transaction->notes;
}
return theme('item_list', $list);
}
else {
drupal_set_message(t('No transaction found.'), array());
}
}