From 142ec2f42021a38c3bdf55714c3c91177b542c98 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Sat, 19 Jan 2013 14:28:06 -0500 Subject: [PATCH] TPAC: Fix series display for multiple series fields This commit adds one test record, "Harry Potter and the Goblet of Fire", which contains multiple series fields. TPAC would display the series fields in a purely additive fashion as the variable was not reset after each field. Now we initialize the series var for each new series field we retrieve, fixing the display problem. Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- Open-ILS/src/templates/opac/parts/record/series.tt2 | 2 +- Open-ILS/tests/datasets/sql/bibs_graphic_880.sql | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/record/series.tt2 b/Open-ILS/src/templates/opac/parts/record/series.tt2 index 7cdf1b1323..8b29b6bb60 100644 --- a/Open-ILS/src/templates/opac/parts/record/series.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/series.tt2 @@ -8,6 +8,7 @@ BLOCK render_series; FOR node IN ctx.marc_xml.findnodes('//*[@tag="' _ tag _ '"]'); all_terms = []; graphics = []; + series = ''; FOR subfield IN node.childNodes; NEXT UNLESS subfield.nodeName == "subfield"; code = subfield.getAttribute('code'); @@ -32,7 +33,6 @@ BLOCK render_series; series = series _ '
' _ link _ '
'; END; results.push(series); - END; END; FOR entry IN results; diff --git a/Open-ILS/tests/datasets/sql/bibs_graphic_880.sql b/Open-ILS/tests/datasets/sql/bibs_graphic_880.sql index a6c3f09e2d..6d27597dab 100644 --- a/Open-ILS/tests/datasets/sql/bibs_graphic_880.sql +++ b/Open-ILS/tests/datasets/sql/bibs_graphic_880.sql @@ -6,5 +6,6 @@ INSERT INTO marcxml_import (tag, marc) VALUES (:bib_tag, '01964cam a2200397Ia 45002802833CONIFER20110408114902.0m d cr unu||||||||090106s1979 gw ob 001 0 eng d9780387095141 (New York)0387095144 (New York)9783540095149 (Berlin)3540095144 (Berlin)(OCoLC)ocn297188498SPLNMSPLNMGW5XECaOWAQA3.L28 no. 727QA377$1880-01Saitō, Yoshimi.Spectral representations for Schrödinger operators with long-range potentials[electronic resource] /Yoshimi Saitō.Berlin ;New York :Springer-Verlag,1979.148 p. ;25 cm.Lecture notes in mathematics,0075-8434 ;727Includes bibliographical references (p. [141]-144) and index.Access restricted to users with a valid University of Windsor ID ; Ontario Council of University Libraries ; Springer Science+Business Media, LLC.OWADifferential equations, Elliptic.SpringerSP(before 2005)_2012_11_3349.mrc.2012_11_5Schrödinger operator.Scattering (Mathematics)Spectral theory (Mathematics)Print version:Saitō, Yoshimi.Spectral representations for Schrödinger operators with long-range potentials.Berlin ; New York : Springer-Verlag, 19790387095144(DLC) 79015958(OCoLC)5101219Lecture notes in mathematics (Springer-Verlag) ;727.http://ezproxy.uwindsor.ca/login?url=http://books.scholarsportal.info/viewdoc.html?id=/ebooks/ebooks2/springer/2011-04-14/2/3540095144Available OnlineWINDSYShttp://ezproxy.uwindsor.ca/login?url=http://dx.doi.org/10.1007/BFb0070997Available OnlineWINDSYS100-01/$1齋藤, 義實297188498OCoLC2802833biblio'), (:bib_tag, '02921nam a2200625Ia 4500892053CONIFER20081125080111.0m d cr cn| 081017s2006 ja a sb 001 0 eng d97844312877594431287752(OCoLC)ocn262693560(OCoLC)262693560978-4-431-28774-2Springerhttp://www.springerlink.comGW5XEengGW5XEMAINQP123.B68 2006eb2006 G-560WF 102I608b 2006$1QPlcco612.222880-01Breathing, feeding, and neuroprotection[electronic resource] /I . Homma, S. Shioda, eds.880-02Tokyo ;New York :Springer,c2006.xvi, 148 p. :ill. ;24 cm.Includes bibliographical references and index.Central regulation of breathing -- Neurogeneration and neuroprotection -- Brain functions in health and disease -- Brain functions by the Dipole Tracing method.Electronic reproduction.New York :Springer,2008.Mode of access: World Wide Web.System requirements: Web browser.Title from title screen (viewed on Oct. 10, 2008).Access may be restricted to users at subscribing institutions.RespirationRegulation.Blood-brain barrier.Neurophysiology.Respiratory MechanicsphysiologyCongresses.Respiratory TransportphysiologyCongresses.Biological ClocksCongresses.Blood-Brain BarrierinnervationCongresses.Brain StemphysiologyCongresses.Nerve RegenerationphysiologyCongresses.880-03Nō.jlabsh/3Electronic books.local880-04Homma, Ikuo.880-00Shioda, S.(Seiji)SpringerLink (Online service)Original44312877449784431287742(DLC) 2006923431(OCoLC)69982830Available online from SpringerLinkhttp://librweb.laurentian.ca/login?url=http://dx.doi.org/10.1007/4-431-28775-2LUSYSAvailable online from ScholarsPortalhttp://librweb.laurentian.ca/login?url=http://resolver.scholarsportal.info/isbn/9784431287759LUSYS245-01/$1Breathing,Feeding,and,Neuroprotection/[electronic resource]I。Homma;S。Shioda[編]。260-02/$1[東京]:[シュプリンガー・フェアラーク東京],c2006。650-03/$1jlabsh/3700-00/$1本間生夫700-04/$1塩田清二92ONTCL1a892053Sirsi_Auto892053biblio'), (:bib_tag, '02737nam a2200589Ia 4500925636CONIFER20081125083147.0m d cr cn| 081017s2002 gw a sb 100 0 eng d 9783540461456 3540461450(OCoLC)ocn262687400(OCoLC)262687400978-3-540-44123-6Springerhttp://www.springerlink.comGW5XEengGW5XEMAINQA76.9.D37D396 2002eb$1Qlcco658.4/038/028557422DaWaK 2002(2002 :Aix-en-Provence, France)Data warehousing and knowledge discovery[electronic resource] :4th international conference, DaWaK 2002, Aix-en-Provence, France, September 4-6, 2002 : proceedings /Yahiko Kambayashi, Werner Winiwarter, Masatoshi Arikawa (eds.).Berlin ;New York :Springer,2002.xiii, 337 p. :ill. ;24 cm.Lecture notes in computer science ;2114Includes bibliographical references.Electronic reproduction.New York :Springer,2008.Mode of access: World Wide Web.System requirements: Web browser.Title from title screen (viewed on Oct. 10, 2008).Access may be restricted to users at subscribing institutions.Data warehousingCongresses.Database searchingCongresses.BANCO DE DADOS (CONGRESSOS)larpcalREDES E COMUNICAÇÃO DE DADOS (CONGRESSOS)larpcalRECUPERAÇÃO DA INFORMAÇÃO (CONGRESSOS)larpcalData-analyse.gttKennismanagement.gttData warehouse.gttBases de donnéesInterrogationCongrès.Entrepôts de données (Informatique)Congrès.Electronic books.localKambayashi, Y.Winiwarter, Werner.880-01Arikawa, Masatoshi.SpringerLink (Online service)Original35404412399783540441236(DLC) 2002030275(OCoLC)50291185Available online from SpringerLinkhttp://librweb.laurentian.ca/login?url=http://dx.doi.org/10.1007/3-540-46145-0LUSYShttp://link.springer-ny.com/link/service/series/0558/tocs/t2454.htmRestricted to Springer LINK subscribersAvailable online from Scholars Portalhttp://librweb.laurentian.ca/login?url=http://resolver.scholarsportal.info/isbn/9783540461456LUSYS700-01/$1有川, 正俊92ONTCL1a925636Sirsi_Auto925636biblio'), -(:bib_tag, '02145cam a2200505Ia 4500964180MAnMC20061016090635.0060622s2005 cc a 000 0 chi d7801885120 :$7.35(OCoLC)70159732BKLBKLBKLACTRANOGchiengNOGA$1880-01Cai, Zhizhong,1948-880-02Laozi shuo I : Zhi zhe de di yu =the Dao speaks I : the whispers of wisdom /Cai Zhizhong zhu ; Brian Bruya yi.880-03Zhi zhe de di yuDao speaks IWhispers of wisdom880-04Di 1 ban.880-05Beijing Shi :Xian dai chu ban she,2005.4, 93 p. :chiefly ill. ;21 cm.880-06Cai Zhizhong man hua zhong ying wen ban.880-07Laozi.Dao de jing.880-08LaoziCriticism and interpretation.880-09LaoziCaricatures and cartoons.Chinese language materials.Philosophy, TaoistCaricatures and cartoons.TaoismComic books, strips, etc.100-01/$1蔡志忠,1948-245-02/$1老子说 I : 智者的低语 =the Dao speaks I : the whispers of wisdom /蔡志忠著 ; Brian Bruya 译.246-03/$1智者的低语250-04/$1第1版.260-05/$1北京市 :现代出版社,2005.440-06/$1蔡志忠漫画中英文版.600-07/$1老子.道德經.600-08/$1老子Criticism and interpretation.600-09/$1老子Caricatures and cartoons.100701106101601-0C0NOGnobcw 10-16-2006gaaagplMBIMBIStacksC 299.5 C123LA V.1book3186700219120812.00nonreferenceholdablecirculatingvisibleAvailablegaaagplMBIMBIStacksC 299.5 C123LA V.1book3186700218768512.00nonreferenceholdablecirculatingvisibleAvailable964180AUTOGEN964180biblio') +(:bib_tag, '02145cam a2200505Ia 4500964180MAnMC20061016090635.0060622s2005 cc a 000 0 chi d7801885120 :$7.35(OCoLC)70159732BKLBKLBKLACTRANOGchiengNOGA$1880-01Cai, Zhizhong,1948-880-02Laozi shuo I : Zhi zhe de di yu =the Dao speaks I : the whispers of wisdom /Cai Zhizhong zhu ; Brian Bruya yi.880-03Zhi zhe de di yuDao speaks IWhispers of wisdom880-04Di 1 ban.880-05Beijing Shi :Xian dai chu ban she,2005.4, 93 p. :chiefly ill. ;21 cm.880-06Cai Zhizhong man hua zhong ying wen ban.880-07Laozi.Dao de jing.880-08LaoziCriticism and interpretation.880-09LaoziCaricatures and cartoons.Chinese language materials.Philosophy, TaoistCaricatures and cartoons.TaoismComic books, strips, etc.100-01/$1蔡志忠,1948-245-02/$1老子说 I : 智者的低语 =the Dao speaks I : the whispers of wisdom /蔡志忠著 ; Brian Bruya 译.246-03/$1智者的低语250-04/$1第1版.260-05/$1北京市 :现代出版社,2005.440-06/$1蔡志忠漫画中英文版.600-07/$1老子.道德經.600-08/$1老子Criticism and interpretation.600-09/$1老子Caricatures and cartoons.100701106101601-0C0NOGnobcw 10-16-2006gaaagplMBIMBIStacksC 299.5 C123LA V.1book3186700219120812.00nonreferenceholdablecirculatingvisibleAvailablegaaagplMBIMBIStacksC 299.5 C123LA V.1book3186700218768512.00nonreferenceholdablecirculatingvisibleAvailable964180AUTOGEN964180biblio'), +(:bib_tag, '01483cam a2200361Ia 4500800255MAnMC20110603140152.0020801r20022000nyua c 000 1 eng d0439139600 (pbk.) :$8.99(OCoLC)ocm50279560OCOOCOMRQUtOrBLWMRQAJ(MVLC)442287Rowling, J. K.Harry Potter and the goblet of fire /by J.K. Rowling ; illustrations by Mary GrandPré.New York :Scholastic,2002.xi, 734 p. :ill. ;19 cm.Year four at HogwartsHarry Potter: Year four at HogwartsSequel to: Harry Potter and the prisoner of Azkaban.Fourteen-year-old Harry Potter joins the Weasleys at the Quidditch World Cup, then enters his fourth year at Hogwarts Academy where he is mysteriously entered in an unusual contest that challenges his wizarding skills, friendships and character, amid signs that an old enemy is growing stronger.Hogwarts School of Witchcraft and Wizardry (Imaginary place)Fiction.WizardsFiction(MVLC)373715MagicFiction(MVLC)398525SchoolsFiction(MVLC)379065EnglandFiction.(MVLC)486319Fantasy fictionJuvenile fiction.gsafdFantasy fictionJuvenile fiction.GrandPré, Mary(MVLC)176539Rowling, J. K.Year ... at HogwartsHarry Potter: Year four at HogwartsX0MRQ800255AUTOGEN800255biblio') ; -- 2.43.2