summaryrefslogtreecommitdiff
path: root/app/views/projects/_home_panel.html.haml
blob: 8703b264f37ce05671c7e3f99a218e0aa8a7d71c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- empty_repo = @project.empty_repo?
.project-home-panel{:class => ("empty-project" if empty_repo)}
  .row
    .span5
      %h4.project-home-title
        = @project.name_with_namespace
        %span.visibility-level-label
          = visibility_level_icon(@project.visibility_level)
          = visibility_level_label(@project.visibility_level)

    .span7
      - unless empty_repo
        .project-home-dropdown
          = render "dropdown"
      .form-horizontal
        = render "shared/clone_panel"

  .project-home-extra.clearfix
    .project-home-desc
      - if @project.description.present?
        = @project.description
      - if can?(current_user, :admin_project, @project)
        –
        %strong= link_to 'Edit', edit_project_path

    - unless empty_repo
      .project-home-links
        = link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project, @ref || @repository.root_ref)
        = link_to pluralize(@repository.branch_names.count, 'branch'), project_branches_path(@project)
        = link_to pluralize(@repository.tag_names.count, 'tag'), project_tags_path(@project)
        %span.light.prepend-left-20= repository_size