mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
small refactorings
This commit is contained in:
parent
26a27e5cfe
commit
ccdaae038b
4 changed files with 57 additions and 63 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue