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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-908 / +1116 lines)
Lines 23-967 Link Here
23
</title>
23
</title>
24
[% INCLUDE 'doc-head-close.inc' %]
24
[% INCLUDE 'doc-head-close.inc' %]
25
[% IF op == 'else' %]
25
[% IF op == 'else' %]
26
    <style>
26
    [% FILTER collapse %]
27
        h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief ol { display : none; }
27
        <style>
28
        .overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding: .5em; color: #000; }
28
            h4.local_collapse a {
29
    </style>
29
                font-size: 80%;
30
                text-decoration: none;
31
            }
32
            fieldset.brief ol {
33
                display: none;
34
            }
35
            .overlay {
36
                background: #eeffd4;
37
                color: #000;
38
                display: none;
39
                left: 50%;
40
                margin-left: -100px;
41
                margin-top: -10px;
42
                padding: .5em;
43
                position: absolute;
44
                text-align: center;
45
                top: 180px;
46
                width: 200px;
47
            }
48
        </style>
49
    [% END %]
30
[% END %]
50
[% END %]
31
</head>
51
</head>
32
52
33
<body id="acq_suggestion" class="acq">
53
<body id="acq_suggestion" class="acq">
34
[% INCLUDE 'header.inc' %]
54
    [% INCLUDE 'header.inc' %]
35
[% INCLUDE 'cat-search.inc' %]
55
    [% INCLUDE 'cat-search.inc' %]
36
<div id="breadcrumbs">
37
    <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
38
    [% IF op == 'save' %]
39
        [% IF ( suggestionid ) %]
40
            <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo;  Edit suggestion #[% suggestionid | html %]
41
        [% ELSE %]
42
            <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo; Add suggestion
43
        [% END %]
44
    [% ELSIF ( op == 'show' ) %]
45
           <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo; Show suggestion #[% suggestionid | html %]
46
    [% ELSE %]
47
        Suggestions management
48
    [% END %]
49
</div>
50
51
[% IF ( op == 'show' ) %]
52
    <div class="main container-fluid">
53
        <div class="row">
54
            <div class="col-md-8 col-md-offset-2">
55
56
    <div id="toolbar" class="btn-toolbar">
57
        <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&amp;suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
58
        <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&amp;suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
59
    </div>
60
61
    <fieldset class="rows">
62
      <legend>Bibliographic information</legend>
63
      <ol>
64
            [% IF ( title ) %]
65
                <li>
66
                    <span class="label">Title:</span>
67
                    [% IF suggestion.biblionumber %]
68
                        <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestion.biblionumber | uri %]">[% suggestion.title | html %]</a>
69
                    [% ELSE %]
70
                        [% title | html %]
71
                    [% END %]
72
                </li>
73
            [% END %]
74
            [% IF ( author ) %]
75
                <li>
76
                    <span class="label">Author:</span>
77
                    [% author | html %]
78
                </li>
79
            [% END %]
80
            [% IF ( copyrightdate ) %]
81
                <li>
82
                    <span class="label">Copyright date:</span>
83
                    [% copyrightdate | html %]
84
                </li>
85
            [% END %]
86
            [% IF ( isbn ) %]
87
                <li>
88
                    <span class="label">ISBN or ISSN or other standard number:</span>
89
                    [% isbn | html %]
90
                </li>
91
            [% END %]
92
            [% IF ( publishercode ) %]
93
                <li>
94
                    <span class="label">Publisher:</span>
95
                    [% publishercode | html %]
96
                </li>
97
            [% END %]
98
            [% IF ( place ) %]
99
                <li>
100
                    <span class="label">Publication place:</span>
101
                    [% place | html %]
102
                </li>
103
            [% END %]
104
            [% IF ( collectiontitle ) %]
105
                <li>
106
                    <span class="label">Collection title:</span>
107
                    [% collectiontitle | html %]
108
                </li>
109
            [% END %]
110
            [% IF ( itemtype ) %]
111
                <li>
112
                    <span class="label">Document type:</span>
113
                    [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
114
                </li>
115
            [% END %]
116
        [% IF ( patron_reason_loop ) %]
117
          <li><span class="label">Reason for suggestion: </span>
118
            [% FOREACH patron_reason_loo IN patron_reason_loop %]
119
              [% IF patron_reason_loo.authorised_value == patronreason %][% patron_reason_loo.lib | html %][% END %]
120
            [% END %]
121
          </li>
122
        [% END %]
123
            [% IF ( note ) %]
124
                <li>
125
                    <span class="label">Notes:</span>
126
                    [% note | html %]
127
                </li>
128
            [% END %]
129
      </ol>
130
    </fieldset>
131
    <fieldset class="rows"> <legend>Suggestion management</legend>
132
      <ol>
133
        <li>
134
          <span class="label">Status:</span>
135
          [% SET status_found = 0 %]
136
          [% IF ( STATUS == 'ASKED' ) %]
137
              Pending
138
              [% SET status_found = 1 %]
139
          [% ELSIF ( STATUS == 'ACCEPTED' ) %]
140
              Accepted
141
              [% SET status_found = 1 %]
142
          [% ELSIF ( STATUS == 'CHECKED' ) %]
143
              Checked
144
              [% SET status_found = 1 %]
145
          [% ELSIF ( STATUS == 'REJECTED' ) %]
146
              Rejected
147
              [% SET status_found = 1 %]
148
          [% ELSIF ( STATUS == 'ORDERED' ) %]
149
              Ordered
150
              [% SET status_found = 1 %]
151
          [% ELSIF ( STATUS == 'AVAILABLE' ) %]
152
              Available
153
              [% SET status_found = 1 %]
154
          [% ELSE %]
155
              [% FOREACH s IN SuggestionStatuses %]
156
                  [% IF STATUS == s.authorised_value %]
157
                      [% s.lib | html %]
158
                      [% SET status_found = 1 %]
159
                  [% END %]
160
              [% END %]
161
          [% END %]
162
163
        </li>
164
        <li>
165
         <span class="label">Reason:</span>
166
            [% IF ( reason ) %]
167
                [% AuthorisedValues.GetByCode( 'SUGGEST', reason, 0 ) | html %]
168
            [% END %]
169
        </li>
170
        <li>
171
          <table>
172
            <thead><tr><th>&nbsp;</th><th>Date</th><th>By</th></tr></thead>
173
            <tbody>
174
            <tr>
175
                <th>[% tp('purchase suggestion created by', 'Created by:') | html %]</th>
176
                <td>[% suggesteddate | $KohaDates %]</td>
177
                <td>
178
                    [% IF ( suggestedby_patron.borrowernumber ) %]
179
                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_patron.borrowernumber | uri %]">[% suggestedby_patron.surname | html %], [% suggestedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>
180
                        [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])
181
                    [% END %]
182
                </td>
183
            </tr>
184
            <tr>
185
                <th>Managed by:</th>
186
                <td>[% manageddate | $KohaDates %]</td>
187
                <td>
188
                        [% IF ( managedby_patron.borrowernumber ) %]
189
                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_patron.borrowernumber | uri %]">[% managedby_patron.surname | html %], [% managedby_patron.firstname | html %] ([% managedby_patron.cardnumber | html %])</a>
190
                            [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
191
                        [% END %]
192
                </td>
193
            </tr>
194
            <tr>
195
                <th>Accepted on:</th>
196
                <td>[% accepteddate | $KohaDates %]</td>
197
                <td>
198
                    [% IF ( acceptedby_patron.borrowernumber ) %]
199
                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_patron.borrowernumber | uri %]">[% acceptedby_patron.surname | html %], [% acceptedby_patron.firstname | html %] ([% acceptedby_patron.cardnumber | html %])</a>
200
                        [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
201
                    [% END %]
202
                </td>
203
            </tr>
204
            <tr>
205
                <th>Last modification on:</th>
206
                <td>[% lastmodificationdate | $KohaDates %]</td>
207
                <td>
208
                    [% IF ( lastmodificationby_patron.borrowernumber ) %]
209
                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% lastmodificationby_patron.borrowernumber | uri %]">[% lastmodificationby_patron.surname | html %], [% lastmodificationby_patron.firstname | html %] ([% lastmodificationby_patron.cardnumber | html %])</a>
210
                        [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
211
                    [% END %]
212
                </td>
213
            </tr>
214
            </tbody>
215
        </table></li></ol>
216
    </fieldset>
217
    <fieldset class="rows"> <legend>Acquisition information</legend>
218
      <ol>
219
        <li>
220
          <span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]
221
        </li>
222
        <li>
223
          <span class="label">Fund:</span> [% budgetname | html %]
224
        </li>
225
        <li>
226
          <span class="label">Copies:</span>[% quantity | html %]
227
        </li>
228
        <li>
229
          <span class="label">Currency:</span>[% currency | html %]
230
        </li>
231
        <li>
232
          <span class="label">Price:</span>[% price | $Price %]
233
        </li>
234
        <li>
235
          <span class="label">Total</span>[% total | $Price %]
236
        </li>
237
      </ol>
238
    </fieldset>
239
240
    <fieldset class="action">
241
        <a href="suggestion.pl">&lt;&lt; Back to suggestions</a>
242
    </fieldset>
243
244
    </div>
245
    </div>
246
</div>
247
[% ELSE %]
248
249
[% IF op == 'save' %]
250
    <div class="main container-fluid">
251
        <div class="row">
252
            <div class="col-md-8 col-md-offset-2">
253
[% ELSE %]
254
    <div class="main container-fluid">
255
        <div class="row">
256
            <div class="col-sm-10 col-sm-push-2">
257
                <main>
258
56
259
[% END %]
57
    <div id="breadcrumbs">
260
58
        <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
261
[% IF op == 'save' %]
59
        [% IF op == 'save' %]
262
    [% FOR m IN messages %]
60
            [% IF ( suggestionid ) %]
263
        <div class="dialog [% m.type | html %]">
61
                <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo;  Edit suggestion #[% suggestionid | html %]
264
            [% SWITCH m.code %]
62
            [% ELSE %]
265
            [% CASE 'biblio_exists' %]
63
                <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo; Add suggestion
266
                A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id | uri %]">[% m.title | html %]</a>. Click on "Confirm your suggestion" to ignore this message.
267
            [%  CASE 'manager_not_enough_permissions' %]
268
                The manager you selected does not have sufficient permissions.
269
            [% CASE %]
270
                [% m.code | html %]
271
            [% END %]
64
            [% END %]
272
        </div>
65
        [% ELSIF ( op == 'show' ) %]
273
    [% END %]
66
            <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> &rsaquo; Show suggestion #[% suggestionid | html %]
274
    <form id="add_edit" action="suggestion.pl" method="post" class="validated">
67
        [% ELSE %]
275
    <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
68
            Suggestions management
276
    <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
277
    [% IF ( suggestionid ) %]
278
        <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
279
        <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
280
    [% ELSE %]
281
        <h1>Enter a new purchase suggestion</h1>
282
    [% END %]
283
    <fieldset class="rows"> <legend>Bibliographic information</legend><ol>
284
        <li>
285
            <label for="title" class="required">Title:</label>
286
            <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
287
            <span class="required">Required</span>
288
        </li>
289
        <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/></li>
290
        <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" /></li>
291
        <li><label for="isbn">ISBN or ISSN or other standard number:</label><input type="text" id="isbn" name="isbn" size="50" maxlength="80" value="[% isbn | html %]"/></li>
292
        <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/></li>
293
        <li><label for="place">Publication place:</label><input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/></li>
294
        <li><label for="collectiontitle">Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/></li>
295
        <li><label for="itemtype">Document type:</label>
296
            [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
297
        </li>
298
        [% IF patron_reason_loop %]
299
            <li>
300
                <label for="patronreason">Reason for suggestion: </label>
301
                <select name="patronreason" id="patronreason">
302
                    <option value=""> -- Choose -- </option>
303
                    [% FOREACH patron_reason_loo IN patron_reason_loop %]
304
                        [% IF patron_reason_loo.authorised_value == patronreason %]
305
                            <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
306
                        [% ELSE %]
307
                            <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
308
                        [% END %]
309
                    [% END %]
310
                </select>
311
            </li>
312
        [% END %]
69
        [% END %]
313
        <li><label for="note">Notes:</label><textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea></li>
70
    </div> <!-- /.breadcrumbs -->
314
        </ol>
315
    </fieldset>
316
    <fieldset class="rows"> <legend>Suggestion management</legend>
317
       <ol>
318
            [% IF ( suggestionid ) %]
319
                <li>
320
                    <label for="STATUS">Status:</label>
321
                    <select id="STATUS" name="STATUS">
322
                        <option value="">No status</option>
323
324
                        [% IF (statusselected_ASKED ) %]
325
                            <option value="ASKED" selected="selected">Pending</option>
326
                        [% ELSE %]
327
                            <option value="ASKED">Pending</option>
328
                        [% END %]
329
71
330
                        [% IF (statusselected_ACCEPTED ) %]
72
    [% IF ( op == 'show' ) %]
331
                            <option value="ACCEPTED" selected="selected">Accepted</option>
73
        <div class="main container-fluid">
332
                        [% ELSE %]
74
            <div class="row">
333
                            <option value="ACCEPTED">Accepted</option>
75
                <div class="col-md-8 col-md-offset-2">
334
                        [% END %]
335
76
336
                        [% IF (statusselected_CHECKED ) %]
77
                    <div id="toolbar" class="btn-toolbar">
337
                            <option value="CHECKED" selected="selected">Checked</option>
78
                        <a class="btn btn-default" id="editsuggestion" href="suggestion.pl?op=edit&amp;suggestionid=[% suggestionid | html %]"><i class="fa fa-pencil"></i> Edit</a>
338
                        [% ELSE %]
79
                        <a class="btn btn-default deletesuggestion" href="suggestion.pl?op=delete&amp;suggestionid=[% suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a>
339
                            <option value="CHECKED">Checked</option>
80
                    </div>
340
                        [% END %]
341
342
                        [% IF ( statusselected_REJECTED ) %]
343
                            <option value="REJECTED" selected="selected">Rejected</option>
344
                        [% ELSE %]
345
                            <option value="REJECTED">Rejected</option>
346
                        [% END %]
347
348
                        [% IF ( statusselected_ORDERED ) %]
349
                            <option value="ORDERED" selected="selected">Ordered</option>
350
                        [% ELSE %]
351
                            <option value="ORDERED">Ordered</option>
352
                        [% END %]
353
81
354
                        [% FOREACH s IN SuggestionStatuses %]
82
                    <fieldset class="rows">
355
                            [% IF s.authorised_value == suggestion.STATUS %]
83
                        <legend>Bibliographic information</legend>
356
                                <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
84
                            <ol>
357
                            [% ELSE %]
85
                                [% IF ( title ) %]
358
                                <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
86
                                    <li>
87
                                        <span class="label">Title:</span>
88
                                        [% IF suggestion.biblionumber %]
89
                                            <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestion.biblionumber | uri %]">[% suggestion.title | html %]</a>
90
                                        [% ELSE %]
91
                                            [% title | html %]
92
                                        [% END %]
93
                                    </li>
94
                                [% END %]
95
                                [% IF ( author ) %]
96
                                <li>
97
                                    <span class="label">Author:</span>
98
                                    [% author | html %]
99
                                </li>
359
                            [% END %]
100
                            [% END %]
360
                        [% END %]
101
                            [% IF ( copyrightdate ) %]
361
                    </select>
102
                                <li>
362
                </li>
103
                                    <span class="label">Copyright date:</span>
363
                <li>
104
                                    [% copyrightdate | html %]
364
                    <label for="reason">Reason</label>
105
                                </li>
365
                    <select class="select-reason" id="reason" name="reason">
366
                        <option value=""> -- Choose a reason -- </option>
367
                        [% FOREACH reasonsloo IN suggestion.reasonsloop %]
368
                            [% IF (reasonsloo.lib == suggestion.reason) %]
369
                                <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
370
                            [% ELSE %]
371
                                <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
372
                            [% END %]
106
                            [% END %]
373
                        [% END %]
107
                            [% IF ( isbn ) %]
374
                        <option value="other">Others...</option>
108
                                <li>
375
                    </select>
109
                                    <span class="label">ISBN or ISSN or other standard number:</span>
376
110
                                    [% isbn | html %]
377
                    <span id="other_reason" name="other_reason">
111
                                </li>
378
                        [% IF other_reason %]
379
                            <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
380
                        [% ELSE %]
381
                            <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
382
                        [% END %]
383
                        <a href="#back">Cancel</a>
384
                    </span>
385
                </li>
386
            [% END %]
387
        <li><table>
388
            <thead><tr><th>&nbsp;</th><th>Date</th><th>By</th><th>Action</th></tr></thead>
389
            <tbody>
390
            <tr>
391
                <th><label for="suggesteddate">[% tp('purchase suggestion created by', 'Created by:') | html %]</label> </th>
392
                <td><input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]</td>
393
                <td id="tdsuggestedby"><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby | html %]"/>[% IF ( suggestedby_patron.borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_patron.borrowernumber | uri %]">[% suggestedby_patron.surname | html %], [% suggestedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>  [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])[% END %]
394
                </td>
395
                <td><a href="#" id="edit_suggester" class="btn btn-default">Set to patron</a></td>
396
            </tr>
397
            <tr>
398
                <th><label for="accepteddate">Accepted on:</label> </th>
399
                <td><input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]</td>
400
                <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby | html %]"/>[% IF ( acceptedby_patron.borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_patron.borrowernumber | uri %]">[% acceptedby_patron.surname | html %], [% acceptedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a> [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])[% END %]</td>
401
                <td></td>
402
            </tr>
403
            <tr>
404
                <th><label for="lastmodificationdate">Last modification on:</label> </th>
405
                <td>[% lastmodificationdate | $KohaDates %]</td>
406
                <td>
407
                    [% IF lastmodificationby_patron %]
408
                        [% INCLUDE 'patron-title.inc' patron=lastmodificationby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
409
                    [% END %]
410
                </td>
411
                <td></td>
412
            </tr>
413
            </tbody>
414
        </table></li>
415
416
            <li>
417
                <label for="managedon">Managed on:</label>
418
                <input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]
419
            </li>
420
            <li>
421
                <label for="managedby_name">by:</label>
422
                <div>
423
                    <span id="managedby_name" name="managedby_name">
424
                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a>
425
                    </span>
