gitlab-org--gitlab-foss/app/views/projects/_home_panel.html.haml
2015-07-31 13:56:15 +02:00

34 lines
1.2 KiB
Text

- empty_repo = @project.empty_repo?
.project-home-panel.clearfix{:class => ("empty-project" if empty_repo)}
.project-identicon-holder
= project_icon(@project, alt: '', class: 'project-avatar avatar s90')
.project-home-desc.lead
- if @project.description.present?
= markdown(@project.description, pipeline: :description)
.project-repo-buttons
= render 'projects/buttons/star'
- unless empty_repo
= 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)
- if can? current_user, :download_code, @project
= link_to "#", class: 'btn js-toggle-clone-holder' do
= icon('cloud-download fw')
Clone
- if can? current_user, :download_code, @project
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: @ref, format: 'zip'), class: 'btn', rel: 'nofollow' do
= icon('download fw')
Download
= render 'projects/buttons/dropdown'
= render "shared/clone_panel"