2013-03-22 00:20:30 +01:00
|
|
|
- title t('.title', supplier: @supplier.name, count: @supplier.articles.undeleted.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',
|
2013-03-22 00:20:30 +01:00
|
|
|
placeholder: t('.search_placeholder')
|
2009-01-16 16:19:26 +01:00
|
|
|
|
2012-10-19 01:12:47 +02:00
|
|
|
.btn-group
|
2013-03-22 00:20:30 +01:00
|
|
|
= link_to t('.new'), new_supplier_article_path(@supplier), remote: true, class: 'btn btn-primary'
|
|
|
|
= link_to t('.edit_all'), edit_all_supplier_articles_path(@supplier), class: 'btn'
|
|
|
|
= link_to t('.upload'), upload_supplier_articles_path(@supplier), class: 'btn'
|
2011-05-18 17:37:10 +02:00
|
|
|
- if current_user.role_orders?
|
2013-03-22 00:20:30 +01:00
|
|
|
= link_to t('.new_order'), new_order_path(supplier_id: @supplier), class: 'btn'
|
2012-10-19 01:12:47 +02:00
|
|
|
|
|
|
|
- unless @supplier.shared_supplier.nil?
|
|
|
|
.btn-group
|
|
|
|
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn btn-success dropdown-toggle' do
|
2013-03-22 00:20:30 +01:00
|
|
|
= t '.ext_db.title'
|
2012-10-19 01:12:47 +02:00
|
|
|
%span.caret
|
|
|
|
%ul.dropdown-menu
|
2013-03-22 00:20:30 +01:00
|
|
|
%li= link_to t('.ext_db.import'), "#import", 'data-toggle-this' => '#import'
|
|
|
|
%li= link_to t('.ext_db.sync'), 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
|
2013-03-22 00:20:30 +01:00
|
|
|
= t '.change_supplier'
|
2012-10-19 01:12:47 +02:00
|
|
|
%span.caret
|
|
|
|
%ul.dropdown-menu
|
2014-02-20 15:04:53 +01:00
|
|
|
- Supplier.undeleted.where.not(id: @supplier.id).order('suppliers.name ASC').each do |supplier|
|
2012-10-19 01:12:47 +02:00
|
|
|
%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
|
2013-03-22 00:20:30 +01:00
|
|
|
%h3= t '.import.title'
|
2014-02-20 15:04:53 +01:00
|
|
|
= text_field_tag "q[name_cont_all]", "", class: 'input-medium search-query',
|
2013-03-22 00:20:30 +01:00
|
|
|
placeholder: t('.import.placeholder')
|
2012-10-19 01:12:47 +02:00
|
|
|
%label.checkbox
|
2014-02-20 15:04:53 +01:00
|
|
|
= check_box_tag "q[origin_eq]", "REG", false
|
2013-03-22 00:20:30 +01:00
|
|
|
= t '.import.restrict_region'
|
2012-10-19 01:12:47 +02:00
|
|
|
#search_results.clearfix
|
2013-03-22 00:20:30 +01:00
|
|
|
= link_to t('ui.close'), "#import", 'data-toggle-this' => '#import'
|
2012-10-19 01:12:47 +02:00
|
|
|
|
|
|
|
= form_tag update_selected_supplier_articles_path(@supplier), id: "articlesInListForm",
|
|
|
|
'data-submit-onchange' => true do
|
2012-12-14 18:10:46 +01:00
|
|
|
#table= render 'articles'
|