debian-mirror-gitlab/app/views/admin/projects/show.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

206 lines
8.7 KiB
Text
Raw Normal View History

2021-04-17 20:07:23 +05:30
- add_page_specific_style 'page_bundles/members'
2020-07-28 23:09:34 +05:30
- add_to_breadcrumbs _("Projects"), admin_projects_path
2018-03-27 19:54:05 +05:30
- breadcrumb_title @project.full_name
2020-07-28 23:09:34 +05:30
- page_title @project.full_name, _("Projects")
2021-01-29 00:20:46 +05:30
- current_user_is_group_owner = @group && @group.has_owner?(current_user)
2018-12-05 23:21:45 +05:30
2022-07-23 23:45:48 +05:30
%h1.page-title.gl-font-size-h-display
2020-07-28 23:09:34 +05:30
= _('Project: %{name}') % { name: @project.full_name }
2023-05-27 22:25:52 +05:30
= render Pajamas::ButtonComponent.new(href: edit_admin_namespace_project_path({ id: @project.to_param, namespace_id: @project.namespace.to_param }),
icon: 'pencil',
button_options: { class: 'gl-float-right'}) do
2020-07-28 23:09:34 +05:30
= _('Edit')
2014-09-02 18:07:02 +05:30
%hr
2016-06-02 11:05:42 +05:30
- if @project.last_repository_check_failed?
.row
.col-md-12
2022-06-21 17:19:12 +05:30
= render Pajamas::AlertComponent.new(variant: :danger,
2022-07-23 23:45:48 +05:30
alert_options: { class: 'gl-mb-5',
data: { testid: 'last-repository-check-failed-alert' }}) do |c|
2023-07-09 08:55:56 +05:30
- c.with_body do
2020-05-24 23:13:21 +05:30
- 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
2014-09-02 18:07:02 +05:30
.row
.col-md-6
2022-10-11 01:57:18 +05:30
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, body_options: { class: 'gl-p-0' }) do |c|
2023-07-09 08:55:56 +05:30
- c.with_header do
2020-07-28 23:09:34 +05:30
= _('Project info:')
2023-07-09 08:55:56 +05:30
- c.with_body do
2022-10-11 01:57:18 +05:30
%ul.content-list
%li{ class: 'gl-px-5!' }
2020-07-28 23:09:34 +05:30
%span.light
2022-10-11 01:57:18 +05:30
= _('Name:')
2014-09-02 18:07:02 +05:30
%strong
2022-10-11 01:57:18 +05:30
= link_to @project.name, project_path(@project)
%li{ class: 'gl-px-5!' }
2020-07-28 23:09:34 +05:30
%span.light
2022-10-11 01:57:18 +05:30
= _('Namespace:')
2018-05-09 12:01:36 +05:30
%strong
2022-10-11 01:57:18 +05:30
- 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!' }
2020-07-28 23:09:34 +05:30
%span.light
2022-10-11 01:57:18 +05:30
= _('Owned by:')
2014-09-02 18:07:02 +05:30
%strong
2022-10-11 01:57:18 +05:30
- if @project.owners.any?
= safe_join(@project.owners.map { |owner| link_to(owner.name, [:admin, owner]) }, ", ".html_safe)
- else
= _('(deleted)')
2016-09-29 09:46:39 +05:30
2022-10-11 01:57:18 +05:30
%li{ class: 'gl-px-5!' }
2020-07-28 23:09:34 +05:30
%span.light
2022-10-11 01:57:18 +05:30
= _('Created by:')
2016-09-29 09:46:39 +05:30
%strong
2022-10-11 01:57:18 +05:30
= @project.creator.try(:name) || _('(deleted)')
2014-09-02 18:07:02 +05:30
2022-10-11 01:57:18 +05:30
%li{ class: 'gl-px-5!' }
2020-07-28 23:09:34 +05:30
%span.light
2022-10-11 01:57:18 +05:30
= _('Created on:')
2020-07-28 23:09:34 +05:30
%strong
2022-10-11 01:57:18 +05:30
= @project.created_at.to_s(:medium)
2015-04-26 12:48:37 +05:30
2022-10-11 01:57:18 +05:30
%li{ class: 'gl-px-5!' }
%span.light
= _('ID:')
%strong
= @project.id
2019-09-04 21:01:54 +05:30
2022-10-11 01:57:18 +05:30
%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
= _('Gitaly storage name:')
%strong
= @project.repository.storage
%li{ class: 'gl-px-5!' }
%span.light
= _('Gitaly relative path:')
%strong
= @project.repository.relative_path
%li{ class: 'gl-px-5!' }
= render 'shared/storage_counter_statistics', storage_size: @project.statistics&.storage_size, storage_details: @project.statistics
%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')
- else
%li{ class: 'gl-px-5!' }
%span.light
= _('repository:')
%strong.cred
= _('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
%span{ class: visibility_level_color(@project.visibility_level) }
= visibility_level_icon(@project.visibility_level)
= visibility_level_label(@project.visibility_level)
2014-09-02 18:07:02 +05:30
2020-06-23 00:09:42 +05:30
= render 'shared/custom_attributes', custom_attributes: @project.custom_attributes
2018-12-05 23:21:45 +05:30
= render_if_exists 'admin/projects/geo_status_widget', locals: { project: @project }
2022-10-11 01:57:18 +05:30
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }) do |c|
2023-07-09 08:55:56 +05:30
- c.with_header do
2020-07-28 23:09:34 +05:30
= s_('ProjectSettings|Transfer project')
2023-07-09 08:55:56 +05:30
- c.with_body do
2023-03-17 16:20:25 +05:30
= gitlab_ui_form_for @project, url: transfer_admin_project_path(@project), method: :put do |f|
2018-11-08 19:23:39 +05:30
.form-group.row
2019-09-04 21:01:54 +05:30
.col-sm-3.col-form-label
2020-07-28 23:09:34 +05:30
= f.label :new_namespace_id, _("Namespace")
2018-11-08 19:23:39 +05:30
.col-sm-9
2023-04-23 21:23:45 +05:30
.js-namespace-select{ data: { field_name: 'new_namespace_id', toggle_text_placeholder: _('Search for Namespace') } }
2014-09-02 18:07:02 +05:30
2018-11-08 19:23:39 +05:30
.form-group.row
.offset-sm-3.col-sm-9
2023-03-17 16:20:25 +05:30
= f.submit _('Transfer'), pajamas_button: true
2014-09-02 18:07:02 +05:30
2022-10-11 01:57:18 +05:30
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5 repository-check' }) do |c|
2023-07-09 08:55:56 +05:30
- c.with_header do
2020-05-24 23:13:21 +05:30
= _("Repository check")
2023-07-09 08:55:56 +05:30
- c.with_body do
2023-03-17 16:20:25 +05:30
= gitlab_ui_form_for @project, url: repository_check_admin_project_path(@project), method: :post do |f|
2016-06-02 11:05:42 +05:30
.form-group
- if @project.last_repository_check_at.nil?
2020-05-24 23:13:21 +05:30
= _("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_s(:medium), strong_start: "<strong class='cred'>", strong_end: "</strong>" }
= failed_message.html_safe
2016-06-02 11:05:42 +05:30
- else
2020-05-24 23:13:21 +05:30
= _("This repository was last checked %{last_check_timestamp}. The check passed.") % { last_check_timestamp: @project.last_repository_check_at.to_s(:medium) }
2016-06-02 11:05:42 +05:30
2020-11-24 15:15:51 +05:30
= link_to sprite_icon('question-o'), help_page_path('administration/repository_checks')
2016-06-02 11:05:42 +05:30
.form-group
2023-03-17 16:20:25 +05:30
= f.submit _('Trigger repository check'), pajamas_button: true
2016-06-02 11:05:42 +05:30
2014-09-02 18:07:02 +05:30
.col-md-6
- if @group
2022-10-11 01:57:18 +05:30
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, body_options: { class: 'gl-p-0' }, footer_options: { class: 'gl-p-4' }) do |c|
2023-07-09 08:55:56 +05:30
- c.with_header do
2016-08-24 12:49:21 +05:30
%strong= @group.name
2020-07-28 23:09:34 +05:30
= _('group members')
2022-01-26 12:08:38 +05:30
= gl_badge_tag @group_members.size
2021-09-30 23:02:18 +05:30
= render 'shared/members/manage_access_button', path: group_group_members_path(@group)
2023-07-09 08:55:56 +05:30
- c.with_body do
2022-10-11 01:57:18 +05:30
%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 }
2023-07-09 08:55:56 +05:30
- c.with_footer do
2014-09-02 18:07:02 +05:30
= paginate @group_members, param_name: 'group_members_page', theme: 'gitlab'
2021-09-30 23:02:18 +05:30
= render 'shared/members/requests', membership_source: @project, group: @group, requesters: @requesters
2016-08-24 12:49:21 +05:30
2022-10-11 01:57:18 +05:30
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, body_options: { class: 'gl-p-0' }, footer_options: { class: 'gl-p-4' }) do |c|
2023-07-09 08:55:56 +05:30
- c.with_header do
2016-08-24 12:49:21 +05:30
%strong= @project.name
2020-07-28 23:09:34 +05:30
= _('project members')
2022-01-26 12:08:38 +05:30
= gl_badge_tag @project.users.size
2021-09-30 23:02:18 +05:30
= render 'shared/members/manage_access_button', path: project_project_members_path(@project)
2023-07-09 08:55:56 +05:30
- c.with_body do
2022-10-11 01:57:18 +05:30
%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 }
2023-07-09 08:55:56 +05:30
- c.with_footer do
2014-09-02 18:07:02 +05:30
= paginate @project_members, param_name: 'project_members_page', theme: 'gitlab'