@@ -, +, @@
---
C4/Biblio.pm | 3 +-
cataloguing/addbiblio.pl | 2 +-
.../prog/en/modules/cataloguing/addbiblio.tt | 34 +++++++++++++++++-----
3 files changed, 29 insertions(+), 10 deletions(-)
--- a/C4/Biblio.pm
+++ a/C4/Biblio.pm
@@ -301,10 +301,11 @@ sub ModBiblio {
# update biblionumber and biblioitemnumber in MARC
# FIXME - this is assuming a 1 to 1 relationship between
# biblios and biblioitems
- my $sth = $dbh->prepare("select biblioitems.biblioitemnumber, biblio_metadata.history from biblioitems, biblio_metadata where biblioitems.biblionumber=?");
+ my $sth = $dbh->prepare("SELECT biblioitems.biblioitemnumber, biblio_metadata.history FROM biblioitems INNER JOIN biblio_metadata ON biblioitems.biblionumber = biblio_metadata.biblionumber WHERE biblioitems.biblionumber=?");
$sth->execute($biblionumber);
my ($biblioitemnumber, $history) = $sth->fetchrow;
$sth->finish();
+ warn($history);
_koha_marc_update_bib_ids( $record, $frameworkcode, $biblionumber, $biblioitemnumber );
# load the koha-table data object
--- a/cataloguing/addbiblio.pl
+++ a/cataloguing/addbiblio.pl
@@ -852,7 +852,7 @@ if ( $op eq "addbiblio" ) {
else {
( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
}
- if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){
+ if ($redirect eq "items" || (defined $mode && $mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){
if ($frameworkcode eq 'FA'){
print $input->redirect(
'/cgi-bin/koha/cataloguing/additem.pl?'
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
@@ -1,4 +1,5 @@
[% USE raw %]
+[% USE KohaDates %]
[% USE Asset %]
[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
@@ -18,13 +19,28 @@
var Sticky;
$(document).ready(function() {
- $(".input_marceditor").click(function(this){
- historyToggle($(this).attr('id') + '_history');
+ $(".input_marceditor").click(function(){
+ var tag = $(this).attr('id');
+ historyToggle(tag + '_history');
return false;
});
- $(".tag_editor").click(function(this){
- openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id, $(this).attr('id'), 'biblio');
+ $(".tag_editor").click(function(){
+ var tag = $(this).attr('id');
+ openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id, tag, 'biblio');
+ return false;
+ });
+
+ $(".buttonHistory").click(function(){
+ var tag = $(this).attr('id');
+ HistoryToggle(tag + '_history');
+ return false;
+ });
+
+ $(".hist_rollback").click(function(){
+ var tag = $(this).attr('data-tag');
+ var value = $(this).attr('data-history');
+ HistoryRollback(tag, value);
return false;
});
@@ -783,7 +799,7 @@ function Changefwk() {
[% IF ( subfield_loo.history ) %]
-
+
@@ -791,9 +807,11 @@ function Changefwk() {
Value | Date | User |
---|---|---|
[% hist.data %] | -[% hist.datetime %] | -[% hist.title %] [% hist.firstname %] [% hist.surname %] |
[% hist.data | html %] | +[% hist.datetime | $KohaDates with_hours = 1 %] | +[% hist.title | html %] [% hist.firstname | html %] [% hist.surname | html %] | +