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

(-)a/C4/Reserves.pm (-1 / +17 lines)
Lines 4-9 package C4::Reserves; Link Here
4
#           2006 SAN Ouest Provence
4
#           2006 SAN Ouest Provence
5
#           2007-2010 BibLibre Paul POULAIN
5
#           2007-2010 BibLibre Paul POULAIN
6
#           2011 Catalyst IT
6
#           2011 Catalyst IT
7
# Copyright 2012 software.coop and MJ Ray
7
#
8
#
8
# This file is part of Koha.
9
# This file is part of Koha.
9
#
10
#
Lines 29-34 use C4::Members; Link Here
29
use C4::Items;
30
use C4::Items;
30
use C4::Circulation;
31
use C4::Circulation;
31
use C4::Accounts;
32
use C4::Accounts;
33
use C4::Log;
32
34
33
# for _koha_notify_reserve
35
# for _koha_notify_reserve
34
use C4::Members::Messaging;
36
use C4::Members::Messaging;
Lines 203-208 sub AddReserve { Link Here
203
        $found,          $waitingdate,	$expdate
205
        $found,          $waitingdate,	$expdate
204
    );
206
    );
205
207
208
    # Record the fact that this book was reserved.
209
    logaction( 'CIRCULATION', 'HOLD', $biblionumber, $borrowernumber );
210
206
    # Send e-mail to librarian if syspref is active
211
    # Send e-mail to librarian if syspref is active
207
    if(C4::Context->preference("emailLibrarianWhenHoldIsPlaced")){
212
    if(C4::Context->preference("emailLibrarianWhenHoldIsPlaced")){
208
        my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber);
213
        my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber);
Lines 1001-1007 sub CancelReserve { Link Here
1001
    return unless ( $reserve_id );
1006
    return unless ( $reserve_id );
1002
1007
1003
    my $dbh = C4::Context->dbh;
1008
    my $dbh = C4::Context->dbh;
1004
1005
    my $query = "
1009
    my $query = "
1006
        UPDATE reserves
1010
        UPDATE reserves
1007
        SET    cancellationdate = now(),
1011
        SET    cancellationdate = now(),
Lines 1030-1035 sub CancelReserve { Link Here
1030
1034
1031
    # now fix the priority on the others....
1035
    # now fix the priority on the others....
1032
    _FixPriority( $reserve_id );
1036
    _FixPriority( $reserve_id );
1037
    
1038
    # Record the fact that this book was unreserved.
1039
    logaction( 'CIRCULATION', 'UNHOLD', $reserve_id );
1033
}
1040
}
1034
1041
1035
=head2 ModReserve
1042
=head2 ModReserve
Lines 1110-1115 sub ModReserve { Link Here
1110
        $sth = $dbh->prepare($query);
1117
        $sth = $dbh->prepare($query);
1111
        $sth->execute( $reserve_id );
1118
        $sth->execute( $reserve_id );
1112
        
1119
        
1120
        # Record the fact that this book was unreserved.
1121
        logaction( 'CIRCULATION', 'UNHOLD', $biblio, $borrower );
1122
1113
    }
1123
    }
1114
    elsif ($rank =~ /^\d+/ and $rank > 0) {
1124
    elsif ($rank =~ /^\d+/ and $rank > 0) {
1115
        my $query = "
1125
        my $query = "
Lines 1130-1135 sub ModReserve { Link Here
1130
        }
1140
        }
1131
1141
1132
        _FixPriority( $reserve_id, $rank );
1142
        _FixPriority( $reserve_id, $rank );
1143
        # Record the fact that this book was unreserved.
1144
        logaction( 'CIRCULATION', 'HOLD', $biblio, 'Modify hold for borrower '.$borrower );
1145
1133
    }
1146
    }
