|
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 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> |
13 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> |
|
Lines 19-24
Link Here
|
| 19 |
[% IF (dateformat == 'metric') %] |
20 |
[% IF (dateformat == 'metric') %] |
| 20 |
dt_add_type_uk_date(); |
21 |
dt_add_type_uk_date(); |
| 21 |
[% END %] |
22 |
[% END %] |
|
|
23 |
|
| 22 |
$(document).ready(function() { |
24 |
$(document).ready(function() { |
| 23 |
var srlt = $("#files").dataTable($.extend(true, {}, dataTablesDefaults, { |
25 |
var srlt = $("#files").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 24 |
"aoColumnDefs": [ |
26 |
"aoColumnDefs": [ |
|
Lines 30-44
Link Here
|
| 30 |
$("select[name='budget_id']").change(function(){ |
32 |
$("select[name='budget_id']").change(function(){ |
| 31 |
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); |
33 |
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); |
| 32 |
var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); |
34 |
var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); |
| 33 |
var destination_sort1 = $(this).siblings('span.sort1').find('input[name="sort1"]'); |
35 |
var destination_sort1 = $(this).parents('fieldset').find('li.sort1').find('input[name="sort1"]'); |
| 34 |
var sort1 = $(destination_sort1).val(); |
36 |
var sort1 = $(destination_sort1).val() || ""; |
| 35 |
if ( destination_sort1.length < 1 ) { |
37 |
if ( destination_sort1.length < 1 ) { |
| 36 |
destination_sort1 = $(this).siblings('span.sort1').find('select[name="sort1"]'); |
38 |
destination_sort1 = $(this).parents('fieldset').find('li.sort1 > select[name="sort1"]'); |
| 37 |
} |
39 |
} |
| 38 |
var destination_sort2 = $(this).siblings('span.sort2').find('input[name="sort2"]'); |
40 |
var destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('input[name="sort2"]'); |
| 39 |
var sort2 = $(destination_sort2).val(); |
41 |
var sort2 = $(destination_sort2).val() || ""; |
| 40 |
if ( destination_sort2.length < 1 ) { |
42 |
if ( destination_sort2.length < 1 ) { |
| 41 |
destination_sort2 = $(this).siblings('span.sort2').find('select[name="sort2"]'); |
43 |
destination_sort2 = $(this).parents('fieldset').find('li.sort2').find('select[name="sort2"]'); |
| 42 |
} |
44 |
} |
| 43 |
getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 ); |
45 |
getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 ); |
| 44 |
|
46 |
|
|
Lines 66-78
Link Here
|
| 66 |
$(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2'); |
68 |
$(this).parent().siblings('li').find('input[name="sort2"]').attr('name', 'all_sort2'); |
| 67 |
} ); |
69 |
} ); |
| 68 |
|
70 |
|
|
|
71 |
$("#records_to_import fieldset.rows ol").hide(); |
| 69 |
$('input:checkbox[name="import_record_id"]').change(function(){ |
72 |
$('input:checkbox[name="import_record_id"]').change(function(){ |
|
|
73 |
var container = $(this).parents("fieldset"); |
| 70 |
if ( $(this).is(':checked') ) { |
74 |
if ( $(this).is(':checked') ) { |
| 71 |
$(this).parent().addClass("selected"); |
75 |
$(container).addClass("selected"); |
| 72 |
$(this).parent().removeClass("unselected"); |
76 |
$(container).removeClass("unselected"); |
|
|
77 |
$(container).find("ol").toggle(); |
| 73 |
} else { |
78 |
} else { |
| 74 |
$(this).parent().addClass("unselected"); |
79 |
$(container).addClass("unselected"); |
| 75 |
$(this).parent().removeClass("selected"); |
80 |
$(container).removeClass("selected"); |
|
|
81 |
$(container).find("ol").toggle(); |
| 76 |
} |
82 |
} |
| 77 |
} ); |
83 |
} ); |
| 78 |
|
84 |
|
|
Lines 91-96
Link Here
|
| 91 |
return false; |
97 |
return false; |
| 92 |
}); |
98 |
}); |
| 93 |
|
99 |
|
|
|
100 |
$("#Aform").on("submit", function(){ |
| 101 |
if ( $("input:checkbox[name='import_record_id']:checked").length < 1 ) { |
| 102 |
alert("There is no record selected"); |
| 103 |
return false; |
| 104 |
} |
| 105 |
|
| 106 |
var error = 0; |
| 107 |
$("input:checkbox[name='import_record_id']:checked").parents('fieldset').find('input[name="quantity"]').each(function(){ |
| 108 |
if ( $(this).val().length < 1 || isNaN( $(this).val() ) ) { |
| 109 |
error++; |
| 110 |
} |
| 111 |
}); |
| 112 |
if ( error > 0 ) { |
| 113 |
alert(error + " quantity values are not filled or not a number"); |
| 114 |
return false; |
| 115 |
} |
| 116 |
|
| 117 |
return disableUnchecked($(this)); |
| 118 |
}); |
| 94 |
}); |
119 |
}); |
| 95 |
|
120 |
|
| 96 |
function disableUnchecked(form){ |
121 |
function disableUnchecked(form){ |
|
Lines 98-104
Link Here
|
| 98 |
$(this).find('select').attr('disabled', 'disabled'); |
123 |
$(this).find('select').attr('disabled', 'disabled'); |
| 99 |
$(this).find('input').attr('disabled', 'disabled'); |
124 |
$(this).find('input').attr('disabled', 'disabled'); |
| 100 |
}); |
125 |
}); |
| 101 |
form.submit(); |
126 |
return 1; |
| 102 |
} |
127 |
} |
| 103 |
//]]> |
128 |
//]]> |
| 104 |
</script> |
129 |
</script> |
|
Lines 116-124
Link Here
|
| 116 |
([% file_name %] staged on [% upload_timestamp %]) |
141 |
([% file_name %] staged on [% upload_timestamp %]) |
| 117 |
</h1> |
142 |
</h1> |
| 118 |
<div> |
143 |
<div> |
|
|
144 |
<div id="records_to_import"> |
| 119 |
<span class="checkall"><a id="checkAll" href="#">Check All</a></span> |
145 |
<span class="checkall"><a id="checkAll" href="#">Check All</a></span> |
| 120 |
<span class="uncheckall"><a id="unCheckAll" href="#">Uncheck All</a></span> |
146 |
<span class="uncheckall"><a id="unCheckAll" href="#">Uncheck All</a></span> |
| 121 |
<form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform" onsubmit="disableUnchecked(this); return false;"> |
147 |
<form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform"> |
| 122 |
<input type="hidden" name="op" value="import_records"/> |
148 |
<input type="hidden" name="op" value="import_records"/> |
| 123 |
<input type="hidden" name="basketno" value="[% basketno %]" /> |
149 |
<input type="hidden" name="basketno" value="[% basketno %]" /> |
| 124 |
<input type="hidden" name="booksellerid" value="[% booksellerid %]" /> |
150 |
<input type="hidden" name="booksellerid" value="[% booksellerid %]" /> |
|
Lines 130-159
Link Here
|
| 130 |
[% END %] |
156 |
[% END %] |
| 131 |
|
157 |
|
| 132 |
[% FOREACH biblio IN biblio_list %] |
158 |
[% FOREACH biblio IN biblio_list %] |
| 133 |
<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;"> |
159 |
<fieldset class="biblio unselected rows"> |
| 134 |
<input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id %]" value="[% biblio.import_record_id %]" /> |
160 |
<legend> |
| 135 |
<input type="hidden" value="[% biblio.rrp %]" name="rrp" /> |
161 |
<label for="record_[% biblio.import_record_id %]" style="width:auto;"> |
| 136 |
<label for="record_[% biblio.import_record_id %]"><span class="citation" style="font-weight:bold;">[% biblio.citation %]</span></label> |
162 |
<input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id %]" value="[% biblio.import_record_id %]" /> |
| 137 |
<span class="match" style="display:block;">[% biblio.overlay_status %]</span> |
163 |
<span class="citation">[% biblio.citation %]</span> |
| 138 |
[% IF ( biblio.match_biblionumber ) %] |
164 |
</label> |
| 139 |
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> |
165 |
( 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> ) |
| 140 |
[% END %] |
166 |
|
| 141 |
<span class="quantity" style="display:block;"> |
167 |
</legend> |
| 142 |
Quantity: <input type="text" value="[% biblio.quantity %]" name="quantity" /> |
168 |
<input type="hidden" value="[% biblio.rrp %]" name="rrp" /> |
| 143 |
</span> |
169 |
<ol> |
| 144 |
<span class="price" style="display:block;"> |
170 |
<li class="status"> |
| 145 |
Price: <input type="text" value="[% biblio.price %]" name="price" /> |
171 |
<span class="match"> |
| 146 |
</span> |
172 |
[% IF biblio.overlay_status == 'no_match' %] |
| 147 |
<span class="discount" style="display:block;"> |
173 |
There is no matching biblio for this records. |
| 148 |
Discount: <input type="text" value="[% biblio.discount %]" name="discount" /> |
174 |
[% ELSE %] |
| 149 |
</span> |
175 |
This record matches existing biblio. |
| 150 |
<span class="budget" style="display:block;"> |
176 |
[% END %] |
|
|
177 |
[% IF ( biblio.match_biblionumber ) %] |
| 178 |
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> |
| 179 |
[% END %] |
| 180 |
</span> |
| 181 |
</li> |
| 182 |
<li class="quantity"> |
| 183 |
<label for="quantity_record_[% biblio.import_record_id %]" class="required">Quantity: </label> |
| 184 |
<input id="quantity_record_[% biblio.import_record_id %]" type="text" value="[% biblio.quantity %]" name="quantity" /> |
| 185 |
</li> |
| 186 |
<li class="price"> |
| 187 |
<label for="price_record_[% biblio.import_record_id %]">Price: </label> |
| 188 |
<input id="price_record_[% biblio.import_record_id %]" type="text" value="[% biblio.price %]" name="price" /> |
| 189 |
</li> |
| 190 |
<li class="discount"> |
| 191 |
<label for="discount_record_[% biblio.import_record_id %]">Discount: </label> |
| 192 |
<input id="discount_record_[% biblio.import_record_id %]" type="text" value="[% biblio.discount %]" name="discount" /> |
| 193 |
</li> |
| 194 |
<li class="budget"> |
| 195 |
<label for="fund_record_[% biblio.import_record_id %]">Fund: </label> |
| 151 |
[% IF ( close ) %] |
196 |
[% IF ( close ) %] |
| 152 |
<span class="label">Budget: </span> |
197 |
<input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %] |
| 153 |
<input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %] |
|
|
| 154 |
[% ELSE %] |
198 |
[% ELSE %] |
| 155 |
<label for="budget_id">Budget: </label> |
199 |
<select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id"> |
| 156 |
<select size="1" name="budget_id"> |
|
|
| 157 |
<option value=""></option> |
200 |
<option value=""></option> |
| 158 |
[% FOREACH budget IN budget_loop %] |
201 |
[% FOREACH budget IN budget_loop %] |
| 159 |
[% IF ( budget.b_id == biblio.budget_id ) %] |
202 |
[% IF ( budget.b_id == biblio.budget_id ) %] |
|
Lines 162-181
Link Here
|
| 162 |
<option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option> |
205 |
<option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option> |
| 163 |
[% END %] |
206 |
[% END %] |
| 164 |
[% END %] |
207 |
[% END %] |
| 165 |
</select> |
208 |
</select> |
| 166 |
[% END %] |
209 |
[% END %] |
| 167 |
<span class="sort1"> |
210 |
</li> |
| 168 |
<label for="sort1">Planning value1: </label> |
211 |
<li class="sort1"> |
| 169 |
<input type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 %]" /> |
212 |
<label for="sort1_record_[% biblio.import_record_id %]">Planning value1: </label> |
| 170 |
</span> |
213 |
<input id="sort1_record_[% biblio.import_record_id %]" type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 %]" /> |
| 171 |
<span class="sort2"> |
214 |
</li> |
| 172 |
<label for="sort2">Planning value2: </label> |
215 |
<li class="sort2"> |
| 173 |
<input type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 %]" /> |
216 |
<label for="sort2_record_[% biblio.import_record_id %]">Planning value2: </label> |
| 174 |
</span> |
217 |
<input id="sort2_record_[% biblio.import_record_id %]" type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 %]" /> |
| 175 |
</span> |
218 |
</li> |
| 176 |
</div> |
219 |
</ol> |
|
|
220 |
</fieldset> |
| 177 |
[% END %] |
221 |
[% END %] |
| 178 |
<div> |
222 |
</div> |
|
|
223 |
<div id="import_all"> |
| 179 |
<h2>Import All</h2> |
224 |
<h2>Import All</h2> |
| 180 |
<p>Import all the lines in the basket with the following parameters:</p> |
225 |
<p>Import all the lines in the basket with the following parameters:</p> |
| 181 |
|
226 |
|
| 182 |
- |
|
|