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

(-)a/C4/Reserves.pm (+22 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 200-205 sub AddReserve { Link Here
200
        $found,          $waitingdate,	$expdate
202
        $found,          $waitingdate,	$expdate
201
    );
203
    );
202
204
205
    # Record the fact that this book was reserved.
206
    logaction( 'CIRCULATION', 'HOLD', $biblionumber, $borrowernumber );
207
203
    # Send e-mail to librarian if syspref is active
208
    # Send e-mail to librarian if syspref is active
204
    if(C4::Context->preference("emailLibrarianWhenHoldIsPlaced")){
209
    if(C4::Context->preference("emailLibrarianWhenHoldIsPlaced")){
205
        my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber);
210
        my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber);
Lines 971-976 sub CancelReserve { Link Here
971
        ";
976
        ";
972
        $sth = $dbh->prepare($query);
977
        $sth = $dbh->prepare($query);
973
        $sth->execute( $item, $borr );
978
        $sth->execute( $item, $borr );
979
980
        # Record the fact that this book was unreserved.
981
        logaction( 'CIRCULATION', 'UNHOLD', $biblio, $borr );
982
        # FIXME: should look up biblionumber if not given
983
974
    }
984
    }
975
    else {
985
    else {
976
        # removing a reserve record....
986
        # removing a reserve record....
Lines 1018-1023 sub CancelReserve { Link Here
1018
        $sth = $dbh->prepare($query);
1028
        $sth = $dbh->prepare($query);
1019
        $sth->execute( $biblio, $borr );
1029
        $sth->execute( $biblio, $borr );
1020
1030
1031
        # Record the fact that this book was unreserved.
1032
        logaction( 'CIRCULATION', 'UNHOLD', $biblio, $borr );
1033
1021
        # now fix the priority on the others....
1034
        # now fix the priority on the others....
1022
        _FixPriority( $biblio, $borr );
1035
        _FixPriority( $biblio, $borr );
1023
    }
1036
    }
Lines 1087-1092 sub ModReserve { Link Here
1087
        $sth = $dbh->prepare($query);
1100
        $sth = $dbh->prepare($query);
1088
        $sth->execute( $biblio, $borrower );
1101
        $sth->execute( $biblio, $borrower );
1089
        
1102
        
1103
        # Record the fact that this book was unreserved.
1104
        logaction( 'CIRCULATION', 'UNHOLD', $biblio, $borrower );
1105
1090
    }
1106
    }
1091
    elsif ($rank =~ /^\d+/ and $rank > 0) {
1107
    elsif ($rank =~ /^\d+/ and $rank > 0) {
1092
        my $query = "
1108
        my $query = "
Lines 1107-1112 sub ModReserve { Link Here
1107
            }
1123
            }
1108
        }
1124
        }
1109
1125
1126
        # Record the fact that this book was unreserved.
1127
        logaction( 'CIRCULATION', 'HOLD', $biblio, 'Modify hold for borrower '.$borrower );
1128
1110
        _FixPriority( $biblio, $borrower, $rank);
1129
        _FixPriority( $biblio, $borrower, $rank);
1111
    }
1130
    }
