Line 0
Link Here
|
|
|
1 |
[% INCLUDE 'doc-head-open.inc' %] |
2 |
<title>Koha › Cataloging › Deduplicator</title> |
3 |
[% INCLUDE 'greybox.inc' %] |
4 |
[% INCLUDE 'doc-head-close.inc' %] |
5 |
<style type="text/css"> |
6 |
/* Prevent floating the main form */ |
7 |
fieldset.rows { float:none; } |
8 |
|
9 |
.mergeReference { color: #161; font-weight: bold; } |
10 |
.cell { float: left; padding-left: 1em; } |
11 |
.matchSource { background-color: #f1e8f6; } |
12 |
input[type=checkbox] { vertical-align: bottom; } |
13 |
|
14 |
#duplicatesContainer li { padding-bottom: 0px; margin-bottom: 0em; } |
15 |
#duplicatesContainer li:last-of-type { padding-bottom: 0px; margin-bottom: 1em; } |
16 |
#duplicatesContainer li.sourceContainer { padding-bottom: 0px; margin-bottom: 1em; } |
17 |
</style> |
18 |
<script type="text/javascript"> |
19 |
//<![CDATA[ |
20 |
|
21 |
function updateMergereference(self) { |
22 |
var matchContainer = $(self).parents(".matchContainer"); |
23 |
var checkboxes = $(matchContainer).find('input[id^="checkbox"]'); |
24 |
var mergeReferenceInput = $(matchContainer).parents("form").children("input.mergeReference"); |
25 |
var checkedBoxes = 0; |
26 |
$(checkboxes).each(function() { |
27 |
if($(this).attr('checked') === 'checked' ) { |
28 |
checkedBoxes++; |
29 |
} |
30 |
}); |
31 |
|
32 |
if (checkedBoxes == 1 && $(self).attr('checked') === 'checked') { |
33 |
$(self).parent().find("span.matchDescription").addClass('mergeReference'); |
34 |
$(mergeReferenceInput).val( $(self).val() ); //Save the biblionumber as the mergereference |
35 |
} |
36 |
else if (checkedBoxes == 0) { |
37 |
$(matchContainer).find("span.matchDescription").removeClass('mergeReference'); |
38 |
$(mergeReferenceInput).val( 0 ); |
39 |
} |
40 |
|
41 |
return 1; |
42 |
} |
43 |
//]]> |
44 |
</script> |
45 |
</head> |
46 |
<body id="deduplicator"> |
47 |
[% INCLUDE 'header.inc' %] |
48 |
[% INCLUDE 'cataloging-search.inc' %] |
49 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> › Deduplicator</div> |
50 |
|
51 |
<div id="doc" class="yui-t7"> |
52 |
<div id="bd"> |
53 |
<div id="yui-main"> |
54 |
|
55 |
|
56 |
<h1>Deduplicator</h1> |
57 |
|
58 |
<div id="deduplicatorForm"> |
59 |
<form name="deduplicationForm" action="/cgi-bin/koha/cataloguing/deduplicator.pl" method="post"> |
60 |
<input type="hidden" name="op" value="deduplicate"/> |
61 |
<fieldset class="rows"> |
62 |
<legend>Configure the deduplication search!</legend> |
63 |
<ol> |
64 |
<li> |
65 |
<label>Limit</label><input type="number" name="limit" value="[% limit %]"/><i>How many bibliographic records to deduplicate? Hint: less than 1000.</i> |
66 |
</li> |
67 |
<li> |
68 |
<label>Offset</label><input type="number" name="offset" value="[% offset %]"/><i>How many bibliographic records to skip from the start? Hint: increment this by the limit of previous deduplication run. If limit = 200, then first offset is 0, then 200, then 400... This is useful for manual deduplication of the whole database.</i> |
69 |
</li> |
70 |
<li> |
71 |
<label>Biblionumber</label><input type="number" name="biblionumber" value="[% biblionumber %]"/><i>From which bibliographic record to start? Obsoletes "Offset". Hint: If you know for certain that after a given biblionumber you have several duplicates, it is easier to target those new duplicate entries using this.</i> |
72 |
</li> |
73 |
<li> |
74 |
<label>Matcher</label> |
75 |
<select name="matcher_id" size="1" id="matchers"> |
76 |
[% FOREACH matcher IN matchers %] |
77 |
[% IF ( matcher.selected ) %] |
78 |
<option value="[% matcher.matcher_id %]" selected="selected">[% matcher.code %] - [% matcher.description %]</option> |
79 |
[% ELSE %] |
80 |
<option value="[% matcher.matcher_id %]">[% matcher.code %] - [% matcher.description %]</option> |
81 |
[% END %] |
82 |
[% END %] |
83 |
</select> |
84 |
<i>The matcher to use to find duplicates. Hint: one can <a href="/cgi-bin/koha/admin/matching-rules.pl">define matchers</a> from the administration menu. For more information see the Koha manual at <a href="koha-community.org/documentation/">koha-community.org/documentation/</a></i> |
85 |
</li> |
86 |
<li> |
87 |
<input type="submit" value="Deduplicate!"/> |
88 |
</li> |
89 |
</ol> |
90 |
</fieldset> |
91 |
</form> |
92 |
</div> |
93 |
|
94 |
|
95 |
|
96 |
[% IF duplicates %] |
97 |
<p> |
98 |
<i> |
99 |
-To deduplicate a found match group, first select the biblio to merge to. The target of the merge is colored. Then select the biblios to merge to the colored target. To reset the merge target, simply remove all checks under one match group.<br/> |
100 |
-The original match source is distinguished from the list of matches by a beautiful pastel color.<br/> |
101 |
-Each matched row starts with the biblionumber, separated by a dash, then the matching score configurable in the Matcher, then the amount of items this biblio has. The named identifier consists of the title, enumeration, part name, publication year and author.<br/> |
102 |
-All merge requests always open to a new tab. |
103 |
</i> |
104 |
</p> |
105 |
<div id="duplicatesContainer"> |
106 |
<fieldset class="rows"> |
107 |
<legend> |
108 |
List of duplicates |
109 |
</legend> |
110 |
|
111 |
<!--<label>Matches - Score - Items count</label> |
112 |
<label>Title</label> |
113 |
<label>Author</label>--> |
114 |
|
115 |
<ol> |
116 |
[% FOREACH duplicate IN duplicates %] |
117 |
<form target="_blank" name="form[% duplicate.biblionumber %]" action="/cgi-bin/koha/cataloguing/merge.pl" method="post"> |
118 |
<input type="hidden" class="mergeReference" name="mergereference" value=""/> |
119 |
<li class="sourceContainer"> |
120 |
<b> |
121 |
<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% duplicate.biblionumber %]">[% duplicate.biblionumber %]</a> |
122 |
[% duplicate.title %] |
123 |
[% duplicate.author %] |
124 |
</b> |
125 |
<input type="submit" value="Merge!"/> |
126 |
</li> |
127 |
<span class="matchContainer"> |
128 |
[% FOREACH match IN duplicate.matches %] |
129 |
<li> |
130 |
<span class="[% match.matchSource %]"> |
131 |
<input id="checkbox[% match.record_id %]" name="biblionumber" value="[% match.record_id %]" type="checkbox" onclick="updateMergereference(this)"/> |
132 |
<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% match.record_id %]"> |
133 |
<span class="matchDescription"> |
134 |
[% match.record_id %] - <i>[% match.score %]</i> |
135 |
</span> |
136 |
</a> |
137 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% match.record_id %]"> |
138 |
[[% match.itemsCount %]] |
139 |
</a> |
140 |
[% match.title %] |
141 |
[% match.author %] |
142 |
</span> |
143 |
</li> |
144 |
[% END %] |
145 |
</span> |
146 |
</form> |
147 |
[% END %] |
148 |
</ol> |
149 |
</fieldset> |
150 |
</div><!--<div id="duplicatesContainer">%--> |
151 |
[% END %] |
152 |
</div> |
153 |
</div> <!--EO <div id="bd"> --> |
154 |
|
155 |
|
156 |
[% INCLUDE 'intranet-bottom.inc' %] |