BigW Consortium Gitlab

show.html.haml 3.64 KB
Newer Older
1
- @no_container = true
2
- breadcrumb_title "Details"
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 12
%div{ class: [container_class, ("limit-container-width" unless fluid_layout)] }
  = render "projects/last_push"

13
= render "home_panel"
14

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

31
      - if @repository.readme
32
        %li
33 34
          = link_to _('Readme'),
            default_project_view != 'readme' ? readme_path(@project) : '#readme'
35

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

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

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

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

52 53 54 55
      - 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
56
              #{ _('Add Changelog') }
57 58 59
        - unless @repository.license_blob
          %li.missing
            = link_to add_special_file_path(@project, file_name: 'LICENSE') do
60
              #{ _('Add License') }
61 62 63
        - unless @repository.contribution_guide
          %li.missing
            = link_to add_special_file_path(@project, file_name: 'CONTRIBUTING.md', commit_message: 'Add contribution guide') do
64
              #{ _('Add Contribution guide') }
65 66 67
        - unless @repository.gitlab_ci_yml
          %li.missing
            = link_to add_special_file_path(@project, file_name: '.gitlab-ci.yml') do
68
              #{ _('Set up CI') }
69 70
        - if koding_enabled? && @repository.koding_yml.blank?
          %li.missing
71
            = link_to  _('Set up Koding'), add_koding_stack_path(@project)
72
        - if @repository.gitlab_ci_yml.blank? && @project.deployment_platform.present?
73
          %li.missing
74
            = 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
75
              #{ _('Set up auto deploy') }
76

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

84 85
  - view_path = default_project_view

86
  - if show_auto_devops_callout?(@project)
87
    = render 'shared/auto_devops_callout'
88

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