replace skeleton files by previous version; apply obvious fixes

This commit is contained in:
JuliusR 2021-12-18 11:21:51 +01:00
parent 1f5cbcd6d1
commit 2133be2436
35 changed files with 1086 additions and 39 deletions

View file

@ -0,0 +1,54 @@
%p
Name:
%br/
= f.text_field :name
%p
Nummer:
%br/
= f.text_field :number
%p
Notiz:
%br/
= f.text_field :note
%p
Herstellerin:
%br/
= f.text_field :manufacturer
%p
Herkunft:
%br/
= f.text_field :origin
%p
Einheit:
%br/
= f.text_field :unit
%p
Preis:
%br/
= f.text_field :price
%p
Steuer:
%br/
= f.text_field :tax
%p
Pfand:
%br/
= f.text_field :deposit
%p
Gebindegröße:
%br/
= f.text_field :unit_quantity
%p
Kategorie:
%br/
= f.text_field :category
%p
Rabattmenge:
%br/
= f.text_field :scale_quantity
%p
Rabattpreis:
%br/
= f.text_field :scale_price
%p= submit_tag "Speichern"
= f.hidden_field :supplier_id

View file

@ -0,0 +1,7 @@
%h1 Artikel bearbeiten
= form_for(:article, :url => supplier_article_path(@article.supplier, @article), :html => { :method => :put }) do |f|
= render 'form', :f => f
= link_to 'Show', supplier_article_path(@article.supplier, @article)
|
= link_to 'zurück', supplier_articles_path(@article.supplier)

View file

@ -0,0 +1,57 @@
%h1
= @supplier.articles.size
Artikel von
= @supplier.name
%p
Aktionen:
= link_to 'Alle löschen', destroy_all_supplier_articles_url(@supplier), :method => :delete, :confirm => "Willst Du wirklich alle löschen?"
|
= link_to "Artikel hochladen", upload_supplier_articles_url(@supplier)
|
= link_to 'Neuer Artikel', new_supplier_article_url(@supplier)
|
= link_to "zurück", suppliers_url
#filter{:style => "float:left;padding-right:1em;"}
= form_tag supplier_articles_url(@supplier), :method => :get do
Suchen im Namen:
= text_field_tag :filter, @filter
= submit_tag 'Suchen'
#sort{:style => "float:left;padding-right:1em;"}
= form_tag supplier_articles_url(@supplier), :method => :get do
Sortieren nach: aktualisiert
= check_box_tag :order, "updated_on", @updated_on, {:onclick => "submit();"}
|
= link_to 'Filter zurücksetzen', supplier_articles_url(@supplier)
#list{:style => "clear:both;padding-top:1em"}
%p= will_paginate @articles
%table
%tr
%th Name
%th Nummer
%th Notiz
%th Herstellerin
%th Herkunft
%th Einheit
%th Preis
%th Steuer
%th Pfand
%th Gebindegröße
- for article in @articles
%tr
%td=h article.name
%td=h article.number
%td=h article.note
%td=h article.manufacturer
%td=h article.origin
%td=h article.unit
%td=h article.price
%td=h article.tax
%td=h article.deposit
%td=h article.unit_quantity
%th= link_to 'Anzeigen', supplier_article_url(@supplier, article)
%th= link_to 'Bearbeiten', edit_supplier_article_url(article.supplier, article)
%th= link_to 'Löschen', supplier_article_url(@supplier, article), :confirm => 'Bist du sicher?', :method => :delete
%p= will_paginate @articles

View file

@ -0,0 +1,5 @@
%h1 Neuer Artikel
= form_for(:article, :url => supplier_articles_path) do |f|
= render 'form', :f => f
= link_to 'zurück', supplier_articles_path(@article.supplier)

View file

@ -0,0 +1,18 @@
%h1 Fehler beim hochladen
%p
= @new_counter
wurden neu gespeichert,
= @updated_counter
aktualisiert und
= @outlisted_counter
wurden ausgelistet.
%p bei folgende Artikeln sind Fehler aufgetreten:
%ul
- for article in @invalid_articles
%li
= article.name
%ul
- article.errors.each do |attr, msg|
%li= "#{attr}: #{msg}"
%p= link_to 'Artikel', supplier_articles_url(@supplier)

