[Koha-patches] [PATCH] Bug 6210 - Follow up, Choose framework on merge
Owen Leonard
oleonard at myacpl.org
Tue Jan 24 16:46:25 CET 2012
- Adding subtitle to the display of titles to be merged
- Adding a link to preview the MARC record of titles to be merged
- Fixing up markup of form to improve appearance
- Correcting breadcrumbs
---
cataloguing/merge.pl | 11 ++++-
.../prog/en/modules/cataloguing/merge.tt | 44 ++++++++-----------
2 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl
index 59b1d02..020001d 100755
--- a/cataloguing/merge.pl
+++ b/cataloguing/merge.pl
@@ -127,12 +127,19 @@ if ($merge) {
}
else {
my $data1 = GetBiblioData($biblionumber[0]);
+ my $record1 = GetMarcBiblio($biblionumber[0]);
+
my $data2 = GetBiblioData($biblionumber[1]);
+ my $record2 = GetMarcBiblio($biblionumber[1]);
# Checks if both records use the same framework
my $frameworkcode1 = &GetFrameworkCode($biblionumber[0]);
my $frameworkcode2 = &GetFrameworkCode($biblionumber[1]);
+
+ my $subtitle1 = GetRecordValue('subtitle', $record1, $frameworkcode1);
+ my $subtitle2 = GetRecordValue('subtitle', $record2, $frameworkcode1);
+
if ($mergereference) {
my $framework;
@@ -170,7 +177,9 @@ if ($merge) {
biblio1 => $biblionumber[0],
biblio2 => $biblionumber[1],
title1 => $data1->{'title'},
- title2 => $data2->{'title'}
+ subtitle1 => $subtitle1,
+ title2 => $data2->{'title'},
+ subtitle2 => $subtitle2
);
if ($frameworkcode1 ne $frameworkcode2) {
my $frameworks = getframeworks;
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt
index 5a48385..9235fdd 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt
@@ -1,5 +1,6 @@
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Cataloging › Merging records</title>
+[% INCLUDE 'greybox.inc' %]
[% INCLUDE 'doc-head-close.inc' %]
<style type="text/css">
div.record ul, div.record li { float:none; display:block; }
@@ -171,7 +172,7 @@ function changeFramework(fw) {
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cataloging-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › [% IF ( biblionumber ) %]Editing <em>[% title |html %]</em> (Record Number [% biblionumber %])[% ELSE %]Add MARC Record[% END %]</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › Merging records</div>
<div id="doc" class="yui-t7">
@@ -198,33 +199,26 @@ function changeFramework(fw) {
<form id="mergeform" action="/cgi-bin/koha/cataloguing/merge.pl" method="post">
<fieldset class="rows">
<legend>Merge reference</legend>
- <table>
- <tr>
- <td style="border-width: 0px; text-align: left">
<ol>
- <li class="radio"><input type="radio" value="[% biblio1 %]" checked="checked" id="mergereference1" name="mergereference" onclick="changeFramework('[% frameworkcode1 %]')" /><label style="float:none" for="mergereference1">[% title1 %] ([% biblio1 %])</label></li>
- <li class="radio"><input type="radio" value="[% biblio2 %]" id="mergereference2" name="mergereference" onclick="changeFramework('[% frameworkcode2 %]')" /><label style="float:none" for="mergereference2">[% title2 %] ([% biblio2 %])</label></li>
-</ol>
- </td>
- <td style="border-width: 0px">
+ <li class="radio"><input type="radio" value="[% biblio1 %]" checked="checked" id="mergereference1" name="mergereference" onclick="changeFramework('[% frameworkcode1 %]')" /><label for="mergereference1">[% title1 %] [% FOREACH subtitl1 IN subtitle1 %] [% subtitl1.subfield %][% END %] (<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio1 %]" title="MARC" rel="gb_page_center[600,500]">[% biblio1 %]</a>)</label></li>
+ <li class="radio"><input type="radio" value="[% biblio2 %]" id="mergereference2" name="mergereference" onclick="changeFramework('[% frameworkcode2 %]')" /><label for="mergereference2">[% title2 %] [% FOREACH subtitl2 IN subtitle2 %] [% subtitl2.subfield %][% END %] (<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio2 %]" title="MARC" rel="gb_page_center[600,500]">[% biblio2 %]</a>)</label></li>
+
[% IF frameworkselect %]
- <label style="float:none" for="frameworkcode">Framework:</label><br>
- <select name="frameworkcode" id="Frameworks">
- <option value="Default">Default</option>
- [% FOREACH frameworkcodeloo IN frameworkselect %]
- [% IF ( frameworkcodeloo.selected ) %]
- <option value="[% frameworkcodeloo.value %]" selected="selected">
- [% ELSE %]
- <option value="[% frameworkcodeloo.value %]">
- [% END %]
- [% frameworkcodeloo.frameworktext %]
- </option>
- [% END %]
- </select>
+ <li><label for="frameworkcode">Using framework:</label>
+ <select name="frameworkcode" id="frameworkcode">
+ <option value="Default">Default</option>
+ [% FOREACH frameworkcodeloo IN frameworkselect %]
+ [% IF ( frameworkcodeloo.selected ) %]
+ <option value="[% frameworkcodeloo.value %]" selected="selected">
+ [% ELSE %]
+ <option value="[% frameworkcodeloo.value %]">
+ [% END %]
+ [% frameworkcodeloo.frameworktext %]
+ </option>
+ [% END %]
+ </select></li>
[% END %]
- </td>
- </tr>
- </table>
+</ol>
<input type="hidden" name="biblionumber" value="[% biblio1 %]" />
<input type="hidden" name="biblionumber" value="[% biblio2 %]" />
--
1.7.3
More information about the Koha-patches
mailing list