From 8cef2b41c1190459d1567c801d21bd739670bda1 Mon Sep 17 00:00:00 2001 From: Tim Madden Date: Sun, 25 Nov 2012 17:41:11 -0600 Subject: [PATCH] Creating new todo link for context headers --- app/assets/stylesheets/mobile.css.scss | 4 ++++ app/views/contexts/_context.m.erb | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/mobile.css.scss b/app/assets/stylesheets/mobile.css.scss index f767bed7..253daabf 100644 --- a/app/assets/stylesheets/mobile.css.scss +++ b/app/assets/stylesheets/mobile.css.scss @@ -149,6 +149,10 @@ span.prj, span.ctx{ background: #FFC2C2; } +.ctx-add { + float: right; +} + ul.c li { list-style-type: none; } diff --git a/app/views/contexts/_context.m.erb b/app/views/contexts/_context.m.erb index 6e9174af..14aa8b27 100644 --- a/app/views/contexts/_context.m.erb +++ b/app/views/contexts/_context.m.erb @@ -1,11 +1,14 @@ <% +new_context_todo_params = {:format => :m} +new_context_todo_params[:from_context] = context.id + # select actions from this context @not_done = @not_done_todos.select {|t| t.context_id == context.id } if not @not_done.empty? # only show a context when there are actions in it -%> -

<%= link_to context.name, context_path(context, :format => 'm') %>

+

<%= link_to context.name, context_path(context, :format => 'm') %><%= link_to t('+'), new_todo_path(new_context_todo_params) %>