foodsoft/app/views/shared/_order_download_button.html.haml
viehlieb 690ea875b7 feat(order): export order to custom csv file
add custom_csv_collection to orders helper

add rute and controller method to orders controller

add custom csv to download dropdown

add functionality to choose column headers + order for custom csv and append order.sum gross&net to custom csv
2023-02-23 18:35:12 +01:00

13 lines
654 B
Text

.btn-group
= link_to '#', class: "btn #{klass} dropdown-toggle", data: {toggle: 'dropdown'} do
= t '.title'
%span.caret
%ul.dropdown-menu
%li= order_pdf(order, :groups, t('.group_pdf'))
%li= order_pdf(order, :articles, t('.article_pdf'))
%li= order_pdf(order, :matrix, t('.matrix_pdf'))
%li= order_pdf(order, :fax, t('.fax_pdf'))
- unless order.stockit?
%li= link_to t('.fax_txt'), order_path(order, format: :txt), {title: t('.download_file')}
%li= link_to t('.fax_csv'), order_path(order, format: :csv), {title: t('.download_file')}
%li= link_to t('.custom_csv'), custom_csv_order_path(order), remote: true