.qi_header
  %h1 To do


.qi_row
  
  -if params[:i_previ_id] 
    -@i_tasks = ITask.where(:i_previ_id => params[:i_previ_id], :done => false).all
  
  -elsif params[:archive]
    -@i_tasks = ITask.where(:done => true).all
  
  -elsif params[:urgent]
    -@i_tasks = ITask.where(:urgent => true, :done => false).all
  -elsif params[:no]
    -@i_tasks = ITask.where(:done => false, :i_previ_id => nil).all
    
  -else
    -params[:all] = true
    -@i_tasks = ITask.where(:done => false).all
    
    
    

  .tasks_menu
    =link_to admin_i_tasks_path(:no => 1), :class => ("active" if params[:no]) do
      Non planifiées
      
    =link_to admin_i_tasks_path(:all => 1), :class => ("active" if params[:all]) do
      Toutes les tâches
  
  
    =link_to admin_i_tasks_path(:urgent => 1), :class => ("active" if params[:urgent]) do
      =ic :"free-code-camp"
      Urgent
      
    =link_to admin_i_tasks_path(:i_previ_id => 1), :class => ("active" if params[:i_previ_id].to_s == "1") do
      =ic :star
      Aujourd'hui
      
    =link_to admin_i_tasks_path(:i_previ_id => 2), :class => ("active" if params[:i_previ_id].to_s == "2") do
      =ic :"arrow-right"
      Rapidement
      
    =link_to admin_i_tasks_path(:i_previ_id => 3), :class => ("active" if params[:i_previ_id].to_s == "3") do
      =ic :history
      Un jour
      
    =link_to admin_i_tasks_path(:archive => 1), :class => ("active" if params[:archive]) do
      Journal
      
  :scss
    .tasks_menu{
      a{
        display:inline-block;
        padding:4px 8px;
        
        &:hover,&.active{
          font-weight:bold;
        }
      }
      
    }
     
  #i_task_form
    
      
    #new_i_task_form=render :partial => "admin/i_tasks/form", :locals => {:new_var => true}

  .row
    #i_tasks_results= render :partial => "admin/i_tasks/results"
    