-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha › Tools › 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>
+ <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
+ <title>Koha › Tools › Labels</title>
+ <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+ <script type="text/JavaScript" language="JavaScript">
+ //<![CDATA[
+ $(document).ready(function() {
+ $("input[name='layout_choice']").change( function() { layout_method() } );
+ layout_method();
+ });
+ function layout_method() {
+ if( $("input[name='layout_choice']:checked").val() == 'layout_string' ) {
+ $('#layout_table').hide();
+ $('#layout_string').show();
+ } else {
+ $('#layout_table').show();
+ $('#layout_string').hide();
+ }
+ }
+ //]]>
+ </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> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="/cgi-bin/koha/labels/label-home.pl">Labels</a> › <!-- 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> </td>
- <td> </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" -->
+ <!-- TMPL_INCLUDE NAME="header.inc" -->
+ <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
+ <div id="breadcrumbs">
+ <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
+ <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
+ <a href="/cgi-bin/koha/labels/label-home.pl">Labels Home</a> ›
+ <a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Mange Label Layouts</a> ›
+ <!-- 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">
+ <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.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="layout_name">Layout Name</label>
+ <input type="text" name="layout_name" id="layout_name" size="20" value="<!-- TMPL_VAR NAME="layout_name" -->" />
+ </li>
+ <li>
+ <label for="barcode_type">Choose Barcode Type (encoding)</label>
+ <select name="barcode_type" id="barcode_type">
+ <!-- TMPL_LOOP NAME="barcode_types" -->
+ <!-- TMPL_IF NAME="selected" -->
+ <option value="<!-- TMPL_VAR NAME="type" -->" selected="selected"><!-- TMPL_VAR NAME="name" --></option>
+ <!-- TMPL_ELSE -->
+ <option value="<!-- TMPL_VAR NAME="type" -->"><!-- TMPL_VAR NAME="name" --></option>
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_LOOP -->
+ </select>
+ </li>
+ <li>
+ <label for="printing_type">Choose Layout Type</label>
+ <select name="printing_type" id="printing_type">
+ <!-- TMPL_LOOP NAME="label_types" -->
+ <!-- TMPL_IF NAME="selected" -->
+ <option value="<!-- TMPL_VAR NAME="type" -->" selected="selected"><!-- TMPL_VAR NAME="name" --></option>
+ <!-- TMPL_ELSE -->
+ <option value="<!-- TMPL_VAR NAME="type" -->"><!-- TMPL_VAR NAME="name" --></option>
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_LOOP -->
+ </select>
+ </li>
+ <li>
+ <fieldset>
+ <legend>Bibliographic Data to Print</legend>
+ <ol>
+ <li class="radio"><!-- TMPL_IF NAME="layout_string" -->
+ <input type="radio" name="layout_choice" id="layout_choice_order" value="layout_table" checked="checked" /><label for="layout_choice_order">Choose Order Of Text Fields to Print</label>
+ <!-- TMPL_ELSE -->
+ <input type="radio" name="layout_choice" id="layout_choice_order" value="layout_table" /><label for="layout_choice_order">Choose Order Of Text Fields to Print</label>
+ <!-- /TMPL_IF -->
+ <div id="layout_table">
+ <!-- TMPL_LOOP NAME="field_table" -->
+ <p>
+ <!-- TMPL_LOOP NAME="text_fields" -->
+ <!-- TMPL_IF NAME="field_empty" -->
+ <!-- TMPL_ELSE -->
+ <select name="<!-- TMPL_VAR NAME="field_name" -->" id="<!-- TMPL_VAR NAME="field_name" escape="url" -->">
+ <!-- TMPL_LOOP NAME="order" -->
+ <!-- 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="<!-- TMPL_VAR NAME="field_name" escape="url" -->"><!-- TMPL_VAR NAME="field_label" --></label>
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_LOOP -->
+ </p>
+ <!-- /TMPL_LOOP -->
+ </div>
+ </li>
+ <!-- TMPL_UNLESS NAME="layout_string" -->
+ <li class="radio"><input type="radio" id="layout_choice_list" name="layout_choice" value="layout_string" checked="checked" /> <label for="layout_choice_list">List Fields</label></li>
+ <!-- TMPL_ELSE -->
+ <li class="radio"><input type="radio" id="layout_choice_list" name="layout_choice" value="layout_string" /> <label for="layout_choice_list">List Fields</label></li>
+ <!-- /TMPL_UNLESS -->
+ <li> <fieldset id="layout_string" class="brief">
+ <label for="format_string">Data Fields</label>
+ <input type="text" name="format_string" id="format_string" size="80" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="format_string" -->" />
+ <div class="hint">
+ <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></li>
+ </ol>
+ </fieldset>
+ </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>
+ <li>
+ <label for="callnum_split">Split Call Numbers</label>
+ <!-- TMPL_IF NAME="callnum_split"-->
+ <input type="checkbox" name="callnum_split" id="callnum_split" value="1" checked="checked" />
+ <!-- TMPL_ELSE -->
+ <input type="checkbox" name="callnum_split" id="callnum_split" value="1" />
+ <!-- /TMPL_IF -->
+ </li>
+ <li>
+ <label for="text_justify">Text Justification</label>
+ <select name="text_justify" id="text_justify">
+ <!-- TMPL_LOOP Name="text_justification_types" -->
+ <!-- TMPL_IF Name="selected" -->
+ <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
+ <!-- TMPL_ELSE -->
+ <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_LOOP -->
+ </select>
+ </li>
+ <li>
+ <label for="font">Font</label>
+ <select name="font" id="font">
+ <!-- TMPL_LOOP Name="font_types" -->
+ <!-- TMPL_IF Name="selected" -->
+ <option value="<!-- TMPL_VAR Name="type" -->" selected="selected"><!-- TMPL_VAR Name="name" --></option>
+ <!-- TMPL_ELSE -->
+ <option value="<!-- TMPL_VAR Name="type" -->"><!-- TMPL_VAR Name="name" --></option>
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_LOOP -->
+ </select>
+ </li>
+ <li>
+ <label for="font_size">Font Size</label>
+ <input type="text" name="font_size" id="font_size" size="2" value="<!-- TMPL_VAR ESCAPE='HTML' NAME="font_size" -->" />
+ </li>
+ </ol>
+ </fieldset>
+ <fieldset class="action">
+ <input type="submit" value="Save" />
+ <a class="cancel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Cancel</a>
+ <input type="hidden" name="op" value="save" />
+ <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" -->