Bugzilla – Attachment 2445 Details for
Bug 5082
Not translatable name of default framework 'Default' in MARCdetail.tmpl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix for 3.0.x
0001-3.0.x-fix-for-Bug-5082-Default-framework-name-not-tr.patch (text/plain), 3.22 KB, created by
Owen Leonard
on 2010-08-03 13:44:08 UTC
(
hide
)
Description:
Proposed fix for 3.0.x
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-08-03 13:44:08 UTC
Size:
3.22 KB
patch
obsolete
>From ad1f60c1e6b9b1996c7bb1727b6e9e7e73e61e5f Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 3 Aug 2010 09:39:09 -0400 >Subject: [PATCH] 3.0.x fix for Bug 5082, Default framework name not translatable >Content-Type: text/plain; charset="utf-8" > >--- > catalogue/MARCdetail.pl | 40 ++++++++------------ > .../prog/en/modules/catalogue/MARCdetail.tmpl | 7 +++- > 2 files changed, 22 insertions(+), 25 deletions(-) > >diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl >index 5b209a6..331f5ee 100755 >--- a/catalogue/MARCdetail.pl >+++ b/catalogue/MARCdetail.pl >@@ -89,30 +89,22 @@ my $itemcount = GetItemsCount($biblionumber); > $template->param( count => $itemcount, > bibliotitle => $biblio->{title}, ); > >-#Getting the list of all frameworks >-my $queryfwk = >- $dbh->prepare("select frameworktext, frameworkcode from biblio_framework"); >-$queryfwk->execute; >-my %select_fwk; >-my @select_fwk; >-my $curfwk; >-push @select_fwk, "Default"; >-$select_fwk{"Default"} = "Default"; >- >-while ( my ( $description, $fwk ) = $queryfwk->fetchrow ) { >- push @select_fwk, $fwk; >- $select_fwk{$fwk} = $description; >-} >-$curfwk=$frameworkcode; >-my $framework=CGI::scrolling_list( -name => 'Frameworks', >- -id => 'Frameworks', >- -default => $curfwk, >- -OnChange => 'Changefwk(this);', >- -values => \@select_fwk, >- -labels => \%select_fwk, >- -size => 1, >- -multiple => 0 ); >-$template->param(framework => $framework); >+# Getting the list of all frameworks >+# get framework list >+my $frameworks = getframeworks; >+my @frameworkcodeloop; >+foreach my $thisframeworkcode ( keys %$frameworks ) { >+ warn $thisframeworkcode; >+ my %row = ( >+ value => $thisframeworkcode, >+ frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'}, >+ ); >+ if ($frameworkcode eq $thisframeworkcode){ >+ $row{'selected'}="selected=\"selected\""; >+ } >+ push @frameworkcodeloop, \%row; >+} >+$template->param( frameworkcodeloop => \@frameworkcodeloop ); > # fill arrays > my @loop_data = (); > my $tag; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl >index b7809d4..bec846a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl >@@ -36,7 +36,12 @@ function Changefwk(FwkList) { > > <!-- /TMPL_UNLESS --> > >- <p><b>With Framework :<!--TMPL_VAR Name="framework" --></b></p> >+ <p><b>With Framework : <select name="Frameworks" id="Frameworks" onchange="Changefwk(this);"> >+ <option value="">Default</option> >+ <!-- TMPL_LOOP NAME="frameworkcodeloop" --> >+ <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value"-->" selected="selected"><!-- TMPL_VAR NAME="frameworktext" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="value"-->"><!-- TMPL_VAR NAME="frameworktext" --></option><!-- /TMPL_IF --> >+ <!-- /TMPL_LOOP --> >+ </select></b></p> > > <div id="bibliotabs" class="toptabs numbered"> > <ul> >-- >1.7.0.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 5082
:
2444
| 2445