templating serials & moving them to a serials directory, more self-explanatory (bull being french)
This commit is contained in:
parent
91e99db992
commit
247e04d204
|
|
@ -0,0 +1,26 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit -- Select supplier<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
<h1>Supplier Search Results</h1>
|
||||
<h2>You searched on <b>supplier <!-- TMPL_VAR name="supplier" -->,</b> <!-- TMPL_VAR name="count" --> results found</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Book seller</th>
|
||||
<th>Select</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP name="loop_suppliers" -->
|
||||
<tr>
|
||||
<td><!-- TMPL_VAR name="name" --></td>
|
||||
<td><a href="#" onclick="javascript:GetIt(<!-- TMPL_VAR name="aqbooksellerid" -->,'<!-- TMPL_VAR name="name" -->')">Get It !</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
|
||||
<script language="Javascript">
|
||||
|
||||
function GetIt(aqbooksellerid,name)
|
||||
{
|
||||
opener.document.f.aqbooksellerid.value = aqbooksellerid;
|
||||
opener.document.f.aqbooksellername.value = name;
|
||||
self.close();
|
||||
}
|
||||
</script>
|
||||
<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit -- Search supplier<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
|
||||
<h1>Search supplier for serial subscription</h1>
|
||||
<form action="/cgi-bin/koha/serials/acqui-search-result.pl" method=post>
|
||||
Supplier name : <input type="text" size="25" name="supplier">
|
||||
<input type="submit" class="button bull" value="OK">
|
||||
</form>
|
||||
<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit -- Select supplier<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
|
||||
<div id="mainbloc">
|
||||
<h1>Select borrowers or enter manually the names</h1>
|
||||
<p>
|
||||
<form action="/cgi-bin/koha/serials/distributedto.pl" method="post" name="Aform">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" name="searchfield" value="<!-- TMPL_VAR name="searchfield" -->">
|
||||
<input type="submit" class="button" value="Filter">
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<h2>Distributed to</h2>
|
||||
<p>
|
||||
<textarea name="distributedto" rows="15" cols="30"><!-- TMPL_VAR name="distributedto" --></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<!-- TMPL_IF name="save" -->
|
||||
saved</p><p>
|
||||
<!-- /TMPL_IF -->
|
||||
<input type="hidden" name="SaveList" value="0">
|
||||
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
|
||||
<input type="button" name="save" value="Save" class="button" onClick="FSaveList()">
|
||||
<input type="button" name="clode" value="Close" class="button" onClick="javascript:window.close()">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<!-- TMPL_VAR NAME="borrowername" -->
|
||||
<select name="borlist" size="15">
|
||||
<!-- TMPL_LOOP name="borlist" -->
|
||||
<option value="<!-- TMPL_VAR name="surname" --><!-- TMPL_VAR name="firstname" -->">
|
||||
<!-- TMPL_VAR name="surname" --> <!-- TMPL_VAR name="firstname" -->
|
||||
</option>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
<input type="button" name="insert" value=">>" class="button" onclick="insertValueQuery()" title="Insert" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</p>
|
||||
<script language="javascript" type="text/javascript">
|
||||
// GPL code coming from PhpMyAdmin
|
||||
function insertValueQuery() {
|
||||
var myQuery = document.Aform.distributedto;
|
||||
var myListBox = document.Aform.borlist;
|
||||
|
||||
if(myListBox.options.length > 0) {
|
||||
var chaineAj = "";
|
||||
var NbSelect = 0;
|
||||
for(var i=0; i<myListBox.options.length; i++) {
|
||||
if (myListBox.options[i].selected){
|
||||
NbSelect++;
|
||||
if (NbSelect > 1)
|
||||
chaineAj += ", ";
|
||||
chaineAj += myListBox.options[i].value;
|
||||
}
|
||||
}
|
||||
|
||||
//IE support
|
||||
if (document.selection) {
|
||||
myQuery.focus();
|
||||
sel = document.selection.createRange();
|
||||
sel.text = chaineAj;
|
||||
document.Aform.insert.focus();
|
||||
}
|
||||
//MOZILLA/NETSCAPE support
|
||||
else if (document.Aform.distributedto.selectionStart || document.Aform.distributedto.selectionStart == "0") {
|
||||
var startPos = document.Aform.distributedto.selectionStart;
|
||||
var endPos = document.Aform.distributedto.selectionEnd;
|
||||
var chaineSql = document.Aform.distributedto.value;
|
||||
myQuery.value = chaineSql.substring(0, startPos) +''+ chaineAj+"\n" + chaineSql.substring(endPos, chaineSql.length);
|
||||
} else {
|
||||
myQuery.value += chaineAj;
|
||||
}
|
||||
}
|
||||
}
|
||||
function FSaveList() {
|
||||
document.Aform.SaveList.value=1;
|
||||
document.Aform.submit();
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="menus.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
|
||||
|
||||
<h1>Late issues</h1>
|
||||
<p>
|
||||
<form action="lateissues.pl" method="post">
|
||||
<!-- TMPL_VAR name="CGIsupplier" -->
|
||||
<!-- TMPL_IF name="phone" -->Phone: <!-- TMPL_VAR name="phone" --><!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="booksellerfax" -->Fax: <!-- TMPL_VAR name="booksellerfax" --><!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="bookselleremail" --></p><p><a href="mailto:<!-- TMPL_VAR name="bookselleremail" -->"><!-- TMPL_VAR name="bookselleremail" --></a><!-- /TMPL_IF -->
|
||||
<input type="submit" value="filter">
|
||||
</form>
|
||||
</p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Issue number</th>
|
||||
<th>Late since</th>
|
||||
<th colspan=2> </th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP name="lateissues" -->
|
||||
<tr>
|
||||
<!-- TMPL_IF name="odd" -->
|
||||
<td class="hilighted"><!-- TMPL_IF name="Title" --><!-- TMPL_VAR name="Title" --><!-- TMPL_ELSE -->|<!-- /TMPL_IF --></td>
|
||||
<td class="hilighted"><!-- TMPL_VAR name="serialseq" --></td>
|
||||
<td class="hilighted"><!-- TMPL_VAR name="planneddate" --></td>
|
||||
<td class="hilighted">
|
||||
<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Detail</a>
|
||||
<a href="statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Recieve</a>
|
||||
</td>
|
||||
<!-- TMPL_ELSE -->
|
||||
<td><!-- TMPL_VAR name="Title" --></td>
|
||||
<td><!-- TMPL_VAR name="serialseq" --></td>
|
||||
<td><!-- TMPL_VAR name="planneddate" --></td>
|
||||
<td>
|
||||
<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Detail</a>
|
||||
<a href="statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Recieve</a>
|
||||
</td>
|
||||
<!-- /TMPL_IF -->
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<!-- TMPL_INCLUDE NAME="bull-top.inc" -->
|
||||
|
||||
|
||||
<!-- TMPL_UNLESS name="popup" -->
|
||||
<h1 class="bull">Subscription information for biblio #<!-- TMPL_VAR NAME="biblionumber" --> with title : <!-- TMPL_VAR name="bibliotitle" --></h1>
|
||||
<p>
|
||||
<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button bull">Back to biblio</a>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
<!-- TMPL_LOOP NAME="years" -->
|
||||
<!-- TMPL_IF NAME="year" -->
|
||||
<a class="button bull" href="javascript:active(<!-- TMPL_VAR NAME="year" -->)"><!-- TMPL_VAR NAME="year" --></a>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
<a class=" button bull" href="serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->&selectview=small">Compact view</a>
|
||||
</p>
|
||||
<!-- TMPL_LOOP NAME="years" -->
|
||||
<div name="<!-- TMPL_VAR NAME="year" -->" id="<!-- TMPL_VAR NAME="year" -->" style="position:absolute; visibility:hidden; margin-top:0px; border:4px;" <!--TMPL_IF Name="first" -->style="visibility:visible"<!--/TMPL_IF -->>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="bull">Information
|
||||
</th>
|
||||
<th class="bull">Date
|
||||
</th>
|
||||
<th class="bull">Number
|
||||
</th>
|
||||
<th class="bull">Status
|
||||
</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP Name="serials" -->
|
||||
<tr>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="notes" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR Name="planneddate" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR Name="serialseq" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_IF Name="status1" -->Arrived<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF Name="status2" -->Waited<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF Name="status3" -->Late<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF Name="status4" -->Missing<!-- /TMPL_IF -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
</div>
|
||||
<!--/TMPL_LOOP -->
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
active(<!-- TMPL_VAR name="yearmin" -->);
|
||||
function active(numlayer)
|
||||
{
|
||||
for (i=<!--TMPL_VAR Name="yearmin"-->; i<=<!--TMPL_VAR Name="yearmax"-->; i++ ) {
|
||||
ong = i;
|
||||
link = "link"+i;
|
||||
if (numlayer==i) {
|
||||
document.getElementById(ong).style.visibility="visible";
|
||||
} else {
|
||||
document.getElementById(ong).style.visibility="hidden";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="menus.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
|
||||
|
||||
<h1>Issues for a subscription</h1>
|
||||
<!-- TMPL_LOOP name="subscription_LOOP" -->
|
||||
<div id="serials_serial_issue_<!-- TMPL_VAR name="subscriptionid" -->">
|
||||
<h2>Subscription information for <!-- TMPL_VAR name="bibliotitle" --></h2>
|
||||
<p>It began on <b><!-- TMPL_VAR name="histstartdate" --></b> and is issued every
|
||||
<b>
|
||||
<!--TMPL_IF name="periodicity1" -->
|
||||
day
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity2" -->
|
||||
week
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity3" -->
|
||||
2 weeks
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity4" -->
|
||||
3 weeks
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity5" -->
|
||||
month
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity6" -->
|
||||
2 months
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity7" -->
|
||||
3 months
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity8" -->
|
||||
quarter
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity9" -->
|
||||
2 quarters
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity10" -->
|
||||
year
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity11" -->
|
||||
2 years
|
||||
<!-- /TMPL_IF -->
|
||||
</b>
|
||||
<!--TMPL_IF name="arrival1" -->
|
||||
on <b>monday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival2" -->
|
||||
on <b>tuesday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival3" -->
|
||||
on <b>wednesday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival4" -->
|
||||
on <b>thursday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival5" -->
|
||||
on <b>friday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival6" -->
|
||||
on <b>saturday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival7" -->
|
||||
on <b>sunday</b>
|
||||
<!-- /TMPL_IF -->
|
||||
for <b>
|
||||
<!-- TMPL_IF name="numberlength" --><!-- TMPL_VAR name="numberlength" --> issues<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="weeklength" --><!-- TMPL_VAR name="weeklength" --> weeks<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="monthlength" --><!-- TMPL_VAR name="monthlength" --> months<!-- /TMPL_IF -->
|
||||
</b>
|
||||
</p>
|
||||
<p>Last renewal of subscription was <b><!-- TMPl_VAR name="startdate" --></b></p>
|
||||
<!-- TMPL_IF name="enddate" --><p><b>This subscription is now ended. The last issue was recieved on <!-- TMPL_VAR name="enddate" --></b></p><!-- /TMPL_IF name="enddate" -->
|
||||
<!--TMPL_UNLESS Name=fullinfo -->
|
||||
<p><!-- TMPL_VAR name="notes" --></p>
|
||||
<!-- TMPL_IF name="opacnote" -->
|
||||
<h3 class="bull">Issues summary</h2>
|
||||
<p>
|
||||
<!-- TMPL_VAR name="opacnote" -->
|
||||
</p>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="recievedlist" -->
|
||||
<h3 class="bull">Recieved issues</h2>
|
||||
<p>
|
||||
<!-- TMPL_VAR name="recievedlist" -->
|
||||
</p>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="missinglist" -->
|
||||
<h3 class="bull">Missing issues</h2>
|
||||
<p>
|
||||
<!-- TMPL_VAR name="missinglist" -->
|
||||
</p>
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
</div>
|
||||
<div id="action">
|
||||
<form action="/cgi-bin/koha/bull-home.pl">
|
||||
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
|
||||
<input type="submit" value="Subscriptions" />
|
||||
</form>
|
||||
<form action="/cgi-bin/koha/MARCdetail.pl />
|
||||
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
|
||||
<input type="submit" value="Back to biblio" />
|
||||
</form>
|
||||
<form action="serial-issues.pl">
|
||||
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->">
|
||||
<input type="hidden" name="selectview" value="full">
|
||||
<input type="submit" value="Complete view">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Serials <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="menus.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
|
||||
|
||||
<h1>Serials</h1>
|
||||
<div id="serials_home">
|
||||
<h2>Serials subscriptions</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>ISSN</th>
|
||||
<th>Title</th>
|
||||
<th>
|
||||
Note
|
||||
</td>
|
||||
<th colspan=2> </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<form action="serials-home.pl" method="post">
|
||||
<td>
|
||||
<input type="text" size=10 maxlength=11 name="ISSN" value="<!-- TMPL_VAR name="ISSN" -->" title="type ISSN here to filter subscription">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" size=40 maxlength=40 name="title" value="<!-- TMPL_VAR name="title" -->" title="type a title -complete or partial- to filter subscription">
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td colspan=2>
|
||||
<input type="submit" value="filter" class="button bull" title="set a filter on ISSN / title">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP name="subscriptions" -->
|
||||
<tr>
|
||||
<!-- TMPL_IF name="toggle" -->
|
||||
<td class="hilighted">
|
||||
<!-- TMPL_ELSE -->
|
||||
<td>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="ISSN" -->
|
||||
<a href="serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button bull" title="Issues history"><!-- TMPL_VAR name="ISSN" --></a>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
</td>
|
||||
<!-- TMPL_IF name="toggle" -->
|
||||
<td class="hilighted">
|
||||
<!-- TMPL_ELSE -->
|
||||
<td>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="title" -->
|
||||
<!-- TMPL_VAR name="title" -->
|
||||
<!-- TMPL_ELSE -->
|
||||
|
|
||||
<!-- /TMPL_IF -->
|
||||
</td>
|
||||
<!-- TMPL_IF name="toggle" -->
|
||||
<td class="hilighted">
|
||||
<!-- TMPL_ELSE -->
|
||||
<td>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="notes" -->(<!-- TMPL_VAR name="notes" -->)<!-- /TMPL_IF -->
|
||||
</td>
|
||||
<!-- TMPL_IF name="toggle" -->
|
||||
<td class="hilighted">
|
||||
<!-- TMPL_ELSE -->
|
||||
<td>
|
||||
<!-- /TMPL_IF -->
|
||||
<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull" title="subscription detail">Detail</a>
|
||||
</td>
|
||||
<!-- TMPL_IF name="toggle" -->
|
||||
<td class="hilighted">
|
||||
<!-- TMPL_ELSE -->
|
||||
<td>
|
||||
<!-- /TMPL_IF -->
|
||||
<a href="statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button bull" title="receive issues for this subscription">Receive</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
<a href="/cgi-bin/koha/serials/subscription-add.pl" class="button bull">Add subscription</a>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
||||
|
||||
|
|
@ -0,0 +1,258 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="menus.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
|
||||
|
||||
<!--------------------------MAIN BODY OF PAGE-------------------------->
|
||||
<!-- TMPL_IF name="mod" -->
|
||||
<h1>Modify subscription</h1>
|
||||
<form method="post" name="f" action="subscription-detail.pl">
|
||||
<input type="hidden" name="op" value="modsubscription" />
|
||||
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
|
||||
<!-- TMPL_ELSE -->
|
||||
<h1>Add a subscription</h1>
|
||||
<form method="post" name="f">
|
||||
<!-- /TMPL_IF -->
|
||||
<div id="serials_subscription_add_information">
|
||||
<h2>Subscription information</h2>
|
||||
<input type="hidden" name="op" value="addsubscription" />
|
||||
<input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->" />
|
||||
<p>Librarian <!-- TMPL_VAR name="user" --></p>
|
||||
<p><label>Supplier</label><input type="text" name="aqbooksellerid" value="<!-- TMPL_VAR name="aqbooksellerid" -->" size=4 /> (<input type="text" name="aqbooksellername" value="<!-- TMPL_VAR name="aqbooksellername" -->" disabled readonly />)<a href="#" onClick="FindAcqui(f)">...</a></p>
|
||||
<p><label>Biblio</label><input type="text" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" size=4 /> (<input type="text" name="title" value="<!-- TMPL_VAR name="bibliotitle" -->" disabled readonly />)<a href="#" onClick="Plugin(f)">...</a></p>
|
||||
<p><label>Notes</label><textarea name="notes" cols="30" rows="2"><!-- TMPL_VAR name="notes" --></textarea></p>
|
||||
<!-- TMPL_IF name="letters" -->
|
||||
<p><label>Enable issue alert</label>
|
||||
<select name="letter">
|
||||
<option value=""></option>
|
||||
<!-- TMPL_LOOP name="letters" -->
|
||||
<!-- TMPL_IF name="selected" -->
|
||||
<option value="<!-- TMPL_VAR name="code" -->" selected><!-- TMPL_VAR name="name" --></option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
</p>
|
||||
<!-- /TMPL_IF -->
|
||||
<p><label>Distributed to </label><a href="#" onClick="DistributedTo()">...</a></p>
|
||||
<p>warning</p>
|
||||
<ul>
|
||||
<li>remember you <b>must</b> have created a biblio <b>before</b> creating a subscription</li>
|
||||
<li>You also must have selected a supplier if you want to ask for late issues</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="serials_subscription_add_planning">
|
||||
<h2>Planning</h2>
|
||||
<p><label>Beginnning date:</label> <input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" size=13 maxlength=10 /></p>
|
||||
<p><label>Frequency (*)</label>
|
||||
<select name="periodicity" size="1">
|
||||
<option value="" selected>Unknown</option>
|
||||
<!-- TMPL_IF name="periodicity1" -->
|
||||
<option value="1" selected>1/day</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1">1/day</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity2" -->
|
||||
<option value="2" selected>1/week</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">1/week</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity3" -->
|
||||
<option value="3" selected>1/2 weeks (2/month)</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3">1/2 weeks (2/months)</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity4" -->
|
||||
<option value="4" selected>1/3 weeks</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="4">1/3 weeks</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity5" -->
|
||||
<option value="5" selected>1/month</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="5">1/month</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity6" -->
|
||||
<option value="6" selected>1/2 months (6/year)</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="6">1/2 months (6/year)</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity7" -->
|
||||
<option value="7" selected>1/3 months (1/quarter)</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="7">1/3 months (1/quarter)</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- periodicity8 is 1/quarter, exactly like periodicity7 -->
|
||||
<!-- TMPL_IF name="periodicity9" -->
|
||||
<option value="9" selected>2/years</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="9">2/years</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity10" -->
|
||||
<option value="10" selected>1/year</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="10">1/year</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="periodicity11" -->
|
||||
<option value="11" selected>1/2 years</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="11">1/2 years</option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
</p>
|
||||
<p><label>Arrives on</label>
|
||||
<select name="dow" size="1">
|
||||
<option value="">None</option>
|
||||
<!-- TMPL_IF name="dow1" -->
|
||||
<option value="1" selected>Monday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="1">Monday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow2" -->
|
||||
<option value="2" selected>Tuesday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="2">Tuesday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow3" -->
|
||||
<option value="3" selected>Wednesday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="3">Wednesday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow4" -->
|
||||
<option value="4" selected>Thursday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="4">Thursday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow5" -->
|
||||
<option value="5" selected>Friday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="5">Friday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow6" -->
|
||||
<option value="6" selected>Saturday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="6">Saturday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF name="dow7" -->
|
||||
<option value="7" selected>Sunday</option>
|
||||
<!-- TMPL_ELSE -->
|
||||
<option value="7">Sunday</option>
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
</div>
|
||||
<div id="serials_subscription_add_length">
|
||||
<h2>Subscription length</h2>
|
||||
<p>* fill 1 from :</p>
|
||||
<ul>
|
||||
<p><label>Number of issues</label><input type="text" name="numberlength" value="<!-- TMPL_VAR name="numberlength" -->" /></p>
|
||||
<p><label>Number of weeks</label><input type="text" name="weeklength" value="<!-- TMPL_VAR name="weeklength" -->" /></p>
|
||||
<p><label>Number of months</label><input type="text" name="monthlength" value="<!-- TMPL_VAR name="monthlength" -->" /></p>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="serials_subscription_add_calculation">
|
||||
<h2>Numbering calculation</h2>
|
||||
<p>
|
||||
<p>Numbering formula: <input type="text" name="numberingmethod" value="<!-- TMPL_VAR name="numberingmethod" -->"></p>
|
||||
<table class="small">
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>X</th>
|
||||
<th>Y</th>
|
||||
<th>Z</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Add</td>
|
||||
<td>
|
||||
<input type="text" name="add1" value="<!-- TMPL_VAR name="add1" -->" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="add2" value="<!-- TMPL_VAR name="add2" -->" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="add3" value="<!-- TMPL_VAR name="add3" -->" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>once every</td>
|
||||
<td><input type="text" name="every1" value="<!-- TMPL_VAR name="every1" -->" /></td>
|
||||
<td><input type="text" name="every2" value="<!-- TMPL_VAR name="every2" -->" /></td>
|
||||
<td><input type="text" name="every3" value="<!-- TMPL_VAR name="every3" -->" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>When more than</td>
|
||||
<td><input type="text" name="whenmorethan1" value="<!-- TMPL_VAR name="whenmorethan1" -->" /></td>
|
||||
<td><input type="text" name="whenmorethan2" value="<!-- TMPL_VAR name="whenmorethan2" -->" /></td>
|
||||
<td><input type="text" name="whenmorethan3" value="<!-- TMPL_VAR name="whenmorethan3" -->" /></td>
|
||||
</tr>
|
||||
<!-- TMPL_IF name="mod" -->
|
||||
<tr>
|
||||
<td>The loop is for instance</td>
|
||||
<td><input type="text" name="innerloop1" value="<!-- TMPL_VAR name="innerloop1" -->" /></td>
|
||||
<td><input type="text" name="innerloop2" value="<!-- TMPL_VAR name="innerloop2" -->" /></td>
|
||||
<td><input type="text" name="innerloop3" value="<!-- TMPL_VAR name="innerloop3" -->" /></td>
|
||||
</tr>
|
||||
<!-- /TMPL_IF -->
|
||||
<tr>
|
||||
<td>Set back to</td>
|
||||
<td><input type="text" name="setto1" value="<!-- TMPL_VAR name="setto1" -->" /></td>
|
||||
<td><input type="text" name="setto2" value="<!-- TMPL_VAR name="setto2" -->" /></td>
|
||||
<td><input type="text" name="setto3" value="<!-- TMPL_VAR name="setto3" -->" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<!-- TMPL_IF name="mod" -->
|
||||
Last value
|
||||
<!-- TMPL_ELSE -->
|
||||
Begins with
|
||||
<!-- /TMPL_IF -->
|
||||
</td>
|
||||
<td><input type="text" name="lastvalue1" value="<!-- TMPL_VAR name="lastvalue1" -->" /></td>
|
||||
<td><input type="text" name="lastvalue2" value="<!-- TMPL_VAR name="lastvalue2" -->" /></td>
|
||||
<td><input type="text" name="lastvalue3" value="<!-- TMPL_VAR name="lastvalue3" -->" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</div>
|
||||
<!-- TMPL_IF name="mod" -->
|
||||
<input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" />
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="button" value="Add subscription" onclick="Check(this.form)" accesskey="w" />
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
function Plugin(f)
|
||||
{
|
||||
window.open("subscription-bib-search.pl","Find a bib index",'width=500,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
function FindAcqui(f)
|
||||
{
|
||||
window.open("acqui-search.pl","Find a supplier",'width=500,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
function DistributedTo()
|
||||
{
|
||||
window.open("distributedto.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->","Distributed to",'width=800,height=600,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
|
||||
function Check(f)
|
||||
{
|
||||
if (f.startdate.value.length != 0 &&
|
||||
f.numberlength.value+f.weeklength.value+f.monthlength.value > 0)
|
||||
{
|
||||
document.f.submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('field marked with * are mandatory');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
|
||||
<h1>Catalogue search</h1>
|
||||
|
||||
<h2>Search on</h2>
|
||||
<form name="f" action="/cgi-bin/koha/serials/subscription-bib-search.pl" method="post">
|
||||
<input type="hidden" name="op" value="do_search">
|
||||
<input type="hidden" name="type" value="intranet">
|
||||
<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->">
|
||||
<p>
|
||||
<label>Keyword</label>
|
||||
<input type="hidden" name="marclist" value="">
|
||||
<input type="hidden" name="and_or" value="and">
|
||||
<input type="hidden" name="excluding" value="">
|
||||
<input type="hidden" name="operator" value="contains">
|
||||
<input type="text" name="value">
|
||||
</p>
|
||||
<p>
|
||||
<label>Itemtype</label>
|
||||
<!-- TMPL_VAR name="CGIitemtype" -->
|
||||
<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR name="category" -->">
|
||||
<input type="hidden" name="marclist" value="">
|
||||
<input type="hidden" name="and_or" value="and">
|
||||
<input type="hidden" name="excluding" value="">
|
||||
<input type="hidden" name="operator" value="=">
|
||||
<input type="hidden" name="index" value="<!-- TMPL_VAR name="index" -->">
|
||||
</p>
|
||||
<p>Results per page :
|
||||
<select align="right" name="resultsperpage" size="1">
|
||||
<option value="20">20</option>
|
||||
<option value="50">50</option>
|
||||
<option value="100">100</option>
|
||||
</select>
|
||||
Ordered by
|
||||
<select name="orderby" size="1">
|
||||
<option value="biblio.title">Title</option>
|
||||
<option value="biblio.author">Author</option>
|
||||
<option value="biblioitems.dewey">Dewey</option>
|
||||
<option value="biblioitems.publicationyear">Publication Year</option>
|
||||
<option value="biblioitems.publishercode">Publisher</option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" value="Start search" class="button catalogue">
|
||||
<a href="javascript:PopupSuggestion()" class="button catalogue">Suggestions</a>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<script language="Javascript" type="text/javascript">
|
||||
function AddStatement() {
|
||||
|
||||
document.forms['f'].op.value="AddStatement";
|
||||
document.f.submit();
|
||||
}
|
||||
|
||||
function PopupSuggestion() {
|
||||
var strQuery="";
|
||||
for (i=0 ; i<document.f.marclist.length ; i++) {
|
||||
if (document.f.value[i].value.length>0) {
|
||||
strQuery += " "+document.f.value[i].value;
|
||||
}
|
||||
}
|
||||
newin=window.open("suggest.pl?Q="+strQuery,"Suggestions",'width=500,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
||||
</script>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
||||
|
|
@ -0,0 +1,231 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription detail<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="menus.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
|
||||
|
||||
<h1>Subscription for <!-- TMPL_VAR name="bibliotitle" --></h1>
|
||||
<div id="serials_subscription_detail">
|
||||
<h2>Subscription information</h2>
|
||||
<p>Librarian identity :</td><td> <!-- TMPL_VAR name="librarian" --></p>
|
||||
<p><label>Supplier </label><!-- TMPL_VAR name="aqbooksellername" --></p>
|
||||
<p><label>Cost</label><!-- TMPL_VAR name="cost" --></p>
|
||||
<p><label>Budget </label><!-- TMPL_VAR name="bookfundid" --></p>
|
||||
<p><label>Biblio</label><i>(<!-- TMPL_VAR name="biblionumber" -->)</i> <!-- TMPL_VAR name="bibliotitle" --></p>
|
||||
<p><label>Notes:</label><!-- TMPL_VAR name="notes" --></p>
|
||||
<p>
|
||||
<!-- TMPL_IF name="letter" -->
|
||||
<label>Issue alert with letter:</label><!-- TMPL_VAR name="letter" -->
|
||||
<!-- TMPL_ELSE -->
|
||||
Borrowers can't subscribe to issue alerts
|
||||
<!-- /TMPL_IF -->
|
||||
</p>
|
||||
<p><label>Distributed to</label>
|
||||
<p><ul><!-- TMPL_VAR name="distributedto" --></ul></p>
|
||||
</div>
|
||||
<div id="serials_subscription_detail_planning">
|
||||
<h2>Planning</h2>
|
||||
<p><label>Beginnning date:</label> <!-- TMPL_VAR name="startdate" --></p>
|
||||
<p><label>Frequency (*):</label>
|
||||
<!--TMPL_IF name="periodicity1" -->
|
||||
1/day
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity2" -->
|
||||
1/week
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity3" -->
|
||||
1/2 weeks
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity4" -->
|
||||
1/3 weeks
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity5" -->
|
||||
1/Month
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity6" -->
|
||||
1/2 Months (6/year)
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity7" -->
|
||||
1/quarter
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity8" -->
|
||||
1/quarter
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity9" -->
|
||||
2/year
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity10" -->
|
||||
1/year
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="periodicity11" -->
|
||||
1/2 years
|
||||
<!-- /TMPL_IF -->
|
||||
</p>
|
||||
<p><label>Arrives on:</label>
|
||||
<!--TMPL_IF name="arrival1" -->
|
||||
Monday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival2" -->
|
||||
Tuesday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival3" -->
|
||||
Wednesday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival4" -->
|
||||
Thursday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival5" -->
|
||||
Friday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival6" -->
|
||||
Saturday
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="arrival7" -->
|
||||
Sunday
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
<div id="serials_subscription_detail_length">
|
||||
<h2>Subscription length</h2>
|
||||
<p><label>Number of issues</label><!-- TMPL_VAR name="numberlength" --></p>
|
||||
<p><label>Number of weeks</label><!-- TMPL_VAR name="weeklength" --></p>
|
||||
<p><label>Number of months</label><!-- TMPL_VAR name="monthlength" --></p>
|
||||
|
||||
</div>
|
||||
<div id="serials_subscription_detail_calculation">
|
||||
<h2>Numbering calculation</h2>
|
||||
<p>
|
||||
<p>Numbering formula: <!-- TMPL_VAR name="numberingmethod" --></p>
|
||||
<table>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> X </th>
|
||||
<th> Y </th>
|
||||
<th> Z </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Add</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="add1" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="add2" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="add3" -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>once every</td>
|
||||
<td><!-- TMPL_VAR name="every1" --></td>
|
||||
<td><!-- TMPL_VAR name="every2" --></td>
|
||||
<td><!-- TMPL_VAR name="every3" --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>When more than</td>
|
||||
<td><!-- TMPL_VAR name="whenmorethan1" --> <!-- TMPL_IF name="innerloop1" --><br/>
|
||||
<i>(is <!-- TMPL_VAR name="innerloop1" -->)</i><!-- /TMPL_IF --></td>
|
||||
<td><!-- TMPL_VAR name="whenmorethan2" --> <!-- TMPL_IF name="innerloop2" --><br/>
|
||||
<i>(is <!-- TMPL_VAR name="innerloop2" -->)</i><!-- /TMPL_IF --></td>
|
||||
<td><!-- TMPL_VAR name="whenmorethan3" --> <!-- TMPL_IF name="innerloop3" --><br/>
|
||||
<i>(is <!-- TMPL_VAR name="innerloop3" -->)</i><!-- /TMPL_IF --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Set back to</td>
|
||||
<td><!-- TMPL_VAR name="setto1" --></td>
|
||||
<td><!-- TMPL_VAR name="setto2" --></td>
|
||||
<td><!-- TMPL_VAR name="setto3" --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Last value
|
||||
</td>
|
||||
<td><!-- TMPL_VAR name="lastvalue1" --></td>
|
||||
<td><!-- TMPL_VAR name="lastvalue2" --></td>
|
||||
<td><!-- TMPL_VAR name="lastvalue3" --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="serials_subscription_detail_issue_list">
|
||||
<h2>Issues</h2>
|
||||
<table class="small">
|
||||
<tr>
|
||||
<th> Issue number </th>
|
||||
<th> Planned date </th>
|
||||
<th> Status </th>
|
||||
<th> Note </th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP name="serialslist" -->
|
||||
<tr>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="serialseq" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="planneddate" -->
|
||||
</td>
|
||||
<td>
|
||||
<!--TMPL_IF name="status1" -->
|
||||
Waited
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="status2" -->
|
||||
Arrived
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="status3" -->
|
||||
Late
|
||||
<!-- /TMPL_IF -->
|
||||
<!--TMPL_IF name="status4" -->
|
||||
Missing
|
||||
<!-- /TMPL_IF -->
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR name="notes" -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="action">
|
||||
<form action="subscription-add.pl">
|
||||
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
|
||||
<input type="hidden" name="op" value="mod" />
|
||||
<input type="submit" value="Modify subscription" />
|
||||
</form>
|
||||
<form action="statecollection.pl">
|
||||
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
|
||||
<input type="submit" value="Recieve issues" />
|
||||
</form>
|
||||
<form action="serial-issues.pl">
|
||||
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
|
||||
<input type="submit" value="Issue history" />
|
||||
</form>
|
||||
<form action="/cgi-bin/koha/bull-home.pl">
|
||||
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
|
||||
<input type="submit" value="Subscriptions" />
|
||||
</form>
|
||||
<!-- TMPL_IF name="letter" -->
|
||||
<form action="viewalerts.pl">
|
||||
<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
|
||||
<input type="submit" value="Alerted borrowers" />
|
||||
</form>
|
||||
<!-- /TMPL_IF -->
|
||||
<form action="/cgi-bin/koha/MARCdetail.pl">
|
||||
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
|
||||
<input type="submit" value="Back to biblio" />
|
||||
</form>
|
||||
<!-- TMPL_UNLESS name="totalissues" -->
|
||||
<form action="javascript:confirm_deletion()">
|
||||
<input type="submit" value="delete" />
|
||||
</form>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function _(s) { return s } // dummy function for gettext
|
||||
function confirm_deletion() {
|
||||
var is_confirmed = confirm(_('Are you sure you want to delete this subscription?'));
|
||||
if (is_confirmed) {
|
||||
window.location="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&op=del";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# $Id$
|
||||
|
||||
#script to show suppliers and orders
|
||||
#written by chris@katipo.co.nz 23/2/2000
|
||||
|
||||
|
||||
# Copyright 2000-2002 Katipo Communications
|
||||
#
|
||||
# This file is part of Koha.
|
||||
#
|
||||
# Koha is free software; you can redistribute it and/or modify it under the
|
||||
# terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
|
||||
# Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
use strict;
|
||||
use C4::Auth;
|
||||
use C4::Biblio;
|
||||
use C4::Output;
|
||||
use CGI;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Database;
|
||||
use HTML::Template;
|
||||
use C4::Acquisition;
|
||||
use C4::Date;
|
||||
|
||||
my $query=new CGI;
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/acqui-search-result.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => {acquisition => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
my $supplier=$query->param('supplier');
|
||||
my ($count,@suppliers)=bookseller($supplier);
|
||||
|
||||
#build reult page
|
||||
my $toggle=0;
|
||||
my @loop_suppliers;
|
||||
for (my $i=0; $i<$count; $i++) {
|
||||
my ($ordcount,$orders)=getorders($suppliers[$i]->{'id'});
|
||||
my %line;
|
||||
if ($toggle==0){
|
||||
$line{even}=1;
|
||||
$toggle=1;
|
||||
} else {
|
||||
$line{even}=0;
|
||||
$toggle=0;
|
||||
}
|
||||
$line{aqbooksellerid} =$suppliers[$i]->{'id'};
|
||||
$line{name} = $suppliers[$i]->{'name'};
|
||||
$line{active} = $suppliers[$i]->{'active'};
|
||||
my @loop_basket;
|
||||
for (my $i2=0;$i2<$ordcount;$i2++){
|
||||
my %inner_line;
|
||||
$inner_line{basketno} =$orders->[$i2]->{'basketno'};
|
||||
$inner_line{total} =$orders->[$i2]->{'count(*)'};
|
||||
$inner_line{authorisedby} = $orders->[$i2]->{'authorisedby'};
|
||||
$inner_line{creationdate} = format_date($orders->[$i2]->{'creationdate'});
|
||||
$inner_line{closedate} = format_date($orders->[$i2]->{'closedate'});
|
||||
push @loop_basket, \%inner_line;
|
||||
}
|
||||
$line{loop_basket} = \@loop_basket;
|
||||
push @loop_suppliers, \%line;
|
||||
}
|
||||
$template->param(loop_suppliers => \@loop_suppliers,
|
||||
supplier => $supplier,
|
||||
count => $count);
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Output;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Database;
|
||||
use HTML::Template;
|
||||
use C4::Acquisition;
|
||||
my $query = new CGI;
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/acqui-search.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => {acquisition => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
#FIXME : Is this page still used ????
|
||||
# looks like no.
|
||||
|
||||
# budget
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sthtemp = $dbh->prepare("Select flags, branchcode from borrowers where borrowernumber = ?");
|
||||
$sthtemp->execute($loggedinuser);
|
||||
my ($flags, $homebranch)=$sthtemp->fetchrow;
|
||||
my ($count,@results)=bookfunds($homebranch);
|
||||
my $classlist='';
|
||||
my $total=0;
|
||||
my $totspent=0;
|
||||
my $totcomtd=0;
|
||||
my $totavail=0;
|
||||
my @loop_budget = ();
|
||||
for (my $i=0;$i<$count;$i++){
|
||||
my ($spent,$comtd)=bookfundbreakdown($results[$i]->{'bookfundid'});
|
||||
my $avail=$results[$i]->{'budgetamount'}-($spent+$comtd);
|
||||
my %line;
|
||||
$line{bookfundname} = $results[$i]->{'bookfundname'};
|
||||
$line{budgetamount} = $results[$i]->{'budgetamount'};
|
||||
$line{spent} = sprintf ("%.2f", $spent);
|
||||
$line{comtd} = sprintf ("%.2f",$comtd);
|
||||
$line{avail} = sprintf ("%.2f",$avail);
|
||||
push @loop_budget, \%line;
|
||||
$total+=$results[$i]->{'budgetamount'};
|
||||
$totspent+=$spent;
|
||||
$totcomtd+=$comtd;
|
||||
$totavail+=$avail;
|
||||
}
|
||||
#currencies
|
||||
my ($count,$rates)=getcurrencies();
|
||||
my @loop_currency = ();
|
||||
for (my $i=0;$i<$count;$i++){
|
||||
my %line;
|
||||
$line{currency} = $rates->[$i]->{'currency'};
|
||||
$line{rate} = $rates->[$i]->{'rate'};
|
||||
push @loop_currency, \%line;
|
||||
}
|
||||
$template->param(classlist => $classlist,
|
||||
type => 'intranet',
|
||||
loop_budget => \@loop_budget,
|
||||
loop_currency => \@loop_currency,
|
||||
total => sprintf("%.2f",$total),
|
||||
totspent => sprintf("%.2f",$totspent),
|
||||
totcomtd => sprintf("%.2f",$totcomtd),
|
||||
totavail => sprintf("%.2f",$totavail));
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Copyright 2000-2002 Katipo Communications
|
||||
#
|
||||
# This file is part of Koha.
|
||||
#
|
||||
# Koha is free software; you can redistribute it and/or modify it under the
|
||||
# terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
|
||||
# Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Date;
|
||||
use C4::Auth;
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Search;
|
||||
use HTML::Template;
|
||||
|
||||
sub StringSearch {
|
||||
my ($searchstring)=@_;
|
||||
my $dbh = C4::Context->dbh;
|
||||
$searchstring=~ s/\'/\\\'/g;
|
||||
my @data=split(' ',$searchstring);
|
||||
my $count=@data;
|
||||
my $sth=$dbh->prepare("Select surname,firstname from borrowers where (surname like ?) order by surname");
|
||||
$sth->execute("$data[0]%");
|
||||
my @results;
|
||||
my $cnt=0;
|
||||
while (my $data=$sth->fetchrow_hashref){
|
||||
push(@results,$data);
|
||||
$cnt ++;
|
||||
}
|
||||
$sth->finish;
|
||||
return($cnt,\@results);
|
||||
}
|
||||
|
||||
my $input = new CGI;
|
||||
my $searchfield=$input->param('searchfield');
|
||||
defined $searchfield or $searchfield='';
|
||||
my $distributedto=$input->param('distributedto');
|
||||
my $subscriptionid = $input->param('subscriptionid');
|
||||
$searchfield=~ s/\,//g;
|
||||
my $SaveList=$input->param('SaveList');
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
||||
unless ($distributedto) {
|
||||
# read the previous distributedto
|
||||
my $sth = $dbh->prepare('select distributedto from subscription where subscriptionid=?');
|
||||
$sth->execute($subscriptionid);
|
||||
($distributedto) = $sth->fetchrow;
|
||||
}
|
||||
|
||||
if ($SaveList) {
|
||||
my $sth = $dbh->prepare("update subscription set distributedto=? where subscriptionid=?");
|
||||
$sth->execute($distributedto,$subscriptionid);
|
||||
}
|
||||
my ($template, $borrowernumber, $cookie)
|
||||
= get_template_and_user({template_name => "serials/distributedto.tmpl",
|
||||
query => $input,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => {cataloguing => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
my $env;
|
||||
my $count=0;
|
||||
my $results;
|
||||
($count,$results)=StringSearch($searchfield) if $searchfield;
|
||||
my $toggle="0";
|
||||
my @loop_data =();
|
||||
for (my $i=0; $i < $count; $i++){
|
||||
if ($i % 2){
|
||||
$toggle=1;
|
||||
} else {
|
||||
$toggle=0;
|
||||
}
|
||||
my %row_data;
|
||||
$row_data{toggle} = $toggle;
|
||||
$row_data{firstname} = $results->[$i]{'firstname'};
|
||||
$row_data{surname} = $results->[$i]{'surname'};
|
||||
push(@loop_data, \%row_data);
|
||||
}
|
||||
$template->param(borlist => \@loop_data,
|
||||
searchfield => $searchfield,
|
||||
distributedto => $distributedto,
|
||||
SaveList => $SaveList,
|
||||
subscriptionid => $subscriptionid,
|
||||
);
|
||||
output_html_with_http_headers $input, $cookie, $template->output;
|
||||
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Bull;
|
||||
use C4::Acquisition;
|
||||
use C4::Output;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Context;
|
||||
use HTML::Template;
|
||||
|
||||
my $query = new CGI;
|
||||
# my $title = $query->param('title');
|
||||
# my $ISSN = $query->param('ISSN');
|
||||
# my @subscriptions = getsubscriptions($title,$ISSN);
|
||||
|
||||
my $supplierid = $query->param('supplierid');
|
||||
my %supplierlist = getSupplierListWithLateIssues;
|
||||
my @select_supplier;
|
||||
push @select_supplier,"";
|
||||
foreach my $supplierid (keys %supplierlist){
|
||||
push @select_supplier, $supplierid
|
||||
}
|
||||
my $CGIsupplier=CGI::scrolling_list( -name => 'supplierid',
|
||||
-values => \@select_supplier,
|
||||
-default => $supplierid,
|
||||
-labels => \%supplierlist,
|
||||
-size => 1,
|
||||
-multiple => 0 );
|
||||
|
||||
my @lateissues;
|
||||
@lateissues = GetLateIssues($supplierid) if $supplierid;
|
||||
my @supplierinfo;
|
||||
my $nothing;
|
||||
($nothing,@supplierinfo)=bookseller($supplierid) if $supplierid;
|
||||
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/lateissues.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => {catalogue => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
$template->param(
|
||||
CGIsupplier => $CGIsupplier,
|
||||
lateissues => \@lateissues,
|
||||
phone => $supplierinfo[0]->{phone},
|
||||
booksellerfax => $supplierinfo[0]->{booksellerfax},
|
||||
bookselleremail => $supplierinfo[0]->{bookselleremail},
|
||||
);
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Koha;
|
||||
use C4::Date;
|
||||
use C4::Bull;
|
||||
use C4::Output;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Context;
|
||||
use HTML::Template;
|
||||
|
||||
my $query = new CGI;
|
||||
my $op = $query->param('op');
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $selectview = $query->param('selectview');
|
||||
$selectview = C4::Context->preference("SubscriptionHistory") unless $selectview;
|
||||
|
||||
my $sth;
|
||||
# my $id;
|
||||
my ($template, $loggedinuser, $cookie);
|
||||
my $biblionumber = $query->param('biblionumber');
|
||||
if ($selectview eq "full"){
|
||||
my $subscriptions = get_full_subscription_list_from_biblionumber($biblionumber);
|
||||
|
||||
my $title = $subscriptions->[0]{bibliotitle};
|
||||
my $yearmin=$subscriptions->[0]{year};
|
||||
my $yearmax=$subscriptions->[scalar(@$subscriptions)-1]{year};
|
||||
|
||||
($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/serial-issues-full.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 1,
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
# replace CR by <br> in librarian note
|
||||
# $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
|
||||
|
||||
$template->param(
|
||||
biblionumber => $query->param('biblionumber'),
|
||||
years => $subscriptions,
|
||||
yearmin => $yearmin,
|
||||
yearmax =>$yearmax,
|
||||
bibliotitle => $title,
|
||||
suggestion => C4::Context->preference("suggestion"),
|
||||
virtualshelves => C4::Context->preference("virtualshelves"),
|
||||
);
|
||||
|
||||
} else {
|
||||
my $subscriptions = get_subscription_list_from_biblionumber($biblionumber);
|
||||
|
||||
($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/serial-issues.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 1,
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
# replace CR by <br> in librarian note
|
||||
# $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
|
||||
|
||||
$template->param(
|
||||
biblionumber => $query->param('biblionumber'),
|
||||
subscription_LOOP => $subscriptions,
|
||||
suggestion => C4::Context->preference("suggestion"),
|
||||
virtualshelves => C4::Context->preference("virtualshelves"),
|
||||
);
|
||||
}
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Bull;
|
||||
use C4::Output;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Context;
|
||||
use HTML::Template;
|
||||
|
||||
my $query = new CGI;
|
||||
my $title = $query->param('title');
|
||||
my $ISSN = $query->param('ISSN');
|
||||
my $biblionumber = $query->param('biblionumber');
|
||||
my @subscriptions = getsubscriptions($title,$ISSN,$biblionumber);
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/serials-home.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => {catalogue => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
$template->param(
|
||||
subscriptions => \@subscriptions,
|
||||
title => $title,
|
||||
ISSN => $ISSN,
|
||||
);
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Koha;
|
||||
use C4::Auth;
|
||||
use C4::Date;
|
||||
use C4::Output;
|
||||
use C4::Bull;
|
||||
use C4::Acquisition;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Context;
|
||||
use HTML::Template;
|
||||
use C4::Bull;
|
||||
use C4::Letters;
|
||||
|
||||
my $query = new CGI;
|
||||
my $op = $query->param('op');
|
||||
my $dbh = C4::Context->dbh;
|
||||
my ($subscriptionid,$auser,$librarian,$cost,$aqbooksellerid, $aqbooksellername,$aqbudgetid, $bookfundid, $startdate, $periodicity,
|
||||
$dow, $numberlength, $weeklength, $monthlength,
|
||||
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
|
||||
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
|
||||
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
|
||||
$numberingmethod, $status, $biblionumber,
|
||||
$bibliotitle, $notes, $letter);
|
||||
|
||||
my @budgets;
|
||||
my ($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/subscription-add.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => {catalogue => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
|
||||
#FIXME : If Budgets are never used, then these lines are useless.
|
||||
$dbh = C4::Context->dbh;
|
||||
my $sthtemp = $dbh->prepare("Select flags, branchcode from borrowers where borrowernumber = ?");
|
||||
$sthtemp->execute($loggedinuser);
|
||||
my ($flags, $homebranch)=$sthtemp->fetchrow;
|
||||
#FIXME : END added by hdl on July,14 2005
|
||||
|
||||
if ($op eq 'mod') {
|
||||
my $subscriptionid = $query->param('subscriptionid');
|
||||
my $subs = &getsubscription($subscriptionid);
|
||||
$auser = $subs->{'user'};
|
||||
$librarian = $subs->{'librarian'};
|
||||
$cost = $subs->{'cost'};
|
||||
$aqbooksellerid = $subs->{'aqbooksellerid'};
|
||||
$aqbooksellername = $subs->{'aqbooksellername'};
|
||||
$bookfundid = $subs->{'bookfundid'};
|
||||
$aqbudgetid = $subs->{'aqbudgetid'};
|
||||
defined $aqbudgetid or $aqbudgetid='';
|
||||
$startdate = $subs->{'startdate'};
|
||||
$periodicity = $subs->{'periodicity'};
|
||||
$dow = $subs->{'dow'};
|
||||
$numberlength = $subs->{'numberlength'};
|
||||
$weeklength = $subs->{'weeklength'};
|
||||
$monthlength = $subs->{'monthlength'};
|
||||
$add1 = $subs->{'add1'};
|
||||
$every1 = $subs->{'every1'};
|
||||
$whenmorethan1 = $subs->{'whenmorethan1'};
|
||||
$setto1 = $subs->{'setto1'};
|
||||
$lastvalue1 = $subs->{'lastvalue1'};
|
||||
$innerloop1 = $subs->{'innerloop1'};
|
||||
$add2 = $subs->{'add2'};
|
||||
$every2 = $subs->{'every2'};
|
||||
$whenmorethan2 = $subs->{'whenmorethan2'};
|
||||
$setto2 = $subs->{'setto2'};
|
||||
$lastvalue2 = $subs->{'lastvalue2'};
|
||||
$innerloop2 = $subs->{'innerloop2'};
|
||||
$add3 = $subs->{'add3'};
|
||||
$every3 = $subs->{'every3'};
|
||||
$whenmorethan3 = $subs->{'whenmorethan3'};
|
||||
$setto3 = $subs->{'setto3'};
|
||||
$lastvalue3 = $subs->{'lastvalue3'};
|
||||
$innerloop3 = $subs->{'innerloop3'};
|
||||
$numberingmethod = $subs->{'numberingmethod'};
|
||||
$status = $subs->{status};
|
||||
$biblionumber = $subs->{'biblionumber'};
|
||||
$bibliotitle = $subs->{'bibliotitle'},
|
||||
$notes = $subs->{'notes'};
|
||||
$letter = $subs->{'letter'};
|
||||
defined $letter or $letter='';
|
||||
$template->param(
|
||||
$op => 1,
|
||||
user => $auser,
|
||||
librarian => $librarian,
|
||||
aqbooksellerid => $aqbooksellerid,
|
||||
aqbooksellername => $aqbooksellername,
|
||||
cost => $cost,
|
||||
aqbudgetid => $aqbudgetid,
|
||||
bookfundid => $bookfundid,
|
||||
startdate => format_date($startdate),
|
||||
periodicity => $periodicity,
|
||||
dow => $dow,
|
||||
numberlength => $numberlength,
|
||||
weeklength => $weeklength,
|
||||
monthlength => $monthlength,
|
||||
add1 => $add1,
|
||||
every1 => $every1,
|
||||
whenmorethan1 => $whenmorethan1,
|
||||
setto1 => $setto1,
|
||||
lastvalue1 => $lastvalue1,
|
||||
innerloop1 => $innerloop1,
|
||||
add2 => $add2,
|
||||
every2 => $every2,
|
||||
whenmorethan2 => $whenmorethan2,
|
||||
setto2 => $setto2,
|
||||
lastvalue2 => $lastvalue2,
|
||||
innerloop2 => $innerloop2,
|
||||
add3 => $add3,
|
||||
every3 => $every3,
|
||||
whenmorethan3 => $whenmorethan3,
|
||||
setto3 => $setto3,
|
||||
lastvalue3 => $lastvalue3,
|
||||
innerloop3 => $innerloop3,
|
||||
numberingmethod => $numberingmethod,
|
||||
status => $status,
|
||||
biblionumber => $biblionumber,
|
||||
bibliotitle => $bibliotitle,
|
||||
notes => $notes,
|
||||
letter => $letter,
|
||||
subscriptionid => $subscriptionid,
|
||||
);
|
||||
$template->param(
|
||||
"periodicity$periodicity" => 1,
|
||||
"dow$dow" => 1,
|
||||
);
|
||||
}
|
||||
##FIXME : Looks like never used.
|
||||
(my $temp,@budgets) = bookfunds($homebranch);
|
||||
# find default value & set it for the template
|
||||
for (my $i=0;$i<$#budgets;$i++) {
|
||||
if ($budgets[$i]->{'aqbudgetid'} eq $aqbudgetid) {
|
||||
$budgets[$i]->{'selected'}=1;
|
||||
}
|
||||
}
|
||||
$template->param(budgets => \@budgets);
|
||||
#FIXME : END Added by hdl on July, 14 2005
|
||||
|
||||
my @letterlist = GetLetterList('serial');
|
||||
for (my $i=0;$i<=$#letterlist;$i++) {
|
||||
$letterlist[$i]->{'selected'} =1 if $letterlist[$i]->{'code'} eq $letter;
|
||||
}
|
||||
$template->param(letters => \@letterlist);
|
||||
|
||||
if ($op eq 'addsubscription') {
|
||||
my $auser = $query->param('user');
|
||||
my $aqbooksellerid = $query->param('aqbooksellerid');
|
||||
my $cost = $query->param('cost');
|
||||
my $aqbudgetid = $query->param('aqbudgetid');
|
||||
my $startdate = $query->param('startdate');
|
||||
my $periodicity = $query->param('periodicity');
|
||||
my $dow = $query->param('dow');
|
||||
my $numberlength = $query->param('numberlength');
|
||||
my $weeklength = $query->param('weeklength');
|
||||
my $monthlength = $query->param('monthlength');
|
||||
my $add1 = $query->param('add1');
|
||||
my $every1 = $query->param('every1');
|
||||
my $whenmorethan1 = $query->param('whenmorethan1');
|
||||
my $setto1 = $query->param('setto1');
|
||||
my $lastvalue1 = $query->param('lastvalue1');
|
||||
my $add2 = $query->param('add2');
|
||||
my $every2 = $query->param('every2');
|
||||
my $whenmorethan2 = $query->param('whenmorethan2');
|
||||
my $setto2 = $query->param('setto2');
|
||||
my $lastvalue2 = $query->param('lastvalue2');
|
||||
my $add3 = $query->param('add3');
|
||||
my $every3 = $query->param('every3');
|
||||
my $whenmorethan3 = $query->param('whenmorethan3');
|
||||
my $setto3 = $query->param('setto3');
|
||||
my $lastvalue3 = $query->param('lastvalue3');
|
||||
my $numberingmethod = $query->param('numberingmethod');
|
||||
my $status = 1;
|
||||
my $biblionumber = $query->param('biblionumber');
|
||||
my $notes = $query->param('notes');
|
||||
my $letter = $query->param('letter');
|
||||
my $subscriptionid = newsubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,
|
||||
$startdate,$periodicity,$dow,$numberlength,$weeklength,$monthlength,
|
||||
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,
|
||||
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,
|
||||
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,
|
||||
$numberingmethod, $status, $notes, $letter
|
||||
);
|
||||
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");
|
||||
} else {
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
}
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
#!/usr/bin/perl
|
||||
# WARNING: 4-character tab stops here
|
||||
|
||||
# Copyright 2000-2002 Katipo Communications
|
||||
#
|
||||
# This file is part of Koha.
|
||||
#
|
||||
# Koha is free software; you can redistribute it and/or modify it under the
|
||||
# terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
|
||||
# Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
use strict;
|
||||
require Exporter;
|
||||
use CGI;
|
||||
use C4::Koha;
|
||||
use C4::Auth;
|
||||
use HTML::Template;
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::SearchMarc;
|
||||
|
||||
my $query=new CGI;
|
||||
my $type=$query->param('type');
|
||||
my $op = $query->param('op');
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
||||
my $startfrom=$query->param('startfrom');
|
||||
$startfrom=0 if(!defined $startfrom);
|
||||
my ($template, $loggedinuser, $cookie);
|
||||
my $resultsperpage;
|
||||
|
||||
if ($op eq "do_search") {
|
||||
my @marclist = $query->param('marclist');
|
||||
my @and_or = $query->param('and_or');
|
||||
my @excluding = $query->param('excluding');
|
||||
my @operator = $query->param('operator');
|
||||
my @value = $query->param('value');
|
||||
|
||||
$resultsperpage= $query->param('resultsperpage');
|
||||
$resultsperpage = 19 if(!defined $resultsperpage);
|
||||
my $orderby = $query->param('orderby');
|
||||
|
||||
# builds tag and subfield arrays
|
||||
my @tags;
|
||||
|
||||
foreach my $marc (@marclist) {
|
||||
if ($marc) {
|
||||
my ($tag,$subfield) = MARCfind_marc_from_kohafield($dbh,$marc);
|
||||
if ($tag) {
|
||||
push @tags,$dbh->quote("$tag$subfield");
|
||||
} else {
|
||||
push @tags, $dbh->quote(substr($marc,0,4));
|
||||
}
|
||||
} else {
|
||||
push @tags, "";
|
||||
}
|
||||
}
|
||||
my ($results,$total) = catalogsearch($dbh, \@tags,\@and_or,
|
||||
\@excluding, \@operator, \@value,
|
||||
$startfrom*$resultsperpage, $resultsperpage,$orderby);
|
||||
|
||||
($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/result.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => {borrowers => 1},
|
||||
flagsrequired => {catalogue => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
# multi page display gestion
|
||||
my $displaynext=0;
|
||||
my $displayprev=$startfrom;
|
||||
if(($total - (($startfrom+1)*($resultsperpage))) > 0 ){
|
||||
$displaynext = 1;
|
||||
}
|
||||
|
||||
my @field_data = ();
|
||||
|
||||
|
||||
for(my $i = 0 ; $i <= $#marclist ; $i++)
|
||||
{
|
||||
push @field_data, { term => "marclist", val=>$marclist[$i] };
|
||||
push @field_data, { term => "and_or", val=>$and_or[$i] };
|
||||
push @field_data, { term => "excluding", val=>$excluding[$i] };
|
||||
push @field_data, { term => "operator", val=>$operator[$i] };
|
||||
push @field_data, { term => "value", val=>$value[$i] };
|
||||
}
|
||||
|
||||
my @numbers = ();
|
||||
|
||||
if ($total>$resultsperpage)
|
||||
{
|
||||
for (my $i=1; $i<$total/$resultsperpage+1; $i++)
|
||||
{
|
||||
if ($i<16)
|
||||
{
|
||||
my $highlight=0;
|
||||
($startfrom==($i-1)) && ($highlight=1);
|
||||
push @numbers, { number => $i,
|
||||
highlight => $highlight ,
|
||||
searchdata=> \@field_data,
|
||||
startfrom => ($i-1)};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $from = $startfrom*$resultsperpage+1;
|
||||
my $to;
|
||||
|
||||
if($total < (($startfrom+1)*$resultsperpage))
|
||||
{
|
||||
$to = $total;
|
||||
} else {
|
||||
$to = (($startfrom+1)*$resultsperpage);
|
||||
}
|
||||
$template->param(result => $results,
|
||||
startfrom=> $startfrom,
|
||||
displaynext=> $displaynext,
|
||||
displayprev=> $displayprev,
|
||||
resultsperpage => $resultsperpage,
|
||||
startfromnext => $startfrom+1,
|
||||
startfromprev => $startfrom-1,
|
||||
searchdata=>\@field_data,
|
||||
total=>$total,
|
||||
from=>$from,
|
||||
to=>$to,
|
||||
numbers=>\@numbers,
|
||||
);
|
||||
} else {
|
||||
($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/subscription-bib-search.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => {catalogue => 1},
|
||||
debug => 1,
|
||||
});
|
||||
my $sth=$dbh->prepare("Select itemtype,description from itemtypes order by description");
|
||||
$sth->execute;
|
||||
my @itemtype;
|
||||
my %itemtypes;
|
||||
push @itemtype, "";
|
||||
$itemtypes{''} = "";
|
||||
while (my ($value,$lib) = $sth->fetchrow_array) {
|
||||
push @itemtype, $value;
|
||||
$itemtypes{$value}=$lib;
|
||||
}
|
||||
|
||||
my $CGIitemtype=CGI::scrolling_list( -name => 'value',
|
||||
-values => \@itemtype,
|
||||
-labels => \%itemtypes,
|
||||
-size => 1,
|
||||
-multiple => 0 );
|
||||
$sth->finish;
|
||||
|
||||
$template->param(
|
||||
CGIitemtype => $CGIitemtype,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
# Print the page
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 4
|
||||
# End:
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Koha;
|
||||
use C4::Date;
|
||||
use C4::Bull;
|
||||
use C4::Output;
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::Context;
|
||||
use HTML::Template;
|
||||
|
||||
my $query = new CGI;
|
||||
my $op = $query->param('op') || '';
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $sth;
|
||||
# my $id;
|
||||
my ($template, $loggedinuser, $cookie, $subs, $user, $sessionID, $flags);
|
||||
my ($subscriptionid,$auser,$librarian,$cost,$aqbooksellerid, $aqbooksellername,$aqbudgetid, $bookfundid, $startdate, $periodicity,
|
||||
$dow, $numberlength, $weeklength, $monthlength,
|
||||
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
|
||||
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
|
||||
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
|
||||
$numberingmethod, $status, $biblionumber, $bibliotitle, $notes,$letter);
|
||||
|
||||
$subscriptionid = $query->param('subscriptionid');
|
||||
|
||||
if ($op eq 'modsubscription') {
|
||||
$auser = $query->param('user');
|
||||
$librarian = $query->param('librarian');
|
||||
$cost = $query->param('cost');
|
||||
$aqbooksellerid = $query->param('aqbooksellerid');
|
||||
$biblionumber = $query->param('biblionumber');
|
||||
$aqbudgetid = $query->param('aqbudgetid');
|
||||
$startdate = format_date_in_iso($query->param('startdate'));
|
||||
$periodicity = $query->param('periodicity');
|
||||
$dow = $query->param('dow');
|
||||
$numberlength = $query->param('numberlength');
|
||||
$weeklength = $query->param('weeklength');
|
||||
$monthlength = $query->param('monthlength');
|
||||
$add1 = $query->param('add1');
|
||||
$every1 = $query->param('every1');
|
||||
$whenmorethan1 = $query->param('whenmorethan1');
|
||||
$setto1 = $query->param('setto1');
|
||||
$lastvalue1 = $query->param('lastvalue1');
|
||||
$innerloop1 = $query->param('innerloop1');
|
||||
$add2 = $query->param('add2');
|
||||
$every2 = $query->param('every2');
|
||||
$whenmorethan2 = $query->param('whenmorethan2');
|
||||
$setto2 = $query->param('setto2');
|
||||
$lastvalue2 = $query->param('lastvalue2');
|
||||
$innerloop2 = $query->param('innerloop2');
|
||||
$add3 = $query->param('add3');
|
||||
$every3 = $query->param('every3');
|
||||
$whenmorethan3 = $query->param('whenmorethan3');
|
||||
$setto3 = $query->param('setto3');
|
||||
$lastvalue3 = $query->param('lastvalue3');
|
||||
$innerloop3 = $query->param('innerloop3');
|
||||
$numberingmethod = $query->param('numberingmethod');
|
||||
$status = 1;
|
||||
$notes = $query->param('notes');
|
||||
$letter = $query->param('letter');
|
||||
|
||||
&modsubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$startdate,
|
||||
$periodicity,$dow,$numberlength,$weeklength,$monthlength,
|
||||
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
|
||||
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
|
||||
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
|
||||
$numberingmethod, $status, $biblionumber, $notes, $letter, $subscriptionid);
|
||||
}
|
||||
|
||||
if ($op eq 'del') {
|
||||
&delsubscription($subscriptionid);
|
||||
print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=../bull-home.pl\"></html>";
|
||||
exit;
|
||||
|
||||
}
|
||||
$subs = &getsubscription($subscriptionid);
|
||||
# html'ize distributedto
|
||||
$subs->{distributedto}=~ s/\n/<br \/>/g;
|
||||
my ($totalissues,@serialslist) = getserials($subscriptionid);
|
||||
$totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscription (only 1 issue)
|
||||
|
||||
($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/subscription-detail.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => {catalogue => 1},
|
||||
debug => 1,
|
||||
});
|
||||
|
||||
($user, $cookie, $sessionID, $flags) = checkauth($query, 0, {catalogue => 1}, "intranet");
|
||||
|
||||
$template->param(
|
||||
user => $subs->{auser},
|
||||
librarian => $subs->{librarian},
|
||||
aqbooksellerid => $subs->{aqbooksellerid},
|
||||
aqbooksellername => $subs->{aqbooksellername},
|
||||
cost => $subs->{cost},
|
||||
aqbudgetid => $subs->{aqbudgetid},
|
||||
bookfundid => $subs->{bookfundid},
|
||||
startdate => format_date($subs->{startdate}),
|
||||
periodicity => $subs->{periodicity},
|
||||
dow => $subs->{dow},
|
||||
numberlength => $subs->{numberlength},
|
||||
weeklength => $subs->{weeklength},
|
||||
monthlength => $subs->{monthlength},
|
||||
add1 => $subs->{add1},
|
||||
every1 => $subs->{every1},
|
||||
whenmorethan1 => $subs->{whenmorethan1},
|
||||
innerloop1 => $subs->{innerloop1},
|
||||
setto1 => $subs->{setto1},
|
||||
lastvalue1 => $subs->{lastvalue1},
|
||||
add2 => $subs->{add2},
|
||||
every2 => $subs->{every2},
|
||||
whenmorethan2 => $subs->{whenmorethan2},
|
||||
setto2 => $subs->{setto2},
|
||||
lastvalue2 => $subs->{lastvalue2},
|
||||
innerloop2 => $subs->{innerloop2},
|
||||
add3 => $subs->{add3},
|
||||
every3 => $subs->{every3},
|
||||
whenmorethan3 => $subs->{whenmorethan3},
|
||||
setto3 => $subs->{setto3},
|
||||
lastvalue3 => $subs->{lastvalue3},
|
||||
innerloop3 => $subs->{innerloop3},
|
||||
numberingmethod => $subs->{numberingmethod},
|
||||
status => $subs->{status},
|
||||
biblionumber => $subs->{biblionumber},
|
||||
bibliotitle => $subs->{bibliotitle},
|
||||
notes => $subs->{notes},
|
||||
letter => $subs->{letter},
|
||||
distributedto => $subs->{distributedto},
|
||||
subscriptionid => $subs->{subscriptionid},
|
||||
serialslist => \@serialslist,
|
||||
totalissues => $totalissues,
|
||||
);
|
||||
$template->param(
|
||||
"periodicity$subs->{periodicity}" => 1,
|
||||
"arrival$subs->{dow}" => 1,
|
||||
);
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
Loading…
Reference in New Issue