summaryrefslogtreecommitdiff
path: root/app/views/projects/edit.html.haml
blob: b2270e0faf7cd5e5104c92f77a3d5bc4ce748afe (plain)
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
- breadcrumb_title _("General Settings")
- page_title _("General")
- add_page_specific_style 'page_bundles/projects_edit'
- @content_class = "limit-container-width" unless fluid_layout
- expanded = expanded_by_default?
- reduce_visibility_form_id = 'reduce-visibility-form'

= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project

- if Feature.enabled?(:show_pages_in_deployments_menu, current_user, type: :experiment)
  = render Pajamas::AlertComponent.new(variant: :info,
      title: _('GitLab Pages has moved'),
      alert_options: { class: 'gl-my-5', data: { feature_id: Users::CalloutsHelper::PAGES_MOVED_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' } }) do |c|
    = c.body do
      = _('To go to GitLab Pages, on the left sidebar, select %{pages_link}.').html_safe % {pages_link: link_to('Deployments > Pages', project_pages_path(@project)).html_safe}

%section.settings.general-settings.no-animate.expanded#js-general-settings
  .settings-header
    %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Naming, topics, avatar')
    = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
      = _('Collapse')
    %p= _('Update your project name, topics, description, and avatar.')
  .settings-content= render 'projects/settings/general'

%section.settings.sharing-permissions.no-animate#js-shared-permissions{ class: ('expanded' if expanded), data: { qa_selector: 'visibility_features_permissions_content' } }
  .settings-header
    %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Visibility, project features, permissions')
    = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
      = expanded ? _('Collapse') : _('Expand')
    %p= _('Choose visibility level, enable/disable project features and their permissions, disable email notifications, and show default award emoji.')

  .settings-content
    = form_for @project, html: { multipart: true, class: "sharing-permissions-form", id: reduce_visibility_form_id }, authenticity_token: true do |f|
      %input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' }
      %template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data(@project).to_json.html_safe
      .js-project-permissions-form{ data: visibility_confirm_modal_data(@project, reduce_visibility_form_id) }
- if show_merge_request_settings_callout?(@project)
  %section.settings.expanded
    = render Pajamas::AlertComponent.new(variant: :info,
        title: _('Merge requests and approvals settings have moved.'),
        alert_options: { class: 'js-merge-request-settings-callout gl-my-5', data: { feature_id: Users::CalloutsHelper::MERGE_REQUEST_SETTINGS_MOVED_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' } }) do |c|
      = c.body do
        = _('On the left sidebar, select %{merge_requests_link} to view them.').html_safe % { merge_requests_link: link_to('Settings > Merge requests', project_settings_merge_requests_path(@project)).html_safe }

= render_if_exists 'projects/settings/analytics_dashboards', expanded: expanded

%section.settings.no-animate{ class: ('expanded' if expanded), data: { qa_selector: 'badges_settings_content' } }
  .settings-header
    %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
      = s_('ProjectSettings|Badges')
    = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
      = expanded ? _('Collapse') : _('Expand')
    %p
      = s_('ProjectSettings|Customize this project\'s badges.')
      = link_to s_('ProjectSettings|What are badges?'), help_page_path('user/project/badges')
  .settings-content
    = render 'shared/badges/badge_settings'

= render_if_exists 'compliance_management/compliance_framework/project_settings', expanded: expanded

= render_if_exists 'projects/settings/default_issue_template'

= render 'projects/service_desk_settings'

%section.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded), data: { qa_selector: 'advanced_settings_content' } }
  .settings-header
    %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Advanced')
    = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
      = expanded ? _('Collapse') : _('Expand')
    %p= s_('ProjectSettings|Housekeeping, export, archive, change path, transfer, and delete.')

  .settings-content
    = render_if_exists 'projects/settings/restore', project: @project

    .sub-section
      %h4= _('Housekeeping')
      %p
        = _('Runs a number of housekeeping tasks within the current repository, such as compressing file revisions and removing unreachable objects.')
        = link_to _('Learn more.'), help_page_path('administration/housekeeping'), target: '_blank', rel: 'noopener noreferrer'
      = link_to _('Run housekeeping'), housekeeping_project_path(@project),
        method: :post, class: "btn gl-button btn-default"

      .gl-display-inline-flex
        #js-project-prune-unreachable-objects-button{ data: { prune_objects_path: housekeeping_project_path(@project, prune: true), prune_objects_doc_path: help_page_path('administration/housekeeping', anchor: 'prune-unreachable-objects') } }

    = render 'export', project: @project

    = render_if_exists 'projects/settings/archive'
    .sub-section.rename-repository
      %h4.warning-title= _('Change path')
      = render 'projects/errors'
      = form_for @project do |f|
        .form-group
          - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'rename-a-repository') }
          %p= _("A project’s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
          %ul
            %li= _("Be careful. Renaming a project's repository can have unintended side effects.")
            %li= _('You will need to update your local repositories to point to the new location.')
            - if @project.deployment_platform.present?
              %li= _('Your deployment services will be broken, you will need to manually fix the services after renaming.')
          = f.label :path, _('Path'), class: 'label-bold'
          .form-group
            .input-group
              .input-group-prepend
                .input-group-text
                  #{Gitlab::Utils.append_path(root_url, @project.namespace.full_path)}/
              = f.text_field :path, class: 'form-control h-auto', data: { qa_selector: 'project_path_field' }
        = f.submit _('Change path'), class: "gl-button btn btn-danger", data: { qa_selector: 'change_path_button' }

    = render 'transfer', project: @project

    = render 'remove_fork', project: @project

    = render 'remove', project: @project

.save-project-loader.hide
  .center
    %h2
      = gl_loading_icon(inline: true, size: 'md', css_class: 'gl-vertical-align-middle')
      = _('Saving project.')
    %p= _('Please wait a moment, this page will automatically refresh when ready.')