=== app/helpers/todo_helper.rb ================================================================== --- app/helpers/todo_helper.rb (/tracks/trunk/tracks) (revision 181) +++ app/helpers/todo_helper.rb (/patches/moveforward) (revision 181) @@ -135,5 +135,21 @@ str << ",step:1,inputField:\"" + input_field + "\",cache:true,align:\"TR\" })" javascript_tag str end + + def link_to_remote_todo_notdone_move_forward( item, tag ) + if app_configurations["controls"]["move_forward"] + link_to_remote( tag, + { + :update => "item-#{item.id}-container", + :complete => "new Effect.Appear('item-#{item.id}-container');", + :url => { :controller => "todo", + :action => "move_forward", + :id => item.id, + :days => app_configurations["controls"]["move_forward_days"] } + }, + { :class => "move_forward" } + ) + end + end end === app/controllers/todo_controller.rb ================================================================== --- app/controllers/todo_controller.rb (/tracks/trunk/tracks) (revision 181) +++ app/controllers/todo_controller.rb (/patches/moveforward) (revision 181) @@ -77,6 +77,19 @@ end end + def move_forward + self.init + + item = check_user_return_item + item.due = item.due + @params["days"].to_i + if item.save + render :partial => 'item', :object => item + else + flash["warning"] = "change not done" + render_text "" + end + end + # Edit the details of an action # def update_action === app/views/context/_show_items.rhtml ================================================================== --- app/views/context/_show_items.rhtml (/tracks/trunk/tracks) (revision 181) +++ app/views/context/_show_items.rhtml (/patches/moveforward) (revision 181) @@ -36,6 +36,9 @@ <% if item.project_id %> <%= link_to( "[P]", { :controller => "project", :action => "show", :name => urlize(item.project.name) }, :title => "View project: #{item.project.name}" ) %> <% end %> + <% if item.due %> + <%= link_to_remote_todo_notdone_move_forward( item, ">>" ) %> + <% end %> <% if item.notes? %> <%= "" + image_tag( "blank", :width=>"16", :height=>"16", :border=>"0" ) + "" %> <% m_notes = sanitize(markdown( item.notes )) %> === app/views/todo/_item.rhtml ================================================================== --- app/views/todo/_item.rhtml (/tracks/trunk/tracks) (revision 181) +++ app/views/todo/_item.rhtml (/patches/moveforward) (revision 181) @@ -18,6 +18,9 @@ <% elsif item.project_id -%> <%= link_to( "[P]", { :controller => "project", :action => "show", :name => urlize(item.project.name) }, :title => "View project: #{item.project.name}" ) %> <% end -%> +<% if item.due %> + <%= link_to_remote_todo_notdone_move_forward( item, ">>" ) %> +<% end %> <% if item.notes? -%> <%= toggle_show_notes( item ) %> <% end -%> === config/settings.yml.tmpl ================================================================== --- config/settings.yml.tmpl (/tracks/trunk/tracks) (revision 181) +++ config/settings.yml.tmpl (/patches/moveforward) (revision 181) @@ -12,3 +12,7 @@ admin: email: butshesagirl@rousette.org.uk loginhash: change-me +controls: +# control for moving task due date forward some number of days. + move_forward: false + move_forward_days: 30 \ No newline at end of file === public/stylesheets/print.css ================================================================== --- public/stylesheets/print.css (/tracks/trunk/tracks) (revision 181) +++ public/stylesheets/print.css (/patches/moveforward) (revision 181) @@ -20,7 +20,7 @@ } /* Josh added */ -#navcontainer, #input_box, #footer, .big-box, .refresh, .badge, h1 { +#navcontainer, #input_box, #footer, .big-box, .refresh, .badge, .move_forward h1 { display:none; }