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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt (-1 / +21 lines)
Lines 18-23 Link Here
18
            PopupZ3950($(this).prop('id'));
18
            PopupZ3950($(this).prop('id'));
19
            return false;
19
            return false;
20
        });
20
        });
21
        $(".merge-items").on("click",function(e){
22
            e.preventDefault();
23
            MergeItems();
24
        });
21
     });
25
     });
22
26
23
    /* this function open a popup to search on z3950 server.  */
27
    /* this function open a popup to search on z3950 server.  */
Lines 36-41 Link Here
36
        return strQuery;
40
        return strQuery;
37
    }
41
    }
38
42
43
    /**
44
     * This function checks if the adequate number of records are checked for merging
45
     */
46
    function MergeItems() {
47
	var checkboxes = $("input:checkbox:checked");
48
        var nbCheckbox = checkboxes.length;
49
	if (nbCheckbox != 2) {
50
	    alert(_("Two records must be selected for merging."));
51
	} else {
52
	    location.href='/cgi-bin/koha/cataloguing/merge.pl?biblionumber=' + checkboxes[0].value + '&biblionumber=' + checkboxes[1].value;
53
	}
54
	return false;
55
    }
56
39
    //]]>
57
    //]]>
40
</script>
58
</script>
41
</head>
59
</head>
Lines 73-78 Link Here
73
                [% END %]
91
                [% END %]
74
            </ul>
92
            </ul>
75
        </div>
93
        </div>
94
        <div class="btn-group"><button type="submit" class="btn btn-small merge-items"><i class="icon-merge"></i> Merge selected</button></div>
76
  </div>
95
  </div>
77
[% END %]
96
[% END %]
78
97
Lines 89-94 Link Here
89
<div class="searchresults">
108
<div class="searchresults">
90
    <table>
109
    <table>
91
        <tr>
110
        <tr>
111
            <th>&nbsp;</th>
92
            <th>Title</th>
112
            <th>Title</th>
93
            <th>Location</th>
113
            <th>Location</th>
94
            <th>Preview</th>
114
            <th>Preview</th>
Lines 101-106 Link Here
101
        [% ELSE %]
121
        [% ELSE %]
102
            <tr>
122
            <tr>
103
        [% END %]
123
        [% END %]
124
            <td><input type="checkbox" class="selection" id="bib[% resultsloo.biblionumber %]" name="biblionumber" value="[% resultsloo.biblionumber %]" /></td>
104
            <td>
125
            <td>
105
                <p>
126
                <p>
106
                    <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% resultsloo.biblionumber %]">[% resultsloo.title |html %]</a>
127
                    <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% resultsloo.biblionumber %]">[% resultsloo.title |html %]</a>
107
- 

Return to bug 13886