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'

View file

@ -0,0 +1,23 @@
!!!
%html
%head
%meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"}
%title=h "SharedLists: " + controller.controller_name
= stylesheet_link_tag 'application'
= csrf_meta_tag
= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload'
%body
#content
- if flash[:notice]
%h3{:style => "color: green"}= flash[:notice]
- if flash[:error]
%h3{:style => "color: red"}= flash[:error]
= yield
#footer
%hr/
- if current_user.present?
Logged in as #{current_user.email}, #{link_to("log out", log_out_path)}
- else
= link_to "Log in", log_in_path
= yield :javascript

View file

@ -1,12 +0,0 @@
!!!
%html
%head
%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
%title Sharedlists
%meta{:content => "width=device-width,initial-scale=1", :name => "viewport"}/
= csrf_meta_tags
= csp_meta_tag
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload'
%body
= yield

View file

@ -1,8 +0,0 @@
!!!
%html
%head
%meta{:content => "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/
:css
/* Email styles need to be inline */
%body
= yield

View file

@ -1 +0,0 @@
= yield

View file

@ -0,0 +1,13 @@
%h1 Log in
= form_tag sessions_path do
%p
= label_tag :email
%br/
= text_field_tag :email, params[:email]
%p
= label_tag :password
%br/
= password_field_tag :password
%p.button
= submit_tag "Log in"

View file

@ -0,0 +1,49 @@
= simple_form_for @supplier do |f|
= f.input :name, required: true
= f.input :address, required: true
= f.input :phone, required: true
= f.input :phone2
= f.input :fax
= f.input :email
= f.input :url
= f.input :delivery_days
/= f.input :order_howto, as: :text, input_html: {rows: 5}
= f.input :note, as: :text, input_html: {rows: 5, cols: 60}
/= f.input :min_order_quantity
/= f.input :article_info_url
= f.input :ftp_sync
%div#ftp_details{style: ('display: none' unless @supplier.ftp_sync?)}
= f.input :ftp_host
= f.input :ftp_user
= f.input :ftp_password
= f.input :ftp_type, collection: Supplier::FTP_TYPES, include_blank: false
= f.input :ftp_regexp, hint: t('.ftp_regexp_hint')
= f.input :mail_sync
%div#mail_details{style: ('display: none' unless @supplier.mail_sync?)}
.input
%label Send to
- if !ENV["MAILER_DOMAIN"].present?
%i (please set <tt>MAILER_DOMAIN</tt> to see address)
- elsif @supplier.articles_mail_address.present?
%tt= @supplier.articles_mail_address
- else
%i (save supplier to see address)
= f.input :mail_type, collection: ArticleImport.file_formats.map {|k,o| [o::NAME, k] }
= f.input :mail_from
= f.input :mail_subject
.form-actions
= f.submit class: 'btn'
= link_to t('ui.or_cancel'), (@supplier.new_record? ? suppliers_path : supplier_path(@supplier))
- content_for :javascript do
:javascript
$(document).on('change', '#supplier_ftp_sync', function() {
$('#ftp_details').toggle(this.checked);
});
$(document).on('change', '#supplier_mail_sync', function() {
$('#mail_details').toggle(this.checked);
});

View file

@ -0,0 +1,2 @@
%h1 Lieferantin bearbeiten
= render 'form'

View file

@ -0,0 +1,23 @@
%h1 Lieferanten
%table
%tr
%th Name
%th Adresse
%th Telefon
%th Liefertage
%th Notiz
%th Zuletzt aktualisiert
%th
- for supplier in @suppliers
%tr
%td= link_to supplier.name, supplier_path(supplier)
%td= supplier.address
%td= supplier.phone
%td= supplier.delivery_days
%td= supplier.note
%td= I18n.l supplier.articles_updated_at rescue nil
%td= link_to supplier.articles.size.to_s + ' Artikel', supplier_articles_url(supplier)
%br/
= link_to 'Neuer Lieferant', new_supplier_url

View file

@ -0,0 +1,2 @@
%h1 Neue Lieferantin
= render 'form'

View file

@ -0,0 +1,43 @@
%h1 Lieferantin anzeigen
%p
Name:
%br/
%strong= @supplier.name
%p
Adresse:
%br/
%strong= @supplier.address
%p
Telefon 1:
%br/
%strong= @supplier.phone
%p
Telefon 2:
%br/
%strong= @supplier.phone2
%p
Fax:
%br/
%strong= @supplier.fax
%p
E-Mail:
%br/
%strong= @supplier.email
%p
Webseite:
%br/
%strong= @supplier.url
%p
Liefertage:
%br/
%strong= @supplier.delivery_days
%p
Notiz:
%br/
%strong= @supplier.note
= link_to 'Bearbeiten', edit_supplier_path(@supplier)
|
= link_to 'Löschen', supplier_path(@supplier), :confirm => 'Bist du sicher?', :method => :delete
|
= link_to 'Zurück', suppliers_path