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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-8 / +18 lines)
Lines 70-75 Link Here
70
                <th>Patron category</th>
70
                <th>Patron category</th>
71
                <th>Item type</th>
71
                <th>Item type</th>
72
                <th>Actions</th>
72
                <th>Actions</th>
73
                <th>Note</th>
73
                <th>Current checkouts allowed</th>
74
                <th>Current checkouts allowed</th>
74
                <th>Current on-site checkouts allowed</th>
75
                <th>Current on-site checkouts allowed</th>
75
                <th>Loan period</th>
76
                <th>Loan period</th>
Lines 96-102 Link Here
96
                <th>Item level holds</th>
97
                <th>Item level holds</th>
97
                <th>Article requests</th>
98
                <th>Article requests</th>
98
                <th>Rental discount (%)</th>
99
                <th>Rental discount (%)</th>
99
                <th>Note</th>
100
                <th>Actions</th>
100
                <th>Actions</th>
101
            </tr>
101
            </tr>
102
            </thead>
102
            </thead>
Lines 120-125 Link Here
120
                                                          <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&amp;itemtype=[% rule.itemtype | html %]&amp;categorycode=[% rule.categorycode | html %]&amp;branch=[% rule.current_branch | html %]"><i class="fa fa-trash"></i> Delete</a>
120
                                                          <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&amp;itemtype=[% rule.itemtype | html %]&amp;categorycode=[% rule.categorycode | html %]&amp;branch=[% rule.current_branch | html %]"><i class="fa fa-trash"></i> Delete</a>
121
                                                        </td>
121
                                                        </td>
122
122
123
                                                        <td>
124
                                                            [% IF rule.note %]
125
                                                                <a name="viewnote" data-toggle="popover" title="Note" data-content="[% rule.note %]" data-placement="top" data-trigger="hover">View note</a>
126
                                                            [% ELSE %]&nbsp;[% END %]
127
                                                        </td>
123
							<td>[% IF ( rule.unlimited_maxissueqty ) %]
128
							<td>[% IF ( rule.unlimited_maxissueqty ) %]
124
									<span>Unlimited</span>
129
									<span>Unlimited</span>
125
								[% ELSE %]
130
								[% ELSE %]
Lines 247-252 Link Here
247
                        <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
252
                        <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
248
                        <button name="cancel" class="clear_edit btn btn-default btn-xs"><i class="fa fa-undo"></i> Clear</button>
253
                        <button name="cancel" class="clear_edit btn btn-default btn-xs"><i class="fa fa-undo"></i> Clear</button>
249
                    </td>
254
                    </td>
255
                    <td><input type="text" name="note" id="note" size="15" value="" maxlength="100"></td>
250
                    <td><input type="text" name="maxissueqty" id="maxissueqty" size="3" /></td>
256
                    <td><input type="text" name="maxissueqty" id="maxissueqty" size="3" /></td>
251
                    <td><input type="text" name="maxonsiteissueqty" id="maxonsiteissueqty" size="3" /></td>
257
                    <td><input type="text" name="maxonsiteissueqty" id="maxonsiteissueqty" size="3" /></td>
252
                    <td><input type="text" name="issuelength" id="issuelength" size="3" /> </td>
258
                    <td><input type="text" name="issuelength" id="issuelength" size="3" /> </td>
Lines 318-324 Link Here
318
                        </select>
324
                        </select>
319
                    </td>
325
                    </td>
320
                    <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
326
                    <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
321
                    <td><input type="text" name="note" id="note" size="15" value=""></td>
322
                    <td class="actions">
327
                    <td class="actions">
323
                        <input type="hidden" name="branch" value="[% current_branch | html %]"/>
328
                        <input type="hidden" name="branch" value="[% current_branch | html %]"/>
324
                        <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
329
                        <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
Lines 330-335 Link Here
330
                      <th>Patron category</th>
335
                      <th>Patron category</th>
331
                      <th>Item type</th>
336
                      <th>Item type</th>
332
                      <th>&nbsp;</th>
337
                      <th>&nbsp;</th>
338
                      <th>Note</th>
333
                      <th>Current checkouts allowed</th>
339
                      <th>Current checkouts allowed</th>
