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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
|
- add_page_specific_style 'page_bundles/members'
- add_page_specific_style 'page_bundles/projects'
- add_to_breadcrumbs _("Projects"), admin_projects_path
- breadcrumb_title @project.full_name
- page_title @project.full_name, _("Projects")
- current_user_is_group_owner = @group && @group.has_owner?(current_user)
= render ::Layouts::PageHeadingComponent.new(@project.full_name) do |c|
- c.with_actions do
= render Pajamas::ButtonComponent.new(href: edit_admin_namespace_project_path({ id: @project.to_param, namespace_id: @project.namespace.to_param })) do
= _('Edit')
- if @project.last_repository_check_failed?
= render Pajamas::AlertComponent.new(variant: :danger,
alert_options: { class: 'gl-mb-5',
data: { testid: 'last-repository-check-failed-alert' }}) do |c|
- c.with_body do
- last_check_message = _("Last repository check (%{last_check_timestamp}) failed. See the 'repocheck.log' file for error messages.")
- last_check_message = last_check_message % { last_check_timestamp: time_ago_with_tooltip(@project.last_repository_check_at) }
= last_check_message.html_safe
.gl-grid.md:gl-grid-cols-2.gl-gap-5
.gl-flex.gl-flex-col.gl-gap-5
= render ::Layouts::CrudComponent.new(_('Project information')) do |c|
- c.with_body do
%ul.content-list
%li{ class: '!gl-px-5' }
%span.light
= _('Name:')
%strong
= link_to @project.name, project_path(@project)
%li{ class: '!gl-px-5' }
%span.light
= _('Namespace:')
%strong
- if @project.namespace
= link_to @project.namespace.human_name, [:admin, @project.personal? ? @project.namespace.owner : @project.group]
- else
= s_('ProjectSettings|Global')
%li{ class: '!gl-px-5' }
%span.light
= _('Owned by:')
%strong
- if @project.owners.any?
= safe_join(@project.owners.map { |owner| link_to(owner.name, [:admin, owner]) }, ", ".html_safe)
- else
= _('(deleted)')
%li{ class: '!gl-px-5' }
%span.light
= _('Created by:')
%strong
= @project.creator.try(:name) || _('(deleted)')
%li{ class: '!gl-px-5' }
%span.light
= _('Created on:')
%strong
= @project.created_at.to_fs(:medium)
%li{ class: '!gl-px-5' }
%span.light
= _('ID:')
%strong
= @project.id
%li{ class: '!gl-px-5' }
%span.light
= _('http:')
%strong
= link_to @project.http_url_to_repo, project_path(@project)
%li{ class: '!gl-px-5' }
%span.light
= _('ssh:')
%strong
= link_to @project.ssh_url_to_repo, project_path(@project)
- if @project.repository.exists?
%li{ class: '!gl-px-5' }
%span.light
= s_('ProjectSettings|Storage name:')
%strong
= @project.repository.storage
%br
%small.gl-text-secondary
= s_('ProjectSettings|For Gitaly, name of the storage that stores the repository. For Gitaly Cluster, name of the virtual storage that stores the repository.')
%li{ class: '!gl-px-5' }
%span.light
= s_('ProjectSettings|Relative path:')
%strong
= @project.repository.relative_path
%br
%small.gl-text-secondary
= s_('ProjectSettings|For Gitaly, location of data on the storage. For Gitaly Cluster, location of data on the virtual storage.')
%li{ class: '!gl-px-5' }
= render 'shared/storage_counter_statistics', storage_size: @project.statistics&.storage_size, storage_details: @project.statistics, namespace: @project.namespace
%li{ class: '!gl-px-5' }
%span.light
= _('last commit:')
%strong
= last_commit(@project)
%li{ class: '!gl-px-5' }
%span.light
= _('Git LFS status:')
%strong
= project_lfs_status(@project)
= link_to sprite_icon('question-o'), help_page_path('topics/git/lfs/index.md')
- else
%li{ class: '!gl-px-5' }
%span.light
= _('repository:')
%strong.gl-text-danger
= _('does not exist')
- if @project.archived?
%li{ class: '!gl-px-5' }
%span.light
= _('archived:')
%strong
= _('project is read-only')
= render_if_exists "admin/projects/shared_runner_status", project: @project
%li{ class: '!gl-px-5' }
%span.light
= _('access:')
%strong
= visibility_level_content(@project, css_class: visibility_level_color(@project.visibility_level))
- if @project.created_and_owned_by_banned_user? && Feature.enabled?(:hide_projects_of_banned_users)
= _('This project is hidden because its creator has been banned')
- else
= visibility_level_label(@project.visibility_level)
= render 'shared/custom_attributes', custom_attributes: @project.custom_attributes
= render_if_exists 'admin/projects/geo_status_widget', locals: { project: @project }
= render ::Layouts::CrudComponent.new(s_('ProjectSettings|Transfer project')) do |c|
- c.with_body do
= gitlab_ui_form_for @project, url: transfer_admin_project_path(@project), method: :put do |f|
.form-group
.col-form-label
= f.label :new_namespace_id, _("Namespace")
.js-namespace-select{ data: { field_name: 'new_namespace_id', toggle_text_placeholder: _('Search for Namespace') } }
.form-group
= f.submit _('Transfer'), pajamas_button: true
= render ::Layouts::CrudComponent.new(_('Repository check'), options: { class: 'repository-check' }) do |c|
- c.with_body do
= gitlab_ui_form_for @project, url: repository_check_admin_project_path(@project), method: :post do |f|
.form-group
- if @project.last_repository_check_at.nil?
= _("This repository has never been checked.")
- elsif @project.last_repository_check_failed?
- failed_message = _("This repository was last checked %{last_check_timestamp}. The check %{strong_start}failed.%{strong_end} See the 'repocheck.log' file for error messages.")
- failed_message = failed_message % { last_check_timestamp: @project.last_repository_check_at.to_fs(:medium), strong_start: "<strong class='gl-text-danger'>", strong_end: "</strong>" }
= failed_message.html_safe
- else
= _("This repository was last checked %{last_check_timestamp}. The check passed.") % { last_check_timestamp: @project.last_repository_check_at.to_fs(:medium) }
= link_to sprite_icon('question-o'), help_page_path('administration/repository_checks.md')
.form-group
= f.submit _('Trigger repository check'), pajamas_button: true
.gl-flex.gl-flex-col.gl-gap-5
- if @group
= render ::Layouts::CrudComponent.new(_('Group members'),
icon: 'user',
count: @group_members.size) do |c|
- c.with_actions do
= render 'shared/members/manage_access_button', path: group_group_members_path(@group)
- c.with_body do
%ul.content-list.members-list
= render partial: 'shared/members/member',
collection: @group_members, as: :member,
locals: { membership_source: @project,
group: @group,
current_user_is_group_owner: current_user_is_group_owner }
- c.with_footer do
= paginate @group_members, param_name: 'group_members_page', theme: 'gitlab'
= render 'shared/members/requests', membership_source: @project, group: @group, requesters: @requesters
= render ::Layouts::CrudComponent.new(_('%{project_name} project members') % { project_name: @project.name },
icon: 'user',
count: @project.users.size) do |c|
- c.with_actions do
= render 'shared/members/manage_access_button', path: project_project_members_path(@project)
- c.with_body do
%ul.content-list.project_members.members-list
= render partial: 'shared/members/member',
collection: @project_members, as: :member,
locals: { membership_source: @project,
group: @group,
current_user_is_group_owner: current_user_is_group_owner }
- unless @project_members.size < Kaminari.config.default_per_page
- c.with_footer do
= paginate @project_members, param_name: 'project_members_page', theme: 'gitlab'
|