Update Catalog Stats report: / Remove lccn/loc filter, which seems to conflate marc21...
authorRyan Higgins <rch@liblime.com>
Sun, 25 May 2008 20:54:21 +0000 (15:54 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 27 May 2008 12:33:32 +0000 (07:33 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tmpl
reports/catalogue_stats.pl

index e92e719..eb81d0f 100644 (file)
                        </tr>
                </thead>
                <tbody>
-                       <!-- TMPL_IF Name="hasdewey" -->
-                               <tr class="hilighted">
-                                       <td>Dewey Classification</td>
-                                       <td><input type="radio" name="Line" value="dewey" /></td>
-                                       <td><input type="radio" name="Column" value="dewey" /></td>
-                                       <td> <label for="deweyFrom">From</label> <input type="text" id="deweyFrom" name="Filter" /> <label for="deweyTo">To</label> <input type="text" id="deweyTo" name="Filter" /></td>
-                               </tr>
-                               <tr class="hilighted">
-                                       <td>&nbsp;</td>
-                                       <td colspan="2"><select name="deweydigits" id="deweydigits">
-                                               <option value=""> </option>
-                                               <option value ="1">1</option>
-                                               <option value ="2">2</option>
-                                               <option value ="3">3</option>
-                                               <option value ="4">4</option>
-                                               <option value ="5">5</option>
-                                               </select>
-                                               <label for="deweydigits">digits</label> 
-                                       </td>
-                                       <td>&nbsp;</td>
-                               </tr>
-                               <!-- TMPL_ELSE -->
-                               <tr><td colspan="4"><input type="hidden" name="Filter" /> <input type="hidden" name="Filter" /></td></tr>
-                       <!-- /TMPL_IF -->
+                               <input type="hidden" name="Filter" /> <input type="hidden" name="Filter" />
                        <!-- TMPL_IF Name="haslccn" -->
-                               <!--TMPL_IF Name="hlghtlccn"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
+                                       <tr>
                                        <td>LoC Classification</td>
                                        <td><input type="radio" name="Line" value="lccn" /></td>
                                        <td><input type="radio" name="Column" value="lccn" /></td>
                                        <td> <label for="locFrom">From</label> <input type="text" name="Filter" id="locFrom" /> <label for="locTo">To</label> <input type="text" name="Filter" id="locTo" /></td>
                                </tr>
-                               <!--TMPL_IF Name="hlghtlccn"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
+                                       <tr>
                                        <td>&nbsp;</td>
                                        <td colspan="2"><select name="lccndigits" id="lccndigits">
                                                <option value=""> </option>
                                        <td>&nbsp;</td>
                                </tr>
                                <!-- TMPL_ELSE -->
-                               <tr><td colspan="4"><input type="hidden" name="Filter" /> <input type="hidden" name="Filter" /></td></tr>
+                               <input type="hidden" name="Filter" /> <input type="hidden" name="Filter" />
                        <!-- /TMPL_IF  -->
                        <!-- TMPL_IF Name="hascote" -->
-                               <!--TMPL_IF Name="hlghtcote"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
-                                       <td>Callnumber</td>
+                         <tr>
+                                       <td>Koha Full Call Number</td>
                                        <td><input type="radio" name="Line" value="items.itemcallnumber" /></td>
                                        <td><input type="radio" name="Column" value="items.itemcallnumber" /></td>
                                        <td><label for="callnoFrom">From</label> <input type="text" name="Filter" id="callnoFrom" /> <label for="callnoTo">To</label> <input type="text" name="Filter" id="callnoTo" /></td>
                                </tr>
-                               <!--TMPL_IF Name="hlghtcote"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
+                        <tr>
                                        <td>&nbsp;</td>
                                        <td colspan="2"><select name="cotedigits" id="cotedigits">
                                                <option value=""> </option>
                                <!-- TMPL_ELSE -->
                                <tr><td colspan="4"><input type="hidden" name="Filter" /> <input type="hidden" name="Filter" /></td></tr>
                        <!-- /TMPL_IF -->
-                       <!--TMPL_IF Name="hglghtDT"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
+                        <tr>
                                <td>Item Type</td>
                                <td><input type="radio" name="Line" value="itemtype" /></td>
                                <td><input type="radio" name="Column" value="itemtype" /></td>
                                        </select>
                                </td>
                        </tr>
-                       <!--TMPL_IF Name="hglghtPub"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
+                        <tr>
                                <td>Publisher</td>
                                <td><input type="radio" name="Line" value="publishercode" /></td>
                                <td><input type="radio" name="Column" value="publishercode" /></td>
                                <td><input type="text" name="Filter" /></td>
                        </tr>
-                       <!--TMPL_IF Name="hglghtPY"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
+                       <tr>
                                <td>Publication Year</td>
                                <td><input type="radio" name="Line" value="publicationyear" /></td>
                                <td><input type="radio" name="Column" value="publicationyear" /></td>
                                <td><label for="pubyearFrom">From</label> <input type="text" name="Filter" id="pubyearFrom" /> <label for="pubyearTo">To</label> <input type="text" name="Filter" id="pubyearTo" /></td>
                        </tr>
-                       <!--TMPL_IF Name="hglghtHB"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
+                       <tr>
                                <td>Home Branch</td>
                                <td><input type="radio" name="Line" value="items.homebranch" /></td>
                                <td><input type="radio" name="Column" value="items.homebranch" /></td>
                                        </select>
                                </td>
                        </tr>
-                       <!--TMPL_IF Name="hglghtLOC"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
-                               <td>Location</td>
+                       <tr>
+                               <td>Shelving Location</td>
                                <td><input type="radio" name="Line" value="items.location" /></td>
                                <td><input type="radio" name="Column" value="items.location" /></td>
                                <td><select name="Filter" id="location">
                                        </select>
                                </td>
                        </tr>
-                       <tr class="hilighted">
+                       <tr>
                                <td>Collection</td>
                                <td><input type="radio" name="Line"   value="items.ccode" /></td>
                                <td><input type="radio" name="Column" value="items.ccode" /></td>
index b1f8a44..485dca4 100755 (executable)
@@ -121,47 +121,52 @@ if ($do_it) {
 #                              -values   => \@select,
 #                              -size     => 1,
 #                              -multiple => 0 );
-       
-       $req = $dbh->prepare( "select count(lccn) from biblioitems ");
-       $req->execute;
-#      undef @select;
-#      push @select,"";
-       my $haslccn;
-       my $hlghtlccn;
-       while (my ($value) =$req->fetchrow) {
-               $hlghtlccn = !($hasdewey);
-               $haslccn =1 if (($value>2) and (! $haslccn));
-               $count++ if (($value) and (! $haslccn));
+
+# (rch) biblioitems.lccn is mapped to lccn MARC21 010$a in default framework.
+# This is not the LC Classification.  It's the Control Number.
+# So I'm just going to remove this bit.  Call Number is handled in itemcallnumber.
+#
+       my $haslccn = 0;
+#      $req = $dbh->prepare( "select count(lccn) from biblioitems ");
+#      $req->execute;
+#      my $hlghtlccn;
+#      while (my ($value) =$req->fetchrow) {
+#              $hlghtlccn = !($hasdewey);
+#              $haslccn =1 if (($value>2) and (! $haslccn));
+#              $count++ if (($value) and (! $haslccn));
 #              push @select, $value;
-       }
+#      }
 #      my $CGIlccn=CGI::scrolling_list( -name     => 'Filter',
 #                              -id => 'Filter',
 #                              -values   => \@select,
 #                              -size     => 1,
 #                              -multiple => 0 );
-       
-       $req = $dbh->prepare("select count(itemcallnumber) from items");
-       $req->execute;
-#      undef @select;
-#      push @select,"";
-       my $hascote;
-       my $hlghtcote;
-       while (my ($value) =$req->fetchrow) {
-               $hascote =1 if (($value>2) and (! $hascote));
-               $count++ if (($value) and (! $hascote));
-               $hlghtcote = (($hasdewey) and ($haslccn)) or (!($hasdewey) and !($haslccn));
-#              push @select, $value;
-       }
+
+# No need to test for data here.  If you don't have itemcallnumbers, you probably know it.
+# FIXME: Hardcoding to 5 chars on itemcallnum. 
+#
+        my $hascote = 1;
+        my $highcote = 5;
+
+#      $req = $dbh->prepare("select count(itemcallnumber) from items");
+#      $req->execute;
+#      my $hlghtcote;
+#      while (my ($value) =$req->fetchrow) {
+#              $hascote =1 if (($value>2) and (! $hascote));
+#              $count++ if (($value) and (! $hascote));
+#              $hlghtcote = (($hasdewey) and ($haslccn)) or (!($hasdewey) and !($haslccn));
+##             push @select, $value;
+#      }
 #      my $CGIcote=CGI::scrolling_list( -name     => 'Filter',
 #                              -id => 'Filter',
 #                              -values   => \@select,
 #                              -size     => 1,
 #                              -multiple => 0 );
-       my $hglghtDT  = ++$count % 2;
-       my $hglghtPub = ++$count % 2;
-       my $hglghtPY  = ++$count % 2;
-       my $hglghtHB  = ++$count % 2;
-       my $hglghtLOC = ++$count % 2;
+#      my $hglghtDT  = ++$count % 2;
+#      my $hglghtPub = ++$count % 2;
+#      my $hglghtPY  = ++$count % 2;
+#      my $hglghtHB  = ++$count % 2;
+#      my $hglghtLOC = ++$count % 2;
 #      warn "highlightDT "  .$hglghtDT;
 #      warn "highlightPub " .$hglghtPub;
 #      warn "highlightPY "  .$hglghtPY;
@@ -219,16 +224,16 @@ if ($do_it) {
 #                                      CGIFromDeweyClass => $CGIdewey,
 #                                      CGIToDeweyClass => $CGIdewey,
                                        haslccn   => $haslccn,
-                                       hlghtlccn => $hlghtlccn,
+#                                      hlghtlccn => $hlghtlccn,
 #                                      CGIFromLoCClass => $CGIlccn,
 #                                      CGIToLoCClass => $CGIlccn,
                                        hascote   => $hascote,
-                                       hlghtcote => $hlghtcote,
-                                       hglghtDT  => $hglghtDT,
-                                       hglghtPub => $hglghtPub,
-                                       hglghtPY  => $hglghtPY,
-                                       hglghtHB  => $hglghtHB,
-                                       hglghtLOC => $hglghtLOC,
+#                                      hlghtcote => $hlghtcote,
+#                                      hglghtDT  => $hglghtDT,
+#                                      hglghtPub => $hglghtPub,
+#                                      hglghtPY  => $hglghtPY,
+#                                      hglghtHB  => $hglghtHB,
+#                                      hglghtLOC => $hglghtLOC,
 #                                      CGIFromCoteClass => $CGIcote,
 #                                      CGIToCoteClass => $CGIcote,
                                        CGIItemType => $CGIitemtype,
@@ -276,15 +281,15 @@ sub calculate {
                                ($i== 1) ? "Dewey Classification To"   :
                                ($i== 2) ? "Lccn Classification From"  :
                                ($i== 3) ? "Lccn Classification To"    :
-                               ($i== 4) ? "Cote Classification From"  :
-                               ($i== 5) ? "Cote Classification To"    :
-                               ($i== 6) ? "Document type"             :
+                               ($i== 4) ? "Item CallNumber From"  :
+                               ($i== 5) ? "Item CallNumber To"    :
+                               ($i== 6) ? "Item type"             :
                                ($i== 7) ? "Publisher"                 :
                                ($i== 8) ? "Publication year From"     :
                                ($i== 9) ? "Publication year To"       :
-                               ($i==10) ? "Branch :"                  :
-                               ($i==11) ? "Location :"                :
-                               ($i==12) ? "Catalog Code :"            : '';
+                               ($i==10) ? "Library :"                  :
+                               ($i==11) ? "Shelving Location :"                :
+                               ($i==12) ? "Collection Code :"            : '';
                        push @loopfilter, \%cell;
                }
        }