|
|
|
@ -23,29 +23,33 @@ Drupal.behaviors.roblib_search_eds = {
|
|
|
|
|
if (typeof val.Items !== 'undefined') { |
|
|
|
|
items.push('<div class ="roblib-search-row" id="' + id + '">'); |
|
|
|
|
if (typeof val.Items.Ti !== 'undefined') { |
|
|
|
|
jQuery.each(val.Items.Ti, function (key2, val2) { |
|
|
|
|
jQuery.each(val.RecordInfo.BibEntity.Titles, function (key2, val2) { |
|
|
|
|
items.push('<div class="roblib-title eds">'); |
|
|
|
|
items.push('<a href="http://proxy.library.upei.ca/login?url=' + val.PLink + '&scope=site">' + val2.Data + '</a></div>'); |
|
|
|
|
items.push('<a href="http://proxy.library.upei.ca/login?url=' + val.PLink + '&scope=site">' + val2.TitleFull + '</a></div>'); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
val.pubType == 'Book' ? pubType = 'Print Book' : pubType = val.pubType; |
|
|
|
|
|
|
|
|
|
pubYear = val.RecordInfo.BibRelationships.IsPartOfRelationships["date"]; |
|
|
|
|
!pubYear ? pubYear = " " : pubYear = pubYear[0]["Y"]; |
|
|
|
|
|
|
|
|
|
if (typeof val.Items.TypPub !== 'undefined') { |
|
|
|
|
jQuery.each(val.Items.TypPub, function (key6, typpub) { |
|
|
|
|
strs = typpub.Data.split('; '); |
|
|
|
|
types = roblib_intersects(strs, ['<span class="highlight">Book</span>', '<span class="highlight">eBook</span>']); |
|
|
|
|
items.push('<div class="eds-type"><span class="eds-pubyear">' + pubYear + '</span> - ' + types.join(', ') + '</div>'); |
|
|
|
|
//strs = typpub.Data.split('; ');
|
|
|
|
|
//types = roblib_intersects(strs, ['<span class="highlight">Book</span>', '<span class="highlight">eBook</span>']);
|
|
|
|
|
items.push('<div class="eds-type"><span class="eds-pubyear">' + pubYear + '</span> - ' + pubType + '</div>'); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
items.push('<div class="eds-sor">'); |
|
|
|
|
roblib_authors = ""; |
|
|
|
|
var roblib_authors =[]; |
|
|
|
|
jQuery.each(val.RecordInfo.BibRelationships.HasContributorRelationships, function (key3, author) { |
|
|
|
|
roblib_authors += author.NameFull; |
|
|
|
|
roblib_authors.push(author.NameFull); |
|
|
|
|
}) |
|
|
|
|
roblib_authors = roblib_shorten(roblib_authors, 50, " "); |
|
|
|
|
|
|
|
|
|
items.push('<div class="eds-sor">'); |
|
|
|
|
roblib_authors = roblib_shorten(roblib_authors.join('; '), 50, " "); |
|
|
|
|
items.push(roblib_authors); |
|
|
|
|
items.push('</div>'); |
|
|
|
|
|
|
|
|
|
if (typeof val.Items.Src !== 'undefined') { |
|
|
|
|
jQuery.each(val.Items.Src, function (key4, source) { |
|
|
|
|
items.push('<div class="eds-src">' + source.Data + '</div>'); |
|
|
|
@ -56,9 +60,22 @@ Drupal.behaviors.roblib_search_eds = {
|
|
|
|
|
items.push('<div class="eds-pubinfo">' + pubinfo.Data + '</div>'); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
var url; |
|
|
|
|
!val.Items.URL ? url = " " : url = val.Items.URL[0].Data; |
|
|
|
|
if(url) { |
|
|
|
|
items.push('<div class="eds-url">' + url + '</div>'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
items.push('<div class="eds-db">' + val.DbLabel + '</div>'); |
|
|
|
|
|
|
|
|
|
if(pubType == "Print Book") { |
|
|
|
|
anNumber = val.An.split("."); |
|
|
|
|
if (anNumber[0] && anNumber[0] == 'upei') { |
|
|
|
|
catalogUrl = '<a href="http://islandpines.roblib.upei.ca/eg/opac/record/' + anNumber[1] + |
|
|
|
|
'">View in UPEI Catalogue</a>'; |
|
|
|
|
} |
|
|
|
|
if (catalogUrl) { |
|
|
|
|
items.push('<div class="eds-catalog-link">' + catalogUrl + '</div>'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
items.push('</div>'); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|