Add stock_article_selection (deleting multiple stock articles at once)
This commit is contained in:
parent
ecb7ce7cd3
commit
099e2b9b06
13 changed files with 217 additions and 34 deletions
19
app/views/stockit_selections/_overview.html.haml
Normal file
19
app/views/stockit_selections/_overview.html.haml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
%table.table.table-hover
|
||||
%tr
|
||||
%th Artikel
|
||||
%th Erstellt am
|
||||
%th Erstellt von
|
||||
%th Optionen
|
||||
|
||||
- stock_article_selections.each do |stock_article_selection|
|
||||
%tr
|
||||
%td=h truncate stock_article_selection.stock_articles.map{ |article| article.name}.join(', ')
|
||||
%td=h stock_article_selection.created_at
|
||||
%td=h link_to_user_message_if_valid stock_article_selection.created_by
|
||||
%td
|
||||
= link_to 'Anzeigen', stock_article_selection, class: 'btn btn-small'
|
||||
= link_to "Artikel löschen", articles_stock_article_selection_path(stock_article_selection), :method => :delete,
|
||||
:confirm => 'Diesen Löschvorschlag wirklich ausführen und markierte Artikel löschen?', class: 'btn btn-small btn-danger'
|
||||
= link_to "Verwerfen", stock_article_selection, :method => :delete,
|
||||
:confirm => 'Diesen Löschvorschlag wirklich verwerfen?', class: 'btn btn-small'
|
||||
7
app/views/stockit_selections/index.html.haml
Normal file
7
app/views/stockit_selections/index.html.haml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
- title "Löschvorschläge für Lagerartikel"
|
||||
- if @stock_article_selections.empty?
|
||||
%p Es gibt keine ausstehenden Löschvorschläge.
|
||||
%ul
|
||||
%li= link_to "Löschvorschlag erstellen", stock_articles_path
|
||||
- else
|
||||
= render :partial => 'overview', :locals => {:stock_article_selections => @stock_article_selections}
|
||||
18
app/views/stockit_selections/show.html.haml
Normal file
18
app/views/stockit_selections/show.html.haml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
- title "Löschvorschlag für #{@stock_article_selection.stock_articles.count} Lagerartikel"
|
||||
|
||||
%dl
|
||||
%dt Löschvorschlag vom:
|
||||
%dd=h @stock_article_selection.created_at
|
||||
%dt Erstellt durch:
|
||||
%dd=h link_to_user_message_if_valid(@stock_article_selection.created_by)
|
||||
%dt Zu löschende Artikel
|
||||
- for article in @stock_article_selection.stock_articles
|
||||
%dd=h article.name
|
||||
|
||||
|
||||
%p
|
||||
= link_to 'Artikel löschen', articles_stock_article_selection_path(@stock_article_selection), :method => :delete,
|
||||
:confirm => 'Diesen Löschvorschlag wirklich ausführen und markierte Artikel löschen?', class: 'btn btn-danger'
|
||||
= link_to 'Verwerfen', @stock_article_selection, :method => :delete,
|
||||
:confirm => 'Diesen Löschvorschlag wirklich verwerfen?', class: 'btn'
|
||||
= link_to 'Alle Löschvorschläge zeigen', stock_article_selections_path, class: 'btn'
|
||||
Loading…
Add table
Add a link
Reference in a new issue