<div id="display_box">
    <div id="projects-empty-nd" style="display:<%= @no_projects ? 'block' : 'none'%>;">
	      <div class="message"><p>Currently there are no projects</p></div>
	</div>
  <%= render :partial => 'project_state_group', :object => @active_projects, :locals => { :state => 'active'} %>
  <%= render :partial => 'project_state_group', :object => @hidden_projects, :locals => { :state => 'hidden'} %>
  <%= render :partial => 'project_state_group', :object => @completed_projects, :locals => { :state => 'completed'} %>
</div>

<% @project = @new_project -%>
<div id="input_box">
  <%= link_to_function("Create a new project &#187;",
                       "Element.toggle('project_new');Form.focusFirstElement('project-form');",
                       {:title => "Add a next action", :accesskey => "n"}) %>

  <div id="project_new" class="project_new" style="display:block">
    <% form_remote_tag :url => projects_path, :method => :post,
                       :html=> { :id=>'project-form', :name=>'project', :class => 'inline-form' } do -%>

      <div id="status"><%= error_messages_for('project') %></div>

      <label for="project_name">Name:</label><br />
      <%= text_field 'project', 'name', "tabindex" => 1  %><br />

      <label for="project_description">Description (optional):</label><br />
      <%= text_area 'project', 'description', "cols" => 30, "rows" => 4, "tabindex" => 2  %><br />

    <label for="default_context_name">Default Context (optional):</label><br />
    <%= text_field_tag("project[default_context_name]", @project.default_context.name, :tabindex => 3) %>
    <%= render :partial => 'default_context_autocomplete' %>
        <br />

      <input type="submit" value="Add Project" tabindex="4" /><br />
      
      <input id="go_to_project" type="checkbox" tabindex="5" name="go_to_project"/><label for="go_to_project"> Take me to the new project page</label><br /> 

    <% end -%>
  </div>
</div>
