diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-06 12:06:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-06 12:06:21 +0000 |
commit | 63894d59abd34f76f399d755012cdcd32c5b1103 (patch) | |
tree | ce797c74a93eb5a17c0e906cc7327938dcd2a4a1 /app/views | |
parent | cd15d0e6c32da7f69689c7cff2e90aeda33b8318 (diff) | |
download | gitlab-ce-63894d59abd34f76f399d755012cdcd32c5b1103.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/_visibility_modal.html.haml | 30 | ||||
-rw-r--r-- | app/views/projects/edit.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/merge_requests/_widget.html.haml | 1 |
3 files changed, 34 insertions, 1 deletions
diff --git a/app/views/projects/_visibility_modal.html.haml b/app/views/projects/_visibility_modal.html.haml new file mode 100644 index 00000000000..3ef93a40137 --- /dev/null +++ b/app/views/projects/_visibility_modal.html.haml @@ -0,0 +1,30 @@ +- strong_start = "<strong>".html_safe +- strong_end = "</strong>".html_safe + +.modal.js-confirm-project-visiblity{ tabindex: -1 } + .modal-dialog + .modal-content + .modal-header + %h3.page-title= _('Reduce this project’s visibility?') + %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } + %span{ "aria-hidden": true }= sprite_icon("close", size: 16) + .modal-body + %p + - if @project.group + = _("You're about to reduce the visibility of the project %{strong_start}%{project_name}%{strong_end} in %{strong_start}%{group_name}%{strong_end}.").html_safe % { project_name: @project.name, group_name: @project.group.name, strong_start: strong_start, strong_end: strong_end } + - else + = _("You're about to reduce the visibility of the project %{strong_start}%{project_name}%{strong_end}.").html_safe % { project_name: @project.name, strong_start: strong_start, strong_end: strong_end } + %p + = _('Once you confirm and press "Reduce project visibility":') + %ul + %li + = ("Current forks will keep their visibility level but their fork relationship with this project will be %{strong_start}removed%{strong_end}.").html_safe % { strong_start: strong_start, strong_end: strong_end } + %label{ for: "confirm_path_input" } + = ("To confirm, type %{phrase_code}").html_safe % { phrase_code: '<code class="js-confirm-danger-match">%{phrase_name}</code>'.html_safe % { phrase_name: @project.full_path } } + .form-group + = text_field_tag 'confirm_path_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input' + .form-actions.clearfix + .pull-right + %button.btn.btn-default{ type: "button", "data-dismiss": "modal" } + = _('Cancel') + = submit_tag _('Reduce project visibility'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button", disabled: true diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 328fdd0be10..7ad52673137 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -21,7 +21,9 @@ %input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' } %template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data_json(@project) .js-project-permissions-form - = f.submit _('Save changes'), class: "btn btn-success", data: { qa_selector: 'visibility_features_permissions_save_button' } + - if show_visibility_confirm_modal?(@project) + = render "visibility_modal" + = f.submit _('Save changes'), class: "btn btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level } %section.qa-merge-request-settings.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] } .settings-header diff --git a/app/views/projects/merge_requests/_widget.html.haml b/app/views/projects/merge_requests/_widget.html.haml index f056189fec0..b00c95c3cd7 100644 --- a/app/views/projects/merge_requests/_widget.html.haml +++ b/app/views/projects/merge_requests/_widget.html.haml @@ -9,5 +9,6 @@ window.gl.mrWidgetData.squash_before_merge_help_path = '#{help_page_path("user/project/merge_requests/squash_and_merge")}'; window.gl.mrWidgetData.troubleshooting_docs_path = '#{help_page_path('user/project/merge_requests/index.md', anchor: 'troubleshooting')}'; window.gl.mrWidgetData.security_approvals_help_page_path = '#{help_page_path('user/application_security/index.html', anchor: 'security-approvals-in-merge-requests-ultimate')}'; + window.gl.mrWidgetData.eligible_approvers_docs_path = '#{help_page_path('user/project/merge_requests/merge_request_approvals', anchor: 'eligible-approvers')}'; #js-vue-mr-widget.mr-widget |