Bugzilla – Attachment 36643 Details for
Bug 1985
Email notification of new OPAC comments
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13635: Unimarc - On editing a notice, the title should be displayed
Bug-13635-Unimarc---On-editing-a-notice-the-title-.patch (text/plain), 3.65 KB, created by
Biblibre Sandboxes
on 2015-03-06 09:12:50 UTC
(
hide
)
Description:
Bug 13635: Unimarc - On editing a notice, the title should be displayed
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2015-03-06 09:12:50 UTC
Size:
3.65 KB
patch
obsolete
>From cabeb6a5a676ee1e6dca10ee08de62d2c679e3af Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 28 Jan 2015 13:03:31 +0100 >Subject: [PATCH] Bug 13635: Unimarc - On editing a notice, the title should > be displayed > >The title method of MARC::Record does not deal with UNIMARC, it should >not be called if the marc flavour is UNIMARC. > >Test plan: >On an unimarc installation, edit a notice, with this patch you should >see > "Editing TITLE (Record number BIBLIONUMBER)" > >Without, the title was not displayed. >Same in the breadcrumbs. > >Bug 13635: Remove another useless call > >There is another call to the title method in additem.pl without any >check on the marc flavour. >But here the title variable sent to the template is redefined 3 lines >later. >So it can be simply removed. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Tested on UNIMARC install, editing a 'record' (not notice) does not show >title on breadcrumbs, status bar or page title. >With patch it does! >No koha-qa errors. > >Signed-off-by: joel aloi <aloi54@live.fr> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> > >Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr> > >http://bugs.koha-community.org/show_bug.cgi?id=1985 >--- > cataloguing/addbiblio.pl | 14 ++++++++++---- > cataloguing/additem.pl | 1 - > 2 files changed, 10 insertions(+), 5 deletions(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index d969215..93ef3ef 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -823,7 +823,8 @@ $is_a_modif = 0; > > if ($biblionumber) { > $is_a_modif = 1; >- $template->param( title => $record->title(), ); >+ my $title = C4::Context->preference('marcflavour') eq "UNIMARC" ? $record->subfield('200', 'a') : $record->title; >+ $template->param( title => $title ); > > # if it's a modif, retrieve bibli and biblioitem numbers for the future modification of old-DB. > ( $biblionumbertagfield, $biblionumbertagsubfield ) = >@@ -912,8 +913,10 @@ if ( $op eq "addbiblio" ) { > done =>1, > popup =>1 > ); >- $template->param( title => $record->subfield('200',"a") ) if ($record ne "-1" && C4::Context->preference('marcflavour') =~/unimarc/i); >- $template->param( title => $record->title() ) if ($record ne "-1" && C4::Context->preference('marcflavour') eq "usmarc"); >+ if ( $record ne '-1' ) { >+ my $title = C4::Context->preference('marcflavour') eq "UNIMARC" ? $record->subfield('200', 'a') : $record->title; >+ $template->param( title => $title ); >+ } > $template->param( > popup => $mode, > itemtype => $frameworkcode, >@@ -983,7 +986,10 @@ elsif ( $op eq "delete" ) { > ); > } > >-$template->param( title => $record->title() ) if ( $record ne "-1" ); >+if ( $record ne '-1' ) { >+ my $title = C4::Context->preference('marcflavour') eq "UNIMARC" ? $record->subfield('200', 'a') : $record->title; >+ $template->param( title => $title ); >+} > $template->param( > popup => $mode, > frameworkcode => $frameworkcode, >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 9c7fb3f..d127179 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -847,7 +847,6 @@ foreach my $tag ( keys %{$tagslib}){ > @loop_data = sort {$a->{subfield} cmp $b->{subfield} } @loop_data; > > # what's the next op ? it's what we are not in : an add if we're editing, otherwise, and edit. >-$template->param( title => $record->title() ) if ($record ne "-1"); > $template->param( > biblionumber => $biblionumber, > title => $oldrecord->{title}, >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 1985
:
33916
|
33918
|
36065
|
36516
|
36517
|
36521
|
36522
|
36613
|
36614
|
36628
|
36629
|
36643
|
36644
|
36645
|
36677
|
36678
|
36720
|
38908
|
38909
|
38910
|
39062
|
63746
|
63747
|
63748
|
63749
|
63750
|
63751
|
63752
|
63761
|
63762
|
63763
|
74760
|
74761
|
74762
|
74763
|
74764
|
74769
|
74770
|
74771
|
91190
|
91191
|
91192
|
91193
|
91194
|
91195
|
91196
|
91197
|
91198
|
91818
|
91819
|
91820
|
91821
|
91822
|
91823