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

(-)a/C4/Biblio.pm (-1 / +2 lines)
Lines 301-310 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();
308
    warn($history);
308
    _koha_marc_update_bib_ids( $record, $frameworkcode, $biblionumber, $biblioitemnumber );
309
    _koha_marc_update_bib_ids( $record, $frameworkcode, $biblionumber, $biblioitemnumber );
309
310
310
    # load the koha-table data object
311
    # load the koha-table data object
(-)a/cataloguing/addbiblio.pl (-1 / +1 lines)
Lines 852-858 if ( $op eq "addbiblio" ) { Link Here
852
        else {
852
        else {
853
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
853
            ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode );
854
        }
854
        }
855
        if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){
855
        if ($redirect eq "items" || (defined $mode && $mode ne "popup" && !$is_a_modif && $redirect ne "view" && $redirect ne "just_save")){
856
	    if ($frameworkcode eq 'FA'){
856
	    if ($frameworkcode eq 'FA'){
857
		print $input->redirect(
857
		print $input->redirect(
858
            '/cgi-bin/koha/cataloguing/additem.pl?'
858
            '/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 18-30 Link Here
18
    var Sticky;
19
    var Sticky;
19
	 $(document).ready(function() {
20
	 $(document).ready(function() {
20
21
21
        $(".input_marceditor").click(function(this){
22
        $(".input_marceditor").click(function(){
22
            historyToggle($(this).attr('id') + '_history');
23
            var tag = $(this).attr('id');
24
            historyToggle(tag + '_history');
23
            return false;
25
            return false;
24
        });
26
        });
25
27
26
        $(".tag_editor").click(function(this){
28
        $(".tag_editor").click(function(){
27
            openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id, $(this).attr('id'), 'biblio');
29
            var tag = $(this).attr('id');
30
            openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id, tag, 'biblio');
31
            return false;
32
        });
33
34
        $(".buttonHistory").click(function(){
35
            var tag = $(this).attr('id');
36
            HistoryToggle(tag + '_history');
37
            return false;
38
        });
39
40
        $(".hist_rollback").click(function(){
41
            var tag = $(this).attr('data-tag');
42
            var value = $(this).attr('data-history');
43
            HistoryRollback(tag, value);
28
            return false;
44
            return false;
29
        });
45
        });
30
46
Lines 783-789 function Changefwk() { Link Here
783
799
784
                [% IF ( subfield_loo.history ) %]
800
                [% IF ( subfield_loo.history ) %]
785
                <span class="subfield_history">
801
                <span class="subfield_history">
786
                    <a href="#" class="buttonHistory" onclick="HistoryToggle('[% mv.id %]_history'); return false;">
802
                    <a href="#" class="buttonHistory" id="[%- mv.id -%]">
787
                        <img src="[% interface %]/[% theme %]/img/icon-history.png" alt="History" title="Display history for this field" />
803
                        <img src="[% interface %]/[% theme %]/img/icon-history.png" alt="History" title="Display history for this field" />
788
                    </a>
804
                    </a>
789
                </span>
805
                </span>
Lines 791-799 function Changefwk() { Link Here
791
                <table class="history_table" id="[%- mv.id -%]_history" name="[%- mv.name -%]_history">
807
                <table class="history_table" id="[%- mv.id -%]_history" name="[%- mv.name -%]_history">
792
                    <tr><th>Value</th><th>Date</th><th>User</th></tr>
808
                    <tr><th>Value</th><th>Date</th><th>User</th></tr>
793
                    [% FOREACH hist IN subfield_loo.history %]
809
                    [% FOREACH hist IN subfield_loo.history %]
794
						<tr><td><a href="#" onclick="HistoryRollback('[% mv.id %]', '[% hist.data %]'); return false;">[% hist.data %]</a></td>
810
                        <tr>
795
                        <td>[% hist.datetime %]</td>
811
                            <td><a href="#" data-tag='[%- mv.id -%]' data-history='[% hist.data %]' class='hist_rollback'>[% hist.data | html %]</a></td>
796
                        <td>[% hist.title %] [% hist.firstname %] [% hist.surname %]</td></tr>
812
                            <td>[% hist.datetime | $KohaDates with_hours = 1 %]</td>
813
                            <td>[% hist.title | html %] [% hist.firstname | html %] [% hist.surname | html %]</td>
814
                        </tr>
797
                    [% END %]
815
                    [% END %]
798
                </table>
816
                </table>
799
                [% END %]
817
                [% END %]
800
- 

Return to bug 14367