Koha/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tmpl
Ryan Higgins 56b87af4db Labels update- print any marc field and add csv output.
Make any MARC data available to labels module;
Also add a csv output option, allowing export of relevant
biblio data do a 3rd party label layout application.
Note: This patch REQUIRES a forthcoming updatedatabase patch !

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-22 17:54:02 -05:00

300 lines
11 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha &rsaquo; Tools &rsaquo; Labels</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script>
function jscss(action,o,c1,c2)
{
// from: http://onlinetools.org/articles/unobtrusivejavascript/cssjsseparation.html
switch (action){
case 'swap':
o.className=!jscss('check',o,c1)?o.className.replace(c2,c1): o.className.replace(c1,c2);
break;
case 'add':
if(!jscss('check',o,c1)){o.className+=o.className?' '+c1:c1;}
break;
case 'remove':
var rep=o.className.match(' '+c1)?' '+c1:c1;
o.className=o.className.replace(rep,'');
break;
case 'check':
return new RegExp('\\b'+c1+'\\b').test(o.className)
break;
}
}
function chooselayoutspec(rb) {
stringspec=document.getElementById("formatstring");
if(rb.value == 'layout_string') {
stringspec.disabled=0;
jscss('remove',document.getElementById('layout_string'),'disabled','');
jscss('add',document.getElementById('layout_tx'),'disabled','');
} else {
stringspec.disabled=1;
jscss('remove',document.getElementById('layout_tx'),'disabled','');
jscss('add',document.getElementById('layout_string'),'disabled','');
}
}
</script>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <a href="/cgi-bin/koha/labels/label-home.pl">Labels</a> &rsaquo; <!-- TMPL_IF NAME="layout_id" -->Edit<!-- TMPL_ELSE -->Create<!-- /TMPL_IF --> Label Layout</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="tools-labels-toolbar.inc" -->
<form name="input" action="/cgi-bin/koha/labels/label-manager.pl" method="get">
<fieldset class="rows">
<legend><!-- TMPL_IF NAME="layout_id" -->Edit<!-- TMPL_ELSE -->Create<!-- /TMPL_IF --> Label Layout</legend>
<ol>
<li><label for="layoutname">Layout Name</label>
<input type="text" name="layoutname" id="layoutname" size="20" value="<!-- TMPL_VAR NAME="layoutname" -->" /></li>
<li><label for="barcodetype">Choose Barcode Type (encoding)</label>
<select name="barcodetype" id="barcodetype">
<!-- TMPL_LOOP NAME="barcode_types" -->
<!-- TMPL_IF NAME="active" -->
<option value="<!-- TMPL_VAR NAME="code" -->" selected="selected"><!-- TMPL_VAR NAME="desc" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="code" -->"><!-- TMPL_VAR NAME="desc" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select></li>
<li><label for="printingtype">Choose Layout Type</label>
<select name="printingtype" id="printingtype">
<!-- TMPL_LOOP NAME="printingtypes" -->
<!-- TMPL_IF NAME="active" -->
<option value="<!-- TMPL_VAR NAME="code" -->" selected="selected"><!-- TMPL_VAR NAME="desc" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="code" -->"><!-- TMPL_VAR NAME="desc" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select></li>
<li>
<fieldset class="rows">
<legend>
Bibliographic Data to Print
</legend>
<input type="radio" name="layoutchoice" value="layout_tx" <!-- TMPL_UNLESS NAME="layout_string" -->checked="checked"<!-- /TMPL_UNLESS --> onclick="chooselayoutspec(this);" >Choose Order Of Text Fields to Print</input>
<fieldset id="layout_tx" <!-- TMPL_IF NAME="layout_string" -->class="disabled"<!-- /TMPL_IF -->>
<table summary="fields to print">
<tr>
<td>
<select name="tx_title" id="tx_title">
<!-- TMPL_LOOP Name="tx_title" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="num" -->">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
<label for="tx_title">Title</label>
</td>
<td>
<select name="tx_subtitle" id="tx_subtitle">
<!-- TMPL_LOOP Name="tx_subtitle" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="num" -->">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
<label for="tx_subtitle">Subtitle</label>
</td>
<td>
<select name="tx_author" id="tx_author">
<!-- TMPL_LOOP Name="tx_author" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="num" -->">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
<label for="tx_author">Author</label>
</td>
</tr>
<tr>
<td>
<select name="tx_isbn" id="tx_isbn">
<!-- TMPL_LOOP Name="tx_isbn" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="num" -->">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
<label for="tx_isbn">ISBN</label>
</td>
<td>
<select name="tx_issn" id="tx_issn">
<!-- TMPL_LOOP Name="tx_issn" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="num" -->">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
<label for="tx_issn">ISSN</label>
</td>
<td>
<select name="tx_itemtype" id="tx_itemtype">
<!-- TMPL_LOOP Name="tx_itemtype" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="num" -->">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
<label for="tx_itemtype">Itemtype</label>
</td>
</tr>
<tr>
<td>
<select name="tx_barcode">
<!-- TMPL_LOOP Name="tx_barcode" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="num" -->">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
<label for="tx_barcode">Barcode (as text)</label>
</td>
<td>
<select name="tx_classif" id="tx_classif">
<!-- TMPL_LOOP Name="tx_classif" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="num" -->">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
<label for="tx_classif">Classification</label>
</td>
<td>
<select name="tx_subclass" id="tx_subclass">
<!-- TMPL_LOOP Name="tx_subclass" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="num" -->">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
<label for="tx_subclass">Subclass</label>
</td>
</tr>
<tr>
<td>
<select name="tx_itemcallnumber" id="tx_itemcallnumber">
<!-- TMPL_LOOP Name="tx_itemcallnumber" -->
<!-- TMPL_IF Name="selected" -->
<option value="<!-- TMPL_VAR Name="num" -->" selected="selected">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR Name="num" -->">
<!-- TMPL_VAR Name="num" -->
</option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
<label for="tx_itemcallnumber">Call Number</label>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</fieldset>
<br />
<input type="radio" name="layoutchoice" value="layout_string" <!-- TMPL_IF NAME="layout_string" -->checked="checked"<!-- /TMPL_IF --> onclick="chooselayoutspec(this);"> List Fields </input>
<fieldset id="layout_string" <!-- TMPL_UNLESS NAME="layout_string" -->class="disabled"<!-- /TMPL_UNLESS -->>
<label for="layoutname">Data Fields</label>
<input type="text" name="formatstring" id="formatstring" size="60" value="<!-- TMPL_VAR NAME="formatstring" -->" <!-- TMPL_UNLESS NAME="layout_string" -->disabled="true"<!-- /TMPL_UNLESS --> />
<div class="help">
<p>Enter a comma separated list of fields to print. You may include any <em>Koha field</em> or MARC subfield.</p>
<p>See online help for advanced options</p>
<p>ex: barcode, itemcallnumber, title, "050a 050b", 300a </p>
</div>
</fieldset>
</fieldset>
</li>
<li><label for="startlabel">Start printing from Label number: </label><input type="text" name="startlabel" id="startlabel" size="1" value="<!-- TMPL_IF NAME="startlabel" --><!-- TMPL_VAR NAME="startlabel" --><!-- TMPL_ELSE -->1<!-- /TMPL_IF -->" /></li>
<li><label for="guidebox">Draw Guide Boxes</label>
<!-- TMPL_IF NAME="guidebox"-->
<input type="checkbox" name="guidebox" id="guidebox" value="1" checked="checked" />
<!-- TMPL_ELSE -->
<input type="checkbox" name="guidebox" id="guidebox" value="1" />
<!-- /TMPL_IF --></li>
</ol>
</fieldset>
<fieldset class="action">
<input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/labels/label-home.pl">Cancel</a>
<input type="hidden" name="op" value="<!-- TMPL_IF NAME="layout_id" -->save<!-- TMPL_ELSE -->add<!-- /TMPL_IF -->_layout" />
<input type="hidden" name="layout_id" value="<!-- TMPL_VAR NAME="layout_id" -->" />
</fieldset>
</form>
</div>
</div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->