From cf9fa69ac214f1a88ed4761b692e9348a3113106 Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Fri, 16 Oct 2009 21:06:55 +0200 Subject: [PATCH] Minor improvements to task show view. --- app/helpers/application_helper.rb | 3 ++- app/views/tasks/_assignments.haml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ebf49f2e..baa8b1a3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -123,8 +123,9 @@ module ApplicationHelper def icon(name, options={}) icons = { :delete => { :file => 'b_drop.png', :alt => 'Löschen'}, :edit => { :file => 'b_edit.png', :alt => 'Bearbeiten'}} + options[:alt] ||= icons[name][:alt] + options[:title] ||= icons[name][:title] options.merge!({:size => '16x16',:border => "0"}) - options.merge!({:alt => icons[name][:alt], :title => icons[name][:alt]}) unless options[:alt] image_tag icons[name][:file], options end diff --git a/app/views/tasks/_assignments.haml b/app/views/tasks/_assignments.haml index 11a33ae1..d51671fd 100644 --- a/app/views/tasks/_assignments.haml +++ b/app/views/tasks/_assignments.haml @@ -1,4 +1,5 @@ - @task.assignments.each do |ass| = ass.user.nick - %small= link_to icon(:delete), {:action => "drop_assignment", :id => ass}, :confirm => 'Bist du sicher?', :method => "post" - %br/ \ No newline at end of file + %small= link_to icon(:delete, :title => "#{ass.user.nick} entfernen"), | + {:action => "drop_assignment", :id => ass}, | + :confirm => 'Bist du sicher?', :method => "post" |