1112
}
1131
}
Lines 1172-1177 sub ModReserveFill { Link Here
1172
    $sth = $dbh->prepare($query);
1191
    $sth = $dbh->prepare($query);
1173
    $sth->execute( $biblionumber, $resdate, $borrowernumber );
1192
    $sth->execute( $biblionumber, $resdate, $borrowernumber );
1174
    
1193
    
1194
    # Record the fact that this book was unreserved.
1195
    logaction( 'CIRCULATION', 'UNHOLD', $biblionumber, $borrowernumber );
1196
1175
    # now fix the priority on the others (if the priority wasn't
1197
    # now fix the priority on the others (if the priority wasn't
1176
    # already sorted!)....
1198
    # already sorted!)....
1177
    unless ( $priority == 0 ) {
1199
    unless ( $priority == 0 ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt (+2 lines)
Lines 89-94 $(document).ready(function() { Link Here
89
    [% END %]
89
    [% END %]
90
</div>
90
</div>
91
91
92
<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>
93
92
</div>
94
</div>
93
</div>
95
</div>
94
<div class="yui-b">
96
<div class="yui-b">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (+3 lines)
Lines 85-90 Link Here
85
[% ELSE %]
85
[% ELSE %]
86
<div class="dialog message">This patron has no circulation history.</div>
86
<div class="dialog message">This patron has no circulation history.</div>
87
[% END %]
87
[% END %]
88
89
<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>
90
88
</div>
91
</div>
89
</div>
92
</div>
90
93
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (-80 / +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>
Lines 135-219 Link Here
135
					</fieldset>
220
					</fieldset>
136
			</form>
221
			</form>
137
                [% END %]
222
                [% END %]
138
                [% IF ( do_it ) %]
139
                    [% IF ( total ) %]
140
                        <h4>[% total %] lines found.</h4>
141
                        <table>
142
                            <tr>
143
                                <th>Date</th>
144
                                <th>Librarian</th>
145
                                <th>Module</th>
146
                                <th>Action</th>
147
                                <th>Object</th>
148
                                <th>Info</th>
149
                            </tr>
150
                            [% FOREACH loopro IN looprow %]
151
                                [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
152
                                <tr>
153
                                    <td>[% loopro.timestamp %]</td>
154
                                    <td>
155
                                       [% IF ( module == 'CIRCULATION' ) %]
156
                                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this user."> [% loopro.user %] </a>
157
                                        [% ELSE %]
158
                                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.user %]" title="display detail for this librarian."> [% loopro.user %] </a>
159
                                        [% END %]
160
                                    </td>
161
                                    <td>[% loopro.module %]</td>
162
                                    <td>[% loopro.action %]</td>
163
                                    <td>
164
                                        [% IF ( module == 'MEMBERS' ) %]
165
                                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> member [% loopro.object %] </a>
166
                                        [% ELSE %]
167
                                            [% IF ( module == 'CIRCULATION' ) %]
168
                                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details.">
169
                                                [% IF ( loopro.object ) %]
170
                                                    member [% loopro.object %]
171
                                                [% END %]
172
                                            </a>
173
                                            [% ELSE %]
174
                                                [% IF ( module == 'CATALOGUING' ) %]
175
                                                    [% IF ( info == 'item' ) %]
176
                                                        <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object %]&biblionumber=[% loopro.biblionumber %]&bi=[% loopro.biblioitemnumber %]#item[% loopro.object %]">Item [% loopro.object %]</a>
177
                                                    [% ELSE %]
178
                                                        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object %]" title="Display detail for this biblio">biblio [% loopro.object %]</a>
179
                                                    [% END %]
180
                                                [% ELSE %]
181
                                                    [% IF ( module == 'SERIAL' ) %]
182
                                                        <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object %]"> [% loopro.object %] </a>
183
                                                    [% ELSE %]
184
                                                        [% IF ( module == 'AUTHORITIES' ) %]
185
                                                            <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object %]" title="Display detail for this authority">auth [% loopro.object %]</a>
186
                                                        [% ELSE %]
187
                                                            [% loopro.object %]
188
                                                        [% END %]
189
                                                    [% END %]
190
                                                [% END %]
191
                                            [% END %]
192
                                        [% END %]
193
                                    </td>
194
                                    <td>
195
                                        [% IF ( loopro.CIRCULATION ) %]
196
                                            <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.barcode |html %]</a>
197
                                        [% ELSE %]
198
                                            [% loopro.info |html %]
199
                                        [% END %]
200
                                    </td>
201
                                </tr>
202
                            [% END %]
203
                        </table>
204
                    [% ELSE %]
205
                        <div class="dialog alert">
206
                            No log found
207
                            [% IF ( CATALOGUING ) %]
208
                                for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object %]">Bibliographic record [% object %]</a>
209
                            [% END %]
210
                            [% IF ( MEMBERS ) %]
211
                                for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object %]">[% INCLUDE 'patron-title.inc' %]</a>
212
                            [% END %]
213
                            .
214
                        </div>
215
                    [% END %]
216
                [% END %]
217
			</div>
223
			</div>
218
		</div>
224
		</div>
219
		<div class="yui-b noprint">
225
		<div class="yui-b noprint">
220
- 

Return to bug 6890