= render "project_head"

.entry
  %h3= @project.name
  %br

    

  %pre
    = "git clone #{@project.url_to_repo}"



%h4 Details:

%table
  %tr
    %td Name
    %td= @project.name
  
  %tr
    %td Slug
    %td= @project.code
  
  %tr
    %td Path
    %td= @project.path

  %tr
    %td Owner
    %td= link_to @project.owner.name, project_team_member_path(@project, @project.team_member_by_id(@project.owner))

  %tr
    %td Last commit
    %td
      = time_ago_in_words(@project.commit.committed_date)
      ago

  %tr
    %td Team
    %td
      = @project.users_projects.count
      users

  %tr
    %td Open Issues
    %td
      = @project.issues.opened.count

  %tr
    %td Merge Requests
    %td
      = @project.merge_requests.opened.count

  %tr
    %td Created
    %td= @project.created_at.stamp("Aug 21, 2011")

  %tr
    %td{:colspan => 2}= simple_format @project.description


%h4 Features:

%table
  %tr
    %td Issues
    %td
      - if @project.issues_enabled
        .alert-message.success
          Enabled
      - else 
        .alert-message.error
          Disabled
  
  %tr
    %td Merge Requests
    %td
      - if @project.merge_requests_enabled
        .alert-message.success
          Enabled
      - else 
        .alert-message.error
          Disabled
  %tr
    %td Wall
    %td
      - if @project.wall_enabled
        .alert-message.success
          Enabled
      - else 
        .alert-message.error
          Disabled
.actions
  = link_to "Edit", edit_project_path(@project), :class => "btn"