|
Lines 7-12
Link Here
|
| 7 |
› Batch list |
7 |
› Batch list |
| 8 |
[% END %] |
8 |
[% END %] |
| 9 |
</title> |
9 |
</title> |
|
|
10 |
[% INCLUDE 'greybox.inc' %] |
| 10 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
11 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
| 11 |
[% INCLUDE 'doc-head-close.inc' %] |
12 |
[% INCLUDE 'doc-head-close.inc' %] |
| 12 |
[% INCLUDE 'datatables.inc' %] |
13 |
[% INCLUDE 'datatables.inc' %] |
|
Lines 17-22
Link Here
|
| 17 |
[% IF (dateformat == 'metric') %] |
18 |
[% IF (dateformat == 'metric') %] |
| 18 |
dt_add_type_uk_date(); |
19 |
dt_add_type_uk_date(); |
| 19 |
[% END %] |
20 |
[% END %] |
|
|
21 |
|
| 20 |
$(document).ready(function() { |
22 |
$(document).ready(function() { |
| 21 |
var srlt = $("#files").dataTable($.extend(true, {}, dataTablesDefaults, { |
23 |
var srlt = $("#files").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 22 |
"aoColumns": [ |
24 |
"aoColumns": [ |
|
Lines 32-46
Link Here
|
| 32 |
$("select[name='budget_id']").change(function(){ |
34 |
$("select[name='budget_id']").change(function(){ |
| 33 |
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); |
35 |
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); |
| 34 |
var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); |
36 |
var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); |
| 35 |
var destination_sort1 = $(this).siblings('span.sort1').find('input[name="sort1"]'); |
37 |
var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]'); |
| 36 |
var sort1 = $(destination_sort1).val(); |
38 |
var sort1 = $(destination_sort1).val() || ""; |
| 37 |
if ( destination_sort1.length < 1 ) { |
39 |
if ( destination_sort1.length < 1 ) { |
| 38 |
destination_sort1 = $(this).siblings('span.sort1').find('select[name="sort1"]'); |
40 |
destination_sort1 = $(this).parents('fieldset').find('li.sort1 > select[name="sort1"]'); |
| 39 |
} |
41 |
} |
| 40 |
var destination_sort2 = $(this).siblings('span.sort2').find('input[name="sort2"]'); |
42 |
var destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('input[name="sort2"]'); |
| 41 |
var sort2 = $(destination_sort2).val(); |
43 |
var sort2 = $(destination_sort2).val() || ""; |
| 42 |
if ( destination_sort2.length < 1 ) { |
44 |
if ( destination_sort2.length < 1 ) { |
| 43 |
destination_sort2 = $(this).siblings('span.sort2').find('select[name="sort2"]'); |
45 |
destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('select[name="sort2"]'); |
| 44 |
} |
46 |
} |
| 45 |
getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 ); |
47 |
getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 ); |
| 46 |
|
48 |
|
|
Lines 68-80
Link Here
|
| 68 |
$(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2'); |
70 |
$(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2'); |
| 69 |
} ); |
71 |
} ); |
| 70 |
|
72 |
|
|
|
73 |
$("#records_to_import fieldset.rows ol").hide(); |
| 71 |
$('input:checkbox[name="import_record_id"]').change(function(){ |
74 |
$('input:checkbox[name="import_record_id"]').change(function(){ |
|
|
75 |
var container = $(this).parents("fieldset"); |
| 72 |
if ( $(this).is(':checked') ) { |
76 |
if ( $(this).is(':checked') ) { |
| 73 |
$(this).parent().addClass("selected"); |
77 |
$(container).addClass("selected"); |
| 74 |
$(this).parent().removeClass("unselected"); |
78 |
$(container).removeClass("unselected"); |
|
|
79 |
$(container).find("ol").toggle(); |
| 75 |
} else { |
80 |
} else { |
| 76 |
$(this).parent().addClass("unselected"); |
81 |
$(container).addClass("unselected"); |
| 77 |
$(this).parent().removeClass("selected"); |
82 |
$(container).removeClass("selected"); |
|
|
83 |
$(container).find("ol").toggle(); |
| 78 |
} |
84 |
} |
| 79 |
} ); |
85 |
} ); |
| 80 |
|
86 |
|
|
Lines 93-98
Link Here
|
| 93 |
return false; |
99 |
return false; |
| 94 |
}); |
100 |
}); |
| 95 |
|
101 |
|
|
|
102 |
$("#Aform").on("submit", function(){ |
| 103 |
if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) { |
| 104 |
alert("There is no record selected"); |
| 105 |
return false; |
| 106 |
} |
| 107 |
|
| 108 |
var error = 0; |
| 109 |
$("input:checkbox[name='import_record_id']:checked").parents('fieldset').find('input[name="quantity"]').each(function(){ |
| 110 |
if ( $(this).val().length < 1 || isNaN( $(this).val() ) ) { |
| 111 |
error++; |
| 112 |
} |
| 113 |
}); |
| 114 |
if ( error > 0 ) { |
| 115 |
alert(error + " quantity values are not filled or not a number"); |
| 116 |
return false; |
| 117 |
} |
| 118 |
|
| 119 |
return disableUnchecked($(this)); |
| 120 |
}); |
| 96 |
}); |
121 |
}); |
| 97 |
|
122 |
|
| 98 |
function disableUnchecked(form){ |
123 |
function disableUnchecked(form){ |
|
Lines 100-106
Link Here
|
| 100 |
$(this).find('select').attr('disabled', 'disabled'); |
125 |
$(this).find('select').attr('disabled', 'disabled'); |
| 101 |
$(this).find('input').attr('disabled', 'disabled'); |
126 |
$(this).find('input').attr('disabled', 'disabled'); |
| 102 |
}); |
127 |
}); |
| 103 |
form.submit(); |
128 |
return 1; |
| 104 |
} |
129 |
} |
| 105 |
//]]> |
130 |
//]]> |
| 106 |
</script> |
131 |
</script> |
|
Lines 118-126
Link Here
|
| 118 |
([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %]) |
143 |
([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %]) |
| 119 |
</h1> |
144 |
</h1> |
| 120 |
<div> |
145 |
<div> |
|
|
146 |
<div id="records_to_import"> |
| 121 |
<span class="checkall"><a id="checkAll" href="#">Check All</a></span> |
147 |
<span class="checkall"><a id="checkAll" href="#">Check All</a></span> |
| 122 |
<span class="uncheckall"><a id="unCheckAll" href="#">Uncheck All</a></span> |
148 |
<span class="uncheckall"><a id="unCheckAll" href="#">Uncheck All</a></span> |
| 123 |
<form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform" onsubmit="disableUnchecked(this); return false;"> |
149 |
<form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform"> |
| 124 |
<input type="hidden" name="op" value="import_records"/> |
150 |
<input type="hidden" name="op" value="import_records"/> |
| 125 |
<input type="hidden" name="basketno" value="[% basketno %]" /> |
151 |
<input type="hidden" name="basketno" value="[% basketno %]" /> |
| 126 |
<input type="hidden" name="booksellerid" value="[% booksellerid %]" /> |
152 |
<input type="hidden" name="booksellerid" value="[% booksellerid %]" /> |
|
Lines 132-142
Link Here
|
| 132 |
[% END %] |
158 |
[% END %] |
| 133 |
|
159 |
|
| 134 |
[% FOREACH biblio IN biblio_list %] |
160 |
[% FOREACH biblio IN biblio_list %] |
| 135 |
<div class="biblio unselected" style="border-radius: 5px 5px; -moz-border-radius: 5px; padding: 5px; margin:5px; border-style : solid; border-color : grey; border-width:1px;"> |
161 |
<fieldset class="biblio unselected rows"> |
| 136 |
<input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id %]" value="[% biblio.import_record_id %]" /> |
162 |
<legend> |
| 137 |
<input type="hidden" value="[% biblio.rrp %]" name="rrp" /> |
163 |
<label for="record_[% biblio.import_record_id %]" style="width:auto;"> |
| 138 |
<label for="record_[% biblio.import_record_id %]"><span class="citation" style="font-weight:bold;">[% biblio.citation %]</span></label> |
164 |
<input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id %]" value="[% biblio.import_record_id %]" /> |
| 139 |
<span class="match" style="display:block;"> |
165 |
<span class="citation">[% biblio.citation %]</span> |
|
|
166 |
</label> |
| 167 |
( Show <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% biblio.import_record_id %]" title="MARC" rel="gb_page_center[600,500]">Card</a> ) |
| 168 |
|
| 169 |
</legend> |
| 170 |
<input type="hidden" value="[% biblio.rrp %]" name="rrp" /> |
| 171 |
<ol> |
| 172 |
<li class="status"> |
| 173 |
<span class="match"> |
| 140 |
[% IF ( biblio_lis.overlay_status == 'no_match' ) %] |
174 |
[% IF ( biblio_lis.overlay_status == 'no_match' ) %] |
| 141 |
No match |
175 |
No match |
| 142 |
[% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %] |
176 |
[% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %] |
|
Lines 146-171
Link Here
|
| 146 |
[% ELSE %] |
180 |
[% ELSE %] |
| 147 |
[% biblio_lis.overlay_status %] |
181 |
[% biblio_lis.overlay_status %] |
| 148 |
[% END %] |
182 |
[% END %] |
| 149 |
</span> |
183 |
[% IF ( biblio.match_biblionumber ) %] |
| 150 |
[% IF ( biblio.match_biblionumber ) %] |
184 |
Matches biblio [% biblio.match_biblionumber %] (score = [% biblio.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber %]">[% biblio.match_citation %]</a> |
| 151 |
Matches biblio [% biblio.match_biblionumber %] (score = [% biblio.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber %]">[% biblio.match_citation %]</a> |
185 |
[% END %] |
| 152 |
[% END %] |
186 |
</span> |
| 153 |
<span class="quantity" style="display:block;"> |
187 |
</li> |
| 154 |
Quantity: <input type="text" value="[% biblio.quantity %]" name="quantity" /> |
188 |
<li class="quantity"> |
| 155 |
</span> |
189 |
<label for="quantity_record_[% biblio.import_record_id %]" class="required">Quantity: </label> |
| 156 |
<span class="price" style="display:block;"> |
190 |
<input id="quantity_record_[% biblio.import_record_id %]" type="text" value="[% biblio.quantity %]" name="quantity" /> |
| 157 |
Price: <input type="text" value="[% biblio.price %]" name="price" /> |
191 |
</li> |
| 158 |
</span> |
192 |
<li class="price"> |
| 159 |
<span class="discount" style="display:block;"> |
193 |
<label for="price_record_[% biblio.import_record_id %]">Price: </label> |
| 160 |
Discount: <input type="text" value="[% biblio.discount %]" name="discount" /> |
194 |
<input id="price_record_[% biblio.import_record_id %]" type="text" value="[% biblio.price %]" name="price" /> |
| 161 |
</span> |
195 |
</li> |
| 162 |
<span class="budget" style="display:block;"> |
196 |
<li class="discount"> |
|
|
197 |
<label for="discount_record_[% biblio.import_record_id %]">Discount: </label> |
| 198 |
<input id="discount_record_[% biblio.import_record_id %]" type="text" value="[% biblio.discount %]" name="discount" /> |
| 199 |
</li> |
| 200 |
<li class="budget"> |
| 201 |
<label for="fund_record_[% biblio.import_record_id %]">Fund: </label> |
| 163 |
[% IF ( close ) %] |
202 |
[% IF ( close ) %] |
| 164 |
<span class="label">Budget: </span> |
203 |
<input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %] |
| 165 |
<input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %] |
|
|
| 166 |
[% ELSE %] |
204 |
[% ELSE %] |
| 167 |
<label for="budget_id">Budget: </label> |
205 |
<select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id"> |
| 168 |
<select size="1" name="budget_id"> |
|
|
| 169 |
<option value=""></option> |
206 |
<option value=""></option> |
| 170 |
[% FOREACH budget IN budget_loop %] |
207 |
[% FOREACH budget IN budget_loop %] |
| 171 |
[% IF ( budget.b_id == biblio.budget_id ) %] |
208 |
[% IF ( budget.b_id == biblio.budget_id ) %] |
|
Lines 174-193
Link Here
|
| 174 |
<option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option> |
211 |
<option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option> |
| 175 |
[% END %] |
212 |
[% END %] |
| 176 |
[% END %] |
213 |
[% END %] |
| 177 |
</select> |
214 |
</select> |
| 178 |
[% END %] |
215 |
[% END %] |
| 179 |
<span class="sort1"> |
216 |
</li> |
| 180 |
<label for="sort1">Planning value1: </label> |
217 |
<li class="sort1"> |
| 181 |
<input type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 %]" /> |
218 |
<label for="sort1_record_[% biblio.import_record_id %]">Planning value1: </label> |
| 182 |
</span> |
219 |
<input id="sort1_record_[% biblio.import_record_id %]" type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 %]" /> |
| 183 |
<span class="sort2"> |
220 |
</li> |
| 184 |
<label for="sort2">Planning value2: </label> |
221 |
<li class="sort2"> |
| 185 |
<input type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 %]" /> |
222 |
<label for="sort2_record_[% biblio.import_record_id %]">Planning value2: </label> |
| 186 |
</span> |
223 |
<input id="sort2_record_[% biblio.import_record_id %]" type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 %]" /> |
| 187 |
</span> |
224 |
</li> |
| 188 |
</div> |
225 |
</ol> |
|
|
226 |
</fieldset> |
| 189 |
[% END %] |
227 |
[% END %] |
| 190 |
<div> |
228 |
</div> |
|
|
229 |
<div id="import_all"> |
| 191 |
<h2>Import all</h2> |
230 |
<h2>Import all</h2> |
| 192 |
<p>Import all the lines in the basket with the following parameters:</p> |
231 |
<p>Import all the lines in the basket with the following parameters:</p> |
| 193 |
|
232 |
|
| 194 |
- |
|
|