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 81-87 $(document).ready(function() { Link Here
81
        <fieldset class="rows"><ol>
81
        <fieldset class="rows"><ol>
82
        <li>
82
        <li>
83
        [% IF ( action_add_category ) %]<label for="category">Category: </label>
83
        [% IF ( action_add_category ) %]<label for="category">Category: </label>
84
            <input type="text" name="category"  id="category" size="10" maxlength="10" class="focus" />
84
            <input type="text" name="category"  id="category" size="16" maxlength="16" class="focus" />
85
			 [% ELSE %]<span class="label">Category</span>
85
			 [% ELSE %]<span class="label">Category</span>
86
		<input type="hidden" name="category" value="[% category %]" />	 [% category %]
86
		<input type="hidden" name="category" value="[% category %]" />	 [% category %]
87
			 [% END %]
87
			 [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tt (+2 lines)
Lines 36-41 Link Here
36
36
37
<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>
37
<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>
38
38
39
<p><strong>Customization:</strong> You can create additional custom suggestion statuses by creating new authorised values of the category SUGGEST_STATUS</p>
40
39
<p><strong>See the full documentation for Purchase Suggestions in the <a href="http://manual.koha-community.org/3.12/en/managesuggest.html">manual</a> (online).</strong></p>
41
<p><strong>See the full documentation for Purchase Suggestions in the <a href="http://manual.koha-community.org/3.12/en/managesuggest.html">manual</a> (online).</strong></p>
40
42
41
[% INCLUDE 'help-bottom.inc' %]
43
[% INCLUDE 'help-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-67 / +206 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 363-381 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
363
<h1>Suggestions management</h1>
411
<h1>Suggestions management</h1>
364
412
365
[% UNLESS ( notabs ) %]
413
[% UNLESS ( notabs ) %]
366
<div id="suggestiontabs" class="toptabs">
414
    <div id="suggestiontabs" class="toptabs">
367
<ul class="ui-tabs-nav">
415
    <ul class="ui-tabs-nav">
368
[% FOREACH suggestion IN suggestions %]
416
        [% FOREACH suggestion IN suggestions %]
369
[% IF ( suggestion.first ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#[% suggestion.suggestiontype %]">[% IF ( suggestion.suggestiontypelabel ) %]
417
            [% IF ( suggestion.first ) %]
370
    [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
418
                <li class="ui-tabs-selected">
371
    [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
419
            [% ELSE %]
372
    [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
420
                <li>
373
    [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
421
            [% END %]
374
    [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
422
375
    [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered[% ELSE %]
423
            <a href="#[% suggestion.suggestiontype %]">
376
    [% suggestion.suggestiontypelabel %][% END %]
424
            [% IF ( suggestion.suggestiontypelabel ) %]
377
    [% ELSE %]No name[% END %] ([% suggestion.suggestionscount %])</a></li>
425
                [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending
378
[% END %]
426
                [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted
427
                [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked
428
                [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected
429
                [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available
430
                [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered
431
                [% ELSE %][% suggestion.suggestiontypelabel %][% END %]
432
            [% ELSE %]
433
                [% IF ( suggestion.suggestiontype ) %]
434
                    [% KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) %]
435
                [% ELSE %]
436
                    No name
437
                [% END %]
438
            [% END %]
439
            ([% suggestion.suggestions_loop.size %])</a></li>
440
441
        [% END %]
379
    </ul>
442
    </ul>
380
[% END %]
443
[% END %]
381
444
Lines 419-459 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
419
                    [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate %][% END %]
482
                    [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate %][% END %]
420
                </td>
483
                </td>
421
                <td>
484
                <td>
422
                    [% suggestions_loo.branchcode %]
485
                    [% suggestions_loo.branchcode | $KohaBranchName %]
423
                </td>
486
                </td>
424
                <td>
487
                <td>
425
                    [% suggestions_loo.budget_name %]
488
                    [% suggestions_loo.budget_name %]
426
                </td>
489
                </td>
427
                <td>
490
                <td>
428
                    [% 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 %]
491
                    [% IF ( suggestions_loo.ASKED ) %]
492
                        Pending
493
                    [% ELSIF ( suggestions_loo.ACCEPTED ) %]
494
                        Accepted
495
                    [% ELSIF ( suggestions_loo.ORDERED ) %]
496
                        Ordered
497
                    [% ELSIF ( suggestions_loo.REJECTED ) %]
498
                        Rejected
499
                    [% ELSIF ( suggestions_loo.CHECKED ) %]
500
                        Checked
501
                    [% ELSIF KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
502
                        [% KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %]
503
                    [% END %]
504
505
                    [% IF ( suggestions_loo.reason ) %]
506
                        <br />([% suggestions_loo.reason %])
507
                    [% END %]
429
                </td>
508
                </td>
430
        </tr>
509
        </tr>
431
        [% END %]</tbody>
510
        [% END %]</tbody>
432
        </table>  <fieldset>
511
        </table>  <fieldset>
433
    <div id="select-reason[% suggestion.suggestiontype %]">
512
    <div id="select-reason[% suggestion.suggestiontype %]">
434
        <div id="status[% suggestion.suggestiontype %]">
513
        <div id="status[% suggestion.suggestiontype %]">
435
	<label for="STATUS[% suggestion.suggestiontype %]">Mark selected as: </label><select name="STATUS" id="STATUS[% suggestion.suggestiontype %]">
514
            <label for="STATUS[% suggestion.suggestiontype %]">Mark selected as: </label>
436
	<option value=""> -- Choose a status --</option>
515
            <select name="STATUS" id="STATUS[% suggestion.suggestiontype %]">
437
    [% IF (statusselected_ASKED ) %]<option value="ASKED" selected="selected">Pending</option> 
516
                <option value=""> -- Choose a status --</option>
438
    [% ELSE %]<option value="ASKED">Pending</option>[% END %]
517
439
    [% IF (statusselected_ACCEPTED ) %]<option value="ACCEPTED" selected="selected">Accepted</option>
518
                [% IF (statusselected_ASKED ) %]
440
    [% ELSE %]<option value="ACCEPTED">Accepted</option>[% END %]
519
                    <option value="ASKED" selected="selected">Pending</option>
441
    [% IF (statusselected_CHECKED ) %]<option value="CHECKED" selected="selected">Checked</option>
520
                [% ELSE %]
442
    [% ELSE %]<option value="CHECKED">Checked</option>[% END %]
521
                    <option value="ASKED">Pending</option>
443
    [% IF ( statusselected_REJECTED ) %]<option value="REJECTED" selected="selected">Rejected</option>
522
                [% END %]
444
    [% ELSE %]<option value="REJECTED">Rejected</option>[% END %]
523
445
	</select>
524
                [% IF (statusselected_ACCEPTED ) %]
446
    <label for="reason[% suggestion.suggestiontype %]">with this reason:</label>                 <select id="reason[% suggestion.suggestiontype %]" name="reason[% suggestion.suggestiontype %]">
525
                    <option value="ACCEPTED" selected="selected">Accepted</option>
447
                    <option value=""> -- Choose a reason -- </option>
526
                [% ELSE %]
448
                        [% FOREACH reasonsloo IN suggestion.reasonsloop %]
527
                    <option value="ACCEPTED">Accepted</option>
449
                        <option value="[% reasonsloo.lib %]">[% reasonsloo.lib %]</option>
528
                [% END %]
450
                        [% END %]
529
451
                    <option value="other">Others...</option>
530
                [% IF (statusselected_CHECKED ) %]
452
                    </select>   <span id="other_reason[% suggestion.suggestiontype %]">
531
                    <option value="CHECKED" selected="selected">Checked</option>
453
            <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>
532
                [% ELSE %]
454
        </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" />
533
                    <option value="CHECKED">Checked</option>
455
        </div>
534
                [% END %]
535
536
                [% IF ( statusselected_REJECTED ) %]
537
                    <option value="REJECTED" selected="selected">Rejected</option>
538
                [% ELSE %]
539
                    <option value="REJECTED">Rejected</option>
540
                [% END %]
541
542
                [% FOREACH s IN SuggestionStatuses %]
543
                    <option value="[% s.authorised_value %]">[% s.lib %]</option>
544
                [% END %]
545
            </select>
546
547
            <label for="reason[% suggestion.suggestiontype %]">with this reason:</label>
548
            <select id="reason[% suggestion.suggestiontype %]" name="reason[% suggestion.suggestiontype %]">
549
                <option value=""> -- Choose a reason -- </option>
550
                [% FOREACH reasonsloo IN suggestion.reasonsloop %]
551
                    <option value="[% reasonsloo.lib %]">[% reasonsloo.lib %]</option>
552
                [% END %]
553
                <option value="other">Others...</option>
554
            </select>
555
556
            <span id="other_reason[% suggestion.suggestiontype %]">
557
                <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype %]" name="other_reason[% suggestion.suggestiontype %]" value="please note your reason here..." />
558
                <a href="#back[% suggestion.suggestiontype %]">Cancel</a>
559
            </span>
560
561
            <strong style="padding: 0 1em;">OR:</strong>
562
563
            <label for="[% suggestion.suggestiontype %]delete">Delete selected</label>
564
            <input type="checkbox" name="op" id="[% suggestion.suggestiontype %]delete" />
456
        </div>
565
        </div>
566
    </div>
457
567
458
568
459
    <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype %]" />
569
    <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype %]" />
Lines 495-510 $(document).ready(function() { calcNewsuggTotal(); }); Link Here
495
                </fieldset>
605
                </fieldset>
496
				 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
606
				 <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4>
497
                    <ol>
607
                    <ol>
498
                      <li><label for="STATUS"> Status:</label><select name="STATUS" id="STATUS"><option value="">Any</option>
608
                      <li>
499
                        [% IF (statusselected_ASKED ) %]<option value="ASKED" selected="selected">Pending</option> 
609
                          <label for="STATUS"> Status:</label>
500
                        [% ELSE %]<option value="ASKED">Pending</option>[% END %]
610
                          <select name="STATUS" id="STATUS">
501
                        [% IF (statusselected_ACCEPTED ) %]<option value="ACCEPTED" selected="selected">Accepted</option>
611
                              <option value="">Any</option>
502
                        [% ELSE %]<option value="ACCEPTED">Accepted</option>[% END %]
612
503
                        [% IF (statusselected_CHECKED ) %]<option value="CHECKED" selected="selected">Checked</option>
613
                              [% IF (statusselected_ASKED ) %]
504
                        [% ELSE %]<option value="CHECKED">Checked</option>[% END %]
614
                                  <option value="ASKED" selected="selected">Pending</option>
505
                        [% IF ( statusselected_REJECTED ) %]<option value="REJECTED" selected="selected">Rejected</option>
615
                              [% ELSE %]
506
                        [% ELSE %]<option value="REJECTED">Rejected</option>[% END %]
616
                                  <option value="ASKED">Pending</option>
507
                      </select></li>
617
                              [% END %]
618
619
                              [% IF (statusselected_ACCEPTED ) %]
620
                                  <option value="ACCEPTED" selected="selected">Accepted</option>
621
                              [% ELSE %]
622
                                  <option value="ACCEPTED">Accepted</option>
623
                              [% END %]
624
625
                              [% IF (statusselected_CHECKED ) %]
626
                                  <option value="CHECKED" selected="selected">Checked</option>
627
                              [% ELSE %]
628
                                  <option value="CHECKED">Checked</option>
629
                              [% END %]
630
631
                              [% IF ( statusselected_REJECTED ) %]
632
                                  <option value="REJECTED" selected="selected">Rejected</option>
633
                              [% ELSE %]
634
                                  <option value="REJECTED">Rejected</option>
635
                              [% END %]
636
637
                              [% FOREACH s IN SuggestionStatuses %]
638
                                  [% IF s.authorised_value == selected_status %]
639
                                      <option value="[% s.authorised_value %]" selected="selected">[% s.lib %]</option>
640
                                  [% ELSE %]
641
                                      <option value="[% s.authorised_value %]">[% s.lib %]</option>
642
                                  [% END %]
643
                              [% END %]
644
                          </select>
645
                      </li>
646
508
                    <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
647
                    <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option>
509
[% 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 %]
648
[% 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 %]
510
                                                                     </select></li>
649
                                                                     </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 (-1 / +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 383-386 foreach my $field ( qw(managedby acceptedby suggestedby budgetid) ) { Link Here
383
    $hashlists{ lc($field) . "_loop" } = \@codes_list;
386
    $hashlists{ lc($field) . "_loop" } = \@codes_list;
384
}
387
}
385
$template->param(%hashlists);
388
$template->param(%hashlists);
389
$template->param(
390
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
391
    SuggestionStatuses       => GetAuthorisedValues('SUGGEST_STATUS'),
392
);
386
output_html_with_http_headers $input, $cookie, $template->output;
393
output_html_with_http_headers $input, $cookie, $template->output;
387
- 

Return to bug 9307