8e364c4c6a
This patch removes the use of POSIX::strftime which is based on the locales of the system. The DateTime module translates month and day name with success, without any locale installed. For the saesons, I use the way used in Koha: write the word in templates. On this way the translate script will match them and allow translators to translate them. This patch adds a regression: the season names are not translated following the locale selected. This could be done when bug 8044 will be pushed. Test plan: 0/ Update your po files and translate the season name. 1/ Create a numbering pattern using season. example: Name: Seasonal Numbering formula: {X} X: Season, Add=1, Every=1, Set back to 0 when more than 3, formatting "name of season" And test the prediction pattern with: frequency: 1/3 month First issue : 2013-09-21 length: 12 months X begins with 2 (21th Septembre is Fall) 2/ Click on the test pattern button, you should get: Fall 21/09/2013 Winter 21/12/2013 Spring 21/03/2014 Summer 21/06/2014 Change the locale and verify the season names are *not* translated. Change the Koha language and verify the season names are translated. 3/ Create a numbering pattern using day or month name. example: Name: day Numbering formula: {X} X: day, Add=1, Every=1, Set back to 0 when more than 6, formatting "name of day" Frequency: 1/day First issue: 2013-11-18 length: 1 month X begins with 0 You should get: Monday 18/11/2013 Tuesday 19/11/2013 Wednesday 20/11/2013 [...] Sunday 15/12/2013 Monday 16/12/2013 Tuesday 17/12/2013 change the locale and verify the day names are translated. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described. No koha-qa errors Tested on top of Bug 11265 and Bug 11263, and solved merge conflict Updating PO file gives seasons to translate. Tested using seasons, day and month Only note is different behavior 1) To use seasons you need to use staff in desired language 2) To use day and month only need to select locale Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> No regressions found. Passes koha-qa.pl, t and xt Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested this again on top of 11263 and it works as described. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
315 lines
12 KiB
Text
315 lines
12 KiB
Text
[% USE Branches %]
|
|
[% USE KohaDates %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Serials › Serial collection information for [% bibliotitle %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
function generateReceive(subscriptionid) {
|
|
if(nbissues=prompt(_("How many issues do you want to receive ?"))){
|
|
document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid+'&nbissues='+nbissues;
|
|
}
|
|
}
|
|
function print_slip(subscriptionid,issue){
|
|
var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
|
|
window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
|
|
}
|
|
function addsubscriptionid()
|
|
{
|
|
var tab=new Array();
|
|
var serialids = document.edition.serialid;
|
|
for (i=0; i<serialids.length; i++){
|
|
if (serialids[i].checked == true){
|
|
var found=false;
|
|
for (var val in tab){
|
|
if (tab[val] == document.getElementsByName("subs")[i].getAttribute('val')){found = true;}
|
|
}
|
|
if (found == false){
|
|
tab=tab.concat((document.getElementsByName("subs")[i].getAttribute('val')));
|
|
}
|
|
}
|
|
}
|
|
var string="";
|
|
for (var val in tab){
|
|
string = string + tab[val] + ",";
|
|
}
|
|
string=string.substring(0,string.length -1);
|
|
document.edition.subscriptionid.value=string;
|
|
}
|
|
function popup(subscriptionid) {
|
|
newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
|
|
}
|
|
|
|
function generateNext(subscriptionid) {
|
|
if(confirm(_("Do you really want to generate next serial?"))){
|
|
document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
|
|
}
|
|
}
|
|
|
|
function CheckAll( node ) {
|
|
$("#"+node).checkCheckboxes();
|
|
return false;
|
|
}
|
|
function CheckNone( node ) {
|
|
$("#"+node).unCheckCheckboxes();
|
|
return false;
|
|
}
|
|
$(document).ready(function() {
|
|
$('#subscription_years').tabs();
|
|
$(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ 0,-1 ], "bSortable": false, "bSearchable": false },
|
|
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
|
|
],
|
|
"aaSorting": [[0, 'desc']],
|
|
"sDom": 't',
|
|
"bAutoWidth": false,
|
|
"bPaginate": false,
|
|
"bInfo": false,
|
|
"bFilter": false,
|
|
} ));
|
|
});
|
|
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body id="ser_serials-collection" class="yui-skin-sam ser">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'serials-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › Serial collection information for <i>[% bibliotitle %]</i></div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
|
|
[% UNLESS ( popup ) %]
|
|
[% INCLUDE 'serials-toolbar.inc' %]
|
|
|
|
<h1>Serial collection information for <i>[% bibliotitle %]</i>
|
|
[% IF location %] ([% location %] ) [% END %]
|
|
[% IF ( callnumber ) %]callnumber: [% callnumber %][% END %]</h1>
|
|
[% END %]
|
|
|
|
[% IF ( subscriptions ) %]
|
|
<table>
|
|
[% IF ( subscriptions.size == 1 ) %]
|
|
<caption> Subscription summary</caption>
|
|
[% ELSE %]
|
|
<caption> Subscription summaries</caption>
|
|
[% END %]
|
|
<tr>
|
|
<th>Subscription num.</th>
|
|
<th>Frequency</th>
|
|
<th>Numbering pattern</th>
|
|
<th>Library</th>
|
|
<th>Call number</th>
|
|
<th>Notes</th>
|
|
[% IF ( routing && CAN_user_serials_routing ) %]<th>Routing</th>[% END %]
|
|
<th>Renew</th>
|
|
</tr>
|
|
[% FOREACH subscription IN subscriptions %]
|
|
[% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
|
|
<td><a href="subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]"># [% subscription.subscriptionid %]</a> </td>
|
|
<td>[% subscription.frequency.description %]</td>
|
|
<td>[% subscription.numberpattern.label %]</td>
|
|
<td> [% subscription.branchcode %]</td>
|
|
<td> [% subscription.callnumber %]</td>
|
|
<td> [% subscription.notes %]
|
|
[% UNLESS subscription.closed %]
|
|
[% IF ( subscription.subscriptionexpired ) %]
|
|
<br /><span class="problem"> Subscription expired</span>
|
|
[% END %]
|
|
[% ELSE %]
|
|
<br /> Subscription closed
|
|
[% END %]
|
|
</td>
|
|
[% IF ( routing && CAN_user_serials_routing ) %]
|
|
<td>
|
|
[% UNLESS subscription.closed %]
|
|
[% IF ( subscription.hasRouting ) %]
|
|
<a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit routing list</a>
|
|
[% ELSE %]
|
|
<a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&op=new">Create routing list</a>
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
[% UNLESS subscription.closed %]
|
|
[% IF ( subscription.abouttoexpire ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
|
|
[% ELSE %]
|
|
[% IF ( subscription.subscriptionexpired ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
|
|
[% ELSE %]
|
|
<td> </td>
|
|
[% END %]
|
|
[% END %]
|
|
[% ELSE %]
|
|
<td> </td>
|
|
[% END %]
|
|
</tr>
|
|
[% END %]
|
|
[% IF ( subscr ) %]
|
|
[% IF ( subscriptioncount > 1 ) %]
|
|
<tr ><td colspan="8"> <a href="serials-collection.pl?biblionumber=[% biblionumber %]">See any subscription attached to this biblio</a></td>
|
|
</tr>
|
|
[% END %]
|
|
[% END %]
|
|
</table>
|
|
[% END %]
|
|
|
|
|
|
[% IF ( years ) %]<form name="edition" action="serials-edit.pl" method="post">
|
|
<div id="subscription_years" class="toptabs numbered">
|
|
<ul>
|
|
[% FOREACH year IN years %]
|
|
[% IF ( year.year ) %]
|
|
<li><a href="#subscription-year-[% year.year %]">[% year.year %]</a></li>
|
|
[% END %]
|
|
[% END %]
|
|
</ul>
|
|
|
|
[% FOREACH year IN years %]
|
|
<div id="subscription-year-[% year.year %]">
|
|
[% IF ( CAN_user_serials_receive_serials ) %]
|
|
<p>
|
|
<input type="submit" value="Edit serials" />
|
|
[% UNLESS subscription.closed %]
|
|
<input type="button" value="Generate next" onclick="javascript:generateNext([% subscriptionidlist %])" />
|
|
[% IF ( subscriptions.size == 1 and !serialsadditems ) %] <input type="button" value="Multi receiving" onclick="javascript:generateReceive([% subscriptionidlist %])" />[% END %]
|
|
[% END %]
|
|
</p>
|
|
[% END %]
|
|
<span class="checkall">
|
|
<a class="CheckAll" href="#" onclick="CheckAll('subscription-year-[% year.year %]'); return false;">Select all</a>
|
|
</span> |
|
|
<span class="clearall">
|
|
<a class="CheckNone" href="#" onclick="CheckNone('subscription-year-[% year.year %]'); return false;">Clear all</a>
|
|
</span>
|
|
<table class="subscription-year-table">
|
|
<thead>
|
|
<tr>
|
|
[% IF ( CAN_user_serials_receive_serials ) %]<th>Edit</th>[% END %]
|
|
[% IF ( subscriptions.size > 1 ) %]
|
|
<th># Subs</th>
|
|
[% END %]
|
|
<th class="title-string">Date published
|
|
</th>
|
|
<th class="title-string">Date received
|
|
</th>
|
|
<th>Number
|
|
</th>
|
|
<th>Status
|
|
</th>
|
|
<th>Notes
|
|
</th>
|
|
<th>Library
|
|
</th>
|
|
[% IF ( routing ) %]<th>Routing</th>[% END %]
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH serial IN year.serials %]
|
|
[% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
|
|
[% IF ( CAN_user_serials_receive_serials ) %]
|
|
<td>
|
|
[% IF ( serial.cannotedit ) %]
|
|
disabled
|
|
[% ELSE %]
|
|
[% IF ( serial.subscriptionexpired ) %]
|
|
<input type="checkbox" name="serialid" value="[% serial.serialid %]" disabled="disabled" />
|
|
[% ELSE %]
|
|
[% IF ( serial.checked ) %]
|
|
<input type="checkbox" class="checkboxed" name="serialid" checked="checked" value="[% serial.serialid %]" />
|
|
[% ELSE %]
|
|
<input type="checkbox" class="checkboxed" name="serialid" value="[% serial.serialid %]" />
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
[% IF ( subscriptions.size > 1 ) %]
|
|
<td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid %]">[% serial.subscriptionid %]</a></td>
|
|
[% END %]
|
|
<td>
|
|
<span title="[% serial.publisheddate %]">
|
|
[% IF serial.publisheddate %]
|
|
[% serial.publisheddate | $KohaDates %]
|
|
[% ELSE %]
|
|
Unknown
|
|
[% END %]
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span title="[% serial.planneddate %]">
|
|
[% IF serial.planneddate %]
|
|
[% serial.planneddate | $KohaDates %]
|
|
[% ELSE %]
|
|
Unknown
|
|
[% END %]
|
|
</span>
|
|
</td>
|
|
<td>
|
|
[% IF ( matches = serial.serialseq.match('Spring(.*)') ) %]
|
|
Spring[% matches.join("") %]
|
|
[% ELSIF ( matches = serial.serialseq.match('Summer(.*)') ) %]
|
|
Summer[% matches.join("") %]
|
|
[% ELSIF ( matches = serial.serialseq.match('Fall(.*)') ) %]
|
|
Fall[% matches.join("") %]
|
|
[% ELSIF ( matches = serial.serialseq.match('Winter(.*)') ) %]
|
|
Winter[% matches.join("") %]
|
|
[% ELSE %]
|
|
[% serial.serialseq %]
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% IF ( serial.status1 ) %]Expected[% END %]
|
|
[% IF ( serial.status2 ) %]Arrived[% END %]
|
|
[% IF ( serial.status3 ) %]Late[% END %]
|
|
[% IF ( serial.status4 ) %]Missing[% END %]
|
|
[% IF ( serial.status41 ) %]Missing (never received)[% END %]
|
|
[% IF ( serial.status42 ) %]Missing (sold out)[% END %]
|
|
[% IF ( serial.status43 ) %]Missing (damaged)[% END %]
|
|
[% IF ( serial.status44 ) %]Missing (lost)[% END %]
|
|
[% IF ( serial.status5 ) %]Not issued[% END %]
|
|
[% IF ( serial.status6 ) %]Delete[% END %]
|
|
[% IF ( serial.status7 ) %]Claimed[% END %]
|
|
[% IF ( serial.status8 ) %]Stopped[% END %]
|
|
</td>
|
|
<td>
|
|
[% serial.notes %]
|
|
</td>
|
|
<td>
|
|
[% Branches.GetName( serial.branchcode ) %]
|
|
</td>
|
|
[% IF ( routing ) %]
|
|
<td>
|
|
<a href="" onclick="print_slip([% serial.subscriptionid |html %], '[% serial.serialseq |html %] ([% serial.publisheddate %])'); return false" >Print list</a>
|
|
</td>
|
|
[% END %]
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
[% END %]
|
|
<input type="hidden" name="subscriptionid" value="[% subscriptionidlist %]" />
|
|
|
|
</div>
|
|
</form>
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="yui-b">
|
|
[% INCLUDE 'serials-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|