csv_parser($locum_config['format_special']['download'])); $no_avail_mat_codes = in_array($item['mat_code'], $locum->csv_parser($locum_config['format_special']['skip_avail'])); $location_label = $item['loc_code'] || ($item['loc_code'] != 'none') ? $locum_config['locations'][$item['loc_code']] : ''; $note_arr = unserialize($item['notes']); $series = trim($item['series']); if ($split_pos = max(strpos($series, ";"), strpos($series, ":"), strpos($series, "."), 0)) { $series = trim(substr($series, 0, $split_pos)); } // Construct the availabilty summary. if ($item_status['avail'] == 0 && $item_status['holds'] > 0) { $class = "holds"; $reqtext = "There are no copies available. " . $item_status['holds'] . " request" . ($item_status['holds'] == 1 ? '' : 's') . " on " . $item_status['total'] . ($item_status['total'] == 1 ? ' copy' : ' copies') . '.'; } else if ($item_status['avail'] == 0) { $class = "first"; $reqtext = "There are no copies available."; } else if($item_status['holds'] > 0) { $class = "holds"; $reqtext = "There " . ($item_status['avail'] == 1 ? 'is' : 'are') . " currently $item_status[avail] available and " . $item_status['holds'] . " request" . ($item_status['holds'] == 1 ? '' : 's') . " on " . $item_status['total'] . ' ' . ($item_status['total'] == 1 ? 'copy' : 'copies'); } else { $class = "avail"; $reqtext = "There " . ($item_status['avail'] == 1 ? 'is' : 'are') . " currently $item_status[avail] available."; } // Build the item availability array if (count($item_status['items'])) { foreach ($item_status['items'] as $copy_status) { if ($copy_status['avail'] > 0) { $copy_tag = ($copy_status['avail'] == 1) ? t('copy available') : t('copies available'); $status_msg = $copy_status['avail'] . ' ' . $copy_tag; } else if ($copy_status['due']) { $status_msg = t('Next copy due') . ' ' . date('n-j-Y', $copy_status['due']); } else { $status_msg = $copy_status['statusmsg']; } if (variable_get('sopac_multi_branch_enable', 0)) { $copy_status_array[] = array($copy_status['location'], $copy_status['callnum'], $locum_config['branches'][$copy_status['branch']], $status_msg); } else { $copy_status_array[] = array($copy_status['location'], $copy_status['callnum'], $status_msg); } } } if (sopac_prev_search_url(TRUE)) { print '
'; } ?>' . sopac_put_request_link($item['bnum'], 1, 0, $locum_config['formats'][$item['mat_code']]) . '
'; print 'No copies found.
'; } } if (count($item_status['orders'])) { print '' . implode("
", $item_status['orders']) . '
'; } ?>' . $note . '
'; } print ''; } ?> '; print 'No reviews have been written yet. You could be the first!
'; } print $rev_form ? $rev_form : 'Login to write a review of your own.
'; ?>