Module: ContextsHelper

Defined in:
app/helpers/contexts_helper.rb

Instance Method Summary collapse

Instance Method Details

#context_summary(context, undone_todo_count) ⇒ Object



18
19
20
# File 'app/helpers/contexts_helper.rb', line 18

def context_summary(context, undone_todo_count)
  (:p, "#{undone_todo_count}. Context is #{context.hidden? ? 'Hidden' : 'Active'}.".html_safe)
end


10
11
12
# File 'app/helpers/contexts_helper.rb', line 10

def link_to_delete_context(context, descriptor = sanitize(context.name))
  link_to_delete(:context, context, descriptor)
end


14
15
16
# File 'app/helpers/contexts_helper.rb', line 14

def link_to_edit_context(context, descriptor = sanitize(context.name))
  link_to_edit(:context, context, descriptor)
end

#show_context_name(context) ⇒ Object



2
3
4
5
6
7
8
# File 'app/helpers/contexts_helper.rb', line 2

def show_context_name(context)
  if source_view_is :context
    (:span, :id => "context_name"){ context.name }
  else
    link_to_context(context)
  end
end