426
                    [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
427
                        | Previously was [% INCLUDE 'patron-title.inc' patron=managedby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
428
                    [% END %]
429
                    <br />
430
                    <a id="edit_manager" class="new_window" href="#"><i class="fa fa-search"></i> Select manager</a>
431
                    [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
432
                        <a id="restore_previous_manager" href="#"><i class="fa fa-trash"></i> Keep existing manager</a>
433
                    [% END %]
434
                    <input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" />
435
436
                    <br/>
437
                    <label for="notify">Notify manager:</label>
438
                    <input type="checkbox" id="notify" name="notify" value="notify" disabled="disabled" title="A NOTIFY_MANAGER notice will be generated and send to the manager if a valid email address is defined. This can be checked if a new manager has been selected." />
439
                </div>
440
            </li>
441
        </ol>
442
    </fieldset>
443
    <fieldset class="rows"> <legend>Acquisition information</legend><ol>
444
        <li><label for="branchcode">Library:</label>
445
            <select name="branchcode" id="branchcode">
446
                <option value="">Any</option>
447
                [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
448
            </select>
449
        </li>
450
        <li><label for="budgetid">Fund:</label>
451
            <select name="budgetid" id="budgetid">
452
                <option value="">Any</option>
453
                [% FOREACH budget IN sugg_budgets %]
454
                    [% IF ( budget.selected ) %]
455
                        <option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %](inactive)[% END %]</option>
456
                    [% ELSIF ( budget.b_active ) %]
457
                        <option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option>
458
                    [% ELSE %]
459
                        <option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option>
460
                    [% END %]
461
                [% END %]
462
            </select>
463
            <label for="showallfunds" style="float:none;width:auto;">&nbsp;Show inactive:</label>
464
            <input type="checkbox" id="showallfunds" />
465
        </li>
466
        <li><label for="quantity">Copies:</label>
467
            <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
468
                </li>
469
                <li>
470
                    <label for="currency">Currency:</label>
471
                    [% FOREACH c IN currencies %]
472
                        <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
473
                        <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
474
                    [% END %]
475
476
                    <select name="currency" id="currency">
477
                        [% FOREACH c IN currencies %]
478
                            [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
479
                                <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
480
                            [% ELSIF not c.archived %]
481
                                <option value="[% c.currency | html %]">[% c.currency | html %]</option>
482
                            [% END %]
112
                            [% END %]
483
                        [% END %]
113
                            [% IF ( publishercode ) %]
484
                    </select>
114
                                <li>
485
                </li>
115
                                    <span class="label">Publisher:</span>
486
                <li><label for="price">Price:</label>
116
                                    [% publishercode | html %]
487
            <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
117
                                </li>
488
                </li><li><label for="total">Total: </label>
118
                            [% END %]
489
			<input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
119
                            [% IF ( place ) %]
490
                </li></ol>
120
                                <li>
491
    </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
121
                                    <span class="label">Publication place:</span>
492
    <fieldset class="action">
122
                                    [% place | html %]
493
        <input type="hidden" name="op" value="[% op | html %]" />
123
                                </li>
494
        [% IF ( suggestionid ) %]
124
                            [% END %]
495
            [% IF ( need_confirm ) %]
125
                            [% IF ( collectiontitle ) %]
496
                <input type="hidden" name="save_confirmed" value="1" />
126
                                <li>
497
                <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
127
                                    <span class="label">Collection title:</span>
498
            [% ELSE %]
128
                                    [% collectiontitle | html %]
499
                <input type="submit" value="Save" />
129
                                </li>
500
            [% END %]
130
                            [% END %]
501
            <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
131
                            [% IF ( itemtype ) %]
132
                                <li>
133
                                    <span class="label">Document type:</span>
134
                                    [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', itemtype, 0 ) | html %]
135
                                </li>
136
                            [% END %]
137
                            [% IF ( patron_reason_loop ) %]
138
                                <li>
139
                                    <span class="label">Reason for suggestion: </span>
140
                                    [% FOREACH patron_reason_loo IN patron_reason_loop %]
141
                                        [% IF patron_reason_loo.authorised_value == patronreason %]
142
                                            [% patron_reason_loo.lib | html %]
143
                                        [% END %]
144
                                    [% END %]
145
                                </li>
146
                            [% END %]
147
                            [% IF ( note ) %]
148
                                <li>
149
                                    <span class="label">Notes:</span>
150
                                    [% note | html %]
151
                                </li>
152
                            [% END %]
153
                        </ol>
154
                    </fieldset>
155
156
                    <fieldset class="rows">
157
                        <legend>Suggestion management</legend>
158
                        <ol>
159
                            <li>
160
                                <span class="label">Status:</span>
161
                                [% SET status_found = 0 %]
162
                                [% IF ( STATUS == 'ASKED' ) %]
163
                                    Pending
164
                                    [% SET status_found = 1 %]
165
                                [% ELSIF ( STATUS == 'ACCEPTED' ) %]
166
                                    Accepted
167
                                    [% SET status_found = 1 %]
168
                                [% ELSIF ( STATUS == 'CHECKED' ) %]
169
                                    Checked
170
                                    [% SET status_found = 1 %]
171
                                [% ELSIF ( STATUS == 'REJECTED' ) %]
172
                                    Rejected
173
                                    [% SET status_found = 1 %]
174
                                [% ELSIF ( STATUS == 'ORDERED' ) %]
175
                                    Ordered
176
                                    [% SET status_found = 1 %]
177
                                [% ELSIF ( STATUS == 'AVAILABLE' ) %]
178
                                    Available
179
                                    [% SET status_found = 1 %]
180
                                [% ELSE %]
181
                                    [% FOREACH s IN SuggestionStatuses %]
182
                                        [% IF STATUS == s.authorised_value %]
183
                                            [% s.lib | html %]
184
                                            [% SET status_found = 1 %]
185
                                        [% END %]
186
                                    [% END %]
187
                                [% END %]
188
                            </li>
189
                            <li>
190
                                <span class="label">Reason:</span>
191
                                [% IF ( reason ) %]
192
                                    [% AuthorisedValues.GetByCode( 'SUGGEST', reason, 0 ) | html %]
193
                                [% END %]
194
                            </li>
195
                        </ol>
196
197
                        <table>
198
                            <thead>
199
                                <tr>
200
                                    <th>&nbsp;</th>
201
                                    <th>Date</th>
202
                                    <th>By</th>
203
                                </tr>
204
                            </thead>
205
                            <tbody>
206
                                <tr>
207
                                    <th>[% tp('purchase suggestion created by', 'Created by:') | html %]</th>
208
                                    <td>[% suggesteddate | $KohaDates %]</td>
209
                                    <td>
210
                                        [% IF ( suggestedby_patron.borrowernumber ) %]
211
                                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_patron.borrowernumber | uri %]">[% suggestedby_patron.surname | html %], [% suggestedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>
212
                                            [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])
213
                                        [% END %]
214
                                    </td>
215
                                </tr>
216
                                <tr>
217
                                    <th>Managed by:</th>
218
                                    <td>[% manageddate | $KohaDates %]</td>
219
                                    <td>
220
                                        [% IF ( managedby_patron.borrowernumber ) %]
221
                                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_patron.borrowernumber | uri %]">[% managedby_patron.surname | html %], [% managedby_patron.firstname | html %] ([% managedby_patron.cardnumber | html %])</a>
222
                                            [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
223
                                        [% END %]
224
                                    </td>
225
                                </tr>
226
                                <tr>
227
                                    <th>Accepted on:</th>
228
                                    <td>[% accepteddate | $KohaDates %]</td>
229
                                    <td>
230
                                        [% IF ( acceptedby_patron.borrowernumber ) %]
231
                                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_patron.borrowernumber | uri %]">[% acceptedby_patron.surname | html %], [% acceptedby_patron.firstname | html %] ([% acceptedby_patron.cardnumber | html %])</a>
232
                                            [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
233
                                        [% END %]
234
                                    </td>
235
                                </tr>
236
                                <tr>
237
                                    <th>Last modification on:</th>
238
                                    <td>[% lastmodificationdate | $KohaDates %]</td>
239
                                    <td>
240
                                        [% IF ( lastmodificationby_patron.borrowernumber ) %]
241
                                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% lastmodificationby_patron.borrowernumber | uri %]">[% lastmodificationby_patron.surname | html %], [% lastmodificationby_patron.firstname | html %] ([% lastmodificationby_patron.cardnumber | html %])</a>
242
                                            [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
243
                                        [% END %]
244
                                    </td>
245
                                </tr>
246
                            </tbody>
247
                        </table>
248
                    </fieldset>
249
250
                    <fieldset class="rows">
251
                        <legend>Acquisition information</legend>
252
                        <ol>
253
                            <li>
254
                                <span class="label">Library:</span>
255
                                [% Branches.GetName( branchcode ) | html %]
256
                            </li>
257
                            <li>
258
                                <span class="label">Fund:</span>
259
                                [% budgetname | html %]
260
                            </li>
261
                            <li>
262
                                <span class="label">Copies:</span>
263
                                [% quantity | html %]
264
                            </li>
265
                            <li>
266
                                <span class="label">Currency:</span>
267
                                [% currency | html %]
268
                            </li>
269
                            <li>
270
                                <span class="label">Price:</span>
271
                                [% price | $Price %]
272
                            </li>
273
                            <li>
274
                                <span class="label">Total</span>
275
                                [% total | $Price %]
276
                            </li>
277
                        </ol>
278
                    </fieldset>
279
280
                    <fieldset class="action">
281
                        <a href="suggestion.pl">&lt;&lt; Back to suggestions</a>
282
                    </fieldset>
283
284
                </div> <!-- /.col-md-8 col-md-offset-2 -->
285
            </div> <!-- /.row -->
286
    [% ELSE # IF op == "show" %]
287
288
        [% IF op == 'save' %]
289
            <div class="main container-fluid">
290
                <div class="row">
291
                    <div class="col-md-8 col-md-offset-2">
502
        [% ELSE %]
292
        [% ELSE %]
503
            [% IF ( need_confirm ) %]
293
            <div class="main container-fluid">
504
                <input type="hidden" name="save_confirmed" value="1" />
294
                <div class="row">
505
                <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
295
                    <div class="col-sm-10 col-sm-push-2">
506
            [% ELSE %]
507
                <input type="submit" value="Submit your suggestion" />
508
            [% END %]
509
            <a class="cancel" href="suggestion.pl">Cancel</a>
510
        [% END %]
296
        [% END %]
511
    </fieldset>
512
    </form>
513
[% END %]
514
515
[% IF op == 'else' %]
516
<div id="toolbar" class="btn-toolbar">
517
    <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
518
</div>
519
520
<h1>Suggestions management</h1>
521
522
[% IF ( displayby != "branchcode" ) %]
523
    <label for="branchcode">Viewing suggestions for library:</label>
524
    <select name="branchcode" id="branchcode">
525
        <option value="__ANY__">Any</option>
526
        [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
527
    </select>
528
[% END %]
529
530
297
531
[% FOR m IN messages %]
298
        [% IF op == 'save' %]
532
    <div class="dialog [% m.type | html %]">
299
            [% FOR m IN messages %]
533
        [% SWITCH m.code %]
300
                <div class="dialog [% m.type | html %]">
534
        [% CASE 'already_exists' %]
301
                    [% SWITCH m.code %]
535
            The suggestion has not been added. A suggestion with this title already exists (<a href='/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% m.id | html %]&op=show'>suggestion #[% m.id | html %]</a>)
302
                    [% CASE 'biblio_exists' %]
536
        [% CASE 'biblio_exists' %]
303
                        A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id | uri %]">[% m.title | html %]</a>. Click on "Confirm your suggestion" to ignore this message.
537
            A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id | uri %]">[% m.title | html %]</a>. Click on "Confirm your suggestion" to ignore this message.
304
                    [%  CASE 'manager_not_enough_permissions' %]
538
        [% CASE %]
305
                        The manager you selected does not have sufficient permissions.
539
            [% m.code | html %]
306
                    [% CASE %]
540
        [% END %]
307
                        [% m.code | html %]
541
    </div>
308
                    [% END %]
542
[% END %]
309
                </div> <!-- /.dialog -->
310
            [% END %]
543
311
544
[% UNLESS ( notabs ) %]
312
            <form id="add_edit" action="suggestion.pl" method="post" class="validated">
545
    <div id="suggestiontabs" class="toptabs">
313
                <input type="hidden" name="redirect" id="redirect" value="[% redirect | html %]" />
546
    <ul class="ui-tabs-nav">
314
                <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber | html %]" />
547
        [% FOREACH suggestion IN suggestions %]
315
                [% IF ( suggestionid ) %]
548
                <li>
316
                    <h1>Edit purchase suggestion #[% suggestionid | html %]</h1>
549
            <a href="#[% suggestion.suggestiontype | uri %]">
317
                    <input type="hidden" name="suggestionid" value="[% suggestionid | html %]"/>
550
            [% IF ( suggestion.suggestiontypelabel ) %]
551
                [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
552
                [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
553
                [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
554
                [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
555
                [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
556
                [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
557
                [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
558
                [% ELSIF (suggestion.suggestiontypelabel == "__ANY__") %]Any
559
                [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
560
            [% ELSE %]
561
                [% IF ( suggestion.suggestiontype ) %]
562
                    [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
563
                [% ELSE %]
318
                [% ELSE %]
564
                    No name
319
                    <h1>Enter a new purchase suggestion</h1>
565
                [% END %]
320
                [% END %]
566
            [% END %]
567
            ([% suggestion.suggestions_loop.size | html %])</a></li>
568
569
        [% END %]
570
    </ul>
571
[% END %]
572
573
[% FOREACH suggestion IN suggestions %]
574
<div id="[% suggestion.suggestiontype | html %]">
575
<form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype| uri %]">
576
577
[% IF ( suggestion.suggestions_loop ) %]
578
<p><a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a></p>
579
    <table id="table_[% loop.count | html %]" class="sorted">
580
        <thead>
581
            <tr>
582
                <th class="NoSort noExport">&nbsp;</th>
583
                <th class="anti-the">Suggestion</th>
584
                <th>Suggested by</th>
585
                <th>Suggested on</th>
586
                <th>Managed by</th>
587
                <th>Managed on</th>
588
                <th>Last modification by</th>
589
                <th>Last modification on</th>
590
                <th>Library</th>
591
                <th>Fund</th>
592
                <th>Status</th>
593
                <th class="NoSort noExport">&nbsp;</th>
594
            </tr>
595
    </thead>
596
        <tbody>
597
            [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
598
                <tr>
599
                <td>
600
                    <input type="checkbox" name="suggestionid" value="[% suggestions_loo.suggestionid | html %]" />
601
                </td>
602
                <td>
603
                    <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&amp;op=show" title="suggestion" >
604
                        [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]</a>
605
                    <br />
606
                    [% IF ( suggestions_loo.copyrightdate ) %]&copy; <span class="suggestion_copyrightdate">[% suggestions_loo.copyrightdate | html %]</span> [% END %]
607
                        [% IF ( suggestions_loo.volumedesc ) %]; <span class="suggestion_volume">Volume:<em>[% suggestions_loo.volumedesc | html %]</em></span> [% END %]
608
                        [% IF ( suggestions_loo.isbn ) %]; <span class="suggestion_isbn">ISBN: <em>[% suggestions_loo.isbn | html %]</em></span> [% END %]
609
                        [% IF ( suggestions_loo.publishercode ) %]; <span class="suggestion_publishercode">Published by [% suggestions_loo.publishercode | html %]</span> [% END %]
610
                        [% IF ( suggestions_loo.publicationyear ) %]in <span class="suggestion_publicationyear"><em>[% suggestions_loo.publicationyear | html %]</em></span> [% END %]
611
                        [% IF ( suggestions_loo.place ) %]in <span class="suggestion_place"><em>[% suggestions_loo.place | html %]</em></span> [% END %]
612
                        [% IF ( suggestions_loo.collectiontitle ) %]; <span class="suggestion_collectiontitle">[% suggestions_loo.collectiontitle | html %]</span> [% END %]
613
                        [% IF ( suggestions_loo.itemtype ) %]; <span class="suggestion_itype">[% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) | html %]</span> [% END %]<br />
614
                        [% IF ( suggestions_loo.note ) %]<div class="suggestion_note"><i class="fa fa-comment"></i> [% suggestions_loo.note | html %]</div>[% END %]
615
                        [% IF suggestions_loo.archived %]<br /><i class="fa fa-archive"></i> Archived[% END %]
616
                </td>
617
                <td>
618
                    <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby | uri %]">[% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby | html %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby | html %])[% END %]</a>
619
                </td>
620
                <td data-order="[% suggestions_loo.suggesteddate | html %]">
621
                    [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
622
                </td>
623
                <td>
624
                    <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.managedby | uri %]">[% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby | html %][% END %]</a>
625
                </td>
626
                <td data-order="[% suggestions_loo.manageddate | html %]">
627
                    [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
628
                </td>
629
                <td>
630
                    <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.lastmodificationby | uri %]">[% suggestions_loo.surnamelastmodificationby | html %][% IF ( suggestions_loo.firstnamelastmodificationby ) %], [% suggestions_loo.firstnamelastmodificationby | html %][% END %]</a>
631
                </td>
632
                <td data-order="[% suggestions_loo.lastmodificationdate | html %]">
633
                    [% IF ( suggestions_loo.lastmodificationdate ) %][% suggestions_loo.lastmodificationdate | $KohaDates %][% END %]
634
                </td>
635
                <td>
636
                    [% Branches.GetName( suggestions_loo.branchcode ) | html %]
637
                </td>
638
                <td>
639
                    [% suggestions_loo.budget_name | html %]
640
                </td>
641
                <td>
642
                    [% IF ( suggestions_loo.ASKED ) %]
643
                        Pending
644
                    [% ELSIF ( suggestions_loo.ACCEPTED ) %]
645
                        Accepted
646
                    [% ELSIF ( suggestions_loo.ORDERED ) %]
647
                        Ordered
648
                    [% ELSIF ( suggestions_loo.REJECTED ) %]
649
                        Rejected
650
                    [% ELSIF ( suggestions_loo.CHECKED ) %]
651
                        Checked
652
                    [% ELSIF ( suggestions_loo.AVAILABLE ) %]
653
                        Available
654
                    [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
655
                        [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
656
                    [% ELSE %]
657
                        Status unknown
658
                    [% END %]
659
660
                    [% IF ( suggestions_loo.reason ) %]
661
                        <br />([% suggestions_loo.reason | html %])
662
                    [% END %]
663
                </td>
664
                <td class="actions">
665
                    <div class="btn-group dropup">
666
                        <a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&amp;op=edit"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% suggestions_loo.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
667
                        <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% suggestions_loo.suggestionid | html %]">
668
                            <li><a class="deletesuggestion" href="suggestion.pl?op=delete&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
669
                            [% UNLESS suggestions_loo.archived %]
670
                                <li><a class="archivesuggestion" href="suggestion.pl?op=archive&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li>
671
                            [% ELSE %]
672
                                <li><a class="unarchivesuggestion" href="suggestion.pl?op=unarchive&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-archive"></i> Unarchive</a></li>
673
                            [% END %]
674
                        </ul>
675
                    </div>
676
                </td>
677
        </tr>
678
        [% END %]</tbody>
679
        </table>
680
681
        <div class="row">
682
            <h2 style="padding-left:1em;">Change selected suggestions</h3>
683
            <div class="col-sm-4">
684
                <fieldset>
685
                    <div id="select-reason">
686
                       <label for="STATUS">Mark selected as: </label>
687
                       <select name="STATUS" id="STATUS">
688
                           <option value=""> -- Choose a status --</option>
689
690
                           [% IF (statusselected_ASKED ) %]
691
                               <option value="ASKED" selected="selected">Pending</option>
692
                           [% ELSE %]
693
                               <option value="ASKED">Pending</option>
694
                           [% END %]
695
696
                           [% IF (statusselected_ACCEPTED ) %]
697
                               <option value="ACCEPTED" selected="selected">Accepted</option>
698
                           [% ELSE %]
699
                               <option value="ACCEPTED">Accepted</option>
700
                           [% END %]
701
702
                           [% IF (statusselected_CHECKED ) %]
703
                               <option value="CHECKED" selected="selected">Checked</option>
704
                           [% ELSE %]
705
                               <option value="CHECKED">Checked</option>
706
                           [% END %]
707
708
                           [% IF ( statusselected_REJECTED ) %]
709
                               <option value="REJECTED" selected="selected">Rejected</option>
710
                           [% ELSE %]
711
                               <option value="REJECTED">Rejected</option>
712
                           [% END %]
713
714
                           [% IF ( statusselected_ORDERED ) %]
715
                               <option value="ORDERED" selected="selected">Ordered</option>
716
                           [% ELSE %]
717
                               <option value="ORDERED">Ordered</option>
718
                           [% END %]
719
720
                           [% FOREACH s IN SuggestionStatuses %]
721
                               <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
722
                           [% END %]
723
                       </select>
724
725
                       <label for="reason">with this reason:</label>
726
                       <select name="reason">
727
                           <option value=""> -- Choose a reason -- </option>
728
                           [% FOREACH reasonsloo IN suggestion.reasonsloop %]
729
                               <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
730
                           [% END %]
731
                           <option value="other">Others...</option>
732
                       </select>
733
734
                       <span class="other_reason">
735
                           <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
736
                           <a href="#" class="cancel_note">Cancel</a>
737
                       </span>
738
                    </div>
739
740
                    <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
741
                    <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
742
                    <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_status"/>Submit</button></fieldset>
743
                </fieldset>
744
            </div>
745
            <div class="col-sm-4">
746
                <fieldset>
747
                    <label for="itemtype">Update item types with: </label>
748
                    [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20  %]
749
                    <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
750
                    <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
751
                    <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_itemtype"/>Submit</button></fieldset>
752
                </fieldset>
753
            </div>
754
321
755
            <div class="col-sm-2">
322
                <fieldset class="rows">
756
                <fieldset>
323
                    <legend>Bibliographic information</legend>
757
                    <label for="set_manager_[% loop.count | html %]">Update manager</label><br/>
324
                    <ol>
758
                    <a id="set_manager_[% loop.count | html %]" data-tab="[% loop.count | html %]" class="set_manager" href="#"><i class="fa fa-search"></i> Select manager</a>
325
                        <li>
759
                    <span id="managedby_name[% loop.count | html %]"></span>
326
                            <label for="title" class="required">Title:</label>
760
                    <input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" />
327
                            <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title | html %]" required="required" class="required" />
761
                    <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
328
                            <span class="required">Required</span>
762
                    <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
329
                        </li>
763
                    <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="update_manager"/>Submit</button></fieldset>
330
                        <li>
331
                            <label for="author">Author:</label>
332
                            <input type="text" id="author" name="author" size="50" maxlength="80" value="[% author | html %]"/>
333
                        </li>
334
                        <li>
335
                            <label for="copyrightdate">Copyright date:</label>
336
                            <input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate | html %]" />
337
                        </li>
338
                        <li>
339
                            <label for="isbn">ISBN or ISSN or other standard number:</label>
340
                            <input type="text" id="isbn" name="isbn" size="50" maxlength="80" value="[% isbn | html %]"/>
341
                        </li>
342
                        <li>
343
                            <label for="publishercode">Publisher:</label>
344
                            <input type="text" id="publishercode" name="publishercode" size="50" maxlength="80" value="[% publishercode | html %]"/>
345
                        </li>
346
                        <li>
347
                            <label for="place">Publication place:</label>
348
                            <input type="text" id="place" name="place" size="50" maxlength="80" value="[% place | html %]"/>
349
                        </li>
350
                        <li>
351
                            <label for="collectiontitle">Collection title:</label>
352
                            <input type="text" id="collectiontitle" name="collectiontitle" size="50" maxlength="80" value="[% collectiontitle | html %]"/>
353
                        </li>
354
                        <li>
355
                            <label for="itemtype">Document type:</label>
356
                            [% PROCESS 'av-build-dropbox.inc' name="itemtype", category="SUGGEST_FORMAT", size = 20, default=itemtype %]
357
                        </li>
358
                        [% IF patron_reason_loop %]
359
                            <li>
360
                                <label for="patronreason">Reason for suggestion: </label>
361
                                <select name="patronreason" id="patronreason">
362
                                    <option value=""> -- Choose -- </option>
363
                                    [% FOREACH patron_reason_loo IN patron_reason_loop %]
364
                                        [% IF patron_reason_loo.authorised_value == patronreason %]
365
                                            <option value="[% patron_reason_loo.authorised_value | html %]" selected="selected">[% patron_reason_loo.lib | html %]</option>
366
                                        [% ELSE %]
367
                                            <option value="[% patron_reason_loo.authorised_value | html %]">[% patron_reason_loo.lib | html %]</option>
368
                                        [% END %]
369
                                    [% END %]
370
                                </select>
371
                            </li>
372
                        [% END # /IF patron_reason_loop %]
373
                        <li>
374
                            <label for="note">Notes:</label>
375
                            <textarea name="note" id="note" rows="5" cols="40">[% note | html %]</textarea>
376
                        </li>
377
                    </ol>
764
                </fieldset>
378
                </fieldset>
765
            </div>
766
379
767
            <div class="col-sm-2">
380
                <fieldset class="rows">
768
                <fieldset>
381
                    <legend>Suggestion management</legend>
769
                    <label for="delete_[% loop.count | html %]">Delete selected</label>
382
                    <ol>
770
                    <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
383
                        [% IF ( suggestionid ) %]
771
                    <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
384
                            <li>
772
                    <fieldset class="action"><button type="submit" class="btn btn-default btn-xs" value="delete"/>Delete</button></fieldset>
385
                                <label for="STATUS">Status:</label>
386
                                <select id="STATUS" name="STATUS">
387
                                    <option value="">No status</option>
388
389
                                    [% IF (statusselected_ASKED ) %]
390
                                        <option value="ASKED" selected="selected">Pending</option>
391
                                    [% ELSE %]
392
                                        <option value="ASKED">Pending</option>
393
                                    [% END %]
394
395
                                    [% IF (statusselected_ACCEPTED ) %]
396
                                        <option value="ACCEPTED" selected="selected">Accepted</option>
397
                                    [% ELSE %]
398
                                        <option value="ACCEPTED">Accepted</option>
399
                                    [% END %]
400
401
                                    [% IF (statusselected_CHECKED ) %]
402
                                        <option value="CHECKED" selected="selected">Checked</option>
403
                                    [% ELSE %]
404
                                        <option value="CHECKED">Checked</option>
405
                                    [% END %]
406
407
                                    [% IF ( statusselected_REJECTED ) %]
408
                                        <option value="REJECTED" selected="selected">Rejected</option>
409
                                    [% ELSE %]
410
                                        <option value="REJECTED">Rejected</option>
411
                                    [% END %]
412
413
                                    [% IF ( statusselected_ORDERED ) %]
414
                                        <option value="ORDERED" selected="selected">Ordered</option>
415
                                    [% ELSE %]
416
                                        <option value="ORDERED">Ordered</option>
417
                                    [% END %]
418
419
                                    [% FOREACH s IN SuggestionStatuses %]
420
                                        [% IF s.authorised_value == suggestion.STATUS %]
421
                                            <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
422
                                        [% ELSE %]
423
                                            <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
424
                                        [% END %]
425
                                    [% END %]
426
                                </select>
427
                            </li>
428
                            <li>
429
                                <label for="reason">Reason</label>
430
                                <select class="select-reason" id="reason" name="reason">
431
                                    <option value=""> -- Choose a reason -- </option>
432
                                    [% FOREACH reasonsloo IN suggestion.reasonsloop %]
433
                                        [% IF (reasonsloo.lib == suggestion.reason) %]
434
                                            <option value="[% reasonsloo.lib | html %]" selected="selected">[% reasonsloo.lib | html %]</option>
435
                                        [% ELSE %]
436
                                            <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
437
                                        [% END %]
438
                                    [% END %]
439
                                    <option value="other">Others...</option>
440
                                </select>
441
442
                                <span id="other_reason" name="other_reason">
443
                                    [% IF other_reason %]
444
                                        <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." value="[% suggestion.reason | html %]"/>
445
                                    [% ELSE %]
446
                                        <input type="text" size="31" id="select-other_reason" name="other_reason" placeholder="please note your reason here..." />
447
                                    [% END %]
448
                                    <a href="#back">Cancel</a>
449
                                </span>
450
                            </li>
451
                        [% END %]
452
                        <li>
453
                            <table>
454
                                <thead>
455
                                    <tr>
456
                                        <th>&nbsp;</th>
457
                                        <th>Date</th>
458
                                        <th>By</th>
459
                                        <th>Action</th>
460
                                    </tr>
461
                                </thead>
462
                                <tbody>
463
                                    <tr>
464
                                        <th>
465
                                            <label for="suggesteddate">[% tp('purchase suggestion created by', 'Created by:') | html %]</label>
466
                                        </th>
467
                                        <td>
468
                                            <input type="text" id="suggesteddate" name="suggesteddate" class="datepicker" size="10" maxlength="10" value="[% suggesteddate | $KohaDates %]"/>[% INCLUDE 'date-format.inc' %]
469
                                        </td>
470
                                        <td id="tdsuggestedby">
471
                                            <input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby | html %]"/>
472
                                            [% IF ( suggestedby_patron.borrowernumber ) %]
473
                                                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_patron.borrowernumber | uri %]">[% suggestedby_patron.surname | html %], [% suggestedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>  [% Branches.GetName( suggestedby_patron.branchcode ) | html %] ([% suggestedby_patron.category.description | html %])
474
                                            [% END %]
475
                                        </td>
476
                                        <td>
477
                                            <a href="#" id="edit_suggester" class="btn btn-default">Set to patron</a>
478
                                        </td>
479
                                    </tr>
480
                                    <tr>
481
                                        <th>
482
                                            <label for="accepteddate">Accepted on:</label>
483
                                        </th>
484
                                        <td>
485
                                            <input type="text" id="accepteddate" name="accepteddate" class="datepicker" size="10" maxlength="10" value="[% accepteddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]
486
                                        </td>
487
                                        <td>
488
                                            <input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby | html %]"/>
489
                                            [% IF ( acceptedby_patron.borrowernumber ) %]
490
                                                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_patron.borrowernumber | uri %]">[% acceptedby_patron.surname | html %], [% acceptedby_patron.firstname | html %] ([% suggestedby_patron.cardnumber | html %])</a>
491
                                                [% Branches.GetName( acceptedby_patron.branchcode ) | html %] ([% acceptedby_patron.category.description | html %])
492
                                            [% END %]
493
                                        </td>
494
                                        <td></td>
495
                                    </tr>
496
                                    <tr>
497
                                        <th>
498
                                            <label for="lastmodificationdate">Last modification on:</label>
499
                                        </th>
500
                                        <td>
501
                                            [% lastmodificationdate | $KohaDates %]
502
                                        </td>
503
                                        <td>
504
                                            [% IF lastmodificationby_patron %]
505
                                                [% INCLUDE 'patron-title.inc' patron=lastmodificationby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( lastmodificationby_patron.branchcode ) | html %] ([% lastmodificationby_patron.category.description | html %])
506
                                            [% END %]
507
                                        </td>
508
                                        <td></td>
509
                                    </tr>
510
                                </tbody>
511
                            </table>
512
                        </li>
513
                        <li>
514
                            <label for="managedon">Managed on:</label>
515
                            <input type="text" id="managedon" name="manageddate" class="datepicker" size="10" maxlength="10" value="[% manageddate | $KohaDates %]" />[% INCLUDE 'date-format.inc' %]
516
                        </li>
517
                        <li>
518
                            <label for="managedby_name">by:</label>
519
                            <div>
520
                                <span id="managedby_name" name="managedby_name">
521
                                    <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% logged_in_user.borrowernumber | uri %]">You</a>
522
                                </span>
523
                                [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
524
                                    | Previously was [% INCLUDE 'patron-title.inc' patron=managedby_patron hide_patron_infos_if_needed=1 %] [% Branches.GetName( managedby_patron.branchcode ) | html %] ([% managedby_patron.category.description | html %])
525
                                [% END %]
526
                                <br />
527
                                <a id="edit_manager" class="new_window" href="#"><i class="fa fa-search"></i> Select manager</a>
528
                                [% IF managedby_patron.borrowernumber && logged_in_user.borrowernumber != managedby_patron.borrowernumber %]
529
                                    <a id="restore_previous_manager" href="#"><i class="fa fa-trash"></i> Keep existing manager</a>
530
                                [% END %]
531
                                <input type="hidden" name="managedby" id="managedby" value="[% logged_in_user.borrowernumber | html %]" />
532
533
                                <br/>
534
                                <label for="notify">Notify manager:</label>
535
                                <input type="checkbox" id="notify" name="notify" value="notify" disabled="disabled" title="A NOTIFY_MANAGER notice will be generated and send to the manager if a valid email address is defined. This can be checked if a new manager has been selected." />
536
                            </div> <!-- /div -->
537
                        </li>
538
                    </ol>
773
                </fieldset>
539
                </fieldset>
774
            </div>
775
776
        </div>
777
778
[% ELSE %]
779
    <strong>No results.</strong>
780
[% END %]
781
</form>
782
</div>
783
[% END %]
784
[% END %]
785
540
786
[% UNLESS op == 'save' %]
541
                <fieldset class="rows">
787
    [% UNLESS ( op == 'show' ) %]
542
                    <legend>Acquisition information</legend>
543
                    <ol>
544
                        <li>
545
                            <label for="branchcode">Library:</label>
546
                            <select name="branchcode" id="branchcode">
547
                                <option value="">Any</option>
548
                                [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
549
                            </select>
550
                        </li>
551
                        <li>
552
                            <label for="budgetid">Fund:</label>
553
                            <select name="budgetid" id="budgetid">
554
                                <option value="">Any</option>
555
                                [% FOREACH budget IN sugg_budgets %]
556
                                    [% IF ( budget.selected ) %]
557
                                        <option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %](inactive)[% END %]</option>
558
                                    [% ELSIF ( budget.b_active ) %]
559
                                        <option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option>
560
                                    [% ELSE %]
561
                                        <option value="[% budget.b_id | html %]" class="b_inactive">[% budget.b_txt | html %] (inactive)</option>
562
                                    [% END %]
563
                                [% END %]
564
                            </select>
565
                            <label for="showallfunds" style="float:none;width:auto;">&nbsp;Show inactive:</label>
566
                            <input type="checkbox" id="showallfunds" />
567
                        </li>
568
                        <li>
569
                            <label for="quantity">Copies:</label>
570
                            <input type="text" size="10" id="quantity" name="quantity" value="[% quantity | html %]" />
571
                        </li>
572
                        <li>
573
                            <label for="currency">Currency:</label>
574
                            [% FOREACH c IN currencies %]
575
                                <input type="hidden" value="[% c.rate | html %]" id="currency_rate_[% c.currency | html %]" name="currency_rate_[% c.currency | html %]" />
576
                                <input type="hidden" id="[% c.currency | html %]" name="[% c.currency | html %]" value="[% c.rate | html %]" />
577
                            [% END %]
578
                            <select name="currency" id="currency">
579
                                [% FOREACH c IN currencies %]
580
                                    [% IF suggestionid and suggestion.currency == c.currency or not suggestionid and c.active %]
581
                                        <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
582
                                    [% ELSIF not c.archived %]
583
                                        <option value="[% c.currency | html %]">[% c.currency | html %]</option>
584
                                    [% END %]
585
                                [% END %]
586
                            </select>
587
                        </li>
588
                        <li>
589
                            <label for="price">Price:</label>
590
                            <input type="text" size="20" name="price" id="price" value="[% price | html %]" />
591
                        </li>
592
                        <li>
593
                            <label for="total">Total: </label>
594
                            <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total | html %]"/>
595
                        </li>
596
                    </ol>
597
                </fieldset> <!-- /.rows -->
598
599
                <input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby | html %][% ELSE %]noone[% END %]"/>
600
601
                <fieldset class="action">
602
                    <input type="hidden" name="op" value="[% op | html %]" />
603
                    [% IF ( suggestionid ) %]
604
                        [% IF ( need_confirm ) %]
605
                            <input type="hidden" name="save_confirmed" value="1" />
606
                            <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
607
                        [% ELSE %]
608
                            <input type="submit" value="Save" />
609
                        [% END %]
610
                        <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby | uri %]#suggestions[% ELSE %]suggestion.pl[% END %]">Cancel</a>
611
                    [% ELSE %]
612
                        [% IF ( need_confirm ) %]
613
                            <input type="hidden" name="save_confirmed" value="1" />
614
                            <input onclick="this.form.op.value = 'save'; this.form.submit();" type="submit" value="Confirm your suggestion" />
615
                        [% ELSE %]
616
                            <input type="submit" value="Submit your suggestion" />
617
                        [% END %]
618
                        <a class="cancel" href="suggestion.pl">Cancel</a>
619
                    [% END %]
620
                </fieldset> <!-- /.action -->
621
            </form> <!-- /#add_edit -->
622
        [% END # /IF op == 'save' %]
788
623
789
            </main>
624
        [% IF op == 'else' %]
790
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
625
            <div id="toolbar" class="btn-toolbar">
626
                <a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
627
            </div>
791
628
792
        <div class="col-sm-2 col-sm-pull-10">
629
            <h1>Suggestions management</h1>
793
            <aside>
794
630
795
<form name="suggestionfilter" action="suggestion.pl" method="get">
631
            [% IF ( displayby != "branchcode" ) %]
796
    <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
632
                <label for="branchcode">Viewing suggestions for library:</label>
797
<fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label>
633
                <select name="branchcode" id="branchcode">
798
                <select name="displayby" id="displayby" style="width:auto;">
634
                    <option value="__ANY__">Any</option>
799
                    [% IF ( displayby == "STATUS" ) %]
635
                    [% PROCESS options_for_libraries libraries => Branches.all( selected => branchfilter || branchcode ) %]
800
                        <option value="STATUS" selected="selected">Status</option>
801
                    [% ELSE %]
802
                        <option value="STATUS">Status</option>
803
                    [% END %]
804
                    [% IF ( displayby == "branchcode" ) %]
805
                        <option value="branchcode" selected="selected">Library</option>
806
                    [% ELSE %]
807
                        <option value="branchcode">Library</option>
808
                    [% END %]
809
                    [% IF ( displayby == "itemtype" ) %]
810
                        <option value="itemtype" selected="selected">Item type</option>
811
                    [% ELSE %]
812
                        <option value="itemtype">Item type</option>
813
                    [% END %]
814
                    [% IF ( displayby == "managedby" ) %]
815
                        <option value="managedby" selected="selected">Managed by</option>
816
                    [% ELSE %]
817
                        <option value="managedby">Managed by</option>
818
                    [% END %]
819
                    [% IF ( displayby == "acceptedby" ) %]
820
                        <option value="acceptedby" selected="selected">Accepted by</option>
821
                    [% ELSE %]
822
                        <option value="acceptedby">Accepted by</option>
823
                    [% END %]
824
                </select>
636
                </select>
825
                <input type="submit" value="Go" />
637
            [% END %]
826
                </li>
827
                </ol>
828
                </fieldset>
829
830
<h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
831
                <div style="display:block;" id="limits">
832
638
833
				<fieldset class="brief"><h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
639
            [% FOR m IN messages %]
834
                   <ol> <li><label for="title"> Title:</label><input type="text" id="title" name="title" value="[% title | html %]" /></li>
640
                <div class="dialog [% m.type | html %]">
835
                    <li><label for="author"> Author:</label><input type="text" id="author" name="author" value="[% author | html %]" /></li>
641
                    [% SWITCH m.code %]
836
                    <li><label for="isbn"> ISBN:</label><input type="text" id="isbn"  name="isbn" value="[% isbn | html %]" /></li>
642
                    [% CASE 'already_exists' %]
837
                    <li><label for="publishercode"> Publisher:</label><input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" /></li>
643
                        The suggestion has not been added. A suggestion with this title already exists (<a href='/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% m.id | html %]&op=show'>suggestion #[% m.id | html %]</a>)
838
                    <li><label for="copyrightdate_filter"> Copyright date:</label><input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" /></li>
644
                    [% CASE 'biblio_exists' %]
839
                    <li><label for="collectiontitle"> Collection title:</label><input type="text" id="collectiontitle" name="collectiontitle" value="[% collectiontitle | html %]" /></li><li><input type="submit" value="Go" /></li></ol>
645
                        A similar document already exists: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% m.id | uri %]">[% m.title | html %]</a>. Click on "Confirm your suggestion" to ignore this message.
840
                </fieldset>
646
                    [% CASE %]
841
				 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
647
                        [% m.code | html %]
842
                    <ol>
648
                    [% END %]
843
                        <li>
649
                </div> <!-- /.dialog -->
844
                            <label for="archived" style="display: inline;">Include archived:</label>
650
            [% END # /FOR m %]
845
                            [% IF filter_archived %]
651
846
                                <input type="checkbox" id="archived" name="filter_archived" checked="checked" title="Include archived suggestions in the search" />
652
            [% UNLESS ( notabs ) %]
653
                <div id="suggestiontabs" class="toptabs">
654
                    <ul class="ui-tabs-nav">
655
                        [% FOREACH suggestion IN suggestions %]
656
                                <li>
657
                            <a href="#[% suggestion.suggestiontype | uri %]">
658
                            [% IF ( suggestion.suggestiontypelabel ) %]
659
                                [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
660
                                [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
661
                                [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
662
                                [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
663
                                [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
664
                                [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
665
                                [% ELSIF (suggestion.suggestiontypelabel == "Unknown") %]Status unknown
666
                                [% ELSIF (suggestion.suggestiontypelabel == "__ANY__") %]Any
667
                                [% ELSE %][% suggestion.suggestiontypelabel | html %][% END %]
847
                            [% ELSE %]
668
                            [% ELSE %]
848
                                <input type="checkbox" id="archived" name="filter_archived" title="Include archived suggestions in the search" />
669
                                [% IF ( suggestion.suggestiontype ) %]
670
                                    [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) | html %]
671
                                [% ELSE %]
672
                                    No name
673
                                [% END %]
849
                            [% END %]
674
                            [% END %]
850
                      </li>
675
                            ([% suggestion.suggestions_loop.size | html %])</a></li>
851
                      <li>
676
852
                          <label for="STATUS"> Status:</label>
677
                        [% END # /FOREACH suggestion %]
853
678
                    </ul> <!-- /.ui-tabs-nav -->
854
                          <select name="STATUS" id="STATUS">
679
            [% END # /UNLESS notabs %]
855
                              <option value="">Any</option>
680
856
681
            [% FOREACH suggestion IN suggestions %]
857
                              [% IF (statusselected_ASKED ) %]
682
                <div id="[% suggestion.suggestiontype | html %]">
858
                                  <option value="ASKED" selected="selected">Pending</option>
683
                    <form class="update_suggestions" name="f" method="post" action="/cgi-bin/koha/suggestion/suggestion.pl#[% suggestion.suggestiontype| uri %]">
859
                              [% ELSE %]
684
860
                                  <option value="ASKED">Pending</option>
685
                        [% IF ( suggestion.suggestions_loop ) %]
861
                              [% END %]
686
                            <p>
862
687
                                <a class="checkall" href="#">Check all</a> | <a class="uncheckall" href="#">Uncheck all</a>
863
                              [% IF (statusselected_ACCEPTED ) %]
688
                            </p>
864
                                  <option value="ACCEPTED" selected="selected">Accepted</option>
689
865
                              [% ELSE %]
690
                            <table id="table_[% loop.count | html %]" class="sorted">
866
                                  <option value="ACCEPTED">Accepted</option>
691
                                <thead>
867
                              [% END %]
692
                                    <tr>
868
693
                                        <th class="NoSort noExport">&nbsp;</th>
869
                              [% IF (statusselected_CHECKED ) %]
694
                                        <th class="anti-the">Suggestion</th>
870
                                  <option value="CHECKED" selected="selected">Checked</option>
695
                                        <th>Suggested by</th>
871
                              [% ELSE %]
696
                                        <th>Suggested on</th>
872
                                  <option value="CHECKED">Checked</option>
697
                                        <th>Managed by</th>
873
                              [% END %]
698
                                        <th>Managed on</th>
874
699
                                        <th>Last modification by</th>
875
                              [% IF ( statusselected_REJECTED ) %]
700
                                        <th>Last modification on</th>
876
                                  <option value="REJECTED" selected="selected">Rejected</option>
701
                                        <th>Library</th>
877
                              [% ELSE %]
702
                                        <th>Fund</th>
878
                                  <option value="REJECTED">Rejected</option>
703
                                        <th>Status</th>
879
                              [% END %]
704
                                        <th class="NoSort noExport">&nbsp;</th>
880
705
                                    </tr>
881
                               [% IF ( statusselected_ORDERED ) %]
706
                                </thead>
882
                                   <option value="ORDERED" selected="selected">Ordered</option>
707
                                <tbody>
883
                               [% ELSE %]
708
                                    [% FOREACH suggestions_loo IN suggestion.suggestions_loop %]
884
                                   <option value="ORDERED">Ordered</option>
709
                                        <tr>
885
                               [% END %]
710
                                            <td>
886
711
                                                <input type="checkbox" name="suggestionid" value="[% suggestions_loo.suggestionid | html %]" />
887
                              [% FOREACH s IN SuggestionStatuses %]
712
                                            </td>
888
                                  [% IF s.authorised_value == selected_status %]
713
                                            <td>
889
                                      <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
714
                                                <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | uri %]&amp;op=show" title="suggestion" >
890
                                  [% ELSE %]
715
                                                    [% suggestions_loo.title | html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author | html %][% END %]
891
                                      <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
716
                                                </a>
892
                                  [% END %]
717
                                                <br />
893
                              [% END %]
718
                                                [% IF ( suggestions_loo.copyrightdate ) %]
894
                          </select>
719
                                                    &copy; <span class="suggestion_copyrightdate">[% suggestions_loo.copyrightdate | html %]</span>
895
                      </li>
720
                                                [% END %]
896
721
                                                [% IF ( suggestions_loo.volumedesc ) %]
897
                    <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
722
                                                    ; <span class="suggestion_volume">Volume:<em>[% suggestions_loo.volumedesc | html %]</em></span>
898
[% FOREACH suggestedby_loo IN suggestedby_loop %][% IF ( suggestedby_loo.selected ) %]<option value="[% suggestedby_loo.code | html %]" selected="selected">[% suggestedby_loo.desc | html %]</option>[% ELSE %]<option value="[% suggestedby_loo.code | html %]">[% suggestedby_loo.desc | html %]</option>[% END %][% END %]
723
                                                [% END %]
899
                                                                     </select></li>
724
                                                [% IF ( suggestions_loo.isbn ) %]
900
                    <li>
725
                                                    ; <span class="suggestion_isbn">ISBN: <em>[% suggestions_loo.isbn | html %]</em></span>
901
                        <label for="suggesteddate_from">Suggested date from:</label>
726
                                                [% END %]
902
                        <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
727
                                                [% IF ( suggestions_loo.publishercode ) %]
903
                    </li>
728
                                                    ; <span class="suggestion_publishercode">Published by [% suggestions_loo.publishercode | html %]</span>
904
                    <li>
729
                                                [% END %]
905
                        <label for="suggesteddate_to">To:</label>
730
                                                [% IF ( suggestions_loo.publicationyear ) %]
906
                        <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
731
                                                    in <span class="suggestion_publicationyear"><em>[% suggestions_loo.publicationyear | html %]</em></span>
907
                    </li>
732
                                                [% END %]
908
                    <li><label for="managedby"> Managed by:</label><select id="managedby" name="managedby"><option value="">Any</option>
733
                                                [% IF ( suggestions_loo.place ) %]
909
[% FOREACH managedby_loo IN managedby_loop %][% IF ( managedby_loo.selected ) %]<option value="[% managedby_loo.code | html %]" selected="selected">[% managedby_loo.desc | html %]</option>[% ELSE %]<option value="[% managedby_loo.code | html %]">[% managedby_loo.desc | html %]</option>[% END %][% END %]
734
                                                    in <span class="suggestion_place"><em>[% suggestions_loo.place | html %]</em></span>
910
                                                                     </select></li>
735
                                                [% END %]
911
                    <li>
736
                                                [% IF ( suggestions_loo.collectiontitle ) %]
912
                        <label for="manageddate_from">Management date from:</label>
737
                                                    ; <span class="suggestion_collectiontitle">[% suggestions_loo.collectiontitle | html %]</span>
913
                        <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
738
                                                [% END %]
914
                    </li>
739
                                                [% IF ( suggestions_loo.itemtype ) %]
915
                    <li>
740
                                                    ; <span class="suggestion_itype">[% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestions_loo.itemtype, 0 ) | html %]</span>
916
                        <label for="manageddate_to">To:</label>
741
                                                [% END %]
917
                        <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
742
                                                <br />
918
                    </li>
743
                                                [% IF ( suggestions_loo.note ) %]
919
                    <li><label for="acceptedby"> Accepted by:</label><select id="acceptedby" name="acceptedby"><option value="">Any</option>
744
                                                    <div class="suggestion_note"><i class="fa fa-comment"></i> [% suggestions_loo.note | html %]</div>
920
[% FOREACH acceptedby_loo IN acceptedby_loop %][% IF ( acceptedby_loo.selected ) %] <option value="[% acceptedby_loo.code | html %]" selected="selected">[% acceptedby_loo.desc | html %]</option>[% ELSE %]<option value="[% acceptedby_loo.code | html %]">[% acceptedby_loo.desc | html %]</option>[% END %][% END %]
745
                                                [% END %]
921
		                                      </select></li>
746
                                                [% IF suggestions_loo.archived %]
922
                    <li>
747
                                                    <br /><i class="fa fa-archive"></i> Archived
923
                        <label for="accepteddate_from">Accepted date from:</label>
748
                                                [% END %]
924
                        <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
749
                                            </td>
925
                    </li>
750
                                            <td>
926
                    <li>
751
                                                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.suggestedby | uri %]">[% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby | html %][% END %] [% IF (suggestions_loo.cardnumbersuggestedby ) %]([% suggestions_loo.cardnumbersuggestedby | html %])[% END %]</a>
927
                        <label for="accepteddate_to">To:</label>
752
                                            </td>
928
                        <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
753
                                            <td data-order="[% suggestions_loo.suggesteddate | html %]">
929
                    </li>
754
                                                [% IF ( suggestions_loo.suggesteddate ) %][% suggestions_loo.suggesteddate | $KohaDates %][% END %]
930
                    <li>
755
                                            </td>
931
                        <input type="submit" value="Go" />
756
                                            <td>
932
                    </li>
757
                                                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.managedby | uri %]">[% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %], [% suggestions_loo.firstnamemanagedby | html %][% END %]</a>
933
                </ol>
758
                                            </td>
934
                </fieldset>
759
                                            <td data-order="[% suggestions_loo.manageddate | html %]">
935
760
                                                [% IF ( suggestions_loo.manageddate ) %][% suggestions_loo.manageddate | $KohaDates %][% END %]
936
				<fieldset class="brief"><h4 class="local_collapse"><a href="#">Acquisition information</a></h4>
761
                                            </td>
937
                    <ol><li><label for="budgetid"> Book fund:</label>
762
                                            <td>
938
                    <select name="budgetid" id="budgetid">
763
                                                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestions_loo.lastmodificationby | uri %]">[% suggestions_loo.surnamelastmodificationby | html %][% IF ( suggestions_loo.firstnamelastmodificationby ) %], [% suggestions_loo.firstnamelastmodificationby | html %][% END %]</a>
939
                      <option value="__ANY__">Any</option>
764
                                            </td>
940
                      [% IF budgetid == '__NONE__' %]
765
                                            <td data-order="[% suggestions_loo.lastmodificationdate | html %]">
941
                          <option value="__NONE__" selected="selected">None</option>
766
                                                [% IF ( suggestions_loo.lastmodificationdate ) %][% suggestions_loo.lastmodificationdate | $KohaDates %][% END %]
942
                      [% ELSE %]
767
                                            </td>
943
                          <option value="__NONE__">None</option>
768
                                            <td>
944
                      [% END %]
769
                                                [% Branches.GetName( suggestions_loo.branchcode ) | html %]
945
                    [% FOREACH budgetsloo IN budgetsloop %]
770
                                            </td>
946
                        [% IF ( budgetsloo.selected ) %]<option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>[% ELSE %]<option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>[% END %]
771
                                            <td>
947
                        [% END %]
772
                                                [% suggestions_loo.budget_name | html %]
948
                    </select></li>
773
                                            </td>
949
                    <li>
774
                                            <td>
950
                        <input type="submit" value="Go" />
775
                                                [% IF ( suggestions_loo.ASKED ) %]
951
                    </li>
776
                                                    Pending
952
                </ol>
777
                                                [% ELSIF ( suggestions_loo.ACCEPTED ) %]
953
                </fieldset>
778
                                                    Accepted
954
            </form>
779
                                                [% ELSIF ( suggestions_loo.ORDERED ) %]
955
        [% INCLUDE 'acquisitions-menu.inc' %]
780
                                                    Ordered
781
                                                [% ELSIF ( suggestions_loo.REJECTED ) %]
782
                                                    Rejected
783
                                                [% ELSIF ( suggestions_loo.CHECKED ) %]
784
                                                    Checked
785
                                                [% ELSIF ( suggestions_loo.AVAILABLE ) %]
786
                                                    Available
787
                                                [% ELSIF AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
788
                                                    [% AuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) | html %]
789
                                                [% ELSE %]
790
                                                    Status unknown
791
                                                [% END %]
792
793
                                                [% IF ( suggestions_loo.reason ) %]
794
                                                    <br />([% suggestions_loo.reason | html %])
795
                                                [% END %]
796
                                            </td>
797
                                            <td class="actions">
798
                                                <div class="btn-group dropup">
799
                                                    <a class="btn btn-default btn-xs" role="button" href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid | html %]&amp;op=edit"><i class="fa fa-pencil"></i> Edit</a><a class="btn btn-default btn-xs dropdown-toggle" id="more_actions_[% suggestions_loo.suggestionid | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
800
                                                    <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="more_actions_[% suggestions_loo.suggestionid | html %]">
801
                                                        <li><a class="deletesuggestion" href="suggestion.pl?op=delete&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-trash"></i> Delete</a></li>
802
                                                        [% UNLESS suggestions_loo.archived %]
803
                                                            <li><a class="archivesuggestion" href="suggestion.pl?op=archive&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-archive"></i> Archive</a></li>
804
                                                        [% ELSE %]
805
                                                            <li><a class="unarchivesuggestion" href="suggestion.pl?op=unarchive&amp;suggestionid=[% suggestions_loo.suggestionid | html %]"><i class="fa fa-archive"></i> Unarchive</a></li>
806
                                                        [% END %]
807
                                                    </ul>
808
                                                </div>
809
                                            </td>
810
                                        </tr>
811
                                    [% END # /FOREACH suggestions_loo %]
812
                                </tbody>
813
                            </table> <!-- /#table_[% loop.count | html %] -->
814
815
                            <div class="row">
816
                                <h2 style="padding-left:1em;">Change selected suggestions</h2>
817
                                <div class="col-sm-4">
818
                                    <fieldset>
819
                                        <div id="select-reason[% loop.index %]">
820
                                            <label for="STATUSreason[% loop.index %]">Mark selected as: </label>
821
                                            <select name="STATUS" id="STATUSreason[% loop.index %]">
822
                                                <option value=""> -- Choose a status --</option>
823
824
                                                [% IF (statusselected_ASKED ) %]
825
                                                    <option value="ASKED" selected="selected">Pending</option>
826
                                                [% ELSE %]
827
                                                    <option value="ASKED">Pending</option>
828
                                                [% END %]
829
830
                                                [% IF (statusselected_ACCEPTED ) %]
831
                                                    <option value="ACCEPTED" selected="selected">Accepted</option>
832
                                                [% ELSE %]
833
                                                    <option value="ACCEPTED">Accepted</option>
834
                                                [% END %]
835
836
                                                [% IF (statusselected_CHECKED ) %]
837
                                                    <option value="CHECKED" selected="selected">Checked</option>
838
                                                [% ELSE %]
839
                                                    <option value="CHECKED">Checked</option>
840
                                                [% END %]
841
842
                                                [% IF ( statusselected_REJECTED ) %]
843
                                                    <option value="REJECTED" selected="selected">Rejected</option>
844
                                                [% ELSE %]
845
                                                    <option value="REJECTED">Rejected</option>
846
                                                [% END %]
847
848
                                                [% IF ( statusselected_ORDERED ) %]
849
                                                    <option value="ORDERED" selected="selected">Ordered</option>
850
                                                [% ELSE %]
851
                                                    <option value="ORDERED">Ordered</option>
852
                                                [% END %]
853
854
                                                [% FOREACH s IN SuggestionStatuses %]
855
                                                    <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
856
                                                [% END %]
857
                                            </select>
858
859
                                            <label for="choosereason[% loop.index %]">with this reason:</label>
860
                                            <select name="reason" id="choosereason[% loop.index %]">
861
                                                <option value=""> -- Choose a reason -- </option>
862
                                                [% FOREACH reasonsloo IN suggestion.reasonsloop %]
863
                                                    <option value="[% reasonsloo.lib | html %]">[% reasonsloo.lib | html %]</option>
864
                                                [% END %]
865
                                                <option value="other">Others...</option>
866
                                            </select>
867
868
                                            <span class="other_reason">
869
                                                <input type="text" size="31" name="other_reason" placeholder="please note your reason here..." />
870
                                                <a href="#" class="cancel_note">Cancel</a>
871
                                            </span>
872
                                        </div>
873
874
                                        <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
875
                                        <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
876
                                        <fieldset class="action">
877
                                            <button type="submit" class="btn btn-default btn-xs" value="update_status">Submit</button>
878
                                        </fieldset>
879
                                    </fieldset>
880
                                </div> <!-- /.col-sm-4 -->
881
882
                                <div class="col-sm-4">
883
                                    <fieldset>
884
                                        <label>
885
                                            Update item types with:
886
                                            [% PROCESS 'av-build-dropbox.inc' name="suggestion_itemtype", category="SUGGEST_FORMAT", size = 20  %]
887
                                        </label>
888
                                        <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
889
                                        <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
890
                                        <fieldset class="action">
891
                                            <button type="submit" class="btn btn-default btn-xs" value="update_itemtype">Submit</button>
892
                                        </fieldset>
893
                                    </fieldset>
894
                                </div> <!-- /.col-sm-4 -->
895
896
                                <div class="col-sm-2">
897
                                    <fieldset>
898
                                        <span class="label">Update manager</span><br/>
899
                                        <a id="set_manager_[% loop.count | html %]" data-tab="[% loop.count | html %]" class="set_manager" href="#"><i class="fa fa-search"></i> Select manager</a>
900
                                        <span id="managedby_name[% loop.count | html %]"></span>
901
                                        <input type="hidden" name="suggestion_managedby" id="managedby[% loop.count | html %]" value="[% logged_in_user.borrowernumber | html %]" />
902
                                        <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
903
                                        <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
904
                                        <fieldset class="action">
905
                                            <button type="submit" class="btn btn-default btn-xs" value="update_manager">Submit</button>
906
                                        </fieldset>
907
                                    </fieldset>
908
                                </div> <!-- /.col-sm-2 -->
909
910
                                <div class="col-sm-2">
911
                                    <fieldset>
912
                                        <span class="label">Delete selected</span>
913
                                        <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
914
                                        <input type="hidden" name="filter_archived" value="[% filter_archived | html %]" />
915
                                        <fieldset class="action">
916
                                            <button type="submit" class="btn btn-default btn-xs" value="delete">Delete</button>
917
                                        </fieldset>
918
                                    </fieldset>
919
                                </div> <!-- /.col-sm-2 -->
920
                            </div> <!-- /.row -->
956
921
957
            </aside>
922
                        [% ELSE %]
958
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
923
                            <strong>No results.</strong>
959
     </div> <!-- /.row -->
924
                        [% END # /IF ( suggestion.suggestions_loop ) %]
960
925
                    </form> <!-- /.update_suggestions -->
961
    [% END %]
926
                </div> <!-- /#[% suggestion.suggestiontype | html %] -->
962
    [% END %]
927
            [% END # /FOREACH suggestion %]
963
</div>
928
            [% UNLESS ( notabs ) %]
964
[% END %]
929
                </div> <!-- /.notabs -->
930
            [% END # /UNLESS notabs %]
931
        [% END # /IF op == 'else' %]
932
933
        [% UNLESS op == 'save' %]
934
            [% UNLESS ( op == 'show' ) %]
935
                </div> <!-- /.col-sm-10.col-sm-push-2 -->
936
937
                <div class="col-sm-2 col-sm-pull-10">
938
                    <aside>
939
                        <form name="suggestionfilter" action="suggestion.pl" method="get">
940
                            <input type="hidden" name="branchcode" value="[% branchfilter | html %]" />
941
                            <fieldset class="brief">
942
                                <ol style="display:block;">
943
                                    <li>
944
                                        <label for="displayby">Organize by: </label>
945
                                        <select name="displayby" id="displayby" style="width:auto;">
946
                                            [% IF ( displayby == "STATUS" ) %]
947
                                                <option value="STATUS" selected="selected">Status</option>
948
                                            [% ELSE %]
949
                                                <option value="STATUS">Status</option>
950
                                            [% END %]
951
                                            [% IF ( displayby == "branchcode" ) %]
952
                                                <option value="branchcode" selected="selected">Library</option>
953
                                            [% ELSE %]
954
                                                <option value="branchcode">Library</option>
955
                                            [% END %]
956
                                            [% IF ( displayby == "itemtype" ) %]
957
                                                <option value="itemtype" selected="selected">Item type</option>
958
                                            [% ELSE %]
959
                                                <option value="itemtype">Item type</option>
960
                                            [% END %]
961
                                            [% IF ( displayby == "managedby" ) %]
962
                                                <option value="managedby" selected="selected">Managed by</option>
963
                                            [% ELSE %]
964
                                                <option value="managedby">Managed by</option>
965
                                            [% END %]
966
                                            [% IF ( displayby == "acceptedby" ) %]
967
                                                <option value="acceptedby" selected="selected">Accepted by</option>
968
                                            [% ELSE %]
969
                                                <option value="acceptedby">Accepted by</option>
970
                                            [% END %]
971
                                        </select>
972
                                        <input type="submit" value="Go" />
973
                                    </li>
974
                                </ol>
975
                            </fieldset> <!-- /.brief -->
976
977
                            <h4>Filter by: <a style="font-size:80%;font-weight:normal;" href="/cgi-bin/koha/suggestion/suggestion.pl">[clear]</a></h4>
978
979
                            <div id="limits">
980
                                <fieldset class="brief">
981
                                    <h4 class="local_collapse"><a href="#">Bibliographic information</a></h4>
982
                                    <ol>
983
                                        <li>
984
                                            <label for="title"> Title:</label>
985
                                            <input type="text" id="title" name="title" value="[% title | html %]" />
986
                                        </li>
987
                                        <li>
988
                                            <label for="author"> Author:</label>
989
                                            <input type="text" id="author" name="author" value="[% author | html %]" />
990
                                        </li>
991
                                        <li>
992
                                            <label for="isbn"> ISBN:</label>
993
                                            <input type="text" id="isbn"  name="isbn" value="[% isbn | html %]" />
994
                                        </li>
995
                                        <li>
996
                                            <label for="publishercode"> Publisher:</label>
997
                                            <input type="text" id="publishercode" name="publishercode" value="[% publishercode | html %]" />
998
                                        </li>
999
                                        <li>
1000
                                            <label for="copyrightdate_filter"> Copyright date:</label>
1001
                                            <input type="text" id="copyrightdate_filter" name="copyrightdate" value="[% copyrightdate | html %]" />
1002
                                        </li>
1003
                                        <li>
1004
                                            <label for="collectiontitle"> Collection title:</label>
1005
                                            <input type="text" id="collectiontitle" name="collectiontitle" value="[% collectiontitle | html %]" /></li><li><input type="submit" value="Go" />
1006
                                        </li>
1007
                                    </ol>
1008
                                </fieldset> <!-- /.brief -->
1009
1010
                                <fieldset class="brief">
1011
                                    <h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
1012
                                    <ol>
1013
                                        <li>
1014
                                            <label for="archived" style="display: inline;">Include archived:</label>
1015
                                            [% IF filter_archived %]
1016
                                                <input type="checkbox" id="archived" name="filter_archived" checked="checked" title="Include archived suggestions in the search" />
1017
                                            [% ELSE %]
1018
                                                <input type="checkbox" id="archived" name="filter_archived" title="Include archived suggestions in the search" />
1019
                                            [% END %]
1020
                                        </li>
1021
                                        <li>
1022
                                            <label for="STATUS[% loop.index %]"> Status:</label>
1023
                                            <select name="STATUS" id="STATUS[% loop.index %]">
1024
                                                <option value="">Any</option>
1025
                                                [% IF (statusselected_ASKED ) %]
1026
                                                    <option value="ASKED" selected="selected">Pending</option>
1027
                                                [% ELSE %]
1028
                                                    <option value="ASKED">Pending</option>
1029
                                                [% END %]
1030
1031
                                                [% IF (statusselected_ACCEPTED ) %]
1032
                                                    <option value="ACCEPTED" selected="selected">Accepted</option>
1033
                                                [% ELSE %]
1034
                                                    <option value="ACCEPTED">Accepted</option>
1035
                                                [% END %]
1036
1037
                                                [% IF (statusselected_CHECKED ) %]
1038
                                                    <option value="CHECKED" selected="selected">Checked</option>
1039
                                                [% ELSE %]
1040
                                                    <option value="CHECKED">Checked</option>
1041
                                                [% END %]
1042
1043
                                                [% IF ( statusselected_REJECTED ) %]
1044
                                                    <option value="REJECTED" selected="selected">Rejected</option>
1045
                                                [% ELSE %]
1046
                                                    <option value="REJECTED">Rejected</option>
1047
                                                [% END %]
1048
1049
                                                [% IF ( statusselected_ORDERED ) %]
1050
                                                    <option value="ORDERED" selected="selected">Ordered</option>
1051
                                                [% ELSE %]
1052
                                                    <option value="ORDERED">Ordered</option>
1053
                                                [% END %]
1054
1055
                                                [% FOREACH s IN SuggestionStatuses %]
1056
                                                    [% IF s.authorised_value == selected_status %]
1057
                                                        <option value="[% s.authorised_value | html %]" selected="selected">[% s.lib | html %]</option>
1058
                                                    [% ELSE %]
1059
                                                        <option value="[% s.authorised_value | html %]">[% s.lib | html %]</option>
1060
                                                    [% END %]
1061
                                                [% END %]
1062
                                            </select>
1063
                                        </li>
1064
1065
                                        <li>
1066
                                            <label for="suggestedby"> Suggested by:</label>
1067
                                            <select id="suggestedby" name="suggestedby">
1068
                                                <option value="">Any</option>
1069
                                                [% FOREACH suggestedby_loo IN suggestedby_loop %]
1070
                                                    [% IF ( suggestedby_loo.selected ) %]
1071
                                                        <option value="[% suggestedby_loo.code | html %]" selected="selected">[% suggestedby_loo.desc | html %]</option>
1072
                                                    [% ELSE %]
1073
                                                        <option value="[% suggestedby_loo.code | html %]">[% suggestedby_loo.desc | html %]</option>
1074
                                                    [% END %]
1075
                                                [% END %]
1076
                                            </select>
1077
                                        </li>
1078
                                        <li>
1079
                                            <label for="suggesteddate_from">Suggested date from:</label>
1080
                                            <input type="text" id="suggesteddate_from" size="10" name="suggesteddate_from" value="[% suggesteddate_from | html %]" />
1081
                                        </li>
1082
                                        <li>
1083
                                            <label for="suggesteddate_to">To:</label>
1084
                                            <input type="text" id="suggesteddate_to" size="10" name="suggesteddate_to" value="[% suggesteddate_to | html %]" />
1085
                                        </li>
1086
                                        <li>
1087
                                            <label for="managedby"> Managed by:</label>
1088
                                            <select id="managedby" name="managedby">
1089
                                                <option value="">Any</option>
1090
                                                [% FOREACH managedby_loo IN managedby_loop %]
1091
                                                    [% IF ( managedby_loo.selected ) %]
1092
                                                        <option value="[% managedby_loo.code | html %]" selected="selected">[% managedby_loo.desc | html %]</option>
1093
                                                    [% ELSE %]
1094
                                                        <option value="[% managedby_loo.code | html %]">[% managedby_loo.desc | html %]</option>
1095
                                                    [% END %]
1096
                                                [% END %]
1097
                                            </select>
1098
                                        </li>
1099
                                        <li>
1100
                                            <label for="manageddate_from">Management date from:</label>
1101
                                            <input type="text" id="manageddate_from" size="10" name="manageddate_from" value="[% manageddate_from | html %]" />
1102
                                        </li>
1103
                                        <li>
1104
                                            <label for="manageddate_to">To:</label>
1105
                                            <input type="text" id="manageddate_to" size="10" name="manageddate_to" value="[% manageddate_to | html %]" />
1106
                                        </li>
1107
                                        <li>
1108
                                            <label for="acceptedby"> Accepted by:</label>
1109
                                            <select id="acceptedby" name="acceptedby">
1110
                                                <option value="">Any</option>
1111
                                                [% FOREACH acceptedby_loo IN acceptedby_loop %]
1112
                                                    [% IF ( acceptedby_loo.selected ) %]
1113
                                                        <option value="[% acceptedby_loo.code | html %]" selected="selected">[% acceptedby_loo.desc | html %]</option>
1114
                                                    [% ELSE %]
1115
                                                        <option value="[% acceptedby_loo.code | html %]">[% acceptedby_loo.desc | html %]</option>
1116
                                                    [% END %]
1117
                                                [% END %]
1118
                                            </select>
1119
                                        </li>
1120
                                        <li>
1121
                                            <label for="accepteddate_from">Accepted date from:</label>
1122
                                            <input type="text" id="accepteddate_from" size="10" name="accepteddate_from" value="[% accepteddate_from | html %]" />
1123
                                        </li>
1124
                                        <li>
1125
                                            <label for="accepteddate_to">To:</label>
1126
                                            <input type="text" id="accepteddate_to" size="10" name="accepteddate_to" value="[% accepteddate_to | html %]" />
1127
                                        </li>
1128
                                        <li>
1129
                                            <input type="submit" value="Go" />
1130
                                        </li>
1131
                                    </ol>
1132
                                </fieldset>
1133
1134
                                <fieldset class="brief">
1135
                                    <h4 class="local_collapse">
1136
                                        <a href="#">Acquisition information</a>
1137
                                    </h4>
1138
                                    <ol>
1139
                                        <li>
1140
                                            <label for="budgetid"> Book fund:</label>
1141
                                            <select name="budgetid" id="budgetid">
1142
                                                <option value="__ANY__">Any</option>
1143
                                                [% IF budgetid == '__NONE__' %]
1144
                                                    <option value="__NONE__" selected="selected">None</option>
1145
                                                [% ELSE %]
1146
                                                    <option value="__NONE__">None</option>
1147
                                                [% END %]
1148
                                                [% FOREACH budgetsloo IN budgetsloop %]
1149
                                                    [% IF ( budgetsloo.selected ) %]
1150
                                                        <option value="[% budgetsloo.budget_id | html %]" selected="selected">[% budgetsloo.budget_name | html %]</option>
1151
                                                    [% ELSE %]
1152
                                                        <option value="[% budgetsloo.budget_id | html %]">[% budgetsloo.budget_name | html %]</option>
1153
                                                    [% END %]
1154
                                                [% END %]
1155
                                            </select>
1156
                                        </li>
1157
                                        <li>
1158
                                            <input type="submit" value="Go" />
1159
                                        </li>
1160
                                    </ol>
1161
                                </fieldset>
1162
                            </div> <!-- /#limits -->
1163
                        </form> <!-- /suggestionsfilter -->
1164
1165
                        [% INCLUDE 'acquisitions-menu.inc' %]
1166
1167
                    </aside>
1168
                </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1169
            [% END # /UNLESS ( op == 'show' ) %]
1170
        [% END # /UNLESS op == 'save' %]
1171
        </div> <!-- /.row -->
1172
1173
    [% END # /IF op == "show" %]
965
1174
966
[% MACRO jsinclude BLOCK %]
1175
[% MACRO jsinclude BLOCK %]
967
    [% INCLUDE 'calendar.inc' %]
1176
    [% INCLUDE 'calendar.inc' %]
968
- 

Return to bug 27446