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