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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt (-1 / +1 lines)
Lines 63-69 Link Here
63
        <fieldset class="rows"><ol>
63
        <fieldset class="rows"><ol>
64
        <li>
64
        <li>
65
			 [% IF ( action_add_category ) %]<label for="category">Category</label>
65
			 [% IF ( action_add_category ) %]<label for="category">Category</label>
66
            <input type="text" name="category"  id="category" size="10" maxlength="10" class="focus" />
66
            <input type="text" name="category"  id="category" size="16" maxlength="16" class="focus" />
67
			 [% ELSE %]<span class="label">Category</span>
67
			 [% ELSE %]<span class="label">Category</span>
68
		<input type="hidden" name="category" value="[% category %]" />	 [% category %]
68
		<input type="hidden" name="category" value="[% category %]" />	 [% category %]
69
			 [% END %]
69
			 [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tt (+2 lines)
Lines 34-39 Link Here
34
34
35
<p>Once you have clicked 'Submit' the suggestion will be moved to the matching tab. The status will also be updated on the patron's account in the OPAC and an email notice will be sent to the patron using the template that matches the status you have chosen.</p>
35
<p>Once you have clicked 'Submit' the suggestion will be moved to the matching tab. The status will also be updated on the patron's account in the OPAC and an email notice will be sent to the patron using the template that matches the status you have chosen.</p>
36
36
37
<p><strong>Customization:</strong> You can create additional custom suggestion statuses by creating new authorised values of the category SUGGEST_STATUS</p>
38
37
<p><strong>See the full documentation for Purchase Suggestions in the <a href="http://manual.koha-community.org/3.10/en/managesuggest.html">manual</a> (online).</strong></p>
39
<p><strong>See the full documentation for Purchase Suggestions in the <a href="http://manual.koha-community.org/3.10/en/managesuggest.html">manual</a> (online).</strong></p>
38
40
39
[% INCLUDE 'help-bottom.inc' %]
41
[% INCLUDE 'help-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-69 / +208 lines)
Lines 1-3 Link Here
1
[% USE KohaAuthorisedValues %]
2
[% USE KohaBranchName %]
1
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Acquisitions  &rsaquo;
4
<title>Koha &rsaquo; Acquisitions  &rsaquo;
3
    [% IF ( op_save ) %]
5
    [% IF ( op_save ) %]
Lines 194-205 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
194
      <ol>
196
      <ol>
195
        <li>
197
        <li>
196
          <span class="label">Status:</span>
198
          <span class="label">Status:</span>
197
          [% IF ( STATUS == 'ASKED' ) %]Pending
199
          [% SET status_found = 0 %]
198
          [% ELSIF ( STATUS == 'ACCEPTED' ) %]Accepted
200
          [% IF ( STATUS == 'ASKED' ) %]
199
          [% ELSIF ( STATUS == 'CHECKED' ) %]Checked
201
              Pending
200
          [% ELSIF ( STATUS == 'REJECTED' ) %]Rejected
202
              [% SET status_found = 1 %]
201
          [% ELSE %]No Status
203
          [% ELSIF ( STATUS == 'ACCEPTED' ) %]
204
              Accepted
205
              [% SET status_found = 1 %]
206
          [% ELSIF ( STATUS == 'CHECKED' ) %]
207
              Checked
208
              [% SET status_found = 1 %]
209
          [% ELSIF ( STATUS == 'REJECTED' ) %]
210
              Rejected
211
              [% SET status_found = 1 %]
212
          [% ELSE %]
213
              [% FOREACH s IN SuggestionStatuses %]
214
                  [% IF STATUS == s.authorised_value %]
215
                      [% s.lib %]
216
                      [% SET status_found = 1 %]
217
                  [% END %]
218
              [% END %]
202
          [% END %]
219
          [% END %]
220
203
        </li>
221
        </li>
204
        <li>
222
        <li>
205
          <table>
223
          <table>
Lines 208-225 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
208
            <tr>
226
            <tr>
209
                <th><span class="label">Suggestion creation</span> </th>
227
                <th><span class="label">Suggestion creation</span> </th>
210
                <td>[% suggesteddate %]</td>
228
                <td>[% suggesteddate %]</td>
211
                <td>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a>  [% suggestedby_branchcode %] ([% suggestedby_description %])[% END %]
229
                <td>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a>  [% suggestedby_branchcode | $KohaBranchName %] ([% suggestedby_description %])[% END %]
212
                </td>
230
                </td>
213
            </tr>
231
            </tr>
214
            <tr>
232
            <tr>
215
                <th><span class="label">Suggestion management</span> </th>
233
                <th><span class="label">Suggestion management</span> </th>
216
                <td>[% manageddate %]</td>
234
                <td>[% manageddate %]</td>
217
                <td>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode %] ([% managedby_description %])[% END %]</td>
235
                <td>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode | $KohaBranchName %] ([% managedby_description %])[% END %]</td>
