diff --git a/app/views/orders/show.html.haml b/app/views/orders/show.html.haml
index 9bc936f4..461f3762 100644
--- a/app/views/orders/show.html.haml
+++ b/app/views/orders/show.html.haml
@@ -65,19 +65,7 @@
= update_articles_link @order, t('.sort_article'), :articles, class: 'btn'
- unless @order.open?
- .btn-group
- = link_to '#', class: 'btn dropdown-toggle', data: {toggle: 'dropdown'} do
- = t '.download.title'
- %span.caret
- %ul.dropdown-menu
- %li= order_pdf(@order, :groups, t('.download.group_pdf'))
- %li= order_pdf(@order, :articles, t('.download.article_pdf'))
- %li= order_pdf(@order, :matrix, t('.download.matrix_pdf'))
- %li= order_pdf(@order, :fax, t('.download.fax_pdf'))
- - unless @order.stockit?
- %li= link_to t('.download.fax_txt'), order_path(@order, format: :txt), {title: t('.download.download_file')}
- %li= link_to t('.download.fax_csv'), order_path(@order, format: :csv), {title: t('.download.download_file')}
-
+ = render 'shared/order_download_button', order: @order, klass: ''
- if @order.open?
= link_to t('.action_end'), finish_order_path(@order), method: :post, class: 'btn btn-success',
data: {confirm: t('.confirm_end', order: @order.name)}
diff --git a/app/views/shared/_order_download_button.html.haml b/app/views/shared/_order_download_button.html.haml
new file mode 100644
index 00000000..6890c3ca
--- /dev/null
+++ b/app/views/shared/_order_download_button.html.haml
@@ -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')}
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 299bdc8e..df271261 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -1563,15 +1563,6 @@ de:
starts: läuft von %{starts}
starts_ends: läuft von %{starts} bis %{ends}
description2: "%{ordergroups} haben %{article_count} Artikel mit einem Gesamtwert von %{net_sum} / %{gross_sum} (netto / brutto) bestellt."
- download:
- article_pdf: Artikel PDF
- download_file: Download file
- fax_csv: Fax CSV
- fax_pdf: Fax PDF
- fax_txt: Fax Text
- group_pdf: Gruppen PDF
- matrix_pdf: Matrix PDF
- title: Download
group_orders: 'Gruppenbestellungen:'
search_placeholder:
articles: Suche nach Artikeln ...
@@ -1717,6 +1708,15 @@ de:
title: Laufende Bestellungen
total_sum: Gesamtsumme
who_ordered: Wer hat bestellt?
+ order_download_button:
+ article_pdf: Artikel PDF
+ download_file: Download file
+ fax_csv: Fax CSV
+ fax_pdf: Fax PDF
+ fax_txt: Fax Text
+ group_pdf: Gruppen PDF
+ matrix_pdf: Matrix PDF
+ title: Download
task_list:
accept_task: Aufgabe übernehmen
done: Erledigt
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 42162c93..5bc9ba0b 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1573,15 +1573,6 @@ en:
starts: open from %{starts}
starts_ends: open from %{starts} until %{ends}
description2: "%{ordergroups} ordered %{article_count} articles, with a total value of %{net_sum} / %{gross_sum} (net / gross)."
- download:
- article_pdf: Article PDF
- download_file: Download file
- fax_csv: Fax CSV
- fax_pdf: Fax PDF
- fax_txt: Fax text
- group_pdf: Group PDF
- matrix_pdf: Matrix PDF
- title: Download
group_orders: 'Group orders:'
search_placeholder:
articles: Search for articles...
@@ -1727,6 +1718,15 @@ en:
title: Current orders
total_sum: Total sum
who_ordered: Who ordered?
+ order_download_button:
+ article_pdf: Article PDF
+ download_file: Download file
+ fax_csv: Fax CSV
+ fax_pdf: Fax PDF
+ fax_txt: Fax text
+ group_pdf: Group PDF
+ matrix_pdf: Matrix PDF
+ title: Download
task_list:
accept_task: Accept task
done: Done
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 6d4c3f1d..982e2d78 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -1539,15 +1539,6 @@ es:
starts: abierto desde %{starts}
starts_ends: abierto desde %{starts} hasta %{ends}
description2: "%{ordergroups} ha pedido %{article_count} artículos, con un valor total de %{net_sum} / %{gross_sum} (neto / bruto)."
- download:
- article_pdf: Artículos PDF
- download_file: Descargar archivo
- fax_csv: Fax CSV
- fax_pdf: Fax PDF
- fax_txt: Fax text
- group_pdf: Group PDF
- matrix_pdf: Matrix PDF
- title: Descargar
group_orders: 'Pedidos del grupo:'
search_placeholder:
articles: Busca artículos...
@@ -1695,6 +1686,15 @@ es:
title: Pedidos activos
total_sum: Suma total
who_ordered: "¿Quién ha pedido?"
+ order_download_button:
+ article_pdf: Artículos PDF
+ download_file: Descargar archivo
+ fax_csv: Fax CSV
+ fax_pdf: Fax PDF
+ fax_txt: Fax text
+ group_pdf: Group PDF
+ matrix_pdf: Matrix PDF
+ title: Descargar
task_list:
accept_task: Acepta la tarea
done: Hecho
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 91fb961f..34d423a6 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -1536,15 +1536,6 @@ fr:
starts: ouverte du %{starts}
starts_ends: ouverte du %{starts} au %{ends}
description2: "%{ordergroups} ont commandé %{article_count} articles, pour un montant total de %{net_sum} (net)/ %{gross_sum} (brut)"
- download:
- article_pdf: Liste des articles en PDF
- download_file: Télécharger
- fax_csv: Fax CSV
- fax_pdf: Fax au format PDF
- fax_txt: Fax au format texte
- group_pdf: Liste des cellules en PDF
- matrix_pdf: Matrice de répartition en PDF
- title: Télécharger
group_orders: 'Commandes des cellules:'
search_placeholder:
articles: Rechercher des articles...
@@ -1690,6 +1681,15 @@ fr:
title: Commandes en cours
total_sum: Total
who_ordered: Qui a commandé?
+ order_download_button:
+ article_pdf: Liste des articles en PDF
+ download_file: Télécharger
+ fax_csv: Fax CSV
+ fax_pdf: Fax au format PDF
+ fax_txt: Fax au format texte
+ group_pdf: Liste des cellules en PDF
+ matrix_pdf: Matrice de répartition en PDF
+ title: Télécharger
task_list:
accept_task: Te charger de ce boulot
done: Effectué
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
index 664fb560..a4ac5267 100644
--- a/config/locales/nl.yml
+++ b/config/locales/nl.yml
@@ -1540,15 +1540,6 @@ nl:
starts: open van %{starts}
starts_ends: open van %{starts} tot %{ends}
description2: "%{ordergroups} hebben %{article_count} artikelen besteld met een totale waarde van %{net_sum} / %{gross_sum} (netto / bruto)."
- download:
- article_pdf: Artikelen PDF
- download_file: Bestand downloaden
- fax_csv: Fax CSV
- fax_pdf: Fax PDF
- fax_txt: Fax text
- group_pdf: Huishoudens PDF
- matrix_pdf: Matrix PDF
- title: Downloaden
group_orders: 'Ledenbestellingen:'
search_placeholder:
articles: Artikelen zoeken...
@@ -1694,6 +1685,15 @@ nl:
title: Lopende bestellingen
total_sum: Totaalsom
who_ordered: Wie heeft besteld?
+ order_download_button:
+ article_pdf: Artikelen PDF
+ download_file: Bestand downloaden
+ fax_csv: Fax CSV
+ fax_pdf: Fax PDF
+ fax_txt: Fax text
+ group_pdf: Huishoudens PDF
+ matrix_pdf: Matrix PDF
+ title: Downloaden
task_list:
accept_task: Taak accepteren
done: Gedaan