Module: ContextsHelper
- Defined in:
- app/helpers/contexts_helper.rb
Instance Method Summary collapse
- #context_summary(context, undone_todo_count) ⇒ Object
- #link_to_delete_context(context, descriptor = sanitize(context.name)) ⇒ Object
- #link_to_edit_context(context, descriptor = sanitize(context.name)) ⇒ Object
- #show_context_name(context) ⇒ Object
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) content_tag(:p, "#{undone_todo_count}. Context is #{context.hidden? ? 'Hidden' : 'Active'}.".html_safe) end |
#link_to_delete_context(context, descriptor = sanitize(context.name)) ⇒ Object
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 |
#link_to_edit_context(context, descriptor = sanitize(context.name)) ⇒ Object
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 content_tag(:span, :id => "context_name"){ context.name } else link_to_context(context) end end |