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

(-)a/acqui/transferorder.pl (+1 lines)
Lines 94-99 if( $basketno && $ordernumber) { Link Here
94
    }
94
    }
95
    $template->param(
95
    $template->param(
96
        show_baskets => 1,
96
        show_baskets => 1,
97
        query          => $query,
97
        basketsloop => \@basketsloop,
98
        basketsloop => \@basketsloop,
98
        basketfromname => $basketfrom->{basketname},
99
        basketfromname => $basketfrom->{basketname},
99
    );
100
    );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt (-74 / +106 lines)
Lines 14-73 Link Here
14
<body id="acq_transferorder" class="acq">
14
<body id="acq_transferorder" class="acq">
15
    <div class="container-fluid">
15
    <div class="container-fluid">
16
        <h1>Transfer order</h1>
16
        <h1>Transfer order</h1>
17
        [% IF ( bookselleridfrom ) %]
17
18
            <h3>Search for a vendor to transfer to</h3>
19
              <div class="transferinfo">
20
                <ul>
21
                  <li><span class="label">From vendor: </span>[% booksellerfromname | html %]</li>
22
                  <li><span class="label">Basket: </span>[% basketfromname | html %]</li>
23
                  <li><span class="label">[% tp('noun', 'Order') | html %]: </span>[% ordernumber | html %]</li>
24
                </ul>
25
              </div>
26
        [% ELSE %]
27
            <h3>Search for a vendor to transfer from</h3>
28
        [% END %]
29
        <form method="get" action="transferorder.pl">
30
            <fieldset>
31
            <input type="hidden" name="op" value="do_search" />
32
            [% IF ( ordernumber ) %]
33
                <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
34
            [% END %]
35
            [% IF ( bookselleridfrom ) %]
36
                <input type="hidden" name="bookselleridfrom" value="[% bookselleridfrom | html %]" />
37
            [% END %]
38
            <label for="query">Vendor:</label>
39
            <input type="text" id="query" name="query" />
40
            <input type="submit" class="btn btn-primary" value="Search" />
41
            </fieldset>
42
        </form>
43
        [% IF ( show_baskets ) %]
18
        [% IF ( show_baskets ) %]
44
            <h3>Baskets for [% booksellertoname | html %]</h3>
45
            [% IF ( basketsloop ) %]
19
            [% IF ( basketsloop ) %]
46
                <table>
20
                <div class="page-section">
47
                    <thead>
21
                    <h3>Baskets for [% booksellertoname | html %]</h3>
48
                        <tr>
22
                    <table>
49
                            <th>Basket (#)</th>
23
                        <thead>
50
                            <th>[% tp('basket created by', 'Created by') | html %]</th>
24
                            <tr>
51
                            <th>Date</th>
25
                                <th>Basket (#)</th>
52
                            <th>&nbsp;</th>
26
                                <th>[% tp('basket created by', 'Created by') | html %]</th>
53
                        </tr>
27
                                <th>Date</th>
54
                    </thead>
28
                                <th>&nbsp;</th>
55
                    <tbody>
29
                            </tr>
56
                        [% FOREACH basket IN basketsloop %]
30
                        </thead>
57
                          <tr>
31
                        <tbody>
58
                            <td>[% basket.basketname | html %] (#[% basket.basketno | html %])</td>
32
                            [% FOREACH basket IN basketsloop %]
59
                            <td>[% basket.createdby | html %]</td>
33
                            <tr>
60
                            <td>[% basket.creationdate | $KohaDates %]</td>
34
                                <td>[% basket.basketname | html %] (#[% basket.basketno | html %])</td>
61
                            <td><a class="btn btn-default btn-xs confirm_transfer" href="transferorder.pl?basketno=[% basket.basketno | html %]&ordernumber=[% ordernumber | html %]">Choose</a>
35
                                <td>[% basket.createdby | html %]</td>
62
                          </tr>
36
                                <td>[% basket.creationdate | $KohaDates %]</td>
63
                        [% END %]
37
                                <td><a class="btn btn-default btn-xs confirm_transfer" href="transferorder.pl?basketno=[% basket.basketno | html %]&ordernumber=[% ordernumber | html %]">Choose</a>
64
                    </tbody>
38
                            </tr>
65
                </table>
39
                            [% END %]
40
                        </tbody>
41
                    </table>
42
                </div>
66
            [% ELSE %]
43
            [% ELSE %]
67
                <p>There are no open baskets for this vendor.</p>
44
                <p>There are no open baskets for this vendor.</p>
68
            [% END %]
45
            [% END %]
69
        [% END %]
46
        [% ELSIF ( ordersloop ) %]
70
        [% IF ( ordersloop ) %]
71
            <h3>Orders for [% booksellerfromname | html %]</h3>
47
            <h3>Orders for [% booksellerfromname | html %]</h3>
72
            <table>
48
            <table>
73
                <thead>
49
                <thead>
Lines 97-132 Link Here
97
                    [% END %]
73
                    [% END %]
98
                </tbody>
74
                </tbody>
99
            </table>
75
            </table>
100
        [% END %]
76
        [% ELSIF ( do_search ) %]
101
        [% IF ( do_search ) %]
102
            [% IF ( bookselleridfrom ) %]
103
                <h3>Choose a vendor to transfer to</h3>
104
            [% ELSE %]
105
                <h3>Choose a vendor to transfer from</h3>
106
            [% END %]
107
            [% IF booksellers.count %]
77
            [% IF booksellers.count %]
108
                <table>
78
                [% IF ( bookselleridfrom ) %]
109
                    <thead>
79
                    <h3>Choose a vendor to transfer to</h3>
110
                        <tr>
80
                [% ELSE %]
111
                            <th>Name</th>
81
                    <h3>Choose a vendor to transfer from</h3>
112
                            <th>&nbsp;</th>
82
                [% END %]
113
                        </tr>
83
                <div class="page-section">
114
                    </thead>
84
                    <table>
115
                    <tbody>
85
                        <thead>
116
                        [% FOREACH bookseller IN booksellers %]
86
                            <tr>
117
                          <tr>
87
                                <th>Name</th>
118
                            <td>[% bookseller.name | html %]</td>
88
                                <th>&nbsp;</th>
119
                            <td><a class="btn btn-default btn-xs" href="transferorder.pl?[% IF (bookselleridfrom) %]bookselleridto[% ELSE %]bookselleridfrom[% END %]=[% bookseller.id | html %][% IF (ordernumber) %]&ordernumber=[% ordernumber | html %][% END %]">Choose</a></td>
89
                            </tr>
120
                          </tr>
90
                        </thead>
121
                        [% END %]
91
                        <tbody>
122
                    </tbody>
92
                            [% FOREACH bookseller IN booksellers %]
123
                 </table>
93
                            <tr>
94
                                <td>[% bookseller.name | html %]</td>
95
                                <td><a class="btn btn-default btn-xs" href="transferorder.pl?[% IF (bookselleridfrom) %]bookselleridto[% ELSE %]bookselleridfrom[% END %]=[% bookseller.id | html %][% IF (ordernumber) %]&ordernumber=[% ordernumber | html %][% END %][% IF (query) %]&query=[% query | html %][% END %]">Choose</a></td>
96
                            </tr>
97
                            [% END %]
98
                        </tbody>
99
                    </table>
100
                </div>
124
            [% ELSE %]
101
            [% ELSE %]
125
                <p>No results found.</p>
102
                <p>No results found.</p>
126
            [% END %]
103
            [% END %]
104
        [% ELSE %]
105
            [% IF ( bookselleridfrom ) %]
106
                <h3>Search for a vendor to transfer to</h3>
107
                <div class="transferinfo">
108
                    <ul>
109
                    <li><span class="label">From vendor: </span>[% booksellerfromname | html %]</li>
110
                    <li><span class="label">Basket: </span>[% basketfromname | html %]</li>
111
                    <li><span class="label">[% tp('noun', 'Order') | html %]: </span>[% ordernumber | html %]</li>
112
                    </ul>
113
                </div>
114
            [% ELSE %]
115
                <h3>Search for a vendor to transfer from</h3>
116
            [% END %]
117
            <form method="get" id="vendor_search_form" action="transferorder.pl">
118
                <fieldset class="brief">
119
                    <input type="hidden" name="op" value="do_search" />
120
                    [% IF ( ordernumber ) %]
121
                        <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
122
                    [% END %]
123
                    [% IF ( bookselleridfrom ) %]
124
                        <input type="hidden" name="bookselleridfrom" value="[% bookselleridfrom | html %]" />
125
                    [% END %]
126
                    <ol>
127
                        <li>
128
                            <label for="query">Vendor:</label>
129
                            <input type="text" id="query" name="query" autofocus="autofocus" />
130
                        </li>
131
                    </ol>
132
                </fieldset>
133
            </form>
127
        [% END %]
134
        [% END %]
128
135
129
<div id="closewindow"><a href="#" class="btn btn-default btn-default close">Cancel</a></div>
136
        <nav class="navbar navbar-default navbar-fixed-bottom">
137
            <div class="container-fluid">
138
                <fieldset class="action">
139
                    [% IF ( show_baskets ) %]
140
                        <form action="/cgi-bin/koha/acqui/transferorder.pl">
141
                            <input type="hidden" name="op" value="do_search" />
142
                            <input type="hidden" name="query" value="[% query | html %]" />
143
                            <input type="hidden" name="bookselleridfrom" value="[% bookselleridfrom | html %]" />
144
                            <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
145
                            <button class="btn btn-default" type="submit"><i class="fa fa-arrow-left"></i> Select a different vendor</button>
146
                        </form>
147
                    [% ELSIF ( do_search ) %]
148
                        <form action="/cgi-bin/koha/acqui/transferorder.pl">
149
                            <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
150
                            <button class="btn btn-default" type="submit"><i class="fa fa-arrow-left"></i> Search again</button>
151
                        </form>
152
                    [% ELSE %]
153
                        <input type="submit" id="vendor_search_submit" class="btn btn-primary" value="Search" />
154
                    [% END %]
155
                    <button type="button" class="btn btn-default close_window">Close window</button>
156
                </fieldset>
157
            </div>
158
        </nav>
130
159
131
[% MACRO jsinclude BLOCK %]
160
[% MACRO jsinclude BLOCK %]
132
    [% IF transferred %]
161
    [% IF transferred %]
Lines 142-147 Link Here
142
                $(".confirm_transfer").on("click",function(){
171
                $(".confirm_transfer").on("click",function(){
143
                    return confirm( _("Transfer order to this basket?") );
172
                    return confirm( _("Transfer order to this basket?") );
144
                });
173
                });
174
                $("#vendor_search_submit").on("click", function(e){
175
                    e.preventDefault();
176
                    $("#vendor_search_form").submit();
177
                });
145
            });
178
            });
146
        </script>
179
        </script>
147
    [% END %]
180
    [% END %]
148
- 

Return to bug 35363