2012-10-19 01:12:47 +02:00
|
|
|
- title "Artikel von #{@supplier.name} (#{@supplier.articles.count})"
|
2009-01-16 16:19:26 +01:00
|
|
|
|
2012-10-19 01:12:47 +02:00
|
|
|
.well.well-small
|
|
|
|
.btn-toolbar
|
|
|
|
= form_tag supplier_articles_path(@supplier), method: :get, remote: true, class: 'form-search pull-right',
|
|
|
|
'data-submit-onchange' => true do
|
|
|
|
= text_field_tag :query, params[:query], class: 'input-medium search-query',
|
|
|
|
placeholder: 'Name ...'
|
2009-01-16 16:19:26 +01:00
|
|
|
|
2012-10-19 01:12:47 +02:00
|
|
|
.btn-group
|
|
|
|
= link_to "Neuer Artikel", new_supplier_article_path(@supplier), remote: true, class: 'btn btn-primary'
|
|
|
|
= link_to "Alle bearbeiten", edit_all_supplier_articles_path(@supplier), class: 'btn'
|
|
|
|
= link_to "Artikel hochladen", upload_supplier_articles_path(@supplier), class: 'btn'
|
2011-05-18 17:37:10 +02:00
|
|
|
- if current_user.role_orders?
|
2012-10-19 01:12:47 +02:00
|
|
|
= link_to "Bestellung anlegen", new_order_path(supplier_id: @supplier), class: 'btn'
|
|
|
|
|
|
|
|
- unless @supplier.shared_supplier.nil?
|
|
|
|
.btn-group
|
|
|
|
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn btn-success dropdown-toggle' do
|
|
|
|
Externe Datenbank
|
|
|
|
%span.caret
|
|
|
|
%ul.dropdown-menu
|
|
|
|
%li= link_to "Suchen/Importieren", "#import", 'data-toggle-this' => '#import'
|
|
|
|
%li= link_to "Synchronisieren", sync_supplier_articles_path(@supplier), method: :post
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2012-10-19 01:12:47 +02:00
|
|
|
.btn-group
|
|
|
|
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do
|
|
|
|
Lieferant wechseln ..
|
|
|
|
%span.caret
|
|
|
|
%ul.dropdown-menu
|
|
|
|
- Supplier.where('id != ?', @supplier.id).order('name ASC').each do |supplier|
|
|
|
|
%li= link_to supplier.name, supplier_articles_path(supplier), tabindex: -1
|
2011-05-18 17:37:10 +02:00
|
|
|
|
2012-10-19 01:12:47 +02:00
|
|
|
- unless @supplier.shared_supplier.nil?
|
|
|
|
#import.well.well-small(style="display:none;")
|
|
|
|
= form_tag shared_supplier_articles_path(@supplier), method: :get, remote: true, class: 'form-search',
|
2011-05-19 19:49:37 +02:00
|
|
|
'data-submit-onchange' => true do
|
2012-10-19 01:12:47 +02:00
|
|
|
%h3 Artikel importieren
|
|
|
|
= text_field_tag "search[name_contains_all]", "", class: 'input-medium search-query', placeholder: 'Name ...'
|
|
|
|
%label.checkbox
|
|
|
|
= check_box_tag "search[origin_equals]", "REG", false
|
|
|
|
Nur aus der Region
|
|
|
|
#search_results.clearfix
|
|
|
|
= link_to "Schließen", "#import", 'data-toggle-this' => '#import'
|
|
|
|
|
|
|
|
= form_tag update_selected_supplier_articles_path(@supplier), id: "articlesInListForm",
|
|
|
|
'data-submit-onchange' => true do
|
|
|
|
#table= render 'articles'
|