1134
}
1147
}
1135
1148
Lines 1195-1200 sub ModReserveFill { Link Here
1195
    $sth = $dbh->prepare($query);
1208
    $sth = $dbh->prepare($query);
1196
    $sth->execute( $biblionumber, $resdate, $borrowernumber );
1209
    $sth->execute( $biblionumber, $resdate, $borrowernumber );
1197
    
1210
    
1211
    # Record the fact that this book was unreserved.
1212
    logaction( 'CIRCULATION', 'UNHOLD', $biblionumber, $borrowernumber );
1213
1198
    # now fix the priority on the others (if the priority wasn't
1214
    # now fix the priority on the others (if the priority wasn't
1199
    # already sorted!)....
1215
    # already sorted!)....
1200
    unless ( $priority == 0 ) {
1216
    unless ( $priority == 0 ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt (+2 lines)
Lines 91-96 $(document).ready(function() { Link Here
91
    [% END %]
91
    [% END %]
92
</div>
92
</div>
93
93
94
<p>See also: <a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&amp;modules=CIRCULATION&amp;object=[% biblionumber |url %]">circulation log for [% title |html %]</a></p>
95
94
</div>
96
</div>
95
</div>
97
</div>
96
<div class="yui-b">
98
<div class="yui-b">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (+3 lines)
Lines 104-109 Link Here
104
[% ELSE %]
104
[% ELSE %]
105
<div class="dialog message">This patron has no circulation history.</div>
105
<div class="dialog message">This patron has no circulation history.</div>
106
[% END %]
106
[% END %]
107
108
<p>See also: <a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&amp;modules=CIRCULATION&amp;info=[% borrowernumber |url %]">circulation log for [% INCLUDE 'patron-title.inc' %]</a></p>
109
107
</div>
110
</div>
108
</div>
111
</div>
109
112
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (-1 / +85 lines)
Lines 29-34 Link Here
29
			<div class="yui-b">
29
			<div class="yui-b">
30
                [% IF ( CAN_user_reports ) %]
30
                [% IF ( CAN_user_reports ) %]
31
				<h1>Browse system logs</h1>
31
				<h1>Browse system logs</h1>
32
                [% IF ( do_it ) %]
33
                    [% IF ( total ) %]
34
                        <h4>[% total %] lines found.</h4>
35
                        <table>
36
                            <tr>
37
                                <th>Date</th>
38
                                <th>Librarian</th>
39
                                <th>Module</th>
40
                                <th>Action</th>
41
                                <th>Object</th>
42
                                <th>Info</th>
43
                            </tr>
44
                            [% FOREACH loopro IN looprow %]
45
                                [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
46
                                <tr>
47
                                    <td>[% loopro.timestamp %]</td>
48
                                    <td>
49
                                       [% IF ( module == 'CIRCULATION' ) %]
50
                                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this patron"> [% loopro.user %] </a>
51
                                        [% ELSE %]
52
                                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian"> [% loopro.user %] </a>
53
                                        [% END %]
54
                                    </td>
55
                                    <td>[% loopro.module %]</td>
56
                                    <td>[% loopro.action %]</td>
57
                                    <td>
58
                                        [% IF ( loopro.module == 'MEMBERS' ) %]
59
                                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display patron details">Patron [% loopro.object %] </a>
60
                                        [% ELSE %]
61
                                            [% IF ( loopro.module == 'CIRCULATION' ) %]
62
                                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">
63
                                                [% IF ( loopro.object ) %]
64
                                                    biblio [% loopro.object %]
65
                                                [% END %]
66
                                            </a>
67
                                            [% ELSE %]
68
                                                [% IF ( loopro.module == 'CATALOGUING' ) %]
69
                                                    [% IF ( info == 'item' ) %]
70
                                                        <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]">Item [% loopro.object %]</a>
71
                                                    [% ELSE %]
72
                                                        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">biblio [% loopro.object %]</a>
73
                                                    [% END %]
74
                                                [% ELSE %]
75
                                                    [% IF ( loopro.module == 'SERIAL' ) %]
76
                                                        <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object %]"> [% loopro.object %] </a>
77
                                                    [% ELSE %]
78
                                                        [% IF ( loopro.module == 'AUTHORITIES' ) %]
79
                                                            <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object %]" title="Display detail for this authority">auth [% loopro.object %]</a>
80
                                                        [% ELSE %]
81
                                                            [% loopro.object %]
82
                                                        [% END %]
83
                                                    [% END %]
84
                                                [% END %]
85
                                            [% END %]
86
                                        [% END %]
87
                                    </td>
88
                                    <td>
89
                                        [% IF ( loopro.module == 'CIRCULATION' && ( loopro.action == 'HOLD' || loopro.action == 'UNHOLD' ) ) %]
90
                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.info |remove('\S+ ') |url %]" title="Display borrower details">Patron [% loopro.info |remove('\S+ ') |html %]</a>
91
                                        [% ELSE %]
92
					    [% IF ( loopro.module == 'CIRCULATION' && loopro.info > 0 ) %]
93
						<a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.info %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]" title="Display detail for this biblio">Item [% loopro.info |html %]</a>
94
					    [% ELSE %]
95
                                                 [% loopro.info |html %]
96
                                            [% END %]
97
                                        [% END %]
98
                                    </td>
99
                                </tr>
100
                            [% END %]
101
                        </table>
102
                    [% ELSE %]
103
                        <div class="dialog alert">
104
                            No log found
105
                            [% IF ( CATALOGUING ) %]
106
                                for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object %]">Bibliographic Record [% object %]</a>
107
                            [% END %]
108
                            [% IF ( MEMBERS ) %]
109
                                for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object %]">[% INCLUDE 'patron-title.inc' %]</a>
110
                            [% END %]
111
                            .
112
                        </div>
113
                    [% END %]
114
                [% END %]
32
				<form method="post" action="/cgi-bin/koha/tools/viewlog.pl">
115
				<form method="post" action="/cgi-bin/koha/tools/viewlog.pl">
33
					[% IF ( do_it ) %]
116
					[% IF ( do_it ) %]
34
						<input type="hidden" name="do_it" value="[% do_it %]" />
117
						<input type="hidden" name="do_it" value="[% do_it %]" />
Lines 64-69 Link Here
64
									<option value ="MODIFY">Modify</option>
147
									<option value ="MODIFY">Modify</option>
65
									<option value="ISSUE">Checkout</option>
148
									<option value="ISSUE">Checkout</option>
66
									<option value="RETURN">Return</option>
149
									<option value="RETURN">Return</option>
150
                                                                      <option value="HOLD">Hold</option>
151
                                                                     <option value="UNHOLD">Unhold</option>
67
								</select>
152
								</select>
68
							</li>
153
							</li>
69
							<li>
154
							<li>
70
- 

Return to bug 6890