edition => 1,
online_loc => 1,
synopsis => 1,
+ physical_description => 1,
+ toc => 1,
copy_count => 1,
series => 1,
serials => 1,
my $publisher_xpath = "//mods:mods/mods:originInfo//mods:publisher[1]";
my $edition_xpath = "//mods:mods/mods:originInfo//mods:edition[1]";
my $abstract_xpath = "//mods:mods/mods:abstract";
-my $toc_xpath = "";
my $related_xpath = "";
my $online_loc_xpath = "(//mods:location/mods:url|//mods:location/mods:url/\@displayLabel)";
+my $physical_desc = "(//mods:physicalDescription/mods:form|//mods:physicalDescription/mods:extent|".
+ "//mods:physicalDescription/mods:reformattingQuality|//mods:physicalDescription/mods:internetMediaType|".
+ "//mods:physicalDescription/mods:digitalOrigin)";
+my $toc_xpath = "//mods:tableOfContents";
my $xpathset = {
for my $arr (@value) {
if( ref($arr) ) {
$data->{$class}->{$type} = shift @$arr;
- $data->{$class}->{$type} .= shift @$arr if (lc($data->{$class}->{$type}) =~ /^the|an?/o);
+ $data->{$class}->{$type} .= ' : ' . shift @$arr if (lc($data->{$class}->{$type}) =~ /^the|an?/o);
for my $t (@$arr) {
$data->{$class}->{$type} .= ' : ' if ($data->{$class}->{$type} =~ /\w\s*$/o);
$data->{$class}->{$type} .= " $t";
($self->{master_doc}->{synopsis}) =
$self->get_field_value( $mods, $abstract_xpath );
+ $self->{master_doc}->{physical_description} = [];
+ push(@{$self->{master_doc}->{physical_description}},
+ $self->get_field_value( $mods, $physical_desc ) );
+ $self->{master_doc}->{physical_description} =
+ join( ' ', @{$self->{master_doc}->{physical_description}});
+
+ ($self->{master_doc}->{toc}) = $self->get_field_value($mods, $toc_xpath);
+
}
$record->online_loc($perl->{online_loc});
$record->synopsis($perl->{synopsis});
+ $record->physical_description($perl->{physical_description});
+ $record->toc($perl->{toc});
+
+ use Data::Dumper;
+ warn Dumper $self->{master_doc};
$self->{master_doc} = undef;
return $record;
var callnumberCache = {};
var rdetailLocalOnly = true;
var globalCNCache = {};
+var localTOC;
var nextContainerIndex;
G.ui.rdetail.edition.appendChild(text(record.edition()));
G.ui.rdetail.pubdate.appendChild(text(record.pubdate()));
G.ui.rdetail.publisher.appendChild(text(record.publisher()));
+ $('rdetail_physical_desc').appendChild(text(record.physical_description()));
G.ui.rdetail.tor.appendChild(text(record.types_of_resource()[0]));
setResourcePic( G.ui.rdetail.tor_pic, record.types_of_resource()[0]);
G.ui.rdetail.abstr.appendChild(text(record.synopsis()));
-
$('rdetail_place_hold').setAttribute(
'href','javascript:holdsDrawWindow("'+record.doc_id()+'");');
if(rdetailTocFetched) break;
unHideMe($('rdetail_extras_loading'));
rdetailTocFetched = true;
- var req = new Request(FETCH_TOC, cleanISBN(record.isbn()));
- req.callback(rdetailShowTOC);
- req.send();
+ if(localTOC) {
+ hideMe($('rdetail_extras_loading'));
+ $('rdetail_toc_div').innerHTML = record.toc().replace(/--/g, "<br/>");
+ } else {
+ var req = new Request(FETCH_TOC, cleanISBN(record.isbn()));
+ req.callback(rdetailShowTOC);
+ req.send();
+ }
break;
case "marc":
function rdetailHandleAddedContent(r) {
var resp = r.getResultObject();
if( resp.Review == 'true' ) unHideMe($('rdetail_reviews_link'));
- if( resp.TOC == 'true' ) unHideMe($('rdetail_toc_link'));
+ if( resp.TOC == 'true' ) {
+ unHideMe($('rdetail_toc_link'));
+ } else {
+ if( record.toc() ) {
+ localTOC = true;
+ unHideMe($('rdetail_toc_link'));
+ }
+ }
}
var rdetailNotesTemplate;
function rdetailDrawNotes(r) {
var notes = r.getResultObject();
+ if(!notes) return;
var tbody = $('rdetail_notes_tbody');
if(!rdetailNotesTemplate)
<tbody id='rdetail_details_tbody'>
<tr>
- <td id='rdetail_image_cell' rowspan='8'><img id='rdetail_image'> </img></td>
+ <td id='rdetail_image_cell' rowspan='9'><img id='rdetail_image'> </img></td>
<td nowrap='nowrap' class='rdetail_desc'>&rdetail.detailMain.title;</td>
<td class='rdetail_item' id='rdetail_title'> </td>
</tr>
<td class='rdetail_item' id='rdetail_publisher'> </td>
</tr>
+
+ <tr>
+ <td nowrap='nowrap' class='rdetail_desc'>Physical Description</td>
+ <td class='rdetail_item' id='rdetail_physical_desc'> </td>
+ </tr>
+
<tr>
<td nowrap='nowrap' class='rdetail_desc'>&rdetail.detailMain.tor;</td>
<td class='rdetail_item'>