View file

@ -0,0 +1,57 @@
%h1 Artikel anzeigen
%p
Name:
%br/
%strong= @article.name
%p
Nummer:
%br/
%strong= @article.number
%p
Notiz:
%br/
%strong= @article.note
%p
Herstellerin:
%br/
%strong= @article.manufacturer
%p
Herkunft:
%br/
%strong= @article.origin
%p
Einheit:
%br/
%strong= @article.unit
%p
Preis:
%br/
%strong= @article.price
%p
Steuer:
%br/
%strong= @article.tax
%p
Pfand:
%br/
%strong= @article.deposit
%p
Gebindegröße:
%br/
%strong= @article.unit_quantity
%p
Kategorie:
%br/
%strong= @article.category
%p
Rabattmenge:
%br/
%strong= @article.scale_quantity
%p
Rabattpreis:
%br/
%strong= @article.scale_price
= link_to 'Bearbeiten', edit_supplier_article_path(@article.supplier, @article)
|
= link_to 'Zurück', supplier_articles_path(@article.supplier)

View file

@ -0,0 +1,26 @@
%h1
Artikel für
= @supplier.name
hochladen
%p
%i Bitte (BNN-)Datei zum upload auswählen
#uploadArticles.uploadForm
= form_for(:articles, :url => {:controller => 'articles', :action => 'parse'}, :html => { :multipart => true }) do |form|
%p
Upload:
= form.file_field("file")
%p
Datei-Format auswählen:
%select{:name => 'type'}
= options_for_select([["", ""]] + ArticleImport::file_formats.invert.map{|f,k| [f::NAME, k]})
%p
Zeichenkodierung:
%select{:name => 'encoding'}
= options_for_select({"Default" => "", "UTF-8" => "UTF-8", "IBM850 (Terra)" => "IBM850", "ISO-8859-15 (Ökotopia)" => "ISO-8859-15"})
%p
= check_box_tag :delete_existing
= label_tag :delete_existing, "Delete existing articles first"
= submit_tag("Artikel hochladen")
= hidden_field_tag :supplier_id, @supplier.id
%p= link_to 'zurück', supplier_articles_url(@supplier)

View file

@ -0,0 +1,45 @@
%h1 hochgeladenen Artikel überprüfen
%p
%i
Bitte überprüfe die Daten aus der Datei und wähle unten den Lieferanten aus.
%br/
Artikel dessen Namen schon in der Datenbank vorhanden sind, werden ignoriert.
= form_tag(:action => 'createArticlesFromFile') do
%table.list
%tr
%th Änderungsk.
%th Name
%th Nummer
%th Notiz
%th Hersteller
%th Herkunft
%th Einheit
%th Preis
%th MwSt.
%th Pfand
%th Geb.Gr.
%th RabattMeng.
%th RabattPreis
- for @article in @articles
%tr
%td= text_field 'article[]', 'changing', :size => 3
%td= text_field 'article[]', 'name', :size => 0
%td= text_field 'article[]', 'number', :size => 5
%td= text_field 'article[]', 'note', :size => 5
%td= text_field 'article[]', 'manufacturer', :size => 5
%td= text_field 'article[]', 'origin', :size => 5
%td= text_field 'article[]', 'unit', :size => 5
%td= text_field 'article[]', 'price', :size => 5
%td= text_field 'article[]', 'tax', :size => 5
%td= text_field 'article[]', 'deposit', :size => 5
%td= text_field 'article[]', 'unit_quantity', :size => 5
%td= text_field 'article[]', 'scale_quantity', :size => 5
%td= text_field 'article[]', 'scale_price', :size => 5
%p
Lieferanten auswählen:
= select('supplier', 'id', Supplier.all.collect {|s| [ s.name, s.id ] }, :selected => nil)
= submit_tag 'Artikel speichern'
%p
= link_to 'zurück', :action => 'uploadArticles'