Module: ContextsHelper

Defined in:
app/helpers/contexts_helper.rb

Instance Method Summary collapse

Instance Method Details

#context_summary(context, undone_todo_count) ⇒ Object


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

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

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

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

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

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

#show_context_name(context) ⇒ Object


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

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