334
                      <th>Current on-site checkouts allowed</th>
340
                      <th>Current on-site checkouts allowed</th>
335
                      <th>Loan period</th>
341
                      <th>Loan period</th>
Lines 349-362 Link Here
349
                      <th>No renewal before</th>
355
                      <th>No renewal before</th>
350
                      <th>Automatic renewal</th>
356
                      <th>Automatic renewal</th>
351
                      <th>No automatic renewal after</th>
357
                      <th>No automatic renewal after</th>
352
                       <th>No automatic renewal after (hard limit)</th>
358
                      <th>No automatic renewal after (hard limit)</th>
353
                      <th>Holds allowed (count)</th>
359
                      <th>Holds allowed (count)</th>
354
                      <th>Holds per record (count)</th>
360
                      <th>Holds per record (count)</th>
355
                      <th>On shelf holds allowed</th>
361
                      <th>On shelf holds allowed</th>
356
                      <th>Item level holds</th>
362
                      <th>Item level holds</th>
357
                      <th>Article requests</th>
363
                      <th>Article requests</th>
358
                      <th>Rental discount (%)</th>
364
                      <th>Rental discount (%)</th>
359
                      <th>Note</th>
360
                      <th>&nbsp;</th>
365
                      <th>&nbsp;</th>
361
                    </tr>
366
                    </tr>
362
                  </tfoot>
367
                  </tfoot>
Lines 788-793 Link Here
788
        var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this rule? This cannot be undone.");
793
        var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this rule? This cannot be undone.");
789
794
790
        $(document).ready(function() {
795
        $(document).ready(function() {
796
            $('[data-toggle="popover"]').popover();
797
791
            $(".delete").on("click",function(){
798
            $(".delete").on("click",function(){
792
                return confirmDelete(MSG_CONFIRM_DELETE);
799
                return confirmDelete(MSG_CONFIRM_DELETE);
793
            });
800
            });
Lines 825-831 Link Here
825
                    itm = $(this).text();
832
                    itm = $(this).text();
826
                    itm = itm.replace(/^\s*|\s*$/g,'');
833
                    itm = itm.replace(/^\s*|\s*$/g,'');
827
                    var current_column = $("#edit_row td:eq("+i+")");
834
                    var current_column = $("#edit_row td:eq("+i+")");
828
                    if ( i == 7 ) {
835
                    if ( i == 3 ) {
836
                        // specific processing for the Note column
837
                        var note = $(this).find("a[name='viewnote']").data("content");
838
                        $(current_column).find("input[type='text']").val(note);
839
                    } else if ( i == 8 ) {
829
                        // specific processing for the Hard due date column
840
                        // specific processing for the Hard due date column
830
                        var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val();
841
                        var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val();
831
                        var input_value = '';
842
                        var input_value = '';
Lines 836-842 Link Here
836
                        }
847
                        }
837
                        $(current_column).find("input[type='text']").val(input_value);
848
                        $(current_column).find("input[type='text']").val(input_value);
838
                        $(current_column).find("select").val(select_value);
849
                        $(current_column).find("select").val(select_value);
839
                    } else if ( i == 13 ) {
850
                    } else if ( i == 14 ) {
840
                        // specific processing for cap_fine_to_replacement_price
851
                        // specific processing for cap_fine_to_replacement_price
841
                        var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']");
852
                        var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']");
842
                        $('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') );
853
                        $('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') );
Lines 861-867 Link Here
861
                            // Remove potential previous input added
872
                            // Remove potential previous input added
862
                            $(current_column).find("input").remove();
873
                            $(current_column).find("input").remove();
863
                            $(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />");
874
                            $(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />");
864
                        } else if ( i == 3 || i == 4 ) {
875
                        } else if ( i == 4 || i == 5 ) {
865
                            // If the value is not an integer for "Current checkouts allowed" or "Current on-site checkouts allowed"
876
                            // If the value is not an integer for "Current checkouts allowed" or "Current on-site checkouts allowed"
866
                            // The value is "Unlimited" (or an equivalent translated string)
877
                            // The value is "Unlimited" (or an equivalent translated string)
867
                            // an it should be set to an empty string
878
                            // an it should be set to an empty string
868
- 

Return to bug 12365