218
            </tr>
236
            </tr>
219
            <tr>
237
            <tr>
220
                <th><span class="label">Suggestion accepted</span> </th>
238
                <th><span class="label">Suggestion accepted</span> </th>
221
                <td>[% accepteddate %]</td>
239
                <td>[% accepteddate %]</td>
222
                <td>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode %] ([% acceptedby_description %])[% END %]</td>
240
                <td>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode | $KohaBranchName %] ([% acceptedby_description %])[% END %]</td>
223
            </tr>
241
            </tr>
224
            </tbody>
242
            </tbody>
225
        </table></li></ol>
243
        </table></li></ol>
Lines 290-323 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
290
    </fieldset>
308
    </fieldset>
291
    <fieldset class="rows"> <legend>Suggestion management</legend>
309
    <fieldset class="rows"> <legend>Suggestion management</legend>
292
       <ol>
310
       <ol>
293
            [% IF ( suggestionid ) %]<li><label for="status">Status:</label><select id="STATUS" name="STATUS"><option value="">No Status</option>
311
            [% IF ( suggestionid ) %]
294
                [% IF (statusselected_ASKED ) %]<option value="ASKED" selected="selected">Pending</option> 
312
                <li>
295
                [% ELSE %]<option value="ASKED">Pending</option>[% END %]
313
                    <label for="status">Status:</label>
296
                [% IF (statusselected_ACCEPTED ) %]<option value="ACCEPTED" selected="selected">Accepted</option>
314
                    <select id="STATUS" name="STATUS">
297
                [% ELSE %]<option value="ACCEPTED">Accepted</option>[% END %]
315
                        <option value="">No Status</option>
298
                [% IF (statusselected_CHECKED ) %]<option value="CHECKED" selected="selected">Checked</option>
316
299
                [% ELSE %]<option value="CHECKED">Checked</option>[% END %]
317
                        [% IF (statusselected_ASKED ) %]
300
                [% IF ( statusselected_REJECTED ) %]<option value="REJECTED" selected="selected">Rejected</option>
318
                            <option value="ASKED" selected="selected">Pending</option>
301
                [% ELSE %]<option value="REJECTED">Rejected</option>[% END %]
319
                        [% ELSE %]
302
            </select></li>[% END %]
320
                            <option value="ASKED">Pending</option>
321
                        [% END %]
322
323
                        [% IF (statusselected_ACCEPTED ) %]
324
                            <option value="ACCEPTED" selected="selected">Accepted</option>
325
                        [% ELSE %]
326
                            <option value="ACCEPTED">Accepted</option>
327
                        [% END %]
328
329
                        [% IF (statusselected_CHECKED ) %]
330
                            <option value="CHECKED" selected="selected">Checked</option>
331
                        [% ELSE %]
332
                            <option value="CHECKED">Checked</option>
333
                        [% END %]
334
335
                        [% IF ( statusselected_REJECTED ) %]
336
                            <option value="REJECTED" selected="selected">Rejected</option>
337
                        [% ELSE %]
338
                            <option value="REJECTED">Rejected</option>
339
                        [% END %]
