BigW Consortium Gitlab

show.html.haml 3.48 KB
Newer Older
1
- @no_container = true
2
- breadcrumb_title "Project"
3
- @content_class = "limit-container-width" unless fluid_layout
4

5
= content_for :meta_tags do
6
  = auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity")
7

8
= render partial: 'flash_messages', locals: { project: @project }
9

10 11
= render "projects/head"
= render "projects/last_push"
12
= render "home_panel"
13

14
- if can?(current_user, :download_code, @project)
15
  %nav.project-stats{ class: container_class }
16 17
    %ul.nav
      %li
18
        = link_to project_tree_path(@project) do
19
          #{_('Files')} (#{storage_counter(@project.statistics.total_repository_size)})
20
      %li
21
        = link_to project_commits_path(@project, current_ref) do
22
          #{n_('Commit', 'Commits', @project.statistics.commit_count)} (#{number_with_delimiter(@project.statistics.commit_count)})
23
      %li
24
        = link_to project_branches_path(@project) do
25
          #{n_('Branch', 'Branches', @repository.branch_count)} (#{number_with_delimiter(@repository.branch_count)})
26
      %li
27
        = link_to project_tags_path(@project) do
28
          #{n_('Tag', 'Tags', @repository.tag_count)} (#{number_with_delimiter(@repository.tag_count)})
29

30 31
      - if default_project_view != 'readme' && @repository.readme
        %li
32
          = link_to _('Readme'), readme_path(@project)
33

34 35
      - if @repository.changelog
        %li
36
          = link_to _('Changelog'), changelog_path(@project)
37

38 39 40
      - if @repository.license_blob
        %li
          = link_to license_short_name(@project), license_path(@project)
41

42 43
      - if @repository.contribution_guide
        %li
44
          = link_to _('Contribution guide'), contribution_guide_path(@project)
45

46 47
      - if @repository.gitlab_ci_yml
        %li
48
          = link_to _('CI configuration'), ci_configuration_path(@project)
49

50 51 52 53
      - if current_user && can_push_branch?(@project, @project.default_branch)
        - unless @repository.changelog
          %li.missing
            = link_to add_special_file_path(@project, file_name: 'CHANGELOG') do
54
              #{ _('Add Changelog') }
55 56 57
        - unless @repository.license_blob
          %li.missing
            = link_to add_special_file_path(@project, file_name: 'LICENSE') do
58
              #{ _('Add License') }
59 60 61
        - unless @repository.contribution_guide
          %li.missing
            = link_to add_special_file_path(@project, file_name: 'CONTRIBUTING.md', commit_message: 'Add contribution guide') do
62
              #{ _('Add Contribution guide') }
63 64 65
        - unless @repository.gitlab_ci_yml
          %li.missing
            = link_to add_special_file_path(@project, file_name: '.gitlab-ci.yml') do
66
              #{ _('Set up CI') }
67 68
        - if koding_enabled? && @repository.koding_yml.blank?
          %li.missing
69
            = link_to  _('Set up Koding'), add_koding_stack_path(@project)
70 71
        - if @repository.gitlab_ci_yml.blank? && @project.deployment_service.present?
          %li.missing
72
            = link_to add_special_file_path(@project, file_name: '.gitlab-ci.yml', commit_message: 'Set up auto deploy', branch_name: 'auto-deploy', context: 'autodeploy') do
73
              #{ _('Set up auto deploy') }
74

75
%div{ class: [container_class, ("limit-container-width" unless fluid_layout)] }
76 77 78 79
  - if @project.archived?
    .text-warning.center.prepend-top-20
      %p
        = icon("exclamation-triangle fw")
80
        #{ _('Archived project! Repository is read-only') }
81

82 83 84 85
  - view_path = default_project_view

  %div{ class: project_child_container_class(view_path) }
    = render view_path