View | Details | Raw Unified | Return to bug 11897
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc (-1 / +1 lines)
Lines 40-45 Link Here
40
[% IF ( issuehistoryview ) %]<li class="active">[% ELSE %]<li>[% END %]
40
[% IF ( issuehistoryview ) %]<li class="active">[% ELSE %]<li>[% END %]
41
<a href="/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=[% biblio_object_id | url  %]" >Checkout history</a></li>
41
<a href="/cgi-bin/koha/catalogue/issuehistory.pl?biblionumber=[% biblio_object_id | url  %]" >Checkout history</a></li>
42
[% IF ( CAN_user_tools_view_system_logs ) %][% IF ( logview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&amp;modules=CATALOGUING&amp;action=MODIFY&amp;object=[% biblio_object_id | url  %]">Modification log</a> </li>[% END %]
42
[% IF ( CAN_user_tools_view_system_logs ) %][% IF ( logview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&amp;modules=CATALOGUING&amp;action=MODIFY&amp;object=[% biblio_object_id | url  %]">Modification log</a> </li>[% END %]
43
[% IF ( CAN_user_stockrotation_manage_rota_items && Koha.Preference('StockRotation') ) %][% IF ( stockrotationview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/stockrotation.pl?biblionumber=[% biblio_object_id %]">Rota</a> </li>[% END %]
43
[% IF ( CAN_user_stockrotation_manage_rota_items && Koha.Preference('StockRotation') ) %][% IF ( stockrotationview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/stockrotation.pl?biblionumber=[% biblio_object_id | uri %]">Rota</a> </li>[% END %]
44
</ul>
44
</ul>
45
</div>
45
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/stockrotation-toolbar.inc (-2 / +2 lines)
Lines 4-12 Link Here
4
        <a id="addrota" class="btn btn-default btn-sm" href="/cgi-bin/koha/tools/stockrotation.pl?op=create_edit_rota"><i class="fa fa-plus"></i> New rota</a>
4
        <a id="addrota" class="btn btn-default btn-sm" href="/cgi-bin/koha/tools/stockrotation.pl?op=create_edit_rota"><i class="fa fa-plus"></i> New rota</a>
5
    [% END %]
5
    [% END %]
6
    [% IF op == 'manage_stages' %]
6
    [% IF op == 'manage_stages' %]
7
        <a id="editrota" class="btn btn-default btn-sm" href="/cgi-bin/koha/tools/stockrotation.pl?op=create_edit_rota&amp;rota_id=[% rota_id %]"><i class="fa fa-pencil"></i> Edit rota</a>
7
        <a id="editrota" class="btn btn-default btn-sm" href="/cgi-bin/koha/tools/stockrotation.pl?op=create_edit_rota&amp;rota_id=[% rota_id | uri %]"><i class="fa fa-pencil"></i> Edit rota</a>
8
    [% END %]
8
    [% END %]
9
    [% IF op == 'manage_items' %]
9
    [% IF op == 'manage_items' %]
10
        <a id="editrota" class="btn btn-default btn-sm" href="/cgi-bin/koha/tools/stockrotation.pl?op=create_edit_rota&amp;rota_id=[% rota_id %]"><i class="fa fa-pencil"></i> Edit rota</a>
10
        <a id="editrota" class="btn btn-default btn-sm" href="/cgi-bin/koha/tools/stockrotation.pl?op=create_edit_rota&amp;rota_id=[% rota_id | uri %]"><i class="fa fa-pencil"></i> Edit rota</a>
11
    [% END %]
11
    [% END %]
12
</div>
12
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt (-16 / +16 lines)
Lines 1-13 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Catalog &rsaquo; Stock rotation details for [% biblio.title %]</title>
4
<title>Koha &rsaquo; Catalog &rsaquo; Stock rotation details for [% biblio.title | html %]</title>
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'browser-strings.inc' %]
6
[% INCLUDE 'browser-strings.inc' %]
7
[% Asset.js("js/browser.js") %]
7
[% Asset.js("js/browser.js") | $raw %]
8
<script type="text/javascript">
8
<script type="text/javascript">
9
//<![CDATA[
9
//<![CDATA[
10
    var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10));
10
    var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
11
    browser.show();
11
    browser.show();
12
//]]>
12
//]]>
13
</script>
13
</script>
Lines 17-23 Link Here
17
[% INCLUDE 'header.inc' %]
17
[% INCLUDE 'header.inc' %]
18
[% INCLUDE 'cat-search.inc' %]
18
[% INCLUDE 'cat-search.inc' %]
19
19
20
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo; Stock rotation details for <i>[% biblio.title | html %][% FOREACH subtitle IN biblio.subtitles %][% subtitle.subfield %][% END %]</i></div>
20
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo; Stock rotation details for <i>[% biblio.title | html %][% FOREACH subtitle IN biblio.subtitles %][% subtitle.subfield | html %][% END %]</i></div>
21
21
22
<div id="doc3" class="yui-t2">
22
<div id="doc3" class="yui-t2">
23
23
Lines 46-55 Link Here
46
                <tbody>
46
                <tbody>
47
                    [% FOREACH item IN items %]
47
                    [% FOREACH item IN items %]
48
                        <tr>
48
                        <tr>
49
                            <td>[% item.bib_item.barcode %]</td>
49
                            <td>[% item.bib_item.barcode | html %]</td>
50
                            <td>[% item.bib_item.itemcallnumber %]</td>
50
                            <td>[% item.bib_item.itemcallnumber | html %]</td>
51
                            <td>
51
                            <td>
52
                                [% item.rota.title %]
52
                                [% item.rota.title | html %]
53
                            </td>
53
                            </td>
54
                            <td>
54
                            <td>
55
                                [% IF item.rota %]
55
                                [% IF item.rota %]
Lines 80-86 Link Here
80
                                    [% ELSE %]
80
                                    [% ELSE %]
81
                                        <span class="stage">
81
                                        <span class="stage">
82
                                    [% END %]
82
                                    [% END %]
83
                                    [% Branches.GetName(this_stage.branchcode_id) %] ([% this_stage.duration %])
83
                                    [% Branches.GetName(this_stage.branchcode_id) | html %] ([% this_stage.duration | html %])
84
                                    </span>
84
                                    </span>
85
                                    &raquo;
85
                                    &raquo;
86
                                [% END %]
86
                                [% END %]
Lines 98-104 Link Here
98
                                [% IF item.stockrotationitem %]
98
                                [% IF item.stockrotationitem %]
99
                                    [% in_transit = item.bib_item.get_transfer %]
99
                                    [% in_transit = item.bib_item.get_transfer %]
100
                                    [% IF !in_transit && item.stages.size > 1 %]
100
                                    [% IF !in_transit && item.stages.size > 1 %]
101
                                        <a class="btn btn-default btn-xs" href="?op=move_to_next_stage&amp;stage_id=[% item.stockrotationitem.stage.stage_id %]&amp;item_id=[% item.bib_item.id %]&amp;biblionumber=[% biblionumber %]">
101
                                        <a class="btn btn-default btn-xs" href="?op=move_to_next_stage&amp;stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&amp;item_id=[% item.bib_item.id | uri %]&amp;biblionumber=[% biblionumber | uri %]">
102
                                    [% ELSE %]
102
                                    [% ELSE %]
103
                                        <a class="btn btn-default btn-xs" disabled>
103
                                        <a class="btn btn-default btn-xs" disabled>
104
                                    [% END %]
104
                                    [% END %]
Lines 106-112 Link Here
106
                                        Move to next stage
106
                                        Move to next stage
107
                                    </a>
107
                                    </a>
108
                                    [% IF !in_transit %]
108
                                    [% IF !in_transit %]
109
                                        <a class="btn btn-default btn-xs" href="?op=toggle_in_demand&amp;stage_id=[% item.stockrotationitem.stage.stage_id %]&amp;item_id=[% item.bib_item.id %]&amp;biblionumber=[% biblionumber %]">
109
                                        <a class="btn btn-default btn-xs" href="?op=toggle_in_demand&amp;stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&amp;item_id=[% item.bib_item.id | uri %]&amp;biblionumber=[% biblionumber | uri %]">
110
                                    [% ELSE %]
110
                                    [% ELSE %]
111
                                        <a class="btn btn-default btn-xs" disabled>
111
                                        <a class="btn btn-default btn-xs" disabled>
112
                                    [% END %]
112
                                    [% END %]
Lines 118-124 Link Here
118
                                        [% END %]
118
                                        [% END %]
119
                                    </a>
119
                                    </a>
120
                                    [% IF !in_transit %]
120
                                    [% IF !in_transit %]
121
                                        <a class="btn btn-default btn-xs" href="?op=confirm_remove_from_rota&amp;stage_id=[% item.stockrotationitem.stage.stage_id %]&amp;item_id=[% item.bib_item.id %]&amp;biblionumber=[% biblionumber %]">
121
                                        <a class="btn btn-default btn-xs" href="?op=confirm_remove_from_rota&amp;stage_id=[% item.stockrotationitem.stage.stage_id | uri %]&amp;item_id=[% item.bib_item.id | uri %]&amp;biblionumber=[% biblionumber | uri %]">
122
                                    [% ELSE %]
122
                                    [% ELSE %]
123
                                        <a class="btn btn-default btn-xs" disabled>
123
                                        <a class="btn btn-default btn-xs" disabled>
124
                                    [% END %]
124
                                    [% END %]
Lines 129-141 Link Here
129
                                    <form class="rota_select_form" method="post" enctype="multipart/form-data">
129
                                    <form class="rota_select_form" method="post" enctype="multipart/form-data">
130
                                        <select class="item_select_rota" name="rota_id">
130
                                        <select class="item_select_rota" name="rota_id">
131
                                            [% FOREACH rota IN rotas %]
131
                                            [% FOREACH rota IN rotas %]
132
                                                <option value="[% rota.rota_id %]">[% rota.title %]</option>
132
                                                <option value="[% rota.rota_id | uri %]">[% rota.title | html %]</option>
133
                                            [% END %]
133
                                            [% END %]
134
                                        </select>
134
                                        </select>
135
                                        <button class="btn btn-default btn-xs" type="submit"><i class="fa fa-plus"></i> Add to rota</button>
135
                                        <button class="btn btn-default btn-xs" type="submit"><i class="fa fa-plus"></i> Add to rota</button>
136
                                        <input type="hidden" name="op" value="add_item_to_rota"></input>
136
                                        <input type="hidden" name="op" value="add_item_to_rota"></input>
137
                                        <input type="hidden" name="item_id" value="[% item.bib_item.id %]"></input>
137
                                        <input type="hidden" name="item_id" value="[% item.bib_item.id | uri %]"></input>
138
                                        <input type="hidden" name="biblionumber" value="[% biblionumber %]"></input>
138
                                        <input type="hidden" name="biblionumber" value="[% biblionumber | uri %]"></input>
139
                                    </form>
139
                                    </form>
140
                                [% END %]
140
                                [% END %]
141
                            </td>
141
                            </td>
Lines 154-161 Link Here
154
        <div class="dialog alert">
154
        <div class="dialog alert">
155
            <h3>Are you sure you want to remove this item from it's rota?</h3>
155
            <h3>Are you sure you want to remove this item from it's rota?</h3>
156
            <p>
156
            <p>
157
                <a class="btn btn-default btn-xs approve" href="?op=remove_item_from_stage&amp;stage_id=[% stage_id %]&amp;item_id=[% item_id %]&amp;biblionumber=[% biblionumber %]"><i class="fa fa-fw fa-check"></i>Yes</a>
157
                <a class="btn btn-default btn-xs approve" href="?op=remove_item_from_stage&amp;stage_id=[% stage_id | uri %]&amp;item_id=[% item_id | uri %]&amp;biblionumber=[% biblionumber | uri %]"><i class="fa fa-fw fa-check"></i>Yes</a>
158
                <a class="btn btn-default btn-xs deny" href="?biblionumber=[% biblionumber %]"><i class="fa fa-fw fa-remove"></i>No</a>
158
                <a class="btn btn-default btn-xs deny" href="?biblionumber=[% biblionumber | uri %]"><i class="fa fa-fw fa-remove"></i>No</a>
159
            </p>
159
            </p>
160
        </div>
160
        </div>
161
    [% END %]
161
    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt (-65 / +64 lines)
Lines 4-12 Link Here
4
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Stock rotation</title>
5
<title>Koha &rsaquo; Stock rotation</title>
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% Asset.css("css/datatables.css") %]
7
[% Asset.css("css/datatables.css") | $raw %]
8
[% INCLUDE 'datatables.inc' %]
8
[% INCLUDE 'datatables.inc' %]
9
[% Asset.js("js/pages/stockrotation.js") %]
9
[% Asset.js("js/pages/stockrotation.js") | $raw %]
10
<script type="text/javascript">
10
<script type="text/javascript">
11
//<![CDATA[
11
//<![CDATA[
12
    $(document).ready(function() {
12
    $(document).ready(function() {
Lines 23-29 Link Here
23
</script>
23
</script>
24
</head>
24
</head>
25
25
26
<body>
26
<body id="tools_stockrotation" class="tools">
27
[% INCLUDE 'header.inc' %]
27
[% INCLUDE 'header.inc' %]
28
[% INCLUDE 'patron-search.inc' %]
28
[% INCLUDE 'patron-search.inc' %]
29
29
Lines 44-53 Link Here
44
[% ELSIF (op == 'manage_stages') %]
44
[% ELSIF (op == 'manage_stages') %]
45
    &rsaquo; Manage stages
45
    &rsaquo; Manage stages
46
[% ELSIF (op == 'create_edit_stage' && stage.id) %]
46
[% ELSIF (op == 'create_edit_stage' && stage.id) %]
47
    <a href="?op=manage_stages&amp;rota_id=[% rota_id %]">&rsaquo; Manage stages</a>
47
    <a href="?op=manage_stages&amp;rota_id=[% rota_id | uri %]">&rsaquo; Manage stages</a>
48
    &rsaquo; Edit stage
48
    &rsaquo; Edit stage
49
[% ELSIF (op == 'create_edit_stage' && !stage.id) %]
49
[% ELSIF (op == 'create_edit_stage' && !stage.id) %]
50
    <a href="?op=manage_stages&amp;rota_id=[% rota_id %]">&rsaquo; Manage stages</a>
50
    <a href="?op=manage_stages&amp;rota_id=[% rota_id | uri %]">&rsaquo; Manage stages</a>
51
    &rsaquo; Create stage
51
    &rsaquo; Create stage
52
[% ELSIF (op == 'manage_items') %]
52
[% ELSIF (op == 'manage_items') %]
53
    &rsaquo; Manage items
53
    &rsaquo; Manage items
Lines 79-91 Link Here
79
                            <tbody>
79
                            <tbody>
80
                                [% FOREACH rota IN existing_rotas %]
80
                                [% FOREACH rota IN existing_rotas %]
81
                                    <tr>
81
                                    <tr>
82
                                        <td>[% rota.title %]</td>
82
                                        <td>[% rota.title | html %]</td>
83
                                        <td>[% rota.cyclical ? 'Yes' : 'No'%]</td>
83
                                        <td>[% rota.cyclical ? 'Yes' : 'No' | html %]</td>
84
                                        <td>[% rota.active ? 'Yes' : 'No'%]</td>
84
                                        <td>[% rota.active ? 'Yes' : 'No' | html %]</td>
85
                                        <td>[% rota.description %]</td>
85
                                        <td>[% rota.description | html %]</td>
86
                                        <td>[% rota.stockrotationitems.count %]</td>
86
                                        <td>[% rota.stockrotationitems.count | html %]</td>
87
                                        <td class="actions">
87
                                        <td class="actions">
88
                                            <a class="btn btn-default btn-xs" href="?op=create_edit_rota&amp;rota_id=[% rota.rota_id %]">
88
                                            <a class="btn btn-default btn-xs" href="?op=create_edit_rota&amp;rota_id=[% rota.rota_id | uri %]">
89
                                                <i class="fa fa-pencil"></i>
89
                                                <i class="fa fa-pencil"></i>
90
                                                Edit
90
                                                Edit
91
                                            </a>
91
                                            </a>
Lines 95-107 Link Here
95
                                                    <i class="fa fa-caret-down"></i>
95
                                                    <i class="fa fa-caret-down"></i>
96
                                                </button>
96
                                                </button>
97
                                                <ul class="dropdown-menu">
97
                                                <ul class="dropdown-menu">
98
                                                    <li><a href="?op=manage_stages&amp;rota_id=[% rota.rota_id %]">Stages</a></li>
98
                                                    <li><a href="?op=manage_stages&amp;rota_id=[% rota.rota_id | uri %]">Stages</a></li>
99
                                                    [% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %]
99
                                                    [% IF CAN_user_stockrotation_manage_rota_items && rota.stockrotationstages.count > 0 %]
100
                                                    <li><a href="?op=manage_items&amp;rota_id=[% rota.rota_id %]">Items</a></li>
100
                                                    <li><a href="?op=manage_items&amp;rota_id=[% rota.rota_id | uri %]">Items</a></li>
101
                                                    [% END %]
101
                                                    [% END %]
102
                                                </ul>
102
                                                </ul>
103
                                            </div>
103
                                            </div>
104
                                            <a class="btn btn-default btn-xs" href="?op=toggle_rota&amp;rota_id=[% rota.rota_id %]">
104
                                            <a class="btn btn-default btn-xs" href="?op=toggle_rota&amp;rota_id=[% rota.rota_id | uri %]">
105
                                                <i class="fa fa-power-off"></i>
105
                                                <i class="fa fa-power-off"></i>
106
                                                [% IF !rota.active %]
106
                                                [% IF !rota.active %]
107
                                                    Activate
107
                                                    Activate
Lines 119-125 Link Here
119
                [% ELSIF (op == 'create_edit_rota') %]
119
                [% ELSIF (op == 'create_edit_rota') %]
120
120
121
                    [% IF rota.rota_id %]
121
                    [% IF rota.rota_id %]
122
                        <h2>Edit "[% rota.title %]"</h2>
122
                        <h2>Edit "[% rota.title | html %]"</h2>
123
                    [% ELSE %]
123
                    [% ELSE %]
124
                        <h2>Create new rota</h2>
124
                        <h2>Create new rota</h2>
125
                    [% END %]
125
                    [% END %]
Lines 135-141 Link Here
135
                            <ol>
135
                            <ol>
136
                                <li>
136
                                <li>
137
                                    <label class="required" for="title">Name:</label>
137
                                    <label class="required" for="title">Name:</label>
138
                                    <input type="text" id="title" name="title" value="[% rota.title %]" required="required" placeholder="Rota name">
138
                                    <input type="text" id="title" name="title" value="[% rota.title | html %]" required="required" placeholder="Rota name">
139
                                    <span class="required">Required</span>
139
                                    <span class="required">Required</span>
140
                                </li>
140
                                </li>
141
                                <li>
141
                                <li>
Lines 152-158 Link Here
152
                                </li>
152
                                </li>
153
                                <li>
153
                                <li>
154
                                    <label for="description">Description:</label>
154
                                    <label for="description">Description:</label>
155
                                    <textarea id="description" name="description" placeholder="Rota description">[% rota.description %]</textarea>
155
                                    <textarea id="description" name="description" placeholder="Rota description">[% rota.description | html %]</textarea>
156
                                </li>
156
                                </li>
157
                            </ol>
157
                            </ol>
158
                        </fieldset>
158
                        </fieldset>
Lines 161-167 Link Here
161
                            <a href="/cgi-bin/koha/tools/stockrotation.pl" class="cancel">Cancel</a>
161
                            <a href="/cgi-bin/koha/tools/stockrotation.pl" class="cancel">Cancel</a>
162
                        </fieldset>
162
                        </fieldset>
163
                        [% IF rota.rota_id %]
163
                        [% IF rota.rota_id %]
164
                            <input type="hidden" name="id" value="[% rota.rota_id %]">
164
                            <input type="hidden" name="id" value="[% rota.rota_id | html %]">
165
                        [% END %]
165
                        [% END %]
166
                        <input type="hidden" name="op" value="process_rota">
166
                        <input type="hidden" name="op" value="process_rota">
167
                    </form>
167
                    </form>
Lines 176-182 Link Here
176
                    </div>
176
                    </div>
177
                    [% END %]
177
                    [% END %]
178
178
179
                    <h2>Manage [% rota.title %] stages</h2>
179
                    <h2>Manage [% rota.title | html %] stages</h2>
180
                    <div id="ajax_status"
180
                    <div id="ajax_status"
181
                        data-saving-msg="Saving changes..."
181
                        data-saving-msg="Saving changes..."
182
                        data-success-msg=""
182
                        data-success-msg=""
Lines 198-206 Link Here
198
                                    <select name="branchcode" id="branch">
198
                                    <select name="branchcode" id="branch">
199
                                        [% FOREACH branch IN branches %]
199
                                        [% FOREACH branch IN branches %]
200
                                            [% IF branch.branchcode == stage.branchcode_id %]
200
                                            [% IF branch.branchcode == stage.branchcode_id %]
201
                                                <option value="[% branch.branchcode %]" selected>[% Branches.GetName(branch.branchcode) %]</option>
201
                                                <option value="[% branch.branchcode | html %]" selected>[% Branches.GetName(branch.branchcode) | html %]</option>
202
                                            [% ELSE %]
202
                                            [% ELSE %]
203
                                                <option value="[% branch.branchcode %]">[% Branches.GetName(branch.branchcode) %]</option>
203
                                                <option value="[% branch.branchcode | html %]">[% Branches.GetName(branch.branchcode) | html %]</option>
204
                                            [% END %]
204
                                            [% END %]
205
                                        [% END %]
205
                                        [% END %]
206
                                    </select>
206
                                    </select>
Lines 208-214 Link Here
208
                                </li>
208
                                </li>
209
                                <li>
209
                                <li>
210
                                    <label class="required" for="duration">Duration:</label>
210
                                    <label class="required" for="duration">Duration:</label>
211
                                    <input type="text" id="duration" name="duration" value="[% stage.duration %]" required="required" placeholder="Duration (days)">
211
                                    <input type="text" id="duration" name="duration" value="[% stage.duration | html %]" required="required" placeholder="Duration (days)">
212
                                    <span class="required">Required</span>
212
                                    <span class="required">Required</span>
213
                                </li>
213
                                </li>
214
                            </ol>
214
                            </ol>
Lines 216-223 Link Here
216
                        <fieldset class="action">
216
                        <fieldset class="action">
217
                            <input type="submit" value="Submit">
217
                            <input type="submit" value="Submit">
218
                        </fieldset>
218
                        </fieldset>
219
                        <input type="hidden" name="stage_id" value="[% stage.id %]">
219
                        <input type="hidden" name="stage_id" value="[% stage.id | html %]">
220
                        <input type="hidden" name="rota_id" value="[% rota_id %]">
220
                        <input type="hidden" name="rota_id" value="[% rota_id | html %]">
221
                        <input type="hidden" name="op" value="process_stage">
221
                        <input type="hidden" name="op" value="process_stage">
222
                    </form>
222
                    </form>
223
223
Lines 230-250 Link Here
230
                                <span class="stagename">Library</span>
230
                                <span class="stagename">Library</span>
231
                                <span class="stageduration">Duration (days)</span>
231
                                <span class="stageduration">Duration (days)</span>
232
                            </div>
232
                            </div>
233
                            <ul id="sortable_stages" data-rota-id="[% rota.rota_id %]">
233
                            <ul id="sortable_stages" data-rota-id="[% rota.rota_id | html %]">
234
                                [% FOREACH stage IN existing_stages %]
234
                                [% FOREACH stage IN existing_stages %]
235
                                    <li id="stage_[% stage.stage_id %]">
235
                                    <li id="stage_[% stage.stage_id | html %]">
236
                                        <span data-toggle="tooltip" title="Drag and drop to move this stage to another position" data-placement="right" class="stagename">
236
                                        <span data-toggle="tooltip" title="Drag and drop to move this stage to another position" data-placement="right" class="stagename">
237
                                            [% IF existing_stages.size > 1 %]
237
                                            [% IF existing_stages.size > 1 %]
238
                                                <i class="drag_handle fa fa-lg fa-bars"></i>
238
                                                <i class="drag_handle fa fa-lg fa-bars"></i>
239
                                            [% END %]
239
                                            [% END %]
240
                                            [% Branches.GetName(stage.branchcode_id) %]
240
                                            [% Branches.GetName(stage.branchcode_id) | html %]
241
                                        </span>
241
                                        </span>
242
                                        <span class="stageduration">[% stage.duration %]</span>
242
                                        <span class="stageduration">[% stage.duration | html %]</span>
243
                                        <span class="stageactions">
243
                                        <span class="stageactions">
244
                                            <a class="btn btn-default btn-xs" href="?op=create_edit_stage&amp;stage_id=[% stage.stage_id %]">
244
                                            <a class="btn btn-default btn-xs" href="?op=create_edit_stage&amp;stage_id=[% stage.stage_id | uri %]">
245
                                                <i class="fa fa-pencil"></i> Edit
245
                                                <i class="fa fa-pencil"></i> Edit
246
                                            </a>
246
                                            </a>
247
                                            <a class="btn btn-default btn-xs" href="?op=confirm_delete_stage&amp;stage_id=[% stage.stage_id %]">
247
                                            <a class="btn btn-default btn-xs" href="?op=confirm_delete_stage&amp;stage_id=[% stage.stage_id | uri %]">
248
                                                <i class="fa fa-trash"></i> Delete
248
                                                <i class="fa fa-trash"></i> Delete
249
                                            </a>
249
                                            </a>
250
                                        </span>
250
                                        </span>
Lines 259-265 Link Here
259
                [% ELSIF (op == 'create_edit_stage') %]
259
                [% ELSIF (op == 'create_edit_stage') %]
260
260
261
                    [% IF stage.id %]
261
                    [% IF stage.id %]
262
                        <h2>Edit "[% Branches.GetName(stage.branchcode_id) %]"</h2>
262
                        <h2>Edit "[% Branches.GetName(stage.branchcode_id) | html %]"</h2>
263
                    [% ELSE %]
263
                    [% ELSE %]
264
                        <h2>Create new stage</h2>
264
                        <h2>Create new stage</h2>
265
                    [% END %]
265
                    [% END %]
Lines 278-286 Link Here
278
                                    <select name="branchcode" id="branch">
278
                                    <select name="branchcode" id="branch">
279
                                        [% FOREACH branch IN branches %]
279
                                        [% FOREACH branch IN branches %]
280
                                            [% IF branch.branchcode == stage.branchcode_id %]
280
                                            [% IF branch.branchcode == stage.branchcode_id %]
281
                                                <option value="[% branch.branchcode %]" selected>[% Branches.GetName(branch.branchcode) %]</option>
281
                                                <option value="[% branch.branchcode | html %]" selected>[% Branches.GetName(branch.branchcode) | html %]</option>
282
                                            [% ELSE %]
282
                                            [% ELSE %]
283
                                                <option value="[% branch.branchcode %]">[% Branches.GetName(branch.branchcode) %]</option>
283
                                                <option value="[% branch.branchcode | html %]">[% Branches.GetName(branch.branchcode) | html %]</option>
284
                                            [% END %]
284
                                            [% END %]
285
                                        [% END %]
285
                                        [% END %]
286
                                    </select>
286
                                    </select>
Lines 288-304 Link Here
288
                                </li>
288
                                </li>
289
                                <li>
289
                                <li>
290
                                    <label class="required" for="duration">Duration:</label>
290
                                    <label class="required" for="duration">Duration:</label>
291
                                    <input type="text" id="duration" name="duration" value="[% stage.duration %]" required="required" placeholder="Duration (days)">
291
                                    <input type="text" id="duration" name="duration" value="[% stage.duration | html %]" required="required" placeholder="Duration (days)">
292
                                    <span class="required">Required</span>
292
                                    <span class="required">Required</span>
293
                                </li>
293
                                </li>
294
                            </ol>
294
                            </ol>
295
                        </fieldset>
295
                        </fieldset>
296
                        <fieldset class="action">
296
                        <fieldset class="action">
297
                            <input type="submit" value="Save">
297
                            <input type="submit" value="Save">
298
                            <a href="/cgi-bin/koha/tools/stockrotation.pl?op=manage_stages&amp;rota_id=[% rota_id %]" class="cancel">Cancel</a>
298
                            <a href="/cgi-bin/koha/tools/stockrotation.pl?op=manage_stages&amp;rota_id=[% rota_id | uri %]" class="cancel">Cancel</a>
299
                        </fieldset>
299
                        </fieldset>
300
                        <input type="hidden" name="stage_id" value="[% stage.id %]">
300
                        <input type="hidden" name="stage_id" value="[% stage.id | html %]">
301
                        <input type="hidden" name="rota_id" value="[% rota_id %]">
301
                        <input type="hidden" name="rota_id" value="[% rota_id | html %]">
302
                        <input type="hidden" name="op" value="process_stage">
302
                        <input type="hidden" name="op" value="process_stage">
303
                    </form>
303
                    </form>
304
                [% ELSIF (op == 'confirm_remove_from_rota') %]
304
                [% ELSIF (op == 'confirm_remove_from_rota') %]
Lines 306-313 Link Here
306
                    <div class="dialog alert">
306
                    <div class="dialog alert">
307
                        <h3>Are you sure you wish to remove this item from it's rota</h3>
307
                        <h3>Are you sure you wish to remove this item from it's rota</h3>
308
                        <p>
308
                        <p>
309
                            <a class="btn btn-default btn-xs approve" href="?op=remove_item_from_stage&amp;item_id=[% item_id %]&amp;stage_id=[% stage_id %]&amp;rota_id=[% rota_id %]"><i class="fa fa-fw fa-check"></i>Yes</a>
309
                            <a class="btn btn-default btn-xs approve" href="?op=remove_item_from_stage&amp;item_id=[% item_id | uri %]&amp;stage_id=[% stage_id | uri %]&amp;rota_id=[% rota_id | uri %]"><i class="fa fa-fw fa-check"></i>Yes</a>
310
                            <a class="btn btn-default btn-xs deny" href="?op=manage_items&amp;rota_id=[% rota_id %]"><i class="fa fa-fw fa-remove"></i>No</a>
310
                            <a class="btn btn-default btn-xs deny" href="?op=manage_items&amp;rota_id=[% rota_id | uri %]"><i class="fa fa-fw fa-remove"></i>No</a>
311
                        </p>
311
                        </p>
312
                    </div>
312
                    </div>
313
                [% ELSIF (op == 'confirm_delete_stage') %]
313
                [% ELSIF (op == 'confirm_delete_stage') %]
Lines 318-330 Link Here
318
                            <p>This stage contains the following item(s):</p>
318
                            <p>This stage contains the following item(s):</p>
319
                            <ul>
319
                            <ul>
320
                                [% FOREACH item IN stage.stockrotationitems %]
320
                                [% FOREACH item IN stage.stockrotationitems %]
321
                                    <li>[% item.itemnumber.biblio.title %] (Barcode: [% item.itemnumber.barcode %])</li>
321
                                    <li>[% item.itemnumber.biblio.title | html %] (Barcode: [% item.itemnumber.barcode | html %])</li>
322
                                [% END %]
322
                                [% END %]
323
                            </ul>
323
                            </ul>
324
                        [% END %]
324
                        [% END %]
325
                        <p>
325
                        <p>
326
                            <a class="btn btn-default btn-xs approve" href="?op=delete_stage&amp;stage_id=[% stage.stage_id %]"><i class="fa fa-fw fa-check"></i>Yes</a>
326
                            <a class="btn btn-default btn-xs approve" href="?op=delete_stage&amp;stage_id=[% stage.stage_id | uri %]"><i class="fa fa-fw fa-check"></i>Yes</a>
327
                            <a class="btn btn-default btn-xs deny" href="?op=manage_stages&amp;rota_id=[% stage.rota.rota_id %]"><i class="fa fa-fw fa-remove"></i>No</a>
327
                            <a class="btn btn-default btn-xs deny" href="?op=manage_stages&amp;rota_id=[% stage.rota.rota_id | uri %]"><i class="fa fa-fw fa-remove"></i>No</a>
328
                        </p>
328
                        </p>
329
                    </div>
329
                    </div>
330
                [% ELSIF (op == 'manage_items') %]
330
                [% ELSIF (op == 'manage_items') %]
Lines 341-352 Link Here
341
                        </div>
341
                        </div>
342
                    [% END %]
342
                    [% END %]
343
343
344
                    <h2>Manage [% rota.title %] items</h2>
344
                    <h2>Manage [% rota.title | html %] items</h2>
345
345
346
                    <div>
346
                    <div>
347
                        <form id="add_rota_item_form" method="post" enctype="multipart/form-data" class="validated">
347
                        <form id="add_rota_item_form" method="post" enctype="multipart/form-data" class="validated">
348
                            <fieldset class="rows">
348
                            <fieldset class="rows">
349
                                <legend>Add item to &quot;[% rota.title %]&quot;</legend>
349
                                <legend>Add item to &quot;[% rota.title | html %]&quot;</legend>
350
                                <ol>
350
                                <ol>
351
                                    <li>
351
                                    <li>
352
                                        <label for="barcode">Barcode:</label>
352
                                        <label for="barcode">Barcode:</label>
Lines 366-378 Link Here
366
                            <fieldset class="action">
366
                            <fieldset class="action">
367
                                <input type="submit" value="Save">
367
                                <input type="submit" value="Save">
368
                            </fieldset>
368
                            </fieldset>
369
                            <input type="hidden" name="rota_id" value="[% rota.id %]">
369
                            <input type="hidden" name="rota_id" value="[% rota.id | html %]">
370
                            <input type="hidden" name="op" value="add_items_to_rota">
370
                            <input type="hidden" name="op" value="add_items_to_rota">
371
                        </form>
371
                        </form>
372
                    </div>
372
                    </div>
373
373
374
                    [% IF items.count > 0 %]
374
                    [% IF items.count > 0 %]
375
                        <h3>Manage items assigned to &quot;[% rota.title %]&quot;</h3>
375
                        <h3>Manage items assigned to &quot;[% rota.title | html %]&quot;</h3>
376
                        <table id="sr_manage_items" class="items_table" role="grid">
376
                        <table id="sr_manage_items" class="items_table" role="grid">
377
                            <thead>
377
                            <thead>
378
                                <th>Barcode</th>
378
                                <th>Barcode</th>
Lines 386-396 Link Here
386
                            <tbody>
386
                            <tbody>
387
                                [% FOREACH item IN items %]
387
                                [% FOREACH item IN items %]
388
                                    <tr>
388
                                    <tr>
389
                                        <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.id %]&amp;biblionumber=[% item.itemnumber.biblio.id %]#item[% item.id %]">[% item.itemnumber.barcode %]</a></td>
389
                                        <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% item.id | uri %]&amp;biblionumber=[% item.itemnumber.biblio.id | uri %]#item[% item.id | uri %]">[% item.itemnumber.barcode | html %]</a></td>
390
                                        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.itemnumber.biblio.id %]">[% item.itemnumber.biblio.title %]</a></td>
390
                                        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.itemnumber.biblio.id | uri %]">[% item.itemnumber.biblio.title | html %]</a></td>
391
                                        <td>[% item.itemnumber.biblio.author %]</td>
391
                                        <td>[% item.itemnumber.biblio.author | html %]</td>
392
                                        <td>[% item.itemnumber.itemcallnumber %]</td>
392
                                        <td>[% item.itemnumber.itemcallnumber | html %]</td>
393
                                        <td>[% item.itemnumber.get_transfer ? 'Yes' : 'No' %]</td>
393
                                        <td>[% item.itemnumber.get_transfer ? 'Yes' : 'No' | html %]</td>
394
                                        <td>
394
                                        <td>
395
                                            [% FOREACH this_stage IN stages %]
395
                                            [% FOREACH this_stage IN stages %]
396
                                                [% IF this_stage.stage_id == item.stage.stage_id %]
396
                                                [% IF this_stage.stage_id == item.stage.stage_id %]
Lines 398-415 Link Here
398
                                                [% ELSE %]
398
                                                [% ELSE %]
399
                                                    <span class="stage">
399
                                                    <span class="stage">
400
                                                [% END %]
400
                                                [% END %]
401
                                                [% Branches.GetName(this_stage.branchcode_id) %] ([% this_stage.duration %])
401
                                                [% Branches.GetName(this_stage.branchcode_id) | html %] ([% this_stage.duration | html %])
402
                                                </span>
402
                                                </span>
403
                                                &raquo;
403
                                                &raquo;
404
                                            [% END %]
404
                                            [% END %]
405
                                            [% IF stages.size > 0 %]
405
                                            [% IF stages.size > 0 %]
406
                                                <span class="stage">[% rota.cyclical ? 'START' : 'END' %]</span>
406
                                                <span class="stage">[% rota.cyclical ? 'START' : 'END' | html %]</span>
407
                                            [% END %]
407
                                            [% END %]
408
                                        </td>
408
                                        </td>
409
                                        <td class="actions">
409
                                        <td class="actions">
410
                                            [% in_transit = item.itemnumber.get_transfer %]
410
                                            [% in_transit = item.itemnumber.get_transfer %]
411
                                            [% IF !in_transit && stages.size > 1 %]
411
                                            [% IF !in_transit && stages.size > 1 %]
412
                                                <a class="btn btn-default btn-xs" href="?op=move_to_next_stage&amp;rota_id=[% rota.id %]&amp;item_id=[% item.id %]&amp;stage_id=[% item.stage.stage_id %]">
412
                                                <a class="btn btn-default btn-xs" href="?op=move_to_next_stage&amp;rota_id=[% rota.id | uri %]&amp;item_id=[% item.id | uri %]&amp;stage_id=[% item.stage.stage_id | uri %]">
413
                                            [% ELSE %]
413
                                            [% ELSE %]
414
                                                <a class="btn btn-default btn-xs" disabled>
414
                                                <a class="btn btn-default btn-xs" disabled>
415
                                            [% END %]
415
                                            [% END %]
Lines 417-431 Link Here
417
                                                Move to next stage
417
                                                Move to next stage
418
                                            </a>
418
                                            </a>
419
                                            [% IF !in_transit %]
419
                                            [% IF !in_transit %]
420
                                                <a class="btn btn-default btn-xs" href="?op=toggle_in_demand&amp;stage_id=[% item.stage.stage_id %]&amp;item_id=[% item.id %]&amp;rota_id=[% rota.id %]">
420
                                                <a class="btn btn-default btn-xs" href="?op=toggle_in_demand&amp;stage_id=[% item.stage.stage_id | uri %]&amp;item_id=[% item.id | uri %]&amp;rota_id=[% rota.id | uri %]">
421
                                            [% ELSE %]
421
                                            [% ELSE %]
422
                                                <a class="btn btn-default btn-xs" disabled>
422
                                                <a class="btn btn-default btn-xs" disabled>
423
                                            [% END %]
423
                                            [% END %]
424
                                                <i class="fa fa-fire"></i>
424
                                                <i class="fa fa-fire"></i>
425
                                                [% item.indemand ? 'Remove &quot;In demand&quot;' : 'Add &quot;In demand&quot;' %]
425
                                                [% item.indemand ? 'Remove &quot;In demand&quot;' : 'Add &quot;In demand&quot;' | html %]
426
                                            </a>
426
                                            </a>
427
                                            [% IF !in_transit %]
427
                                            [% IF !in_transit %]
428
                                                <a class="btn btn-default btn-xs" href="?op=confirm_remove_from_rota&amp;stage_id=[% item.stage.stage_id %]&amp;item_id=[% item.id %]&amp;rota_id=[% rota.id %]">
428
                                                <a class="btn btn-default btn-xs" href="?op=confirm_remove_from_rota&amp;stage_id=[% item.stage.stage_id | uri %]&amp;item_id=[% item.id | uri %]&amp;rota_id=[% rota.id | uri %]">
429
                                            [% ELSE %]
429
                                            [% ELSE %]
430
                                                <a class="btn btn-default btn-xs" disabled>
430
                                                <a class="btn btn-default btn-xs" disabled>
431
                                            [% END %]
431
                                            [% END %]
Lines 452-458 Link Here
452
                            <h4>Items added to rota:</h4>
452
                            <h4>Items added to rota:</h4>
453
                            <ul>
453
                            <ul>
454
                                [% FOREACH item_ok IN barcode_status.ok %]
454
                                [% FOREACH item_ok IN barcode_status.ok %]
455
                                    <li>[% item_ok.biblio.title %]</li>
455
                                    <li>[% item_ok.biblio.title | html %]</li>
456
                                [% END %]
456
                                [% END %]
457
                            </ul>
457
                            </ul>
458
                        [% END %]
458
                        [% END %]
Lines 460-466 Link Here
460
                            <h4>Items already on this rota:</h4>
460
                            <h4>Items already on this rota:</h4>
461
                            <ul>
461
                            <ul>
462
                                [% FOREACH item_on_this IN barcode_status.on_this %]
462
                                [% FOREACH item_on_this IN barcode_status.on_this %]
463
                                    <li>[% item_on_this.biblio.title %]</li>
463
                                    <li>[% item_on_this.biblio.title | html %]</li>
464
                                [% END %]
464
                                [% END %]
465
                            </ul>
465
                            </ul>
466
                        [% END %]
466
                        [% END %]
Lines 468-474 Link Here
468
                            <h4>Barcodes not found:</h4>
468
                            <h4>Barcodes not found:</h4>
469
                            <ul>
469
                            <ul>
470
                                [% FOREACH barcode_not_found IN barcode_status.not_found %]
470
                                [% FOREACH barcode_not_found IN barcode_status.not_found %]
471
                                    <li>[% barcode_not_found %]</li>
471
                                    <li>[% barcode_not_found | html %]</li>
472
                                [% END %]
472
                                [% END %]
473
                            </ul>
473
                            </ul>
474
                        [% END %]
474
                        [% END %]
Lines 476-482 Link Here
476
                            <h4>Items found on other rotas:</h4>
476
                            <h4>Items found on other rotas:</h4>
477
                            <ul>
477
                            <ul>
478
                                [% FOREACH item_on_other IN barcode_status.on_other %]
478
                                [% FOREACH item_on_other IN barcode_status.on_other %]
479
                                    <li>[% item_on_other.biblio.title %]</li>
479
                                    <li>[% item_on_other.biblio.title | html %]</li>
480
                                [% END %]
480
                                [% END %]
481
                            </ul>
481
                            </ul>
482
                        [% END %]
482
                        [% END %]
Lines 486-503 Link Here
486
                            <fieldset>
486
                            <fieldset>
487
                                <legend>Select items to move to this rota:</legend>
487
                                <legend>Select items to move to this rota:</legend>
488
                                [% FOREACH item_on_other IN barcode_status.on_other %]
488
                                [% FOREACH item_on_other IN barcode_status.on_other %]
489
                                    <li><input type="checkbox" name="move_item" value="[% item_on_other.itemnumber %]"> [% item_on_other.biblio.title %] (Currently on &quot;[% item_on_other.stockrotationitem.stage.rota.title %]&quot;)</li>
489
                                    <li><input type="checkbox" name="move_item" value="[% item_on_other.itemnumber | html %]"> [% item_on_other.biblio.title | html %] (Currently on &quot;[% item_on_other.stockrotationitem.stage.rota.title | html %]&quot;)</li>
490
                                [% END %]
490
                                [% END %]
491
491
492
                            </fieldset>
492
                            </fieldset>
493
                            <fieldset class="action">
493
                            <fieldset class="action">
494
                                <input type="submit" value="Save">
494
                                <input type="submit" value="Save">
495
                            </fieldset>
495
                            </fieldset>
496
                            <input type="hidden" name="rota_id" value="[% rota_id %]">
496
                            <input type="hidden" name="rota_id" value="[% rota_id | html %]">
497
                            <input type="hidden" name="op" value="move_items_to_rota">
497
                            <input type="hidden" name="op" value="move_items_to_rota">
498
                        </form>
498
                        </form>
499
                    [% END %]
499
                    [% END %]
500
                    <p><a href="?op=manage_items&amp;rota_id=[% rota_id %]">Return to rota</a></p>
500
                    <p><a href="?op=manage_items&amp;rota_id=[% rota_id | uri %]">Return to rota</a></p>
501
501
502
                [% END %]
502
                [% END %]
503
            </div>
503
            </div>
504
- 

Return to bug 11897