340
341
                        [% FOREACH s IN SuggestionStatuses %]
342
                            [% IF s.authorised_value == selected_status %]
343
                                <option value="[% s.authorised_value %]" selected="selected">[% s.lib %]</option>
344
                            [% ELSE %]
345
                                <option value="[% s.authorised_value %]">[% s.lib %]</option>
346
                            [% END %]
347
                        [% END %]
348
                    </select>
349
                </li>
350
            [% END %]
303
        <li><table>
351
        <li><table>
304
            <thead><tr><th>&nbsp;</th><th>Date</th><th>By</th></tr></thead>
352
            <thead><tr><th>&nbsp;</th><th>Date</th><th>By</th></tr></thead>
305
            <tbody>
353
            <tbody>
306
            <tr>
354
            <tr>
307
                <th><label for="suggesteddate">Suggestion creation</label> </th>
355
                <th><label for="suggesteddate">Suggestion creation</label> </th>
308
                <td><input type="text" id="suggesteddate" name="suggesteddate" size="10" maxlength="10" value="[% suggesteddate %]"/></td>
356
                <td><input type="text" id="suggesteddate" name="suggesteddate" size="10" maxlength="10" value="[% suggesteddate %]"/></td>
309
                <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a>  [% suggestedby_branchcode %] ([% suggestedby_description %])[% END %]
357
                <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a>  [% suggestedby_branchcode | $KohaBranchName %] ([% suggestedby_description %])[% END %]
310
                </td>
358
                </td>
311
            </tr>
359
            </tr>
312
            <tr>
360
            <tr>
313
                <th><label for="managedon">Suggestion management</label> </th>
361
                <th><label for="managedon">Suggestion management</label> </th>
314
                <td><input type="text" id="managedon" name="manageddate" size="10" maxlength="10" value="[% manageddate %]" /></td>
362
                <td><input type="text" id="managedon" name="manageddate" size="10" maxlength="10" value="[% manageddate %]" /></td>
315
                <td><input type="hidden" id="managedby" name="managedby" value="[% managedby %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode %] ([% managedby_description %])[% END %]</td>
363
                <td><input type="hidden" id="managedby" name="managedby" value="[% managedby %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode | $KohaBranchName %] ([% managedby_description %])[% END %]</td>
316
            </tr>
364
            </tr>
317
            <tr>
365
            <tr>
318
                <th><label for="accepteddate">Suggestion accepted</label> </th>
366
                <th><label for="accepteddate">Suggestion accepted</label> </th>
319
                <td><input type="text" id="accepteddate" name="accepteddate" size="10" maxlength="10" value="[% accepteddate %]" /></td>
367
                <td><input type="text" id="accepteddate" name="accepteddate" size="10" maxlength="10" value="[% accepteddate %]" /></td>
320
                <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode %] ([% acceptedby_description %])[% END %]</td>
368
                <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode | $KohaBranchName %] ([% acceptedby_description %])[% END %]</td>
321
            </tr>
369
            </tr>
322
            </tbody>
370
            </tbody>
323
        </table></li></ol>
371
        </table></li></ol>
Lines 364-384 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
364
<h1>Suggestions management</h1>
412
<h1>Suggestions management</h1>
365
413
366
[% UNLESS ( notabs ) %]
414
[% UNLESS ( notabs ) %]
367
<div id="sorting" class="overlay">Sorting...</div>
415
    <div id="sorting" class="overlay">Sorting...</div>
368
<div id="loadingtab" class="overlay">Loading tab...</div>
416
    <div id="loadingtab" class="overlay">Loading tab...</div>
369
<div id="suggestiontabs" class="toptabs">
417
    <div id="suggestiontabs" class="toptabs">
370
<ul class="ui-tabs-nav">
418
    <ul class="ui-tabs-nav">
371
[% FOREACH suggestion IN suggestions %]
419
        [% FOREACH suggestion IN suggestions %]
