show.html.haml 5.96 KB
Newer Older
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
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
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
        - else
          %li
            %span.light repository:
            %strong.cred
              does not exist
81

82 83 84 85 86
        - if @project.archived?
          %li
            %span.light archived:
            %strong repository is read-only

87 88 89
        %li
          %span.light access:
          %strong
90 91 92 93
            %span{ class: visibility_level_color(@project.visibility_level) }
              = visibility_level_icon(@project.visibility_level)
              = visibility_level_label(@project.visibility_level)

94
    .panel.panel-default
95
      .panel-heading
96
        Transfer project
97
      .panel-body
Vinnie Okada's avatar
Vinnie Okada committed
98
        = 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
99
          .form-group
Vinnie Okada's avatar
Vinnie Okada committed
100
            = f.label :new_namespace_id, "Namespace", class: 'control-label'
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
101
            .col-sm-10
Vinnie Okada's avatar
Vinnie Okada committed
102
              = namespace_select_tag :new_namespace_id, selected: params[:namespace_id], class: 'input-large'
103

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
104
          .form-group
105
            .col-sm-offset-2.col-sm-10
106 107
              = f.submit 'Transfer', class: 'btn btn-primary'

108
    .panel.panel-default.repository-check
Jacob Vosmaer's avatar
Jacob Vosmaer committed
109
      .panel-heading
110
        Repository check
Jacob Vosmaer's avatar
Jacob Vosmaer committed
111
      .panel-body
112
        = form_for @project, url: repository_check_admin_namespace_project_path(@project.namespace, @project), method: :post do |f|
Jacob Vosmaer's avatar
Jacob Vosmaer committed
113
          .form-group
114
            - if @project.last_repository_check_at.nil?
Jacob Vosmaer's avatar
Jacob Vosmaer committed
115 116 117
              This repository has never been checked.
            - else
              This repository was last checked
118
              = @project.last_repository_check_at.to_s(:medium) + '.'
Jacob Vosmaer's avatar
Jacob Vosmaer committed
119
              The check
120
              - if @project.last_repository_check_failed?
Jacob Vosmaer's avatar
Jacob Vosmaer committed
121 122 123 124 125 126 127 128
                = succeed '.' do
                  %strong.cred failed
                See
                = link_to 'repocheck.log', admin_logs_path
                for error messages.
              - else
                passed.

129 130
            = link_to icon('question-circle'), help_page_path('administration', 'repository_checks')

Jacob Vosmaer's avatar
Jacob Vosmaer committed
131
          .form-group
132
            = f.submit 'Trigger repository check', class: 'btn btn-primary'
Jacob Vosmaer's avatar
Jacob Vosmaer committed
133

134
  .col-md-6
135
    - if @group
136
      .panel.panel-default
137
        .panel-heading
138
          %strong #{@group.name}
139
          group members (#{@group.group_members.count})
140
          .pull-right
141
            = link_to admin_group_path(@group), class: 'btn btn-xs' do
142
              %i.fa.fa-pencil-square-o
143
        %ul.well-list
144
          - @group_members.each do |member|
145
            = render 'groups/group_members/group_member', member: member, show_controls: false
146 147
        .panel-footer
          = paginate @group_members, param_name: 'group_members_page', theme: 'gitlab'
148

149
    .panel.panel-default
150
      .panel-heading
151
        Project members
152 153
        %small
          (#{@project.users.count})
154
        .pull-right
155
          = link_to namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-xs" do
156
            %i.fa.fa-pencil-square-o
157
            Manage Access
158
      %ul.well-list.project_members
159 160
        - @project_members.each do |project_member|
          - user = project_member.user
161
          %li.project_member
162
            .list-item-name
163 164 165 166 167 168 169
              - if user
                %strong
                  = link_to user.name, admin_user_path(user)
              - else
                %strong
                  = project_member.invite_email
                (invited)
170
            .pull-right
171
              - if project_member.owner?
172 173
                %span.light Owner
              - else
174
                %span.light= project_member.human_access
175
                = link_to namespace_project_project_member_path(@project.namespace, @project, project_member), data: { confirm: remove_from_project_team_message(@project, project_member)}, method: :delete, remote: true, class: "btn btn-sm btn-remove" do
176
                  %i.fa.fa-times
177 178
      .panel-footer
        = paginate @project_members, param_name: 'project_members_page', theme: 'gitlab'