Fix bug in copy summary display on detail page
authorJeff Godin <jgodin@tadl.org>
Mon, 16 Apr 2012 17:40:39 +0000 (13:40 -0400)
committerJeff Godin <jgodin@tadl.org>
Mon, 16 Apr 2012 17:40:39 +0000 (13:40 -0400)
Copy summaries with multiple libraries were having their
list of libraries overwritten by the last library in the
list.

Thanks to wjr for noting the issue. This fixes it by moving
a mis-placed curly brace.

Previous commit fixed search results but not record detail.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/web/opac/skin/tadlv3/xml/rdetail/rdetail_summary.xml

index d88fd59..fca753d 100644 (file)
                                     copycount = copycount + copySummaryObj[libname][loc][cn]['count'];
                                 }
                             }
+                            var libdiv = dojo.create('div');
+                            var libcontent = dojo.create('span', { "style": "font-weight: bold;" });
+                            var libtext = dojo.doc.createTextNode(copycount + ' available at ' + libname);
+                            libcontent.appendChild(libtext);
+                            libdiv.appendChild(libcontent);
+                            output.appendChild(libdiv);
                         }
-                        var libdiv = dojo.create('div');
-                        var libcontent = dojo.create('span', { "style": "font-weight: bold;" });
-                        var libtext = dojo.doc.createTextNode(copycount + ' available at ' + libname);
-                        libcontent.appendChild(libtext);
-                        libdiv.appendChild(libcontent);
-                        output.appendChild(libdiv);
                     }
                     // display the count of unavailable items, if any
                     if (count_copies_unavail > 0) {