koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha authorities/authorities.pl authorities/det... [rel_3_0]


From: Henri-Damien LAURENT
Subject: [Koha-cvs] koha authorities/authorities.pl authorities/det... [rel_3_0]
Date: Wed, 24 Jan 2007 10:20:12 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     Henri-Damien LAURENT <hdl>      07/01/24 10:20:12

Modified files:
        authorities    : authorities.pl detail.pl 
        koha-tmpl/intranet-tmpl/prog/en/authorities: detail.tmpl 

Log message:
        Adding some support to duplicate field + 
        unifying display fo authority records with biblio records.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/authorities.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.15.2.6&r2=1.15.2.7
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/detail.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.4.2.3&r2=1.4.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/detail.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.3&r2=1.1.2.4

Patches:
Index: authorities/authorities.pl
===================================================================
RCS file: /cvsroot/koha/koha/authorities/authorities.pl,v
retrieving revision 1.15.2.6
retrieving revision 1.15.2.7
diff -u -b -r1.15.2.6 -r1.15.2.7
--- authorities/authorities.pl  12 Jan 2007 15:02:38 -0000      1.15.2.6
+++ authorities/authorities.pl  24 Jan 2007 10:20:12 -0000      1.15.2.7
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: authorities.pl,v 1.15.2.6 2007/01/12 15:02:38 toins Exp $
+# $Id: authorities.pl,v 1.15.2.7 2007/01/24 10:20:12 hdl Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -390,11 +390,11 @@
        $record->encoding('UTF-8');
        #warn $record->as_formatted;
        # check for a duplicate
-#      my ($duplicateauthid,$duplicateauthvalue) = 
C4::AuthoritiesMarc::FindDuplicate($record,$authtypecode) if ($op eq "add") && 
(!$is_a_modif);
-#warn "duplicate:$duplicateauthid,$duplicateauthvalue";        
+       my ($duplicateauthid,$duplicateauthvalue) = 
C4::AuthoritiesMarc::FindDuplicate($record,$authtypecode) if ($op eq "add") && 
(!$is_a_modif);
+warn "duplicate:$duplicateauthid,$duplicateauthvalue"; 
        my $confirm_not_duplicate = $input->param('confirm_not_duplicate');
-       # it is not a duplicate (determined either by Koha itself or by user 
checking it's not a duplicate)
-#      if (!$duplicateauthid or $confirm_not_duplicate) {
+# it is not a duplicate (determined either by Koha itself or by user checking 
it's not a duplicate)
+       if (!$duplicateauthid or $confirm_not_duplicate) {
 # warn "noduplicate";
                if ($is_a_modif ) {     
                        
$authid=AUTHmodauthority($dbh,$authid,$record,$authtypecode,1);         
@@ -410,16 +410,16 @@
                print $input->redirect("detail.pl?authid=$authid");
 #              }
                exit;
-#      } else {
-#warn "duplicate";
+       } else {
+warn "duplicate";
        # it may be a duplicate, warn the user and do nothing
-#              build_tabs ($template, $record, $dbh,$encoding);
-#              build_hidden_data;
-#              $template->param(authid =>$authid,
-#                      duplicateauthid                         => 
$duplicateauthid,
-#                      duplicateauthvalue                              => 
$duplicateauthvalue,
-#                       );
-#      }
+               build_tabs ($template, $record, $dbh,$encoding);
+               build_hidden_data;
+               $template->param(authid =>$authid,
+                       duplicateauthid                         => 
$duplicateauthid,
+                       duplicateauthvalue                              => 
$duplicateauthvalue,
+                        );
+       }
 
#------------------------------------------------------------------------------------------------------------------------------
 } elsif ($op eq "addfield") {
 
#------------------------------------------------------------------------------------------------------------------------------

Index: authorities/detail.pl
===================================================================
RCS file: /cvsroot/koha/koha/authorities/detail.pl,v
retrieving revision 1.4.2.3
retrieving revision 1.4.2.4
diff -u -b -r1.4.2.3 -r1.4.2.4
--- authorities/detail.pl       10 Jan 2007 14:40:11 -0000      1.4.2.3
+++ authorities/detail.pl       24 Jan 2007 10:20:12 -0000      1.4.2.4
@@ -144,6 +144,12 @@
                        } else {
                                $subfield_data{marc_value}=$subf[$i][1];
                        }
