- if current_user.require_ssh_key?
  .alert-message.block-message.error
    %p  
      You wont be able to pull/push project code unless you  
      = link_to new_key_path, :class => "vlink" do 
        add new key
      to your profile

%div.dashboard_category
  %h3
    %span.ico.projects
    = link_to "Projects" , "#projects", :id => "projects"
    %small
      (most recent)

  %strong.right
    = link_to projects_path do 
      Projects list → 
  %hr
  .row
    .dashboard_block
      .row
        .span4.right
          %div.borders.ipadded
            %h1
              = pluralize current_user.projects.count, "project", "projects"
            - if current_user.can_create_project?
              %hr
              %div
                You can create up to
                = current_user.projects_limit
                projects. Click on button below to add a new one
                .link_holder
                  %br
                  = link_to new_project_path, :class => "btn" do 
                    New Project » 
            - else 
              %hr
              %div
                You've reached project limit for your account. 
                You cannot create new projects.
                .link_holder
                  %br
                  = link_to profile_path, :class => "btn" do 
                    Your Profile » 
        .span10.left= render "dashboard/projects_feed", :projects => @active_projects
      - if @last_push
        .padded.prepend-top-20
          %h5
            %small Latest push was to the #{@last_push.branch_name} branch of #{@last_push.project.name}:
          %ul.unstyled= render @last_push

- if @merge_requests.any?
  %div.dashboard_category
    %h3
      = link_to "Merge Requests" , "#merge_requests", :id => "merge_requests"
      
      %small (authored or assigned to you)
    %strong.right
      = link_to dashboard_merge_requests_path do 
        Visit merge requests page → 
    %hr
    .row
      .dashboard_block= render "dashboard/merge_requests_feed"

- if @issues.any?
  %div.dashboard_category
    %h3
      = link_to "Issues" , "#issues", :id => "issues"
      %small (assigned to you)
    %strong.right
      = link_to dashboard_issues_path do 
        Visit issues page → 
    %hr
    .row
      .dashboard_block= render "dashboard/issues_feed"

- if @events.any?
  %div.dashboard_category
    %h3
      %span.ico.activities
      = link_to "Activities" , "#activities", :id => "activities"

    %hr
    .row
      .dashboard_block= render @events