small refactorings

This commit is contained in:
Reinier Balt 2013-05-05 20:32:32 +02:00
parent 26a27e5cfe
commit ccdaae038b
4 changed files with 57 additions and 63 deletions

View file

@ -9,22 +9,11 @@ module ContextsHelper
end
def link_to_delete_context(context, descriptor = sanitize(context.name))
link_to(descriptor,
context_path(context, :format => 'js'),
{
:id => "delete_context_#{context.id}",
:class => "delete_context_button icon",
:x_confirm_message => t('contexts.delete_context_confirmation', :name => context.name),
:title => t('contexts.delete_context_title')
})
link_to_delete(:context, context, descriptor)
end
def link_to_edit_context (context, descriptor = sanitize(context.name))
link_to(descriptor, edit_context_path(context),
{
:id => "link_edit_#{dom_id(context)}",
:class => "context_edit_settings icon"
})
link_to_edit(:context, context, descriptor)
end
def context_summary(context, undone_todo_count)