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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-19 / +18 lines)
Lines 1-16 Link Here
1
[% BLOCK btn_group %]
1
[% BLOCK csv_export %]
2
    <div class="btn-group">
2
    <div class="btn-group">
3
       <fieldset class="action">
3
        <a id="exportbutton" class="btn btn-default btn-sm" href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]"><i class="fa fa-download"></i> Export as CSV</a>
4
          <label for="csv_code">Select CSV profile:</label>
4
      <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
5
          <select id="csv_profile_for_export">
5
      <ul class="dropdown-menu" id="export-csv-menu">
6
             <option value="default">default</option>
6
          <li><a href="#">Default</a></li>
7
             [% IF csv_profiles %]
7
          [% IF csv_profiles %]
8
                [% FOR csv IN csv_profiles %]
8
              [% FOR csv IN csv_profiles %]
9
                   <option value="[% csv.export_format_id %]">[% csv.profile %]</option>
9
                <li><a href="#" data-value="[% csv.export_format_id %]">[% csv.profile %]</a></li>
10
                [% END %]
10
              [% END %]
11
             [% END %]
11
          [% END %]
12
          </select>
12
       </ul>
13
       </fieldset>
14
    </div>
13
    </div>
15
[% END %]
14
[% END %]
16
[% USE KohaDates %]
15
[% USE KohaDates %]
Lines 137-147 Link Here
137
            confirm_reopen();
136
            confirm_reopen();
138
        });
137
        });
139
        // Generates a dynamic link for exporting the selections data as CSV
138
        // Generates a dynamic link for exporting the selections data as CSV
140
        $("#exportbutton").click(function() {
139
        $("#exportbutton, #export-csv-menu a").click(function() {
141
            // Building the url from currently checked boxes
140
            // Building the url from currently checked boxes
142
            var url = '/cgi-bin/koha/acqui/basket.pl';
141
            var url = '/cgi-bin/koha/acqui/basket.pl';
143
            url += $('#exportbutton').attr('href');
142
            url += $('#exportbutton').attr('href');
144
            url += '&amp;csv_profile=' + $("#csv_profile_for_export option:selected").val();
143
            if($(this).attr("data-value")) {
144
                url += '&amp;csv_profile=' + $(this).attr("data-value");
145
            }
145
            // And redirecting to the CSV page
146
            // And redirecting to the CSV page
146
            location.href = url;
147
            location.href = url;
147
            return false;
148
            return false;
Lines 223-230 Link Here
223
                        </div>
224
                        </div>
224
                    [% END %]
225
                    [% END %]
225
226
226
                        [% PROCESS btn_group %]
227
                    [% PROCESS csv_export %]
227
                       <div class="btn-group"><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="exportbutton"><i class="fa fa-download"></i> Export as CSV</a></div>
228
228
229
                        [% IF ediaccount %]
229
                        [% IF ediaccount %]
230
                        <div class="btn-group"><a href="/cgi-bin/koha/acqui/edi_ean.pl?op=ediorder&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</a></div>
230
                        <div class="btn-group"><a href="/cgi-bin/koha/acqui/edi_ean.pl?op=ediorder&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</a></div>
Lines 300-307 Link Here
300
                <div id="toolbar" class="btn-toolbar">
300
                <div id="toolbar" class="btn-toolbar">
301
301
302
                    <div class="btn-group"><a href="#" class="btn btn-default btn-sm" id="reopenbutton"><i class="fa fa-refresh"></i> Reopen this basket</a></div>
302
                    <div class="btn-group"><a href="#" class="btn btn-default btn-sm" id="reopenbutton"><i class="fa fa-refresh"></i> Reopen this basket</a></div>
303
                    [% PROCESS btn_group %]
303
304
                    <div class="btn-group"><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="exportbutton"><i class="fa fa-download"></i> Export this basket as CSV</a></div>
304
                    [% PROCESS csv_export %]
305
305
306
                </div>
306
                </div>
307
                [% END %]
307
                [% END %]
308
- 

Return to bug 8612