Create labels with visual tool
Koha's Plugin System allows for you to add additional tools and reports to Koha that are specific to your library. Plugins are installed by uploading KPZ ( Koha Plugin Zip ) packages. A KPZ file is just a zip file containing the perl files, template files, and any other files necessary to make the plugin work.
The plugin system needs to be turned on by a system administrator.
To set up the Koha plugin system you must first make some changes to your install.
Change <enable_plugins>0<enable_plugins> to <enable_plugins>1</enable_plugins> in your koha-conf.xml file
Confirm that the path to <pluginsdir> exists, is correct, and is writable by the web server
Remember to allow access to plugin directory from Apache
<Directory <pluginsdir>>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Restart your webserver
Once set up is complete you will need to alter your UseKohaPlugins system preference. On the Tools page you will see the Tools Plugins and on the Reports page you will see the Reports Plugins.
From the release page you can download the latest *.kpz file
Add items to printing queue with intranetuserjs
$(document).ready(function() {
$(".print_label").after('<li><a href="#" onclick="setPrintQueue(event, $(this))">Tulostusjonoon</a></li>');
});
function setPrintQueue(e, element) {
e.preventDefault();
let searchParams = new URLSearchParams(element.parent().parent().find(".print_label a").attr("href"));
$.ajax({
url: "/api/v1/contrib/kohasuomi/labels/print/queue",
type: "POST",
dataType: "json",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ itemnumber: searchParams.get('number_list'), printed: 0 }),
success: function (result) {
alert("Nide lisätty jonoon!");
},
error: function (err) {
alert("Lisäys epäonnistui!");
}
});
}
- Create and modify labels in configuration.
- Define labels name and dimensions
-
Define label's fields on fields tab. You can choose from the list or create a custom field where you can add fields with subfields. The custom fields can be combined with AND/OR (&&/||)
Predefined fields that are not in the tables:
- items.barcode => Readable barcode
- items.barcodevalue => Only numbers
- items.branchname => Homebranch's description in branches table
- items.location => LOC description from authorised values
- items.signumYKL => YKL code from itemcallnumber
- items.signumLoc => Location from itemcallnumber
- items.signumHeading => Main heading from itemcallnumber
- marc.title => 245$a && 245$b && 245$p && 245$n || 111$a || 130$a
- marc.author => (942$i || 100$a) && (100$c || 110$a || 111$a)
- marc.unititle => 130$a && 130$l
- marc.description => 300$a && 300$e && 347$b
- marc.publication => 260$c || 264$c
- marc.volume => 262$a || 049$a
- Define signum and fields
- The fields will appear to label preview and when the postion is changed the field will move on the preview.
- Print a test label sheet. The configurations have to be saved to get the newest changes. You can modify top and left margins of the print from topbar, those apply only in the printing view. For the test sheet the plugin fetches the first item from the database and fills fields.
- Run the tool.
- Choose from created labels.
- Choose items from the lists available and click them to be printed or read barcodes to the input field. If intranetusejs setting is in place (see above), you can add items to your own list from item's actions.
- Today acquired items are fetched with dateaccessioned value.
- The plugin keeps a list of printed labels so you can return to them and choose to be printed again.