[% USE raw %] [% USE Asset %] [% USE Koha %] [% USE Branches %] [% USE KohaDates %] [% USE TablesSettings %] [% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% FILTER collapse %] [% IF (op == 'create_edit_rota' && rota.rota_id) %] [% tx("Modify rota '{rota_title}'", rota_title = rota.title ) %] › [% ELSIF (op == 'create_edit_rota' && !rota.rota_id) %] [% t("New rota") | html %] › [% ELSIF (op == 'manage_stages') %] [% tx("Manage stages for '{rota_title}'", rota_title = rota.title ) %] › [% ELSIF (op == 'create_edit_stage' && stage.id) %] [% tx("Modify {library} stage", library = Branches.GetName(stage.branchcode_id) ) %] › [% tx("Manage stages for '{rota_title}'", rota_title = rota.title ) %] › [% ELSIF (op == 'create_edit_stage' && !stage.id) %] [% t("New stage") | html %] › [% ELSIF (op == 'manage_items') %] [% tx("Manage items for '{rota_title}'", rota_title = rota.title ) %] › [% ELSIF op == 'add_items_to_rota' %] [% t("Add items" ) | html %] › [% tx("Manage items for '{rota_title}'", rota_title = rota.title ) %] › [% END # /IF (op == 'create_edit_rota' %] [% t("Stock rotation") | html %] › [% t("Cataloging") | html %] › [% t("Koha") | html %] [% END %] [% INCLUDE 'doc-head-close.inc' %] [% WRAPPER 'header.inc' %] [% INCLUDE 'cat-search.inc' %] [% END %] [% WRAPPER 'sub-header.inc' %] [% WRAPPER breadcrumbs %] [% WRAPPER breadcrumb_item %] Cataloging [% END %] [% IF no_op_set %] [% WRAPPER breadcrumb_item bc_active= 1 %] Stock rotation [% END %] [% ELSE %] [% WRAPPER breadcrumb_item %] Stock rotation [% END %] [% END # /IF no_op_set %] [% IF (op == 'create_edit_rota' && rota.rota_id) %] [% WRAPPER breadcrumb_item bc_active= 1 %] [% tx("Modify rota '{rota_title}'", rota_title = rota.title ) %] [% END %] [% ELSIF (op == 'create_edit_rota' && !rota.rota_id) %] [% WRAPPER breadcrumb_item bc_active= 1 %] New rota [% END %] [% ELSIF (op == 'manage_stages') %] [% WRAPPER breadcrumb_item bc_active= 1 %] [% tx("Manage stages for '{rota_title}'", rota_title = rota.title ) %] [% END %] [% ELSIF (op == 'create_edit_stage' && stage.id) %] [% WRAPPER breadcrumb_item %] [% tx("Manage stages for '{rota_title}'", rota_title = rota.title ) %] [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] [% tx("Modify {library} stage", library = Branches.GetName(stage.branchcode_id) ) %] [% END %] [% ELSIF (op == 'create_edit_stage' && !stage.id) %] [% WRAPPER breadcrumb_item %] [% tx("Manage stages for '{rota_title}'", rota_title = rota.title ) %] [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] New stage [% END %] [% ELSIF op == 'add_items_to_rota' %] [% WRAPPER breadcrumb_item %] [% tx("Manage items for '{rota_title}'", rota_title = rota.title ) %] [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] [% t("Add items") | html %] [% END %] [% ELSIF (op == 'manage_items') %] [% WRAPPER breadcrumb_item bc_active= 1 %] [% tx("Manage items for '{rota_title}'", rota_title = rota.title ) %] [% END %] [% END # /IF (op == 'create_edit_rota' %] [% END #/ WRAPPER breadcrumbs %] [% END #/ WRAPPER sub-header.inc %]
[% IF no_op_set %] [% INCLUDE 'stockrotation-toolbar.inc' %]

Stock rotation

[% IF existing_rotas.size > 0 %]
[% FOREACH rota IN existing_rotas %] [% END %]
Name Cyclical Active Description Number of items Actions
[% rota.title | html %] [% rota.cyclical ? 'Yes' : 'No' | html %] [% rota.active ? 'Yes' : 'No' | html %] [% rota.description | html %] [% rota.stockrotationitems.count | html %] Edit
[% IF !rota.active %] Activate [% ELSE %] Deactivate [% END %] Delete
[% END %] [% ELSIF (op == 'create_edit_rota') %] [% IF rota.rota_id %]

[% tx("Modify rota '{rota_title}'", rota_title = rota.title ) %]

[% ELSE %]

New rota

[% END %] [% IF error == 'invalid_form' %]

There was a problem with your form submission

[% END %]
  1. Required
Cancel
[% IF rota.rota_id %] [% END %]
[% ELSIF (op == 'manage_stages') %] [% INCLUDE 'stockrotation-toolbar.inc' %] [% IF error == 'invalid_form' %]

There was a problem with your form submission

[% END %]

[% tx("Manage stages for '{rota_title}'", rota_title = rota.title ) %]

[% IF existing_stages.size > 0 %]
Stages can be re-ordered by using the handle to drag and drop them to their new position
Library Duration (days)
    [% FOREACH stage IN existing_stages %]
  • [% IF existing_stages.size > 1 %] [% END %] [% Branches.GetName(stage.branchcode_id) | html %] [% stage.duration | html %] Edit Delete
  • [% END %]
[% ELSE %]

This rota has no stages.

[% END %]

Return to rotas

[% ELSIF (op == 'create_edit_stage') %] [% IF stage.id %]

[% tx("Modify {library} stage", library = Branches.GetName(stage.branchcode_id) ) %]

[% ELSE %]

New stage

[% END %] [% IF error == 'invalid_form' %]

There was a problem with your form submission

[% END %]
  1. Required
  2. Required
Cancel
[% ELSIF (op == 'confirm_remove_from_rota') %]

Are you sure you wish to remove this item from its rota

Yes No

[% ELSIF (op == 'confirm_delete_rota') %]

Are you sure you want to delete this rota?

[% IF sritemstotal > 0 %] [% IF sritemstotal == 1 %]

[% sritemstotal | html %] item is still attached to this rota, that item will remain at its current stage libraries.

[% ELSE %]

[% sritemstotal | html %] items are still attached to this rota, those items will remain at their current stage libraries.

[% END %] [% END %]

Yes No

[% ELSIF (op == 'confirm_delete_stage') %]

Are you sure you want to delete this stage?

[% IF stage.stockrotationitems.count > 0 %]

This stage contains the following item(s):

    [% FOREACH sritem IN stage.stockrotationitems %]
  • [% sritem.item.biblio.title | html %] (Barcode: [% sritem.item.barcode | html %])
  • [% END %]
[% END %]

Yes No

[% ELSIF (op == 'manage_items') %] [% INCLUDE 'stockrotation-toolbar.inc' %] [% IF error %]
[% IF error == "item_not_found" %]

The item was not found

[% ELSIF error == "already_on_rota" %]

This item is already on this rota

[% END %]
[% END %]

[% tx("Manage items for '{rota_title}'", rota_title = rota.title ) %]

[% IF sritems.count > 0 %]
[% FOREACH sritem IN sritems %] [% END %]
Barcode Title Author Call number In transit Stages & duration in days
(current stage highlighted)
Actions
[% sritem.item.barcode | html %] [% sritem.item.biblio.title | html %] [% sritem.item.biblio.author | html %] [% sritem.item.itemcallnumber | html %] [% sritem.item.get_transfer ? 'Yes' : 'No' | html %] [% FOREACH this_stage IN stages %] [% IF this_stage.stage_id == sritem.stage.stage_id %] [% ELSE %] [% END %] [% Branches.GetName(this_stage.branchcode_id) | html %] ([% this_stage.duration | html %]) » [% END %] [% IF stages.size > 0 %] [% rota.cyclical ? 'START' : 'END' | html %] [% END %] [% in_transit = sritem.item.get_transfer %] [% IF stages.size < 2 %] [% ELSIF !in_transit %] [% ELSE %] [% END %] Move to next stage [% IF !in_transit %] [% ELSE %] [% END %] [% IF sritem.indemand %] Remove "In demand" [% ELSE %] Add "In demand" [% END %] [% IF !in_transit %] [% ELSE %] [% END %] Remove from rota
[% ELSE %]

There are no items assigned to this rota.

[% END %]

Return to rotas

[% ELSIF op == 'add_items_to_rota' %]

[% tx("Add items to rota '{rota_title}'", rota_title = rota.title ) %]

Results

[% IF barcode_status.ok.size > 0 %]

Items added to rota:

    [% FOREACH item_ok IN barcode_status.ok %]
  • [% item_ok.biblio.title | html %]
  • [% END %]
[% END %] [% IF barcode_status.on_this.size > 0 %]

Items already on this rota:

    [% FOREACH item_on_this IN barcode_status.on_this %]
  • [% item_on_this.biblio.title | html %]
  • [% END %]
[% END %] [% IF barcode_status.not_found.size > 0 %]

Barcodes not found:

    [% FOREACH barcode_not_found IN barcode_status.not_found %]
  • [% barcode_not_found | html %]
  • [% END %]
[% END %] [% IF barcode_status.on_other.size > 0 %]

Items found on other rotas:

    [% FOREACH item_on_other IN barcode_status.on_other %]
  • [% item_on_other.biblio.title | html %]
  • [% END %]
[% END %]
[% IF barcode_status.on_other.size > 0 %]
Select items to move to this rota: [% FOREACH item_on_other IN barcode_status.on_other %]
  • [% item_on_other.biblio.title | html %] (Currently on "[% item_on_other.stockrotationitem.stage.rota.title | html %]")
  • [% END %]
    [% END %]

    Return to rota

    [% END %]
    [% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] [% Asset.js( "lib/sortable/Sortable.min.js" ) | $raw %] [% Asset.js("js/pages/stockrotation.js") | $raw %] [% END %] [% INCLUDE 'intranet-bottom.inc' %]