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

(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-11 / +11 lines)
Lines 917-923 $(document).ready(function() { Link Here
917
                        "sClass": "return-claim-notes-td",
917
                        "sClass": "return-claim-notes-td",
918
                        "mDataProp": function ( oObj ) {
918
                        "mDataProp": function ( oObj ) {
919
                            return '<span id="return-claim-notes-static-' + oObj.id + '" class="return-claim-notes" data-return-claim-id="' + oObj.id + '">' + oObj.notes + '</span>'
919
                            return '<span id="return-claim-notes-static-' + oObj.id + '" class="return-claim-notes" data-return-claim-id="' + oObj.id + '">' + oObj.notes + '</span>'
920
                                + '<i style="float:right" class="fa fa-pencil-square-o" title="Double click to edit"></i>';
920
                                + '<i style="float:right" class="fa fa-pencil-square-o" title="' + __("Double click to edit") + '"></i>';
921
                        }
921
                        }
922
                    },
922
                    },
923
                    {
923
                    {
Lines 940-965 $(document).ready(function() { Link Here
940
                        "mDataProp": function ( oObj ) {
940
                        "mDataProp": function ( oObj ) {
941
                            if ( ! oObj.resolution ) return "";
941
                            if ( ! oObj.resolution ) return "";
942
942
943
                            let desc = '<strong>' + oObj.resolution_data.lib + '</strong> on <i>' + oObj.resolved_on + '</i>';
943
                            let desc = '<strong>' + oObj.resolution_data.lib + '</strong> <i>(';
944
                            if (oObj.resolved_by_data) desc += ' by <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=' + oObj.resolved_by_data.borrowernumber + '">' + ( oObj.resolved_by_data.firstname || "" ) + ( oObj.resolved_by_data.surname || "" ) + '</a>';
944
                            if (oObj.resolved_by_data) desc += '<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=' + oObj.resolved_by_data.borrowernumber + '">' + ( oObj.resolved_by_data.firstname || "" ) + " " + ( oObj.resolved_by_data.surname || "" ) + '</a>';
945
                            desc += ', ' + oObj.resolved_on + ')</i>';
945
                            return desc;
946
                            return desc;
946
                        }
947
                        }
947
                    },
948
                    },
948
                    {
949
                    {
949
                        "mDataProp": function ( oObj ) {
950
                        "mDataProp": function ( oObj ) {
950
                            let delete_html = oObj.resolved_on
951
                            let delete_html = oObj.resolved_on
951
                                ? '<li><a href="#" class="return-claim-tools-delete" data-return-claim-id="' + oObj.id + '"><i class="fa fa-trash"></i> Delete</a></li>'
952
                                ? '<li><a href="#" class="return-claim-tools-delete" data-return-claim-id="' + oObj.id + '"><i class="fa fa-trash"></i> ' + __("Delete") + '</a></li>'
952
                                : "";
953
                                : "";
953
                            let resolve_html = ! oObj.resolution
954
                            let resolve_html = ! oObj.resolution
954
                                ? '<li><a href="#" class="return-claim-tools-resolve" data-return-claim-id="' + oObj.id + '"><i class="fa fa-check-square"></i> Resolve</a></li>'
955
                                ? '<li><a href="#" class="return-claim-tools-resolve" data-return-claim-id="' + oObj.id + '"><i class="fa fa-check-square"></i> ' + __("Resolve") + '</a></li>'
955
                                : "";
956
                                : "";
956
957
957
                            return  '<div class="btn-group">'
958
                            return  '<div class="btn-group">'
958
                                  + ' <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">'
959
                                  + ' <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">'
959
                                  + '  Actions <span class="caret"></span>'
960
                                  + __("Actions") + ' <span class="caret"></span>'
960
                                  + ' </button>'
961
                                  + ' </button>'
961
                                  + ' <ul class="dropdown-menu">'
962
                                  + ' <ul class="dropdown-menu">'
962
                                  + '  <li><a href="#" class="return-claim-tools-editnotes" data-return-claim-id="' + oObj.id + '"><i class="fa fa-edit"></i> Edit notes</a></li>'
963
                                  + '  <li><a href="#" class="return-claim-tools-editnotes" data-return-claim-id="' + oObj.id + '"><i class="fa fa-edit"></i> ' + __("Edit notes") + '</a></li>'
963
                                  + resolve_html
964
                                  + resolve_html
964
                                  + delete_html
965
                                  + delete_html
965
                                  + ' </ul>'
966
                                  + ' </ul>'
Lines 1001-1008 $(document).ready(function() { Link Here
1001
                '  <span id="return-claim-notes-editor-' + id + '">'
1002
                '  <span id="return-claim-notes-editor-' + id + '">'
1002
                + ' <textarea id="return-claim-notes-editor-textarea-' + id + '">' + note + '</textarea>'
1003
                + ' <textarea id="return-claim-notes-editor-textarea-' + id + '">' + note + '</textarea>'
1003
                + ' <br/>'
1004
                + ' <br/>'
1004
                + ' <a class="btn btn-default btn-xs claim-returned-notes-editor-submit" data-return-claim-id="' + id + '"><i class="fa fa-save"></i> Update</a>'
1005
                + ' <a class="btn btn-default btn-xs claim-returned-notes-editor-submit" data-return-claim-id="' + id + '"><i class="fa fa-save"></i> ' + __("Update") + '</a>'
1005
                + ' <a class="claim-returned-notes-editor-cancel" data-return-claim-id="' + id + '" href="#">Cancel</a>'
1006
                + ' <a class="claim-returned-notes-editor-cancel" data-return-claim-id="' + id + '" href="#">' + __("Cancel") + '</a>'
1006
                + '</span>';
1007
                + '</span>';
1007
            elt.hide();
1008
            elt.hide();
1008
            $(editor).insertAfter( elt );
1009
            $(editor).insertAfter( elt );
1009
- 

Return to bug 25118