+            $subfield_data{short_desc} = substr(
+                $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{lib},
+                0, 20
+            );
+            $subfield_data{long_desc} =
+              $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{lib};
                        $subfield_data{marc_subfield}=$subf[$i][0];
                        $subfield_data{marc_tag}=$field->tag();
                        push(@subfields_data, \%subfield_data);

Index: koha-tmpl/intranet-tmpl/prog/en/authorities/detail.tmpl
===================================================================
RCS file: 
/cvsroot/koha/koha/koha-tmpl/intranet-tmpl/prog/en/authorities/detail.tmpl,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -b -r1.1.2.3 -r1.1.2.4
--- koha-tmpl/intranet-tmpl/prog/en/authorities/detail.tmpl     10 Jan 2007 
14:40:11 -0000      1.1.2.3
+++ koha-tmpl/intranet-tmpl/prog/en/authorities/detail.tmpl     24 Jan 2007 
10:20:12 -0000      1.1.2.4
@@ -71,23 +71,36 @@
 
     <li><a href="javascript:Dopop('detailprint.pl?authid=<!-- TMPL_VAR 
NAME="authid" -->')" class="button authority">Print</a></li>
 
-    <li><a 
href="../catalogue/search.pl?type=intranet&amp;op=do_search&amp;address@hidden 
1=Koha-Auth-Number <!--TMPL_VAR Name="authid" -->" class="button 
authority"><!-- TMPL_VAR name="count" --> biblios</li>
+    <li><a 
href="../catalogue/search.pl?type=intranet&amp;op=do_search&amp;address@hidden 
1=Koha-Auth-Number <!--TMPL_VAR Name="authid" -->" class="button 
authority"><!-- TMPL_VAR name="count" --> biblios</a></li>
   </ul>
 </div>
 
 <div id="authorities_detail_details">
 <!-- TMPL_LOOP NAME="0XX" -->
-  <table>
-    <tr>
-      <th colspan="2"><!-- TMPL_VAR NAME="tag" --></th>
-    </tr>
+                <!-- TMPL_IF name="tag" -->
+                    <p>
+                        <!-- TMPL_VAR NAME="tag" -->
+                    </p>
+                <!-- TMPL_ELSE -->
+                    <br />
+                <!-- /TMPL_IF -->
   <!-- TMPL_LOOP NAME="subfield" -->
-    <tr>
-      <td><!-- TMPL_VAR NAME="marc_subfield" --> <!-- TMPL_VAR NAME="marc_lib" 
--></td>
-      <td><!-- TMPL_VAR NAME="marc_value" --></td>
-    </tr>
-  <!-- /TMPL_LOOP --> <!-- subfield -->
-  </table>
+                <p>
+                    <label>&nbsp;
+                    <!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR 
NAME="marc_subfield" --><!-- /TMPL_UNLESS -->
+                    <span title="<!-- TMPL_VAR name="long_desc" -->"><!-- 
TMPL_VAR NAME="short_desc" --></span></label>
+                    <!-- TMPL_VAR NAME="marc_value" -->
+                    <!-- TMPL_IF name="link" -->
+                        <a 
href="/cgi-bin/koha/catalogue/search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR 
NAME="link" -->&amp;operator==&amp;type=intranet&amp;value=<!-- TMPL_VAR 
NAME="marc_value" ESCAPE=URL -->">
+                            <img border="0" src="<!-- TMPL_VAR 
NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/filefind.png" 
height="15" title="Search on <!-- TMPL_VAR name="marc_value" -->">
+                        </a>
+                    <!-- /TMPL_IF -->
+                    <!-- TMPL_IF NAME="authority" -->
+                        <a 
href="/cgi-bin/koha/authorities/detail.pl?authid=<!-- TMPL_VAR name="authority" 
-->" class="button catalogue">Auth</a>
+                    <!-- /TMPL_IF -->
+                </p>
+             <!-- /TMPL_LOOP -->
+
 <!-- /TMPL_LOOP --> <!-- tag -->
 </div>
        




reply via email to

[Prev in Thread] Current Thread [Next in Thread]