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

(-)a/catalogue/stockrotation.pl (-3 / +3 lines)
Lines 127-133 if (!defined $op) { Link Here
127
        C4::Search::enabled_staff_search_views
127
        C4::Search::enabled_staff_search_views
128
    );
128
    );
129
129
130
} elsif ($op eq "toggle_in_demand") {
130
} elsif ($op eq "cud-toggle_in_demand") {
131
131
132
    # Toggle in demand
132
    # Toggle in demand
133
    toggle_indemand($params{item_id}, $params{stage_id});
133
    toggle_indemand($params{item_id}, $params{stage_id});
Lines 135-141 if (!defined $op) { Link Here
135
    # Return to items list
135
    # Return to items list
136
    print $input->redirect("?biblionumber=$biblionumber");
136
    print $input->redirect("?biblionumber=$biblionumber");
137
137
138
} elsif ($op eq "remove_item_from_stage") {
138
} elsif ($op eq "cud-remove_item_from_stage") {
139
139
140
    # Remove from the stage
140
    # Remove from the stage
141
    remove_from_stage($params{item_id}, $params{stage_id});
141
    remove_from_stage($params{item_id}, $params{stage_id});
Lines 143-149 if (!defined $op) { Link Here
143
    # Return to items list
143
    # Return to items list
144
    print $input->redirect("?biblionumber=$biblionumber");
144
    print $input->redirect("?biblionumber=$biblionumber");
145
145
146
} elsif ($op eq "move_to_next_stage") {
146
} elsif ($op eq "cud-move_to_next_stage") {
147
147
148
    move_to_next_stage($params{item_id}, $params{stage_id});
148
    move_to_next_stage($params{item_id}, $params{stage_id});
149
149
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt (-11 / +34 lines)
Lines 112-136 Link Here
112
                                    [% IF item.stockrotationitem %]
112
                                    [% IF item.stockrotationitem %]
113
                                        [% in_transit = item.bib_item.get_transfer %]
113
                                        [% in_transit = item.bib_item.get_transfer %]
114
                                        [% IF !in_transit && item.stages.size > 1 %]
114
                                        [% IF !in_transit && item.stages.size > 1 %]
115
                                            <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 %]">
115
                                            <form id="move_to_next_stage_[% item.bib_item.id | html %]" method="post" action="/cgi-bin/koha/catalogue/stockrotation.pl">
116
                                                [% INCLUDE 'csrf-token.inc' %]
117
                                                <input type="hidden" name="op" value="cud-move_to_next_stage" />
118
                                                <input type="hidden" name="stage_id" value="[% item.stockrotationitem.stage.stage_id | html %]" />
119
                                                <input type="hidden" name="item_id" value="[% item.bib_item.id | html %]" />
120
                                                <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
121
                                                <button class="btn btn-default btn-xs" type="submit"><i class="fa fa-arrow-right"></i> Move to next stage</button>
122
                                            </form>
116
                                        [% ELSE %]
123
                                        [% ELSE %]
117
                                            <a class="btn btn-default btn-xs" disabled>
124
                                            <a class="btn btn-default btn-xs" disabled><i class="fa fa-arrow-right"></i> Move to next stage</a>
118
                                        [% END %]
125
                                        [% END %]
119
                                            <i class="fa fa-arrow-right"></i>
126
120
                                            Move to next stage
121
                                        </a>
122
                                        [% IF !in_transit %]
127
                                        [% IF !in_transit %]
123
                                            <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 %]">
128
                                            <form id="toggle_in_demand_[% item.bib_item.id | html %]" method="post" action="/cgi-bin/koha/catalogue/stockrotation.pl">
129
                                                [% INCLUDE 'csrf-token.inc' %]
130
                                                <input type="hidden" name="op" value="cud-toggle_in_demand" />
131
                                                <input type="hidden" name="stage_id" value="[% item.stockrotationitem.stage.stage_id | html %]" />
132
                                                <input type="hidden" name="item_id" value="[% item.bib_item.id | html %]" />
133
                                                <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
134
                                                <button class="btn btn-default btn-xs" type="submit"><i class="fa fa-fire"></i>
135
                                            [% IF item.stockrotationitem.indemand %]
136
                                                Remove "In demand"
137
                                            [% ELSE %]
138
                                                Add "In demand"
139
                                            [% END %]</button>
140
                                            </form>
124
                                        [% ELSE %]
141
                                        [% ELSE %]
125
                                            <a class="btn btn-default btn-xs" disabled>
142
                                            <a class="btn btn-default btn-xs" disabled><i class="fa fa-fire"></i>
126
                                        [% END %]
127
                                            <i class="fa fa-fire"></i>
128
                                            [% IF item.stockrotationitem.indemand %]
143
                                            [% IF item.stockrotationitem.indemand %]
129
                                                Remove "In demand"
144
                                                Remove "In demand"
130
                                            [% ELSE %]
145
                                            [% ELSE %]
131
                                                Add "In demand"
146
                                                Add "In demand"
132
                                            [% END %]
147
                                            [% END %]
133
                                        </a>
148
                                        </a>
149
                                        [% END %]
150
134
                                        [% IF !in_transit %]
151
                                        [% IF !in_transit %]
135
                                            <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 %]">
152
                                            <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 %]">
136
                                        [% ELSE %]
153
                                        [% ELSE %]
Lines 170-176 Link Here
170
        <div class="dialog alert">
187
        <div class="dialog alert">
171
            <h3>Are you sure you want to remove this item from it's rota?</h3>
188
            <h3>Are you sure you want to remove this item from it's rota?</h3>
172
            <p>
189
            <p>
173
                <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>
190
                <form id="remove_item_from_stage_[% item.bib_item.id | html %]" method="post" action="/cgi-bin/koha/catalogue/stockrotation.pl">
191
                    [% INCLUDE 'csrf-token.inc' %]
192
                    <input type="hidden" name="op" value="cud-remove_item_from_stage" />
193
                    <input type="hidden" name="stage_id" value="[% stage_id | html %]" />
194
                    <input type="hidden" name="item_id" value="[% item_id | html %]" />
195
                    <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
196
                    <button class="btn btn-default btn-xs approve" type="submit"><i class="fa fa-fw fa-check"></i>Yes</button>
197
                </form>
174
                <a class="btn btn-default btn-xs deny" href="?biblionumber=[% biblionumber | uri %]"><i class="fa fa-fw fa-times"></i>No</a>
198
                <a class="btn btn-default btn-xs deny" href="?biblionumber=[% biblionumber | uri %]"><i class="fa fa-fw fa-times"></i>No</a>
175
            </p>
199
            </p>
176
        </div>
200
        </div>
177
- 

Return to bug 36193