foodsoft/app/views/articles/_articles.html.haml
2012-10-19 01:12:47 +02:00

40 lines
No EOL
1.5 KiB
Text

- if @supplier.articles.count > 20
= items_per_page
= pagination_links_remote @articles
%table#articles_table.table.table-striped
%thead
%tr
%th
%th{class: sort_td_class_helper(:name)}
= sort_link_helper "Name", "name"
%th
%th{class: sort_td_class_helper(:category)}
= sort_link_helper "Kategorie", "category"
%th{class: sort_td_class_helper(:unit)}
= sort_link_helper "Einheit", "unit"
%th{class: sort_td_class_helper(:note)}
= sort_link_helper "Notiz", "note"
%th{:style => "width: 4em;"} Gebgr.
%th{:style => "width: 5em;"} Preis
%th{:style => "width: 3.5em;"} MwSt
%th{:style => "width: 4em;"} Pfand
%th{:style => "width: 3em;"}
%tbody#listbody
- unless @articles.empty?
- for article in @articles
= render(article)
%tfoot
%tr
%td{:colspan => '11'}
= check_box_tag :checkall, 1, false, 'data-check-all' => '#articlesInListForm', 'data-ignore-onchange' => true
%select{:name => "selected_action", 'data-submit-onchange' => true}
%option{:value => '', :selected => 'selected'} Aktion wählen ...
%option{:value => "destroy", 'data-confirm' => 'Willst Du wirklich alle gewählten Artikel löschen?'} Artikel löschen
%option{:value => "setNotAvailable"} Artikel sind nicht mehr verfügbar
%option{:value => "setAvailable"} Artikel sind verfügbar
= hidden_field_tag 'supplier_id', @supplier.id
= pagination_links_remote @articles