show.html.haml 5.8 KB
Newer Older
Douwe Maan's avatar
Douwe Maan committed
1
- page_title @project.name_with_namespace, "Projects"
2
%h3.page-title
3
  Project: #{@project.name_with_namespace}
4
  = link_to edit_project_path(@project), class: "btn btn-nr pull-right" do
5
    %i.fa.fa-pencil-square-o
6
    Edit
7
%hr
Jacob Vosmaer's avatar
Jacob Vosmaer committed
8
- if @project.last_repository_check_failed?
Jacob Vosmaer's avatar
Jacob Vosmaer committed
9
10
11
12
  .row
    .col-md-12
      .panel
        .panel-heading.alert.alert-danger
13
          Last repository check
14
15
          = "(#{time_ago_in_words(@project.last_repository_check_at)} ago)"
          failed. See
Jacob Vosmaer's avatar
Jacob Vosmaer committed
16
17
          = link_to 'repocheck.log', admin_logs_path
          for error messages.
18
.row
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
19
  .col-md-6
20
    .panel.panel-default
21
      .panel-heading
22
23
24
25
        Project info:
      %ul.well-list
        %li
          %span.light Name:
26
          %strong
27
            = link_to @project.name, project_path(@project)
28
29
30
31
32
33
34
35
36
37
38
        %li
          %span.light Namespace:
          %strong
            - if @project.namespace
              = link_to @project.namespace.human_name, [:admin, @project.group || @project.owner]
            - else
              Global
        %li
          %span.light Owned by:
          %strong
            - if @project.owner
39
              = link_to @project.owner_name, [:admin, @project.owner]
40
41
            - else
              (deleted)
gitlabhq's avatar
gitlabhq committed
42

43
44
45
46
        %li
          %span.light Created by:
          %strong
            = @project.creator.try(:name) || '(deleted)'
47

48
        %li
49
          %span.light Created on:
50
          %strong
51
            = @project.created_at.to_s(:medium)
52

53
54
55
        %li
          %span.light http:
          %strong
56
            = link_to @project.http_url_to_repo, project_path(@project)
57
58
59
        %li
          %span.light ssh:
          %strong
60
            = link_to @project.ssh_url_to_repo, project_path(@project)
61
62
63
64
        - if @project.repository.exists?
          %li
            %span.light fs:
            %strong
Douwe Maan's avatar
Douwe Maan committed
65
              = @project.repository.path_to_repo
66

67
68
69
70
71
          %li
            %span.light Size
            %strong
              = repository_size(@project)

72
73
74
          %li
            %span.light last commit:
            %strong
75
              = last_commit(@project)
76
77
78
79
80

          %li
            %span.light LFS status:
            %strong
              = project_lfs_status(@project)
81
82
83
84
85
        - else
          %li
            %span.light repository:
            %strong.cred
              does not exist
86

87
88
89
90
91
        - if @project.archived?
          %li
            %span.light archived:
            %strong repository is read-only

92
93
94
        %li
          %span.light access:
          %strong
95
96
97
98
            %span{ class: visibility_level_color(@project.visibility_level) }
              = visibility_level_icon(@project.visibility_level)
              = visibility_level_label(@project.visibility_level)

99
    .panel.panel-default
100
      .panel-heading
101
        Transfer project
102
      .panel-body
Vinnie Okada's avatar
Vinnie Okada committed
103
        = form_for @project, url: transfer_admin_namespace_project_path(@project.namespace, @project), method: :put, html: { class: 'form-horizontal' } do |f|
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
104
          .form-group
Vinnie Okada's avatar
Vinnie Okada committed
105
            = f.label :new_namespace_id, "Namespace", class: 'control-label'
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
106
            .col-sm-10
107
108
109
110
111
112
113
              .dropdown
                = dropdown_toggle('Search for Namespace', { toggle: 'dropdown', field_name: 'new_namespace_id', show_any: 'false' }, { toggle_class: 'js-namespace-select large' })
                .dropdown-menu.dropdown-select
                  = dropdown_title('Namespaces')
                  = dropdown_filter("Search for Namespace")
                  = dropdown_content
                  = dropdown_loading
114

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
115
          .form-group
116
            .col-sm-offset-2.col-sm-10
117
118
              = f.submit 'Transfer', class: 'btn btn-primary'

Jacob Vosmaer's avatar
Jacob Vosmaer committed
119
    .panel.panel-default.repository-check
Jacob Vosmaer's avatar
Jacob Vosmaer committed
120
      .panel-heading
Jacob Vosmaer's avatar
Jacob Vosmaer committed
121
        Repository check
Jacob Vosmaer's avatar
Jacob Vosmaer committed
122
      .panel-body
Jacob Vosmaer's avatar
Jacob Vosmaer committed
123
        = form_for @project, url: repository_check_admin_namespace_project_path(@project.namespace, @project), method: :post do |f|
Jacob Vosmaer's avatar
Jacob Vosmaer committed
124
          .form-group
Jacob Vosmaer's avatar
Jacob Vosmaer committed
125
            - if @project.last_repository_check_at.nil?
Jacob Vosmaer's avatar
Jacob Vosmaer committed
126
127
128
              This repository has never been checked.
            - else
              This repository was last checked
Jacob Vosmaer's avatar
Jacob Vosmaer committed
129
              = @project.last_repository_check_at.to_s(:medium) + '.'
Jacob Vosmaer's avatar
Jacob Vosmaer committed
130
              The check
Jacob Vosmaer's avatar
Jacob Vosmaer committed
131
              - if @project.last_repository_check_failed?
Jacob Vosmaer's avatar
Jacob Vosmaer committed
132
133
134
135
136
137
138
139
                = succeed '.' do
                  %strong.cred failed
                See
                = link_to 'repocheck.log', admin_logs_path
                for error messages.
              - else
                passed.

140
            = link_to icon('question-circle'), help_page_path('administration/repository_checks')
141

Jacob Vosmaer's avatar
Jacob Vosmaer committed
142
          .form-group
Jacob Vosmaer's avatar
Jacob Vosmaer committed
143
            = f.submit 'Trigger repository check', class: 'btn btn-primary'
Jacob Vosmaer's avatar
Jacob Vosmaer committed
144

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
145
  .col-md-6
146
    - if @group
147
      .panel.panel-default
148
        .panel-heading
149
150
          %strong= @group.name
          group members
151
          %span.badge= @group_members.size
152
          .pull-right
153
            = link_to admin_group_path(@group), class: 'btn btn-xs' do
154
155
              = icon('pencil-square-o', text: 'Manage Access')
        %ul.well-list.content-list
156
          = render partial: 'shared/members/member', collection: @group_members, as: :member, locals: { show_controls: false }
157
        .panel-footer
158
          = paginate @group_members, param_name: 'group_members_page', theme: 'gitlab'
159

160
    = render 'shared/members/requests', membership_source: @project, requesters: @requesters
161

162
    .panel.panel-default
163
      .panel-heading
164
165
166
        %strong= @project.name
        project members
        %span.badge= @project.users.size
167
        .pull-right
168
169
          = link_to icon('pencil-square-o', text: 'Manage Access'), polymorphic_url([@project, :members]), class: "btn btn-xs"
      %ul.well-list.project_members.content-list
170
        = render partial: 'shared/members/member', collection: @project_members, as: :member, locals: { show_controls: false }
171
      .panel-footer
172
        = paginate @project_members, param_name: 'project_members_page', theme: 'gitlab'