_home_panel.html.haml 1.03 KB
Newer Older
1
- empty_repo = @project.empty_repo?
2
.project-home-panel.clearfix{:class => ("empty-project" if empty_repo)}
3
  .project-identicon-holder
4
    = project_icon(@project, alt: '', class: 'project-avatar avatar s90')
5
  .project-home-desc
6
    %h1= @project.name
7 8 9 10 11
    - if @project.description.present?
      = markdown(@project.description, pipeline: :description)


  .project-repo-buttons
12 13
    = render 'projects/buttons/star'

14
    - unless empty_repo
15 16 17 18 19 20 21 22
      = render 'projects/buttons/fork'

      - if forked_from_project = @project.forked_from_project
        = link_to project_path(forked_from_project), class: 'btn' do
          = icon("code-fork fw")
          Forked from
          = forked_from_project.namespace.try(:name)

23
      - if can? current_user, :download_code, @project
24
        = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: @ref, format: 'zip'), class: 'btn', rel: 'nofollow' do
Douwe Maan's avatar
Douwe Maan committed
25 26
          = icon('download fw')
          Download
27

28
    = render 'projects/buttons/dropdown'
29

30
  = render "shared/clone_panel"