View | Details | Raw Unified | Return to bug 14367
Collapse All | Expand All

(-)a/C4/Biblio.pm (-1 / +1 lines)
Lines 301-307 sub ModBiblio { Link Here
301
    # update biblionumber and biblioitemnumber in MARC
301
    # update biblionumber and biblioitemnumber in MARC
302
    # FIXME - this is assuming a 1 to 1 relationship between
302
    # FIXME - this is assuming a 1 to 1 relationship between
303
    # biblios and biblioitems
303
    # biblios and biblioitems
304
    my $sth = $dbh->prepare("select biblioitems.biblioitemnumber, biblio_metadata.history from biblioitems, biblio_metadata where biblioitems.biblionumber=?");
304
    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=?");
305
    $sth->execute($biblionumber);
305
    $sth->execute($biblionumber);
306
    my ($biblioitemnumber, $history) = $sth->fetchrow;
306
    my ($biblioitemnumber, $history) = $sth->fetchrow;
307
    $sth->finish();
307
    $sth->finish();
(-)a/Koha/MetadataRecord/History.pm (-1 / +1 lines)
Lines 100-106 sub HistoryParse { Link Here
100
    my $json = shift;
100
    my $json = shift;
101
    if (!defined $json) {
101
    if (!defined $json) {
102
        warn "HistoryParse: Missing JSON parameter";
102
        warn "HistoryParse: Missing JSON parameter";
103
        return undef;
103
        return;
104
    }
104
    }
105
    my $input = decode_json($json);
105
    my $input = decode_json($json);
106
    # Reindex the dataset; order all values by datetime under each tag name.
106
    # Reindex the dataset; order all values by datetime under each tag name.
(-)a/cataloguing/addbiblio.pl (-1 / +1 lines)
Lines 862-868 if ( $op eq "addbiblio" ) { Link Here
862
        else {
862
        else {
863
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
863
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
864
        }
864
        }
865
        if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){
865
        if ($redirect eq "items" || (defined $mode && $mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){
866
	    if ($frameworkcode eq 'FA'){
866
	    if ($frameworkcode eq 'FA'){
867
		print $input->redirect(
867
		print $input->redirect(
868
            '/cgi-bin/koha/cataloguing/additem.pl?'
868
            '/cgi-bin/koha/cataloguing/additem.pl?'
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-11 / +27 lines)
Lines 1-6 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% USE KohaDates %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Cataloging &rsaquo; [% IF ( biblionumber ) %]Editing [% title | html %] (Record number [% biblionumber | html %])[% ELSE %]Add MARC record[% END %]</title>
6
<title>Koha &rsaquo; Cataloging &rsaquo; [% IF ( biblionumber ) %]Editing [% title | html %] (Record number [% biblionumber | html %])[% ELSE %]Add MARC record[% END %]</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
Lines 22-34 Link Here
22
    var Sticky;
23
    var Sticky;
23
    $(document).ready(function() {
24
    $(document).ready(function() {
24
25
25
        $(".input_marceditor").click(function(this){
26
        $(".input_marceditor").click(function(){
26
            historyToggle($(this).attr('id') + '_history');
27
            var tag = $(this).attr('id');
28
            historyToggle(tag + '_history');
27
            return false;
29
            return false;
28
        });
30
        });
29
31
30
        $(".tag_editor").click(function(this){
32
        $(".tag_editor").click(function(){
31
            openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id, $(this).attr('id'), 'biblio');
33
            var tag = $(this).attr('id');
34
            openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id, tag, 'biblio');
35
            return false;
36
        });
37
38
        $(".buttonHistory").click(function(){
39
            var tag = $(this).attr('id');
40
            HistoryToggle(tag + '_history');
41
            return false;
42
        });
43
44
        $(".hist_rollback").click(function(){
45
            var tag = $(this).attr('data-tag');
46
            var value = $(this).attr('data-history');
47
            HistoryRollback(tag, value);
32
            return false;
48
            return false;
33
        });
49
        });
34
50
Lines 895-915 Link Here
895
911
896
                                                [% IF ( subfield_loo.history ) %]
912
                                                [% IF ( subfield_loo.history ) %]
897
                                                <span class="subfield_history">
913
                                                <span class="subfield_history">
898
                                                    <a href="#" class="buttonHistory" onclick="HistoryToggle('[% mv.id %]_history'); return false;">
914
                                                    <a href="#" class="buttonHistory" id="[%- mv.id | html -%]">
899
                                                        <img src="[% interface %]/[% theme %]/img/icon-history.png" alt="History" title="Display history for this field" />
915
                                                        <img src="[% interface | html %]/[% theme | html %]/img/icon-history.png" alt="History" title="Display history for this field" />
900
                                                    </a>
916
                                                    </a>
901
                                                </span>
917
                                                </span>
902
918
903
                                                <table class="history_table" id="[%- mv.id -%]_history" name="[%- mv.name -%]_history">
919
                                                <table class="history_table" id="[%- mv.id | html -%]_history" name="[%- mv.name | html -%]_history">
904
                                                    <tr>
920
                                                    <tr>
905
                                                        <th>Value</th>
921
                                                        <th>Value</th>
906
                                                        <th>Date</th>
922
                                                        <th>Date</th>
923
                                                        <th>User</th>
907
                                                    </tr>
924
                                                    </tr>
908
                                                    [% FOREACH hist IN subfield_loo.history %]
925
                                                    [% FOREACH hist IN subfield_loo.history %]
909
                                                    <tr>
926
                                                    <tr>
910
                                                        <td><a href="#" onclick="HistoryRollback('[% mv.id %]', '[% hist.data %]'); return false;">[% hist.data %]</a></td>
927
                                                        <td><a href="#" data-tag='[%- mv.id | html -%]' data-history='[% hist.data | html %]' class='hist_rollback'>[% hist.data | html %]</a></td>
911
                                                        <td>[% hist.datetime %]</td>
928
                                                        <td>[% hist.datetime | $KohaDates with_hours = 1 %]</td>
912
                                                        <td>[% hist.title %] [% hist.firstname %] [% hist.surname %]</td>
929
                                                        <td>[% hist.title | html %] [% hist.firstname | html %] [% hist.surname | html %]</td>
913
                                                    </tr>
930
                                                    </tr>
914
                                                    [% END %]
931
                                                    [% END %]
915
                                                </table>
932
                                                </table>
916
- 

Return to bug 14367