foodsoft/app/views/shared/_order_download_button.html.haml
viehlieb f38e2bff70 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-24 13:05:24 +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