- empty_repo = @project.empty_repo?
.project-home-panel{:class => ("empty-project" if empty_repo)}
  .project-home-row
    .project-home-desc
      - if @project.description.present?
        = escaped_autolink(@project.description)
      - if can?(current_user, :admin_project, @project)
        &ndash;
        = link_to 'Edit', edit_project_path
      - elsif !@project.empty_repo? && @repository.readme
        - readme = @repository.readme
        &ndash;
        = link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)) do
          = readme.name
    .star-fork-buttons
      - unless @project.empty_repo?
        .fork-buttons
          - if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
            - if current_user.already_forked?(@project)
              = link_to project_path(current_user.fork_of(@project)), title: 'Go to my fork' do
                = link_to_toggle_fork
            - else
              = link_to fork_project_path(@project), title: "Fork project", method: "POST" do
                = link_to_toggle_fork

      .star-buttons
        %span.star.js-toggler-container{class: @show_star ? 'on' : ''}
          - if current_user
            = link_to_toggle_star('Star this project.', false, true)
            = link_to_toggle_star('Unstar this project.', true, true)
          - else
            = link_to_toggle_star('You must sign in to star a project.', false, false)

  .project-home-row
    - if current_user && !empty_repo
      .project-home-dropdown
        = render "dropdown"
    - unless @project.empty_repo?
      - if can? current_user, :download_code, @project
        .pull-right.prepend-left-10
          = render 'projects/repositories/download_archive', split_button: true
    = render "shared/clone_panel"
