Translations for articles-pages.
This commit is contained in:
parent
6202e05841
commit
053593f718
12 changed files with 89 additions and 104 deletions
|
|
@ -107,14 +107,18 @@ module ApplicationHelper
|
|||
icons = { :delete => { :file => 'b_drop.png', :alt => 'Löschen'},
|
||||
:edit => { :file => 'b_edit.png', :alt => 'Bearbeiten'}}
|
||||
options.merge!({:size => '16x16',:border => "0"})
|
||||
options.merge!({:alt => icons[name][:alt]}) unless options[:alt]
|
||||
options.merge!({:alt => icons[name][:alt], :title => icons[name][:alt]}) unless options[:alt]
|
||||
|
||||
image_tag icons[name][:file], options
|
||||
end
|
||||
|
||||
# Remote links with default 'loader'.gif during request
|
||||
def remote_link_to(text, options={})
|
||||
remote_options = {:before => "Element.show('loader')", :success => "Element.hide('loader')"}
|
||||
remote_options = {
|
||||
:before => "Element.show('loader')",
|
||||
:success => "Element.hide('loader')",
|
||||
:method => :get
|
||||
}
|
||||
link_to_remote(text, remote_options.merge(options))
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ module ArticlesHelper
|
|||
end
|
||||
|
||||
def row_classes(article)
|
||||
classes = ""
|
||||
classes += ' unavailable' if article.availability
|
||||
classes = " click-me"
|
||||
classes += " unavailable" if !article.availability
|
||||
classes += " just_updated" if @article.recently_updated && @article.availability
|
||||
classes
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,13 +1,4 @@
|
|||
module DeliveriesHelper
|
||||
def articles_for_select(supplier)
|
||||
supplier.articles.find(:all, :limit => 10).collect { |a| [truncate(a.name), a.id] }
|
||||
end
|
||||
|
||||
def add_article_link
|
||||
link_to_function "Artikel hinzufügen", nil, { :accesskey => 'n', :title => "ALT + SHIFT + N" } do |page|
|
||||
page.insert_html :bottom, :stock_changes, :partial => 'stock_change', :object => StockChange.new
|
||||
end
|
||||
end
|
||||
|
||||
def link_to_invoice(delivery)
|
||||
if delivery.invoice
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue