Make the download button of orders reusable
This commit is contained in:
parent
3e156bbbf3
commit
bd49a64cd7
7 changed files with 58 additions and 58 deletions
12
app/views/shared/_order_download_button.html.haml
Normal file
12
app/views/shared/_order_download_button.html.haml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
.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')}
|
||||
Loading…
Add table
Add a link
Reference in a new issue