[40/40] Removing depricated files
This commit is contained in:
parent
e1a4e7c756
commit
dcfaf1121f
15 changed files with 0 additions and 2771 deletions
1494
C4/Labels.pm
1494
C4/Labels.pm
File diff suppressed because it is too large
Load diff
|
@ -1,29 +0,0 @@
|
|||
<div id="toolbar">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
// prepare DOM for YUI Toolbar
|
||||
|
||||
$(document).ready(function() {
|
||||
yuiToolbar();
|
||||
});
|
||||
|
||||
// YUI Toolbar Functions
|
||||
|
||||
function yuiToolbar() {
|
||||
new YAHOO.widget.Button("newlabel");
|
||||
new YAHOO.widget.Button("newtemplate");
|
||||
new YAHOO.widget.Button("newprofile");
|
||||
new YAHOO.widget.Button("newlabelbatch");
|
||||
new YAHOO.widget.Button("newpatroncardbatch");
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
<ul class="toolbar">
|
||||
<li><a id="newlabel" href="/cgi-bin/koha/labels/label-edit-layout.pl">New Layout</a></li>
|
||||
<li><a id="newtemplate" href="/cgi-bin/koha/labels/label-create-template.pl?op=blank">New Label Template</a></li>
|
||||
<li><a id="newprofile" href="/cgi-bin/koha/labels/label-create-profile.pl?op=blank">New Printer Profile</a></li>
|
||||
<li><a id="newlabelbatch" href="/cgi-bin/koha/labels/label-manager.pl?op=add_batch&type=labels">New Label Batch</a></li>
|
||||
<li><a id="newpatroncardbatch" href="/cgi-bin/koha/labels/label-manager.pl?op=add_batch&type=patroncards">New Patron Card Batch</a></li>
|
||||
</ul></div>
|
|
@ -1,255 +0,0 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha › Tools › Labels › Create Layout</title>
|
||||
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
</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> › Create Layout</div>
|
||||
|
||||
<div id="doc3" class="yui-t2">
|
||||
|
||||
<div id="bd">
|
||||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="label-status.inc" -->
|
||||
<form name="input" action="/cgi-bin/koha/labels/label-manager.pl" method="get">
|
||||
|
||||
<fieldset class="rows">
|
||||
<legend>Create 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><fieldset>
|
||||
<legend>Choose Order Of Fields to Print</legend>
|
||||
<table summary="fields to print">
|
||||
<tr>
|
||||
<td>
|
||||
<select name="tx_title" id="tx_title">
|
||||
<option value="0" selected="selected"></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
<label for="tx_title">Title</label>
|
||||
</td>
|
||||
<td>
|
||||
<select name="tx_subtitle" id="tx_subtitle">
|
||||
<option value="0" selected="selected"></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
<label for="tx_subtitle">Subtitle</label>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<select name="tx_author" id="tx_author">
|
||||
<option value="0" selected="selected"></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
<label for="tx_author">Author</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select name="tx_isbn" id="tx_isbn">
|
||||
<option value="0" selected="selected"></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
<label for="tx_isbn">ISBN</label>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<select name="tx_issn" id="tx_issn">
|
||||
<option value="0" selected="selected"></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
<label for="tx_issn">ISSN</label>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<select name="tx_itemtype" id="tx_itemtype">
|
||||
<option value="0" selected="selected"></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
<label for="tx_itemtype">Itemtype</label>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select name="tx_dewey" id="tx_dewey">
|
||||
<option value="0" selected="selected"></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
<label for="tx_dewey">Dewey</label>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<select name="tx_barcode" id="tx_barcode">
|
||||
<option value="0" selected="selected"></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
<label for="tx_barcode">Barcode</label>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<select name="tx_classif" id="tx_classif">
|
||||
<option value="0" selected="selected"></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
<label for="tx_classif">Classification</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select name="tx_subclass" id="tx_subclass">
|
||||
<option value="0" selected="selected"></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
<label for="tx_subclass">Sub-Class</label>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<select name="tx_itemcallnumber" id="tx_itemcallnumber">
|
||||
<option value="0" selected="selected"></option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
<option value="9">9</option>
|
||||
<option value="10">10</option>
|
||||
</select>
|
||||
<label for="tx_itemcallnumber">Call Number</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table></fieldset></li>
|
||||
|
||||
<li><label for="barcodetype">Choose Barcode Type: </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>
|
||||
<label for="startlabel">Start printing from Label number: </label> <input type="text" name="startlabel" id="startlabel" size="2" value="1" /></li>
|
||||
|
||||
|
||||
<li><label for="guidebox">Draw Guide Boxes: </label><input type="checkbox" id="guidebox" name="guidebox" value="1" /></li></ol></fieldset>
|
||||
<fieldset class="action"><input type="hidden" name="op" value="add_layout" />
|
||||
<input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/labels/label-home.pl">Cancel</a></fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-b">
|
||||
<!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
|
@ -1,95 +0,0 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
||||
<title>Koha › Tools › Labels</title>
|
||||
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function confirm_deletion(biblionumber,itemnumber) {
|
||||
var original = $("#row"+itemnumber).attr("class");
|
||||
$("#row"+itemnumber).attr("class","confirm");
|
||||
var is_confirmed = confirm(_('Are you sure you want to delete this profile?'));
|
||||
if (is_confirmed) {
|
||||
window.location = "additem.pl?op=delitem&biblionumber="+biblionumber+"&itemnumber="+itemnumber;
|
||||
} else {
|
||||
$("#row"+itemnumber).attr("class","");
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</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> › <a href="/cgi-bin/koha/labels/label-profiles.pl">Printer Profiles</a> › Create Printer Profile</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" -->
|
||||
|
||||
|
||||
<h3>Create Printer Profile</h3>
|
||||
<!-- TMPL_IF NAME="dberror" -->
|
||||
<div class="yui-g">
|
||||
<div class="dialog alert"><h3>Error Creating Profile</h3>
|
||||
<p>
|
||||
<!-- TMPL_VAR NAME="errmsg" -->
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /TMPL_IF -->
|
||||
<div class="yui-g">
|
||||
<form name="input" action="/cgi-bin/koha/labels/label-create-profile.pl" method="get">
|
||||
<fieldset class="rows"><legend>Profile Settings</legend>
|
||||
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<label for="printername">Printer Name:</label> <input type="text" size="40" name="printername" id="printername" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="paper_bin">Paper Bin:</label><input type="text" size="20" name="paper_bin" id="paper_bin" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="tmpl_id">Template Code: </label><select id="tmpl_id" name="tmpl_id">
|
||||
<!-- TMPL_LOOP NAME="tmpllist" -->
|
||||
<option value="<!-- TMPL_VAR NAME="tmpl_id" -->"><!-- TMPL_VAR NAME="tmpl_code" --></option>
|
||||
<!-- /TMPL_LOOP --></select>
|
||||
</li>
|
||||
<li>
|
||||
<fieldset><legend>Offset:</legend>
|
||||
<ol><li><label for="offset_horz">Horizontal:</label><input type="text" size="2" name="offset_horz" id="offset_horz" /></li>
|
||||
<li><label for="offset_vert">Vertical:</label><input type="text" size="2" name="offset_vert" id="offset_vert" /></li></ol></fieldset>
|
||||
</li>
|
||||
<li>
|
||||
<fieldset><legend>Creep:</legend>
|
||||
<ol><li>
|
||||
<label for="creep_horz">Horizontal:</label><input type="text" size="2" name="creep_horz" id="creep_horz" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="creep_vert">Vertical:</label><input type="text" size="2" name="creep_vert" id="creep_vert" />
|
||||
</li></ol>
|
||||
</fieldset>
|
||||
</li>
|
||||
<li><label for="unit">Units: </label><select id="unit" name="unit">
|
||||
<!-- TMPL_LOOP NAME="unit" -->
|
||||
<option value="<!-- TMPL_VAR NAME="unit" -->"><!-- TMPL_VAR NAME="desc" --></option>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
</li>
|
||||
</ol>
|
||||
</fieldset>
|
||||
<fieldset class="action">
|
||||
<input type="submit" name="op" value="Save" /> <a class="cancel" href="/cgi-bin/koha/labels/label-profiles.pl">Cancel</a>
|
||||
</fieldset></form></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="yui-b">
|
||||
<!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
|
@ -1,86 +0,0 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha › Tools › Labels</title>
|
||||
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
</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> › Create Label Template</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-create-template.pl" method="get">
|
||||
|
||||
<fieldset class="rows">
|
||||
<legend>Create Label Template</legend>
|
||||
|
||||
<ol>
|
||||
|
||||
<li><label for="tmpl_code">Template Code:</label> <input type="text" size="40" name="tmpl_code" id="tmpl_code" /></li>
|
||||
<li><label for="tmpl_desc">Template Description:</label> <textarea cols="40" rows="3" name="tmpl_desc" id="tmpl_desc"></textarea></li>
|
||||
|
||||
<li><label for="units">Units: </label><select id="units" name="units">
|
||||
<!-- TMPL_LOOP NAME="units" -->
|
||||
<option value="<!-- TMPL_VAR NAME="unit" -->"><!-- TMPL_VAR NAME="desc" --></option>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select></li>
|
||||
<li>
|
||||
<label for="page_width">Page Width:</label><input type="text" size="2" name="page_width" id="page_width" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="page_height">Page Height:</label><input type="text" size="2" name="page_height" id="page_height" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="label_width">Label Width:</label><input type="text" size="2" name="label_width" id="label_width" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="label_height">Label Height:</label><input type="text" size="2" name="label_height" id="label_height" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="topmargin">Top Page Margin:</label><input type="text" size="2" name="topmargin" id="topmargin" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="leftmargin">Left Page Margin:</label><input type="text" size="2" name="leftmargin" id="leftmargin" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="cols">Number of Columns:</label><input type="text" size="2" name="cols" id="cols" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="rows">Number of Rows:</label><input type="text" size="2" name="rows" id="rows" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="colgap">Gap between Columns:</label><input type="text" size="2" name="colgap" id="colgap" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="rowgap">Gap between Rows:</label><input type="text" size="2" name="rowgap" id="rowgap" />
|
||||
</li>
|
||||
|
||||
<li><label for="fonts">Font: </label><select id="fonts" name="fonts">
|
||||
<!-- TMPL_LOOP NAME="fonts" -->
|
||||
<option value="<!-- TMPL_VAR NAME="font" -->"><!-- TMPL_VAR NAME="name" --></option>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select></li>
|
||||
|
||||
<li><label for="fontsize">Font Size:</label> <input type="text" id="fontsize" name="fontsize" size="1" value="" /></li>
|
||||
|
||||
<li><label for="active">Active: </label><input type="checkbox" id="active" name="active" /></li>
|
||||
</ol>
|
||||
</fieldset>
|
||||
<fieldset class="action">
|
||||
<input type="submit" name="op" value="Create" />
|
||||
<input type="submit" name="op" value="Cancel" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-b">
|
||||
<!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
|
@ -1,100 +0,0 @@
|
|||
<!-- 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[
|
||||
function DeleteConfirm() {
|
||||
var layout_id = selected_layout();
|
||||
if (layout_id>-1) {
|
||||
var msg = "Are you sure you want to delete template " + layout_id + "?"
|
||||
var answer = confirm(msg);
|
||||
if (answer) {
|
||||
window.location = "/cgi-bin/koha/labels/label-layout.pl?op=delete&layout_id=" + layout_id;
|
||||
}
|
||||
else {
|
||||
return; // abort delete
|
||||
}
|
||||
}
|
||||
else {
|
||||
return; // no layout selected
|
||||
};
|
||||
};
|
||||
function Edit() {
|
||||
var layout_id = selected_layout();
|
||||
if (layout_id>-1) {
|
||||
window.location = "/cgi-bin/koha/labels/label-edit-layout.pl?op=edit&layout_id=" + layout_id;
|
||||
}
|
||||
else {
|
||||
return; // no layout selected
|
||||
};
|
||||
};
|
||||
function selected_layout() {
|
||||
for (i=0;i<document.layouts.action.length;i++){
|
||||
if (document.layouts.action[i].checked==true){
|
||||
return(document.layouts.action[i].value);
|
||||
};
|
||||
};
|
||||
alert("Please select a layout.");
|
||||
return (-1);
|
||||
};
|
||||
//]]>
|
||||
</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> ›
|
||||
Label Layouts
|
||||
</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" -->
|
||||
<div class="yui-gc">
|
||||
<div class="yui-u first" id="manage-label-layouts">
|
||||
<form name="layouts">
|
||||
<h2>Currently Available Layouts</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Layout ID</th>
|
||||
<th>Layout</th>
|
||||
<th>Barcode Type</th>
|
||||
<th>Print Type</th>
|
||||
<th>Fields to Print</th>
|
||||
<th>Select</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP NAME="layout_loop" -->
|
||||
<tr>
|
||||
<td><!-- TMPL_VAR NAME="layout_id" --></td>
|
||||
<td><!-- TMPL_VAR NAME="layout_name" --></td>
|
||||
<td><!-- TMPL_VAR NAME="barcode_type" --></td>
|
||||
<td><!-- TMPL_VAR NAME="printing_type" --></td>
|
||||
<td><!-- TMPL_VAR NAME="format_string" --></td>
|
||||
<td align="center"><input type="radio" name="action" value="<!-- TMPL_VAR NAME="layout_id" -->"></td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
</form>
|
||||
<div style="margin: 10px 10px 10px 0px;">
|
||||
<span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="edit" onclick="Edit()" value="Edit"></span></span>
|
||||
<span class="yui-button yui-link-button"><span class="first-child"><input type="button" id="delete" onclick="DeleteConfirm()" value="Delete"></span></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- TMPL_IF NAME="error" -->
|
||||
<div class="yui-u">
|
||||
<div class="dialog alert">
|
||||
<strong>WARNING: An error was encountered and layout <!-- TMPL_VAR NAME="layout_id" --> was not deleted. Please have your system administrator check the syslog for details.</strong>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-b">
|
||||
<!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
|
@ -1,98 +0,0 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
||||
<title>Koha › Tools › Labels</title>
|
||||
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function confirm_deletion(prof_id) {
|
||||
var original = $("#row"+prof_id).attr("class");
|
||||
$("#row"+prof_id).attr("class","confirm");
|
||||
var is_confirmed = confirm(_('Are you sure you want to delete this item?'));
|
||||
if (is_confirmed) {
|
||||
window.location = "label-profiles.pl?op=delete&prof_id="+prof_id;
|
||||
} else {
|
||||
$("#row"+prof_id).attr("class","");
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</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> › Printer Profiles</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" -->
|
||||
|
||||
<div class="yui-g">
|
||||
<div class="yui-u first">
|
||||
<h2>Printer Profiles</h2>
|
||||
<form name="input" action="/cgi-bin/koha/labels/label-profiles.pl" method="get">
|
||||
<!-- TMPL_IF NAME="resultsloop" -->
|
||||
<table>
|
||||
<tr>
|
||||
<th>Printer Name</th>
|
||||
<th>Paper Bin</th>
|
||||
<th>Template Name</th>
|
||||
<th>Offset-Horizontal</th>
|
||||
<th>Offset-Vertical</th>
|
||||
<th>Creep-Horizontal</th>
|
||||
<th>Creep-Vertical</th>
|
||||
<th>Edit</th>
|
||||
<th>Delete</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP NAME="resultsloop" -->
|
||||
<tr>
|
||||
<td>
|
||||
<!-- TMPL_VAR NAME="printername" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR NAME="paper_bin" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR NAME="tmpl_code" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR NAME="offset_horz" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR NAME="offset_vert" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR NAME="creep_horz" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR NAME="creep_vert" -->
|
||||
</td>
|
||||
<td>
|
||||
<a href="/cgi-bin/koha/labels/label-edit-profile.pl?prof_id=<!-- TMPL_VAR NAME="prof_id" -->">Edit</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/cgi-bin/koha/labels/label-profiles.pl?" onclick="confirm_deletion(<!-- TMPL_VAR NAME="prof_id" -->); return false;">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
</form>
|
||||
<!-- TMPL_ELSE -->
|
||||
No Printer Profiles currently defined.
|
||||
</form>
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
<div class="yui-u">
|
||||
<!-- TMPL_INCLUDE NAME="label-status.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-b">
|
||||
<!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
|
@ -1,72 +0,0 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha › Tools › Labels</title>
|
||||
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
</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> › Label Templates </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" -->
|
||||
<div class="yui-g">
|
||||
<div class="yui-u first">
|
||||
|
||||
<!-- TMPL_IF NAME="resultsloop" -->
|
||||
<h2>Templates</h2>
|
||||
<form name="input" action="/cgi-bin/koha/labels/label-templates.pl" method="get">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Template Code</th>
|
||||
<th>Description</th>
|
||||
<th>Edit</th>
|
||||
<th>Delete</th>
|
||||
<th>Active</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP NAME="resultsloop" -->
|
||||
<tr>
|
||||
<td>
|
||||
<!-- TMPL_VAR NAME="tmpl_code" -->
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_VAR NAME="tmpl_desc" -->
|
||||
</td>
|
||||
<td>
|
||||
<a href="/cgi-bin/koha/labels/label-edit-template.pl?tmpl_id=<!-- TMPL_VAR NAME="tmpl_id" -->">Edit</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/cgi-bin/koha/labels/label-templates.pl?op=delete&tmpl_id=<!-- TMPL_VAR NAME="tmpl_id" -->">Delete</a>
|
||||
</td>
|
||||
<td>
|
||||
<!-- TMPL_IF NAME="active" -->
|
||||
<input type="radio" name="tmpl_id" value="<!-- TMPL_VAR NAME="tmpl_id" -->" checked="checked" />
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="radio" name="tmpl_id" value="<!-- TMPL_VAR NAME="tmpl_id" -->" />
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</table>
|
||||
<fieldset class="action">
|
||||
<input class="button" type="submit" value="Set Active Template" />
|
||||
<input type="hidden" name="op" value="set_active_template" /></fieldset>
|
||||
</form>
|
||||
<!-- /TMPL_IF -->
|
||||
</div>
|
||||
<div class="yui-u">
|
||||
<!-- TMPL_INCLUDE NAME="label-status.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-b">
|
||||
<!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
|
@ -1,73 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Output;
|
||||
use C4::Labels;
|
||||
use C4::Context;
|
||||
use HTML::Template::Pro;
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $query = new CGI;
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "labels/label-create-layout.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => { catalogue => 1 },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
||||
my $data = get_label_options();
|
||||
my $op = $query->param('op');
|
||||
my $layout_id = $query->param('layout_id');
|
||||
|
||||
my $active_template = GetActiveLabelTemplate();
|
||||
my @label_templates = GetAllLabelTemplates();
|
||||
my @printingtypes = get_printingtypes();
|
||||
my @layouts = get_layouts();
|
||||
my @barcode_types = get_barcode_types();
|
||||
my @batches = get_batches();
|
||||
|
||||
my @barcode_types = get_barcode_types($layout_id);
|
||||
my @printingtypes = get_printingtypes($layout_id);
|
||||
my $layout;
|
||||
$layout = get_layout($layout_id) if($layout_id);
|
||||
|
||||
$template->param( guidebox => 1 ) if ( $data->{'guidebox'} );
|
||||
$template->param( "papertype_$data->{'papertype'}" => 1 );
|
||||
$template->param( "$data->{'barcodetype'}_checked" => 1 );
|
||||
$template->param( "startrow" . $data->{'startrow'} . "_checked" => 1 );
|
||||
|
||||
$template->param(
|
||||
op => $op,
|
||||
active_template => $data->{'active_template'},
|
||||
label_templates => \@label_templates,
|
||||
barcode_types => \@barcode_types,
|
||||
printingtypes => \@printingtypes,
|
||||
layout_loop => \@layouts,
|
||||
batches => \@batches,
|
||||
|
||||
id => $data->{'id'},
|
||||
barcodetype => $data->{'barcodetype'},
|
||||
papertype => $data->{'papertype'},
|
||||
tx_author => $data->{'author'},
|
||||
tx_barcode => $data->{'barcode'},
|
||||
tx_title => $data->{'title'},
|
||||
tx_subtitle => $data->{'subtitle'},
|
||||
tx_isbn => $data->{'isbn'},
|
||||
tx_issn => $data->{'issn'},
|
||||
tx_itemtype => $data->{'itemtype'},
|
||||
tx_dewey => $data->{'dewey'},
|
||||
tx_class => $data->{'class'},
|
||||
tx_subclass => $data->{'subclass'},
|
||||
tx_itemcallnumber => $data->{'itemcallnumber'},
|
||||
startlabel => $data->{'startlabel'},
|
||||
|
||||
fontsize => $active_template->{'fontsize'},
|
||||
);
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
|
@ -1,103 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Labels;
|
||||
use HTML::Template::Pro;
|
||||
use POSIX;
|
||||
|
||||
use Data::Dumper;
|
||||
#use Smart::Comments;
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $query = new CGI;
|
||||
### $query
|
||||
|
||||
my $op = $query->param('op');
|
||||
|
||||
my $prof_id = $query->param('prof_id');
|
||||
my $printername = $query->param('printername');
|
||||
my $paper_bin = $query->param('paper_bin');
|
||||
my $tmpl_id = $query->param('tmpl_id');
|
||||
my $offset_horz = $query->param('offset_horz');
|
||||
my $offset_vert = $query->param('offset_vert');
|
||||
my $creep_horz = $query->param('creep_horz');
|
||||
my $creep_vert = $query->param('creep_vert');
|
||||
my $units = $query->param('unit');
|
||||
|
||||
my @resultsloop;
|
||||
my @tmpllist;
|
||||
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "labels/label-create-profile.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 1,
|
||||
flagsrequired => { catalogue => 1 },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
||||
if ( $op eq 'blank' || $op eq '' ) {
|
||||
|
||||
my @units = (
|
||||
{ unit => 'INCH', desc => 'Inches' },
|
||||
{ unit => 'CM', desc => 'Centimeters' },
|
||||
{ unit => 'MM', desc => 'Millimeters' },
|
||||
{ unit => 'POINT', desc => 'Postscript Points' },
|
||||
);
|
||||
|
||||
my @tmpl = GetAllLabelTemplates();
|
||||
|
||||
foreach my $data (@tmpl) {
|
||||
push ( @tmpllist, {tmpl_id => $data->{'tmpl_id'},
|
||||
tmpl_code => $data->{'tmpl_code'}} );
|
||||
}
|
||||
|
||||
$template->param(
|
||||
tmpllist => \@tmpllist,
|
||||
unit => \@units,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
elsif ( $op eq 'Save' ) {
|
||||
my $errmsg;
|
||||
my $dberror = CreateProfile(
|
||||
$prof_id, $printername, $paper_bin, $tmpl_id, $offset_horz,
|
||||
$offset_vert, $creep_horz, $creep_vert, $units
|
||||
);
|
||||
unless ( $dberror ) {
|
||||
print $query->redirect("./label-profiles.pl");
|
||||
exit;
|
||||
}
|
||||
|
||||
# FIXME: This exposes all CGI vars. Surely there is a better way to do it? -fbcit
|
||||
if ( $dberror =~ /Duplicate/ && $dberror =~ /$paper_bin/ ) {
|
||||
$errmsg = "You cannot create duplicate profiles for $printername/$paper_bin.
|
||||
Click the Back button on your browser and enter a different paper bin
|
||||
for $printername.";
|
||||
}
|
||||
|
||||
else {
|
||||
$errmsg = $dberror;
|
||||
}
|
||||
|
||||
$template->param (
|
||||
dberror => $dberror,
|
||||
errmsg => $errmsg,
|
||||
);
|
||||
|
||||
warn "DB error: $dberror";
|
||||
}
|
||||
|
||||
elsif ( $op eq 'Cancel' ) {
|
||||
print $query->redirect("./label-profiles.pl");
|
||||
exit;
|
||||
}
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
|
@ -1,103 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Labels;
|
||||
use HTML::Template::Pro;
|
||||
use POSIX;
|
||||
|
||||
#use Data::Dumper;
|
||||
#use Smart::Comments;
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $query = new CGI;
|
||||
### $query
|
||||
|
||||
my $tmpl_code = $query->param('tmpl_code');
|
||||
my $tmpl_desc = $query->param('tmpl_desc');
|
||||
my $page_height = $query->param('page_height');
|
||||
my $page_width = $query->param('page_width');
|
||||
my $label_height = $query->param('label_height');
|
||||
my $label_width = $query->param('label_width');
|
||||
my $topmargin = $query->param('topmargin');
|
||||
my $leftmargin = $query->param('leftmargin');
|
||||
my $cols = $query->param('cols');
|
||||
my $rows = $query->param('rows');
|
||||
my $colgap = $query->param('colgap');
|
||||
my $rowgap = $query->param('rowgap');
|
||||
my $units = $query->param('units');
|
||||
my $font = $query->param('fonts');
|
||||
my $fontsize = $query->param('fontsize');
|
||||
|
||||
my $batch_id = $query->param('batch_id');
|
||||
|
||||
|
||||
my $op = $query->param('op');
|
||||
my @resultsloop;
|
||||
|
||||
my ( $template, $loggedinuser, $cookie );
|
||||
|
||||
if ( $op eq 'blank' ) {
|
||||
|
||||
my @units = (
|
||||
{ unit => 'INCH', desc => 'Inches' },
|
||||
{ unit => 'CM', desc => 'Centimeters' },
|
||||
{ unit => 'MM', desc => 'Millimeters' },
|
||||
{ unit => 'POINT', desc => 'Postscript Points' },
|
||||
);
|
||||
|
||||
my @fonts = ( #FIXME: There is probably a way to discover what additional fonts are installed on a user's system and generate this list dynamically...
|
||||
{ font => 'TR', name => 'Times Roman' },
|
||||
{ font => 'TB', name => 'Times Bold' },
|
||||
{ font => 'TI', name => 'Times Italic' },
|
||||
{ font => 'TBI', name => 'Times Bold Italic' },
|
||||
{ font => 'C', name => 'Courier' },
|
||||
{ font => 'CB', name => 'Courier Bold' },
|
||||
{ font => 'CO', name => 'Courier Oblique' },
|
||||
{ font => 'CBO', name => 'Courier Bold Oblique' },
|
||||
{ font => 'H', name => 'Helvetica' },
|
||||
{ font => 'HB', name => 'Helvetica Bold' },
|
||||
{ font => 'HO', name => 'Helvetica Oblique' },
|
||||
{ font => 'HBO', name => 'Helvetica Bold Oblique' },
|
||||
);
|
||||
|
||||
( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "labels/label-create-template.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 1,
|
||||
flagsrequired => { catalogue => 1 },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
||||
$template->param(
|
||||
units => \@units,
|
||||
fonts => \@fonts,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
elsif ( $op eq 'Create' ) {
|
||||
CreateTemplate(
|
||||
|
||||
$tmpl_code, $tmpl_desc, $page_width,
|
||||
$page_height, $label_width, $label_height, $topmargin,
|
||||
$leftmargin, $cols, $rows, $colgap,
|
||||
$rowgap, $font, $fontsize, $units );
|
||||
|
||||
print $query->redirect("./label-templates.pl");
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
elsif ( $op eq 'Cancel' ) {
|
||||
print $query->redirect("./label-home.pl");
|
||||
exit;
|
||||
}
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
|
@ -1,70 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright 2006 Katipo Communications.
|
||||
# Parts Copyright 2009 Foundations Bible College.
|
||||
#
|
||||
# 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 warnings;
|
||||
use Sys::Syslog qw(syslog);
|
||||
use CGI;
|
||||
use HTML::Template::Pro;
|
||||
use Data::Dumper;
|
||||
|
||||
use C4::Auth;
|
||||
use C4::Output;
|
||||
use C4::Context;
|
||||
use C4::Debug;
|
||||
use C4::Labels::Lib 1.000000 qw(get_all_templates get_all_layouts get_barcode_types get_label_types);
|
||||
use C4::Labels::Layout 1.000000;
|
||||
|
||||
my $cgi = new CGI;
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "labels/label-layout.tmpl",
|
||||
query => $cgi,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => { catalogue => 1 },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
||||
my $error = 0;
|
||||
|
||||
my $op = $cgi->param('op') || $ARGV[0];
|
||||
my $layout_id = $cgi->param('layout_id') || $ARGV[1];
|
||||
|
||||
if ($op eq 'delete') {
|
||||
$error = C4::Labels::Layout::delete(layout_id => $layout_id);
|
||||
}
|
||||
|
||||
my $layouts = get_all_layouts();
|
||||
|
||||
$template->param(
|
||||
error => $error,
|
||||
layout_id => $layout_id,
|
||||
) if ($error ne 0);
|
||||
|
||||
$template->param(
|
||||
op => $op,
|
||||
barcode_types => get_barcode_types(),
|
||||
printingtypes => get_label_types(),
|
||||
layout_loop => $layouts,
|
||||
);
|
||||
|
||||
output_html_with_http_headers $cgi, $cookie, $template->output;
|
|
@ -1,63 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Labels;
|
||||
use HTML::Template::Pro;
|
||||
use POSIX;
|
||||
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $query = new CGI;
|
||||
my $op = $query->param('op');
|
||||
#my $prof_code = $query->param('prof_code');
|
||||
my $prof_id = $query->param('prof_id');
|
||||
#my $printername = $query->param('printername');
|
||||
#my $tmpl_id = $query->param('tmpl_id');
|
||||
#my $paper_bin = $query->param('paper_bin');
|
||||
#my $offset_horz = $query->param('offset_horz');
|
||||
#my $offset_vert = $query->param('offset_vert');
|
||||
#my $creep_horz = $query->param('creep_horz');
|
||||
#my $creep_vert = $query->param('creep_vert');
|
||||
|
||||
# little block for displaying active layout/template/batch in templates
|
||||
# ----------
|
||||
my $batch_id = $query->param('batch_id');
|
||||
my $active_layout = get_active_layout();
|
||||
my $active_template = GetActiveLabelTemplate();
|
||||
my $active_layout_name = $active_layout->{'layoutname'};
|
||||
my $active_template_name = $active_template->{'tmpl_code'};
|
||||
# ----------
|
||||
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "labels/label-profiles.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 1,
|
||||
flagsrequired => { catalogue => 1 },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
||||
my @resultsloop;
|
||||
|
||||
if ( $op eq 'delete' ) {
|
||||
my $dberror = DeleteProfile($prof_id);
|
||||
warn "DB returned error: $dberror" if $dberror;
|
||||
}
|
||||
|
||||
@resultsloop = GetAllPrinterProfiles();
|
||||
|
||||
$template->param(
|
||||
batch_id => $batch_id,
|
||||
active_layout_name => $active_layout_name,
|
||||
active_template_name => $active_template_name,
|
||||
|
||||
resultsloop => \@resultsloop,
|
||||
);
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
|
@ -1,53 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Labels;
|
||||
use HTML::Template::Pro;
|
||||
use POSIX;
|
||||
|
||||
#use Data::Dumper;
|
||||
#use Smart::Comments;
|
||||
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $query = new CGI;
|
||||
|
||||
my $tmpl_id = $query->param('tmpl_id');
|
||||
my $tmpl_code = $query->param('tmpl_code');
|
||||
my $tmpl_desc = $query->param('tmpl_desc');
|
||||
my $page_height = $query->param('page_height');
|
||||
my $page_width = $query->param('page_width');
|
||||
my $label_height = $query->param('label_height');
|
||||
my $label_width = $query->param('label_width');
|
||||
my $topmargin = $query->param('topmargin');
|
||||
my $leftmargin = $query->param('leftmargin');
|
||||
my $cols = $query->param('cols');
|
||||
my $rows = $query->param('rows');
|
||||
my $colgap = $query->param('colgap');
|
||||
my $rowgap = $query->param('rowgap');
|
||||
my $font = $query->param('fonts');
|
||||
my $fontsize = $query->param('fontsize');
|
||||
my $units = $query->param('units');
|
||||
my $active = $query->param('active');
|
||||
my $prof_id = $query->param('prof_id');
|
||||
|
||||
my $dberror = SaveTemplate(
|
||||
|
||||
$tmpl_id, $tmpl_code, $tmpl_desc, $page_width,
|
||||
$page_height, $label_width, $label_height, $topmargin,
|
||||
$leftmargin, $cols, $rows, $colgap,
|
||||
$rowgap, $font, $fontsize, $units
|
||||
|
||||
);
|
||||
|
||||
SetAssociatedProfile( $prof_id, $tmpl_id ) if $prof_id;
|
||||
|
||||
warn "Database returned the following error: $dberror" if $dberror;
|
||||
|
||||
print $query->redirect("./label-templates.pl");
|
||||
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use C4::Labels;
|
||||
use HTML::Template::Pro;
|
||||
use POSIX;
|
||||
|
||||
#use Data::Dumper;
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $query = new CGI;
|
||||
my $op = $query->param('op');
|
||||
my $tmpl_code = $query->param('tmpl_code');
|
||||
my $tmpl_id = $query->param('tmpl_id');
|
||||
|
||||
|
||||
my $width = $query->param('width');
|
||||
my $height = $query->param('height');
|
||||
my $topmargin = $query->param('topmargin');
|
||||
my $leftmargin = $query->param('leftmargin');
|
||||
my $columns = $query->param('columns');
|
||||
my $rows = $query->param('rows');
|
||||
my $colgap = $query->param('colgap');
|
||||
my $rowgap = $query->param('rowgap');
|
||||
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "labels/label-templates.tmpl",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 1,
|
||||
flagsrequired => { catalogue => 1 },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
my @resultsloop;
|
||||
|
||||
|
||||
if ( $op eq 'set_active_template' ) {
|
||||
SetActiveTemplate($tmpl_id);
|
||||
}
|
||||
|
||||
elsif ( $op eq 'delete' ) {
|
||||
DeleteTemplate($tmpl_id);
|
||||
}
|
||||
|
||||
elsif ( $op eq 'save' ) {
|
||||
SaveTemplate($tmpl_code);
|
||||
}
|
||||
|
||||
@resultsloop = GetAllLabelTemplates();
|
||||
|
||||
# little block for displaying active layout/template/batch in templates
|
||||
# ----------
|
||||
my $batch_id = $query->param('batch_id');
|
||||
my $active_layout = get_active_layout();
|
||||
my $active_template = GetActiveLabelTemplate();
|
||||
my $active_layout_name = $active_layout->{'layoutname'};
|
||||
my $active_template_name = $active_template->{'tmpl_code'};
|
||||
# ----------
|
||||
|
||||
$template->param(
|
||||
|
||||
batch_id => $batch_id,
|
||||
active_layout_name => $active_layout_name,
|
||||
active_template_name => $active_template_name,
|
||||
|
||||
resultsloop => \@resultsloop,
|
||||
);
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
Loading…
Reference in a new issue