372
[% IF ( suggestion.first ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#[% suggestion.suggestiontype %]">[% IF ( suggestion.suggestiontypelabel ) %]
420
            [% IF ( suggestion.first ) %]
373
    [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
421
                <li class="ui-tabs-selected">
374
    [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
422
            [% ELSE %]
375
    [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
423
                <li>
376
    [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
424
            [% END %]
377
    [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
425
378
    [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered[% ELSE %]
426
            <a href="#[% suggestion.suggestiontype %]">
379
    [% suggestion.suggestiontypelabel %][% END %]
427
            [% IF ( suggestion.suggestiontypelabel ) %]
380
    [% ELSE %]No name[% END %] ([% suggestion.suggestionscount %])</a></li>
428
                [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
381
[% END %]
429
                [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
430
                [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
431
                [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
432
                [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
433
                [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
434
                [% ELSE %][% suggestion.suggestiontypelabel %][% END %]
435
            [% ELSE %]
436
                [% IF ( suggestion.suggestiontype ) %]
437
                    [% KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) %]
438
                [% ELSE %]
439
                    No name
440
                [% END %]
441
            [% END %]
442
            ([% suggestion.suggestions_loop.size %])</a></li>
443
444
        [% END %]
382
    </ul>
445
    </ul>
383
[% END %]
446
[% END %]
384
447
Lines 422-462 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
422
                    [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate %][% END %]
485
                    [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate %][% END %]
423
                </td>
486
                </td>
424
                <td>
487
                <td>
425
                    [% suggestions_loo.branchcode %]
488
                    [% suggestions_loo.branchcode | $KohaBranchName %]
426
                </td>
489
                </td>
427
                <td>
490
                <td>
428
                    [% suggestions_loo.budget_name %]
491
                    [% suggestions_loo.budget_name %]
429
                </td>
492
                </td>
430
                <td>
493
                <td>
431
                    [% IF ( suggestions_loo.ASKED ) %]Pending[% END %] [% IF ( suggestions_loo.ACCEPTED ) %]Accepted[% END %] [% IF ( suggestions_loo.ORDERED ) %]Ordered[% END %] [% IF ( suggestions_loo.REJECTED ) %]Rejected[% END %] [% IF ( suggestions_loo.CHECKED ) %]Checked[% END %] [% IF ( suggestions_loo.reason ) %]<br />([% suggestions_loo.reason %])[% END %]
494
                    [% IF ( suggestions_loo.ASKED ) %]
495
                        Pending
496
                    [% ELSIF ( suggestions_loo.ACCEPTED ) %]
497
                        Accepted
498
                    [% ELSIF ( suggestions_loo.ORDERED ) %]
499
                        Ordered
500
                    [% ELSIF ( suggestions_loo.REJECTED ) %]
501
                        Rejected
502
                    [% ELSIF ( suggestions_loo.CHECKED ) %]
503
                        Checked
504
                    [% ELSIF KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
505
                        [% KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
506
                    [% END %]
507
508
                    [% IF ( suggestions_loo.reason ) %]
509
                        <br />([% suggestions_loo.reason %])
510
                    [% END %]
432
                </td>
511
                </td>
433
        </tr>
512
        </tr>
434
        [% END %]</tbody>
513
        [% END %]</tbody>
435
        </table>  <fieldset>
514
        </table>  <fieldset>
436
    <div id="select-reason[% suggestion.suggestiontype %]">
515
    <div id="select-reason[% suggestion.suggestiontype %]">
437
        <div id="status[% suggestion.suggestiontype %]">
516
        <div id="status[% suggestion.suggestiontype %]">
438
	<label for="STATUS[% suggestion.suggestiontype %]">Mark selected as: </label><select name="STATUS" id="STATUS[% suggestion.suggestiontype %]">
517
            <label for="STATUS[% suggestion.suggestiontype %]">Mark selected as: </label>
439
	<option value=""> -- Choose a status --</option>
518
            <select name="STATUS" id="STATUS[% suggestion.suggestiontype %]">
440
    [% IF (statusselected_ASKED ) %]<option value="ASKED" selected="selected">Pending</option> 
519
                <option value=""> -- Choose a status --</option>
441
    [% ELSE %]<option value="ASKED">Pending</option>[% END %]
520
442
    [% IF (statusselected_ACCEPTED ) %]<option value="ACCEPTED" selected="selected">Accepted</option>
521
                [% IF (statusselected_ASKED ) %]
443
    [% ELSE %]<option value="ACCEPTED">Accepted</option>[% END %]
522
                    <option value="ASKED" selected="selected">Pending</option>
444
    [% IF (statusselected_CHECKED ) %]<option value="CHECKED" selected="selected">Checked</option>
523
                [% ELSE %]
445
    [% ELSE %]<option value="CHECKED">Checked</option>[% END %]
524
                    <option value="ASKED">Pending</option>
446
    [% IF ( statusselected_REJECTED ) %]<option value="REJECTED" selected="selected">Rejected</option>
525
                [% END %]
447
    [% ELSE %]<option value="REJECTED">Rejected</option>[% END %]
526
448
	</select>
527
                [% IF (statusselected_ACCEPTED ) %]
449
    <label for="reason[% suggestion.suggestiontype %]">with this reason:</label>                 <select id="reason[% suggestion.suggestiontype %]" name="reason[% suggestion.suggestiontype %]">
528
                    <option value="ACCEPTED" selected="selected">Accepted</option>
450
                    <option value=""> -- Choose a reason -- </option>
529
                [% ELSE %]
451
                        [% FOREACH reasonsloo IN suggestion.reasonsloop %]
530
                    <option value="ACCEPTED">Accepted</option>
452
                        <option value="[% reasonsloo.lib %]">[% reasonsloo.lib %]</option>
531
                [% END %]
453
                        [% END %]
532
454
                    <option value="other">Others...</option>
533
                [% IF (statusselected_CHECKED ) %]
455
                    </select>   <span id="other_reason[% suggestion.suggestiontype %]">
534
                    <option value="CHECKED" selected="selected">Checked</option>
456
            <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype %]" name="other_reason[% suggestion.suggestiontype %]" value="please note your reason here..." /> <a href="#back[% suggestion.suggestiontype %]">Cancel</a>
535
                [% ELSE %]
457
        </span> <strong style="padding: 0 1em;">OR:</strong> <label for="[% suggestion.suggestiontype %]delete">Delete selected</label> <input type="checkbox" name="op" id="[% suggestion.suggestiontype %]delete" />
536
                    <option value="CHECKED">Checked</option>
458
        </div>
537
                [% END %]
538
539
                [% IF ( statusselected_REJECTED ) %]
540
                    <option value="REJECTED" selected="selected">Rejected</option>
541
                [% ELSE %]
542
                    <option value="REJECTED">Rejected</option>
543
                [% END %]
544
545
                [% FOREACH s IN SuggestionStatuses %]
546
                    <option value="[% s.authorised_value %]">[% s.lib %]</option>
547
                [% END %]
548
            </select>
549
550
            <label for="reason[% suggestion.suggestiontype %]">with this reason:</label>
551
            <select id="reason[% suggestion.suggestiontype %]" name="reason[% suggestion.suggestiontype %]">
552
                <option value=""> -- Choose a reason -- </option>
553
                [% FOREACH reasonsloo IN suggestion.reasonsloop %]
554
                    <option value="[% reasonsloo.lib %]">[% reasonsloo.lib %]</option>
555
                [% END %]
556
                <option value="other">Others...</option>
557
            </select>
558
559
            <span id="other_reason[% suggestion.suggestiontype %]">
560
                <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype %]" name="other_reason[% suggestion.suggestiontype %]" value="please note your reason here..." />
561
                <a href="#back[% suggestion.suggestiontype %]">Cancel</a>
562
            </span>
563
564
            <strong style="padding: 0 1em;">OR:</strong>
565
566
            <label for="[% suggestion.suggestiontype %]delete">Delete selected</label>
567
            <input type="checkbox" name="op" id="[% suggestion.suggestiontype %]delete" />
459
        </div>
568
        </div>
569
    </div>
460
570
461
571
462
    <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype %]" />
572
    <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype %]" />
Lines 498-513 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
498
                </fieldset>
608
                </fieldset>
499
				 <fieldset class="brief"><h4 class="collapse"><a href="#">Suggestion information</a></h4>
609
				 <fieldset class="brief"><h4 class="collapse"><a href="#">Suggestion information</a></h4>
500
                    <ol>
610
                    <ol>
501
                      <li><label for="STATUS"> Status:</label><select name="STATUS" id="STATUS"><option value="">Any</option>
611
                      <li>
502
                        [% IF (statusselected_ASKED ) %]<option value="ASKED" selected="selected">Pending</option> 
612
                          <label for="STATUS"> Status:</label>
503
                        [% ELSE %]<option value="ASKED">Pending</option>[% END %]
613
                          <select name="STATUS" id="STATUS">
504
                        [% IF (statusselected_ACCEPTED ) %]<option value="ACCEPTED" selected="selected">Accepted</option>
614
                              <option value="">Any</option>
505
                        [% ELSE %]<option value="ACCEPTED">Accepted</option>[% END %]
615
506
                        [% IF (statusselected_CHECKED ) %]<option value="CHECKED" selected="selected">Checked</option>
616
                              [% IF (statusselected_ASKED ) %]
507
                        [% ELSE %]<option value="CHECKED">Checked</option>[% END %]
617
                                  <option value="ASKED" selected="selected">Pending</option>
508
                        [% IF ( statusselected_REJECTED ) %]<option value="REJECTED" selected="selected">Rejected</option>
618
                              [% ELSE %]
509
                        [% ELSE %]<option value="REJECTED">Rejected</option>[% END %]
619
                                  <option value="ASKED">Pending</option>
510
                      </select></li>
620
                              [% END %]
621
622
                              [% IF (statusselected_ACCEPTED ) %]
623
                                  <option value="ACCEPTED" selected="selected">Accepted</option>
624
                              [% ELSE %]
625
                                  <option value="ACCEPTED">Accepted</option>
626
                              [% END %]
627
628
                              [% IF (statusselected_CHECKED ) %]
629
                                  <option value="CHECKED" selected="selected">Checked</option>
630
                              [% ELSE %]
631
                                  <option value="CHECKED">Checked</option>
632
                              [% END %]
633
634
                              [% IF ( statusselected_REJECTED ) %]
635
                                  <option value="REJECTED" selected="selected">Rejected</option>
636
                              [% ELSE %]
637
                                  <option value="REJECTED">Rejected</option>
638
                              [% END %]
639
640
                              [% FOREACH s IN SuggestionStatuses %]
641
                                  [% IF s.authorised_value == selected_status %]
642
                                      <option value="[% s.authorised_value %]" selected="selected">[% s.lib %]</option>
643
                                  [% ELSE %]
644
                                      <option value="[% s.authorised_value %]">[% s.lib %]</option>
645
                                  [% END %]
646
                              [% END %]
647
                          </select>
648
                      </li>
649
511
                    <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
650
                    <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
512
[% FOREACH suggestedby_loo IN suggestedby_loop %][% IF ( suggestedby_loo.selected ) %]<option value="[% suggestedby_loo.code %]" selected="selected">[% suggestedby_loo.desc %]</option>[% ELSE %]<option value="[% suggestedby_loo.code %]">[% suggestedby_loo.desc %]</option>[% END %][% END %]
651
[% FOREACH suggestedby_loo IN suggestedby_loop %][% IF ( suggestedby_loo.selected ) %]<option value="[% suggestedby_loo.code %]" selected="selected">[% suggestedby_loo.desc %]</option>[% ELSE %]<option value="[% suggestedby_loo.code %]">[% suggestedby_loo.desc %]</option>[% END %][% END %]
513
                                                                     </select></li>
652
                                                                     </select></li>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt (-6 / +9 lines)
Lines 1-3 Link Here
1
[% USE KohaAuthorisedValues %]
1
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;
2
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;
2
[% IF ( op_add ) %]Enter a new purchase suggestion[% END %]
3
[% IF ( op_add ) %]Enter a new purchase suggestion[% END %]
3
[% IF ( op_else ) %]Purchase Suggestions[% END %]
4
[% IF ( op_else ) %]Purchase Suggestions[% END %]
Lines 216-227 $.tablesorter.addParser({ Link Here
216
					[% IF ( suggestions_loo.surnamemanagedby ) %][% suggestions_loo.surnamemanagedby %][% IF ( suggestions_loo.firstnamemanagedby ) %],[% END %] [% suggestions_loo.firstnamemanagedby %][% ELSE %]&nbsp;[% END %]
217
					[% IF ( suggestions_loo.surnamemanagedby ) %][% suggestions_loo.surnamemanagedby %][% IF ( suggestions_loo.firstnamemanagedby ) %],[% END %] [% suggestions_loo.firstnamemanagedby %][% ELSE %]&nbsp;[% END %]
217
                </td>
218
                </td>
218
                <td>
219
                <td>
219
                    [% IF ( suggestions_loo.ASKED ) %]Requested[% END %]
220
                    [% IF    ( suggestions_loo.ASKED ) %]Requested
220
                    [% IF ( suggestions_loo.CHECKED ) %]Checked by the library[% END %]
221
                    [% ELSIF ( suggestions_loo.CHECKED ) %]Checked by the library
221
                    [% IF ( suggestions_loo.ACCEPTED ) %]Accepted by the library[% END %]
222
                    [% ELSIF ( suggestions_loo.ACCEPTED ) %]Accepted by the library
222
                    [% IF ( suggestions_loo.ORDERED ) %]Ordered by the library[% END %]
223
                    [% ELSIF ( suggestions_loo.ORDERED ) %]Ordered by the library
223
                    [% IF ( suggestions_loo.REJECTED ) %]Suggestion declined [% END %]
224
                    [% ELSIF ( suggestions_loo.REJECTED ) %]Suggestion declined
224
                    [% IF ( suggestions_loo.AVAILABLE ) %]Available in the library[% END %]
225
                    [% ELSIF ( suggestions_loo.AVAILABLE ) %]Available in the library
226
                    [% ELSE %] [% KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS, 1 ) %] [% END %]
227
225
                    [% IF ( suggestions_loo.reason ) %]([% suggestions_loo.reason %])[% END %]
228
                    [% IF ( suggestions_loo.reason ) %]([% suggestions_loo.reason %])[% END %]
226
                </td>
229
                </td>
227
            </tr>
230
            </tr>
(-)a/suggestion/suggestion.pl (-2 / +7 lines)
Lines 58-63 sub Init{ Link Here
58
58
59
sub GetCriteriumDesc{
59
sub GetCriteriumDesc{
60
    my ($criteriumvalue,$displayby)=@_;
60
    my ($criteriumvalue,$displayby)=@_;
61
    unless ( grep { /$criteriumvalue/ } qw(ASKED ACCEPTED REJECTED CHECKED) ) {
62
        return GetAuthorisedValueByCode('SUGGEST_STATUS', $criteriumvalue ) || "Unknown";
63
    }
61
    return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i);
64
    return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i);
62
    return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/);
65
    return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/);
63
    return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/);
66
    return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/);
Lines 384-388 foreach my $field ( qw(managedby acceptedby suggestedby budgetid) ) { Link Here
384
    $hashlists{ lc($field) . "_loop" } = \@codes_list;
387
    $hashlists{ lc($field) . "_loop" } = \@codes_list;
385
}
388
}
386
$template->param(%hashlists);
389
$template->param(%hashlists);
387
$template->param(DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),);
390
$template->param(
391
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
392
    SuggestionStatuses       => GetAuthorisedValues('SUGGEST_STATUS'),
393
);
388
output_html_with_http_headers $input, $cookie, $template->output;
394
output_html_with_http_headers $input, $cookie, $template->output;
389
- 

Return to bug 9307