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

(-)a/C4/Biblio.pm (-1 / +2 lines)
Lines 297-306 sub ModBiblio { Link Here
297
    # update biblionumber and biblioitemnumber in MARC
297
    # update biblionumber and biblioitemnumber in MARC
298
    # FIXME - this is assuming a 1 to 1 relationship between
298
    # FIXME - this is assuming a 1 to 1 relationship between
299
    # biblios and biblioitems
299
    # biblios and biblioitems
300
    my $sth = $dbh->prepare("select biblioitems.biblioitemnumber, biblio_metadata.history from biblioitems, biblio_metadata where biblioitems.biblionumber=?");
300
    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=?");
301
    $sth->execute($biblionumber);
301
    $sth->execute($biblionumber);
302
    my ($biblioitemnumber, $history) = $sth->fetchrow;
302
    my ($biblioitemnumber, $history) = $sth->fetchrow;
303
    $sth->finish();
303
    $sth->finish();
304
    warn($history);
304
    _koha_marc_update_bib_ids( $record, $frameworkcode, $biblionumber, $biblioitemnumber );
305
    _koha_marc_update_bib_ids( $record, $frameworkcode, $biblionumber, $biblioitemnumber );
305
306
306
    # load the koha-table data object
307
    # load the koha-table data object
(-)a/cataloguing/addbiblio.pl (-1 / +1 lines)
Lines 844-850 if ( $op eq "addbiblio" ) { Link Here
844
        else {
844
        else {
845
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
845
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
846
        }
846
        }
847
        if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){
847
        if ($redirect eq "items" || (defined $mode && $mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){
848
	    if ($frameworkcode eq 'FA'){
848
	    if ($frameworkcode eq 'FA'){
849
		print $input->redirect(
849
		print $input->redirect(
850
            '/cgi-bin/koha/cataloguing/additem.pl?'
850
            '/cgi-bin/koha/cataloguing/additem.pl?'
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-9 / +26 lines)
Lines 1-4 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE KohaDates %]
2
[% USE Asset %]
3
[% USE Asset %]
3
[% USE Koha %]
4
[% USE Koha %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
Lines 19-31 Link Here
19
    var Sticky;
20
    var Sticky;
20
	 $(document).ready(function() {
21
	 $(document).ready(function() {
21
22
22
        $(".input_marceditor").click(function(this){
23
        $(".input_marceditor").click(function(){
23
            historyToggle($(this).attr('id') + '_history');
24
            var tag = $(this).attr('id');
25
            historyToggle(tag + '_history');
24
            return false;
26
            return false;
25
        });
27
        });
26
28
27
        $(".tag_editor").click(function(this){
29
        $(".tag_editor").click(function(){
28
            openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id, $(this).attr('id'), 'biblio');
30
            var tag = $(this).attr('id');
31
            openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id, tag, 'biblio');
32
            return false;
33
        });
34
35
        $(".buttonHistory").click(function(){
36
            var tag = $(this).attr('id');
37
            HistoryToggle(tag + '_history');
38
            return false;
39
        });
40
41
        $(".hist_rollback").click(function(){
42
            var tag = $(this).attr('data-tag');
43
            var value = $(this).attr('data-history');
44
            HistoryRollback(tag, value);
29
            return false;
45
            return false;
30
        });
46
        });
31
47
Lines 735-741 function Changefwk() { Link Here
735
751
736
                [% IF ( subfield_loo.history ) %]
752
                [% IF ( subfield_loo.history ) %]
737
                <span class="subfield_history">
753
                <span class="subfield_history">
738
                    <a href="#" class="buttonHistory" onclick="HistoryToggle('[% mv.id %]_history'); return false;">
754
                    <a href="#" class="buttonHistory" id="[%- mv.id -%]">
739
                        <img src="[% interface %]/[% theme %]/img/icon-history.png" alt="History" title="Display history for this field" />
755
                        <img src="[% interface %]/[% theme %]/img/icon-history.png" alt="History" title="Display history for this field" />
740
                    </a>
756
                    </a>
741
                </span>
757
                </span>
Lines 743-751 function Changefwk() { Link Here
743
                <table class="history_table" id="[%- mv.id -%]_history" name="[%- mv.name -%]_history">
759
                <table class="history_table" id="[%- mv.id -%]_history" name="[%- mv.name -%]_history">
744
                    <tr><th>Value</th><th>Date</th><th>User</th></tr>
760
                    <tr><th>Value</th><th>Date</th><th>User</th></tr>
745
                    [% FOREACH hist IN subfield_loo.history %]
761
                    [% FOREACH hist IN subfield_loo.history %]
746
						<tr><td><a href="#" onclick="HistoryRollback('[% mv.id %]', '[% hist.data %]'); return false;">[% hist.data %]</a></td>
762
                        <tr>
747
                        <td>[% hist.datetime %]</td>
763
                            <td><a href="#" data-tag='[%- mv.id -%]' data-history='[% hist.data %]' class='hist_rollback'>[% hist.data | html %]</a></td>
748
                        <td>[% hist.title %] [% hist.firstname %] [% hist.surname %]</td></tr>
764
                            <td>[% hist.datetime | $KohaDates with_hours = 1 %]</td>
765
                            <td>[% hist.title | html %] [% hist.firstname | html %] [% hist.surname | html %]</td>
766
                        </tr>
749
                    [% END %]
767
                    [% END %]
750
                </table>
768
                </table>
751
                [% END %]
769
                [% END %]
752
- 

Return to bug 14367