diff options
Diffstat (limited to 'app/views/projects')
82 files changed, 263 insertions, 397 deletions
diff --git a/app/views/projects/_activity.html.haml b/app/views/projects/_activity.html.haml index c5a0b6a1428..05166395067 100644 --- a/app/views/projects/_activity.html.haml +++ b/app/views/projects/_activity.html.haml @@ -11,4 +11,4 @@ .content_list.project-activity{ :"data-href" => activity_project_path(@project) } .loading - .gl-spinner.gl-spinner-md + = gl_loading_icon(size: 'md') diff --git a/app/views/projects/_commit_button.html.haml b/app/views/projects/_commit_button.html.haml index 2c18921d874..d987c4b1033 100644 --- a/app/views/projects/_commit_button.html.haml +++ b/app/views/projects/_commit_button.html.haml @@ -2,6 +2,6 @@ = button_tag 'Commit changes', id: 'commit-changes', class: 'gl-button btn btn-confirm js-commit-button qa-commit-button' = link_to _('Cancel'), cancel_path, - class: 'gl-button btn btn-default gl-ml-3', data: {confirm: leave_edit_message} + id: 'cancel-changes', class: 'gl-button btn btn-default gl-ml-3', data: {confirm: leave_edit_message, confirm_btn_variant: "danger"}, aria: { label: _('Discard changes') } = render 'shared/projects/edit_information' diff --git a/app/views/projects/_deletion_failed.html.haml b/app/views/projects/_deletion_failed.html.haml index 21c799f5bb6..b713b805009 100644 --- a/app/views/projects/_deletion_failed.html.haml +++ b/app/views/projects/_deletion_failed.html.haml @@ -1,10 +1,7 @@ - project = local_assigns.fetch(:project) - return unless project.delete_error.present? -.project-deletion-failed-message.gl-alert.gl-alert-warning - .gl-alert-container - = sprite_icon('warning', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-content - .gl-alert-body - This project was scheduled for deletion, but failed with the following message: - = project.delete_error += render 'shared/global_alert', variant: :warning, dismissible: false, alert_class: 'project-deletion-failed-message' do + .gl-alert-body + This project was scheduled for deletion, but failed with the following message: + = project.delete_error diff --git a/app/views/projects/_files.html.haml b/app/views/projects/_files.html.haml index 2f4a61865f8..a7cf50623f0 100644 --- a/app/views/projects/_files.html.haml +++ b/app/views/projects/_files.html.haml @@ -12,8 +12,7 @@ .info-well.gl-display-none.gl-sm-display-flex.project-last-commit.gl-flex-direction-column #js-last-commit.gl-m-auto - .gl-spinner-container.m-auto - = loading_icon(size: 'md', color: 'dark', css_class: 'align-text-bottom') + = gl_loading_icon(size: 'md') #js-code-owners - if is_project_overview diff --git a/app/views/projects/_gitlab_import_modal.html.haml b/app/views/projects/_gitlab_import_modal.html.haml deleted file mode 100644 index 689e100ab96..00000000000 --- a/app/views/projects/_gitlab_import_modal.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -#gitlab_import_modal.modal - .modal-dialog - .modal-content - .modal-header - %h3.modal-title Import projects from GitLab.com - %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } - %span{ "aria-hidden": "true" } × - .modal-body - To enable importing projects from GitLab.com, - - if current_user.admin? - as administrator you need to configure - - else - ask your GitLab administrator to configure - = link_to 'OAuth integration', help_page_path("integration/gitlab") diff --git a/app/views/projects/_import_project_pane.html.haml b/app/views/projects/_import_project_pane.html.haml index aca7b73267b..a8b809d1871 100644 --- a/app/views/projects/_import_project_pane.html.haml +++ b/app/views/projects/_import_project_pane.html.haml @@ -8,7 +8,7 @@ .import-buttons - if gitlab_project_import_enabled? .import_gitlab_project.has-tooltip{ data: { container: 'body', qa_selector: 'gitlab_import_button' } } - = link_to new_import_gitlab_project_path, class: 'gl-button btn-default btn btn_import_gitlab_project js-import-project-btn', data: { platform: 'gitlab_export', **tracking_attrs_data(track_label, 'click_button', 'gitlab_export') } do + = link_to '#', class: 'gl-button btn-default btn btn_import_gitlab_project js-import-project-btn', data: { href: new_import_gitlab_project_path, platform: 'gitlab_export', **tracking_attrs_data(track_label, 'click_button', 'gitlab_export') } do .gl-button-icon = sprite_icon('tanuki') = _("GitLab export") @@ -36,12 +36,11 @@ %div - if gitlab_import_enabled? %div - = link_to status_import_gitlab_path, class: "gl-button btn-default btn import_gitlab js-import-project-btn #{'how_to_import_link' unless gitlab_import_configured?}", data: { platform: 'gitlab_com', **tracking_attrs_data(track_label, 'click_button', 'gitlab_com') } do + = link_to status_import_gitlab_path, class: "gl-button btn-default btn import_gitlab js-import-project-btn #{'js-how-to-import-link' unless gitlab_import_configured?}", + data: { modal_title: _("Import projects from GitLab.com"), modal_message: import_from_gitlab_message, platform: 'gitlab_com', **tracking_attrs_data(track_label, 'click_button', 'gitlab_com') } do .gl-button-icon = sprite_icon('tanuki') = _("GitLab.com") - - unless gitlab_import_configured? - = render 'projects/gitlab_import_modal' - if fogbugz_import_enabled? %div diff --git a/app/views/projects/_invite_groups_modal.html.haml b/app/views/projects/_invite_groups_modal.html.haml index d16e87d1c26..40dc0009b24 100644 --- a/app/views/projects/_invite_groups_modal.html.haml +++ b/app/views/projects/_invite_groups_modal.html.haml @@ -1,3 +1,3 @@ -- return unless can_admin_project_member?(project) +- return unless can_invite_members_for_project?(project) .js-invite-groups-modal{ data: common_invite_group_modal_data(project, ProjectMember, 'true') } diff --git a/app/views/projects/_last_push.html.haml b/app/views/projects/_last_push.html.haml index 9ba7d25b662..88cce9e71c0 100644 --- a/app/views/projects/_last_push.html.haml +++ b/app/views/projects/_last_push.html.haml @@ -1,9 +1,9 @@ - event = last_push_event - if event && show_last_push_widget?(event) - .gl-alert.gl-alert-success.mt-2{ role: 'alert' } - = sprite_icon('check-circle', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - %button.js-close-banner.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') } - = sprite_icon('close', size: 16, css_class: 'gl-icon') + = render 'shared/global_alert', + variant: :success, + alert_class: 'gl-mt-3', + close_button_class: 'js-close-banner' do .gl-alert-body %span= s_("LastPushEvent|You pushed to") %strong.gl-display-inline-flex.gl-max-w-50p{ data: { toggle: 'tooltip' }, title: event.ref_name } diff --git a/app/views/projects/_merge_request_merge_method_settings.html.haml b/app/views/projects/_merge_request_merge_method_settings.html.haml index 778586a592e..250f7e94e84 100644 --- a/app/views/projects/_merge_request_merge_method_settings.html.haml +++ b/app/views/projects/_merge_request_merge_method_settings.html.haml @@ -19,9 +19,9 @@ .text-secondary = s_('ProjectSettings|Every merge creates a merge commit.') %br - = s_('ProjectSettings|Fast-forward merges only.') + = s_('ProjectSettings|Merging is only allowed when the source branch is up-to-date with its target.') %br - = s_('ProjectSettings|When there is a merge conflict, the user is given the option to rebase.') + = s_('ProjectSettings|When semi-linear merge is not possible, the user is given the option to rebase.') .form-check.mb-2 = form.radio_button :merge_method, :ff, class: "js-merge-method-radio form-check-input", data: { qa_selector: 'merge_ff_radio' } diff --git a/app/views/projects/_new_project_fields.html.haml b/app/views/projects/_new_project_fields.html.haml index 966587a9210..1fb045544aa 100644 --- a/app/views/projects/_new_project_fields.html.haml +++ b/app/views/projects/_new_project_fields.html.haml @@ -8,7 +8,7 @@ .form-group.project-name.col-sm-12 = f.label :name, class: 'label-bold' do %span= _("Project name") - = f.text_field :name, placeholder: "My awesome project", class: "form-control gl-form-input input-lg", data: { track_label: "#{track_label}", track_action: "activate_form_input", track_property: "project_name", track_value: "" }, required: true, aria: { required: true } + = f.text_field :name, placeholder: "My awesome project", class: "form-control gl-form-input input-lg", data: { qa_selector: 'project_name', track_label: "#{track_label}", track_action: "activate_form_input", track_property: "project_name", track_value: "" }, required: true, aria: { required: true } .form-group.project-path.col-sm-6 = f.label :namespace_id, class: 'label-bold' do %span= _('Project URL') @@ -29,14 +29,13 @@ .form-group.project-path.col-sm-6 = f.label :path, class: 'label-bold' do %span= _("Project slug") - = f.text_field :path, placeholder: "my-awesome-project", class: "form-control gl-form-input", required: true, aria: { required: true }, data: { username: current_user.username } + = f.text_field :path, placeholder: "my-awesome-project", class: "form-control gl-form-input", required: true, aria: { required: true }, data: { qa_selector: 'project_path', username: current_user.username } - if current_user.can_create_group? .form-text.text-muted - link_start_group_path = '<a href="%{path}">' % { path: new_group_path } - project_tip = s_('ProjectsNew|Want to house several dependent projects under the same namespace? %{link_start}Create a group.%{link_end}') % { link_start: link_start_group_path, link_end: '</a>' } = project_tip.html_safe -.gl-alert.gl-alert-success.gl-mb-4.gl-display-none.js-user-readme-repo - = sprite_icon('check-circle', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') += render 'shared/global_alert', alert_class: "gl-mb-4 gl-display-none js-user-readme-repo", dismissible: false, variant: :success do .gl-alert-body - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/profile/index', anchor: 'add-details-to-your-profile-with-a-readme') } = html_escape(_('%{project_path} is a project that you can use to add a README to your GitLab profile. Create a public project and initialize the repository with a README to get started. %{help_link_start}Learn more.%{help_link_end}')) % { project_path: "<strong>#{current_user.username} / #{current_user.username}</strong>".html_safe, help_link_start: help_link_start, help_link_end: '</a>'.html_safe } @@ -44,14 +43,15 @@ .form-group = f.label :description, class: 'label-bold' do = s_('ProjectsNew|Project description %{tag_start}(optional)%{tag_end}').html_safe % { tag_start: '<span>'.html_safe, tag_end: '</span>'.html_safe } - = f.text_area :description, placeholder: s_('ProjectsNew|Description format'), class: "form-control gl-form-input", rows: 3, maxlength: 250, data: { track_label: "#{track_label}", track_action: "activate_form_input", track_property: "project_description", track_value: "" } + = f.text_area :description, placeholder: s_('ProjectsNew|Description format'), class: "form-control gl-form-input", rows: 3, maxlength: 250, data: { qa_selector: 'project_description', track_label: "#{track_label}", track_action: "activate_form_input", track_property: "project_description", track_value: "" } -.js-deployment-target-select +- unless Gitlab::CurrentSettings.current_application_settings.hide_third_party_offers? + .js-deployment-target-select = f.label :visibility_level, class: 'label-bold' do = s_('ProjectsNew|Visibility Level') = link_to sprite_icon('question-o'), help_page_path('public_access/public_access'), aria: { label: 'Documentation for Visibility Level' }, target: '_blank', rel: 'noopener noreferrer' -= render 'shared/visibility_level', f: f, visibility_level: visibility_level.to_i, can_change_visibility_level: true, form_model: @project, with_label: false += render 'shared/visibility_level', f: f, visibility_level: visibility_level.to_i, can_change_visibility_level: true, form_model: @project, with_label: false, data: { qa_selector: 'visibility_radios'} - if !hide_init_with_readme = f.label :project_configuration, class: 'label-bold' do @@ -74,5 +74,5 @@ - e.variant(:unchecked_free_indicator) do = render 'new_project_initialize_with_sast', experiment_name: e.name, track_label: track_label, checked: false, with_free_badge: true -= f.submit _('Create project'), class: "btn gl-button btn-confirm", data: { track_label: "#{track_label}", track_action: "click_button", track_property: "create_project", track_value: "" } += f.submit _('Create project'), class: "btn gl-button btn-confirm", data: { qa_selector: 'project_create_button', track_label: "#{track_label}", track_action: "click_button", track_property: "create_project", track_value: "" } = link_to _('Cancel'), dashboard_projects_path, class: 'btn gl-button btn-default btn-cancel', data: { track_label: "#{track_label}", track_action: "click_button", track_property: "cancel", track_value: "" } diff --git a/app/views/projects/_project_templates.html.haml b/app/views/projects/_project_templates.html.haml index 68489fba06c..d00ed2afa3c 100644 --- a/app/views/projects/_project_templates.html.haml +++ b/app/views/projects/_project_templates.html.haml @@ -1,11 +1,10 @@ - f ||= local_assigns[:f] .project-templates-buttons - %ul.nav-tabs.nav-links.nav.scrolling-tabs - %li.built-in-tab - %a.nav-link.active{ href: "#built-in", data: { toggle: 'tab'} } - = _('Built-in') - = gl_tab_counter_badge Gitlab::ProjectTemplate.all.count + Gitlab::SampleDataTemplate.all.count + = gl_tabs_nav({ class: 'nav-links scrolling-tabs gl-display-flex gl-flex-grow-1 gl-flex-nowrap gl-border-0' }) do + = gl_tab_link_to '#built-in', tab_class: 'built-in-tab', class: 'active', data: { toggle: 'tab' } do + = _('Built-in') + = gl_tab_counter_badge Gitlab::ProjectTemplate.all.count + Gitlab::SampleDataTemplate.all.count .tab-content .project-templates-buttons.import-buttons.tab-pane.active#built-in diff --git a/app/views/projects/artifacts/_artifact.html.haml b/app/views/projects/artifacts/_artifact.html.haml index 229de2f759c..9e548582396 100644 --- a/app/views/projects/artifacts/_artifact.html.haml +++ b/app/views/projects/artifacts/_artifact.html.haml @@ -57,5 +57,5 @@ = sprite_icon('folder-open', css_class: 'gl-icon') - if can?(current_user, :destroy_artifacts, @project) - = link_to project_artifact_path(@project, artifact), data: { placement: 'top', container: 'body', confirm: _('Are you sure you want to delete these artifacts?') }, method: :delete, title: _('Delete artifacts'), ref: 'tooltip', aria: { label: _('Delete artifacts') }, class: 'gl-button btn btn-danger btn-icon has-tooltip' do + = link_to project_artifact_path(@project, artifact), data: { placement: 'top', container: 'body', confirm: _('Are you sure you want to delete these artifacts?'), confirm_btn_variant: "danger" }, method: :delete, title: _('Delete artifacts'), ref: 'tooltip', aria: { label: _('Delete artifacts') }, class: 'gl-button btn btn-danger btn-icon has-tooltip' do = sprite_icon('remove', css_class: 'gl-icon') diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml index 919cafe7ce8..85b9a69ab4c 100644 --- a/app/views/projects/blob/_blob.html.haml +++ b/app/views/projects/blob/_blob.html.haml @@ -21,8 +21,7 @@ project_path: @project.full_path, target_branch: project.empty_repo? ? ref : @ref, original_branch: @ref } } - .gl-spinner-container - = loading_icon(size: 'md') + = gl_loading_icon(size: 'md') - else %article.file-holder = render 'projects/blob/header', blob: blob diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 41333c416de..c9303e19d5d 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -45,5 +45,4 @@ - if local_assigns[:path] .js-edit-mode-pane#preview.hide .center - %h2 - %i.icon-spinner.icon-spin + = gl_loading_icon(size: 'lg') diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml index 74df53a8d15..8260aa0fb7e 100644 --- a/app/views/projects/blob/_header.html.haml +++ b/app/views/projects/blob/_header.html.haml @@ -5,13 +5,7 @@ .file-actions.gl-display-flex.gl-align-items-center.gl-flex-wrap.gl-md-justify-content-end< = render 'projects/blob/viewer_switcher', blob: blob unless blame - - if Feature.enabled?(:consolidated_edit_button, @project) - = render 'shared/web_ide_button', blob: blob - - else - = edit_blob_button(@project, @ref, @path, blob: blob) - = ide_edit_button(@project, @ref, @path, blob: blob) - - if can_view_pipeline_editor?(@project) && @path == @project.ci_config_path_or_default - = link_to "Pipeline Editor", project_ci_pipeline_editor_path(@project, branch_name: @ref), class: "btn gl-button btn-confirm-secondary gl-ml-3" + = render 'shared/web_ide_button', blob: blob .btn-group{ role: "group", class: ("gl-ml-3" if current_user) }> = render_if_exists 'projects/blob/header_file_locks_link' - if current_user diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml index 6d2751bb7d4..1d3bec1ad44 100644 --- a/app/views/projects/blob/_upload.html.haml +++ b/app/views/projects/blob/_upload.html.haml @@ -20,8 +20,8 @@ = render 'shared/new_commit_form', placeholder: placeholder, ref: local_assigns[:ref] .form-actions - = button_tag class: 'btn gl-button btn-confirm btn-upload-file', id: 'submit-all', type: 'button' do - .gl-spinner.gl-mr-2.js-loading-icon.hidden + = button_tag class: 'btn gl-button btn-confirm btn-upload-file gl-mr-2', id: 'submit-all', type: 'button' do + = gl_loading_icon(inline: true, css_class: 'gl-mr-2 js-loading-icon hidden') = button_title = link_to _("Cancel"), '#', class: "btn gl-button btn-default btn-cancel", "data-dismiss" => "modal" diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index 8378ce2c7e5..773137ff3f2 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -4,14 +4,16 @@ - webpack_preload_asset_tag('monaco') - if @conflict - .gl-alert.gl-alert-danger.gl-mb-5.gl-mt-5 - .gl-alert-container - = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-content - .gl-alert-body - Someone edited the file the same time you did. Please check out - = link_to _('the file'), project_blob_path(@project, tree_join(@branch_name, @file_path)), target: "_blank", rel: 'noopener noreferrer', class: 'gl-link' - and make sure your changes will not unintentionally remove theirs. + = render 'shared/global_alert', + alert_class: 'gl-mb-5 gl-mt-5', + variant: :danger, + dismissible: false do + - blob_url = project_blob_path(@project, @id) + - external_link_icon = content_tag 'span', { aria: { label: _('Opens new window') }} do + - sprite_icon('external-link', css_class: 'gl-icon').html_safe + - blob_link_start = '<a href="%{url}" class="gl-link" target="_blank" rel="noopener noreferrer">'.html_safe % { url: blob_url } + = _('Someone edited the file the same time you did. Please check out %{link_start}the file %{icon}%{link_end} and make sure your changes will not unintentionally remove theirs.').html_safe % { link_start: blob_link_start, link_end: '</a>'.html_safe , icon: external_link_icon } + %h3.page-title.blob-edit-page-title Edit file diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index 2aeffa88c8f..60877db581f 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -1,16 +1,13 @@ - breadcrumb_title _("Repository") - page_title _("New File"), @path.presence, @ref -%h3.page-title.blob-new-page-title#js-code-quality-walkthrough +%h3.page-title.blob-new-page-title = _('New file') - .js-code-quality-walkthrough{ data: { step: 'commit_ci_file' } } .file-editor = form_tag(project_create_blob_path(@project, @id), method: :post, class: 'js-edit-blob-form js-new-blob-form js-quick-submit js-requires-input', data: blob_editor_paths(@project)) do = render 'projects/blob/editor', ref: @ref = render 'shared/new_commit_form', placeholder: "Add new file" - - if params[:code_quality_walkthrough] - = hidden_field_tag 'code_quality_walkthrough', 'true' = hidden_field_tag 'content', '', id: 'file-content' = render 'projects/commit_button', ref: @ref, cancel_path: project_tree_path(@project, @id) diff --git a/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml b/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml index cf57f1b531d..2b8f62d98bf 100644 --- a/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml +++ b/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml @@ -1,4 +1,4 @@ -= loading_icon(css_class: "gl-vertical-align-text-bottom mr-1") += gl_loading_icon(inline: true, css_class: "gl-mr-2!") = s_('Pipelines|Validating GitLab CI configuration…') = link_to _('Learn more'), help_page_path('ci/yaml/index') diff --git a/app/views/projects/blob/viewers/_loading.html.haml b/app/views/projects/blob/viewers/_loading.html.haml index 18fd0d87ce6..9cb934da7c0 100644 --- a/app/views/projects/blob/viewers/_loading.html.haml +++ b/app/views/projects/blob/viewers/_loading.html.haml @@ -1,2 +1 @@ -.text-center.gl-mt-4.gl-mb-3 - = loading_icon(size: "md", css_class: "qa-spinner") += gl_loading_icon(size: "md", css_class: "qa-spinner gl-my-4") diff --git a/app/views/projects/blob/viewers/_loading_auxiliary.html.haml b/app/views/projects/blob/viewers/_loading_auxiliary.html.haml index 5a2212e0b4e..19aa96a9302 100644 --- a/app/views/projects/blob/viewers/_loading_auxiliary.html.haml +++ b/app/views/projects/blob/viewers/_loading_auxiliary.html.haml @@ -1,2 +1,2 @@ -= loading_icon(css_class: "gl-vertical-align-text-bottom") += gl_loading_icon(inline: true) = _("Analyzing file…") diff --git a/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml b/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml index db4b04eaeb8..5e355ecc4b8 100644 --- a/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml +++ b/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml @@ -1,4 +1,4 @@ -= loading_icon(css_class: "gl-vertical-align-text-bottom mr-1") += gl_loading_icon(inline: true, css_class: "mr-1") = _('Metrics Dashboard YAML definition') + '…' = link_to _('Learn more'), help_page_path('operations/metrics/dashboards/yaml.md') diff --git a/app/views/projects/blob/viewers/_route_map_loading.html.haml b/app/views/projects/blob/viewers/_route_map_loading.html.haml index c48ab84654f..d9e965246a8 100644 --- a/app/views/projects/blob/viewers/_route_map_loading.html.haml +++ b/app/views/projects/blob/viewers/_route_map_loading.html.haml @@ -1,4 +1,4 @@ -= loading_icon(css_class: "gl-vertical-align-text-bottom gl-mr-1") += gl_loading_icon(inline: true, css_class: "gl-mr-1") Validating Route Map… = link_to 'Learn more', help_page_path('ci/environments/index.md', anchor: 'go-from-source-files-to-public-pages') diff --git a/app/views/projects/blob/viewers/_sketch.html.haml b/app/views/projects/blob/viewers/_sketch.html.haml index 08c21258d3f..4feaa7392fd 100644 --- a/app/views/projects/blob/viewers/_sketch.html.haml +++ b/app/views/projects/blob/viewers/_sketch.html.haml @@ -1,3 +1,2 @@ .file-content#js-sketch-viewer{ data: { endpoint: blob_raw_path } } - .text-center.gl-mt-4.gl-mb-3.js-loading-icon - = loading_icon(size: "md") + = gl_loading_icon(size: "md", css_class: "gl-my-4 js-loading-icon") diff --git a/app/views/projects/blob/viewers/_stl.html.haml b/app/views/projects/blob/viewers/_stl.html.haml index f98deebacf9..8bf0339fc3c 100644 --- a/app/views/projects/blob/viewers/_stl.html.haml +++ b/app/views/projects/blob/viewers/_stl.html.haml @@ -1,6 +1,6 @@ .file-content.is-stl-loading .text-center#js-stl-viewer{ data: { endpoint: blob_raw_path } } - = loading_icon(size: "md", css_class: "gl-mt-4 gl-mb-3") + = gl_loading_icon(size: "md", css_class: "gl-my-4") .text-center.gl-mt-3.gl-mb-3.stl-controls .btn-group %button.gl-button.btn.btn-default.btn-sm.js-material-changer{ data: { type: 'wireframe' } } diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml index 8ee7910de4b..5cc83111b34 100644 --- a/app/views/projects/branches/new.html.haml +++ b/app/views/projects/branches/new.html.haml @@ -4,8 +4,7 @@ - if @error = render 'shared/global_alert', variant: :danger, - close_button_class: 'js-close', - is_contained: true do + close_button_class: 'js-close' do .gl-alert-body = @error %h3.page-title diff --git a/app/views/projects/ci/secure_files/show.html.haml b/app/views/projects/ci/secure_files/show.html.haml new file mode 100644 index 00000000000..db0734be6bd --- /dev/null +++ b/app/views/projects/ci/secure_files/show.html.haml @@ -0,0 +1,5 @@ +- @content_class = "limit-container-width" + +- page_title s_('Secure Files') + +#js-ci-secure-files{ data: { project_id: @project.id } } diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 36d3520cb59..a3343aa4228 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -37,13 +37,13 @@ - @commit.parents.each do |parent| = link_to parent.short_id, project_commit_path(@project, parent), class: "commit-sha" .commit-info.branches - .gl-spinner.vertical-align-middle + = gl_loading_icon(inline: true, css_class: 'gl-vertical-align-middle') .well-segment.merge-request-info .icon-container = custom_icon('mr_bold') %span.commit-info.merge-requests{ 'data-project-commit-path' => merge_requests_project_commit_path(@project, @commit.id, format: :json) } - .gl-spinner.vertical-align-middle + = gl_loading_icon(inline: true, css_class: 'gl-vertical-align-middle') - if can?(current_user, :read_pipeline, @last_pipeline) .well-segment.pipeline-info diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml index 9e0dd93c683..02b5fe00ad0 100644 --- a/app/views/projects/commits/_commits.html.haml +++ b/app/views/projects/commits/_commits.html.haml @@ -22,7 +22,7 @@ - if context_commits.present? %li.commit-header.js-commit-header %span.font-weight-bold= n_("%d previously merged commit", "%d previously merged commits", context_commits.count) % context_commits.count - - if project.context_commits_enabled? && can_update_merge_request + - if can_update_merge_request %button.gl-button.btn.btn-default.ml-3.add-review-item-modal-trigger{ type: "button", data: { context_commits_empty: 'false' } } = _('Add/remove') @@ -34,13 +34,14 @@ = render partial: 'projects/commits/commit', collection: context_commits, locals: { project: project, ref: ref, merge_request: merge_request } - if hidden > 0 - %li.gl-alert.gl-alert-warning - .gl-alert-container - = sprite_icon('warning', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-content + %li + = render 'shared/global_alert', + variant: :warning, + dismissible: false do + .gl-alert-body = n_('%s additional commit has been omitted to prevent performance issues.', '%s additional commits have been omitted to prevent performance issues.', hidden) % number_with_delimiter(hidden) -- if project.context_commits_enabled? && can_update_merge_request && context_commits&.empty? +- if can_update_merge_request && context_commits&.empty? %button.gl-button.btn.btn-default.mt-3.add-review-item-modal-trigger{ type: "button", data: { context_commits_empty: 'true' } } = _('Add previously merged commits') diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index 22a5bada311..36641a8c508 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -34,5 +34,4 @@ %div{ id: dom_id(@project) } %ol#commits-list.list-unstyled.content_list = render 'commits', project: @project, ref: @ref - .loading.hide - = loading_icon(size: "lg") + = gl_loading_icon(size: 'lg', css_class: 'loading hide') diff --git a/app/views/projects/diffs/_content.html.haml b/app/views/projects/diffs/_content.html.haml index 718f129cba8..23f9afe8352 100644 --- a/app/views/projects/diffs/_content.html.haml +++ b/app/views/projects/diffs/_content.html.haml @@ -1,3 +1,12 @@ - diff_file = local_assigns.fetch(:diff_file, nil) +- file_hash = hexdigest(diff_file.file_path) + .diff-content - = render 'projects/diffs/viewer', viewer: diff_file.viewer + - if diff_file.has_renderable? + %div{ id: "#raw-diff-#{file_hash}", data: { file_hash: file_hash, diff_toggle_entity: 'toHide' } } + = render 'projects/diffs/viewer', viewer: diff_file.viewer + %div{ id: "#rendered-diff-#{file_hash}", data: { file_hash: file_hash, diff_toggle_entity: 'toShow' } } + = render 'projects/diffs/viewer', viewer: diff_file.rendered.viewer + - else + = render 'projects/diffs/viewer', viewer: diff_file.viewer + diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index 418a65118f5..0638481d968 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -25,6 +25,11 @@ = edit_blob_button(@merge_request.source_project, @merge_request.source_branch, diff_file.new_path, blob: diff_file.blob, link_opts: link_opts) + - if diff_file.has_renderable? + .btn-group.gl-ml-3 + = diff_mode_swap_button('rendered', file_hash) + = diff_mode_swap_button('raw', file_hash) + - if image_diff && image_replaced = view_file_button(diff_file.old_content_sha, diff_file.old_path, project, replaced: true) diff --git a/app/views/projects/diffs/_line.html.haml b/app/views/projects/diffs/_line.html.haml index 330e2f564c9..a5d3328b439 100644 --- a/app/views/projects/diffs/_line.html.haml +++ b/app/views/projects/diffs/_line.html.haml @@ -3,7 +3,7 @@ - plain = local_assigns.fetch(:plain, false) - discussions = local_assigns.fetch(:discussions, nil) - line_code = diff_file.line_code(line) -- if discussions && line.discussable? +- if discussions - line_discussions = discussions[line_code] %tr.line_holder{ class: line.type, id: (line_code unless plain) } @@ -15,11 +15,12 @@ %td.new_line.diff-line-num %td.line_content.match= line.text - else - %td.old_line.diff-line-num{ class: [line.type, ("js-avatar-container" if !plain)], data: { linenumber: line.old_pos } } + %td.old_line.diff-line-num{ class: [line.type, ("js-avatar-container" unless plain)], data: { linenumber: line.old_pos } } - if plain = diff_link_number(line.type, "new", line.old_pos) - else - = add_diff_note_button(line_code, diff_file.position(line), line.type) + - if line.discussable? + = add_diff_note_button(line_code, diff_file.position(line), line.type) %a{ href: "##{line_code}", data: { linenumber: diff_link_number(line.type, "new", line.old_pos) } } %td.new_line.diff-line-num{ class: line.type, data: { linenumber: line.new_pos } } diff --git a/app/views/projects/diffs/_warning.html.haml b/app/views/projects/diffs/_warning.html.haml index 1d9b1b13d5c..3d31773694f 100644 --- a/app/views/projects/diffs/_warning.html.haml +++ b/app/views/projects/diffs/_warning.html.haml @@ -1,7 +1,6 @@ = render 'shared/global_alert', title: _('Too many changes to show.'), variant: :warning, - is_contained: true, alert_class: 'gl-mb-5' do .gl-alert-body = html_escape(_("To preserve performance only %{strong_open}%{display_size} of %{real_size}%{strong_close} files are displayed.")) % { display_size: diff_files.size, real_size: diff_files.real_size, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index f32514141c5..1609d81c0fd 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -66,6 +66,8 @@ %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 @@ -107,6 +109,6 @@ .save-project-loader.hide .center %h2 - .gl-spinner.gl-spinner-md.align-text-bottom + = 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.') diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index c3fbf774faa..6a54eedf6c8 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -1,5 +1,6 @@ - @content_class = "limit-container-width" unless fluid_layout - default_branch_name = @project.default_branch_or_main +- escaped_default_branch_name = default_branch_name.shellescape - @skip_current_level_breadcrumb = true = render partial: 'flash_messages', locals: { project: @project } @@ -31,51 +32,47 @@ %p = _('You can also upload existing files from your computer using the instructions below.') .git-empty.js-git-empty - %fieldset - %h5= _('Git global setup') - %pre.bg-light - :preserve - git config --global user.name "#{h git_user_name}" - git config --global user.email "#{h git_user_email}" + %h5= _('Git global setup') + %pre.bg-light + :preserve + git config --global user.name "#{h git_user_name}" + git config --global user.email "#{h git_user_email}" - %fieldset - %h5= _('Create a new repository') - %pre.bg-light - :preserve - git clone #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} - cd #{h @project.path} - git switch -c #{h default_branch_name} - touch README.md - git add README.md - git commit -m "add README" - - if @project.can_current_user_push_to_default_branch? - %span>< - git push -u origin #{h default_branch_name } + %h5= _('Create a new repository') + %pre.bg-light + :preserve + git clone #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} + cd #{h @project.path} + git switch -c #{h escaped_default_branch_name} + touch README.md + git add README.md + git commit -m "add README" + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin #{h escaped_default_branch_name } - %fieldset - %h5= _('Push an existing folder') - %pre.bg-light - :preserve - cd existing_folder - git init --initial-branch=#{h default_branch_name} - git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} - git add . - git commit -m "Initial commit" - - if @project.can_current_user_push_to_default_branch? - %span>< - git push -u origin #{h default_branch_name } + %h5= _('Push an existing folder') + %pre.bg-light + :preserve + cd existing_folder + git init --initial-branch=#{h escaped_default_branch_name} + git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} + git add . + git commit -m "Initial commit" + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin #{h escaped_default_branch_name } - %fieldset - %h5= _('Push an existing Git repository') - %pre.bg-light - :preserve - cd existing_repo - git remote rename origin old-origin - git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} - - if @project.can_current_user_push_to_default_branch? - %span>< - git push -u origin --all - git push -u origin --tags + %h5= _('Push an existing Git repository') + %pre.bg-light + :preserve + cd existing_repo + git remote rename origin old-origin + git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin --all + git push -u origin --tags - if @project.upload_anchor_data.present? = render 'projects/blob/upload', title: _('Upload New File'), placeholder: _('Upload New File'), button_title: _('Upload file'), form_path: project_create_blob_path(@project, default_branch_name), ref: default_branch_name, method: :post diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index 2b05ffe3eea..e4b8750b96c 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -1,19 +1,11 @@ - page_title _("Environments") - add_page_specific_style 'page_bundles/environments' -- if Feature.enabled?(:new_environments_table) - #environments-table{ data: { endpoint: project_environments_path(@project, format: :json), - "can-read-environment" => can?(current_user, :read_environment, @project).to_s, - "can-create-environment" => can?(current_user, :create_environment, @project).to_s, - "new-environment-path" => new_project_environment_path(@project), - "help-page-path" => help_page_path("ci/environments/index.md"), - "project-path" => @project.full_path, - "default-branch-name" => @project.default_branch_or_main } } -- else - #environments-list-view{ data: { environments_data: environments_list_data, - "can-read-environment" => can?(current_user, :read_environment, @project).to_s, - "can-create-environment" => can?(current_user, :create_environment, @project).to_s, - "new-environment-path" => new_project_environment_path(@project), - "help-page-path" => help_page_path("ci/environments/index.md"), - "project-path" => @project.full_path, - "default-branch-name" => @project.default_branch_or_main } } +#environments-table{ data: { endpoint: project_environments_path(@project, format: :json), + "can-read-environment" => can?(current_user, :read_environment, @project).to_s, + "can-create-environment" => can?(current_user, :create_environment, @project).to_s, + "new-environment-path" => new_project_environment_path(@project), + "help-page-path" => help_page_path("ci/environments/index.md"), + "project-path" => @project.full_path, + "project-id" => @project.id, + "default-branch-name" => @project.default_branch_or_main } } diff --git a/app/views/projects/find_file/show.html.haml b/app/views/projects/find_file/show.html.haml index 194b10e9ef4..af5ad06d30e 100644 --- a/app/views/projects/find_file/show.html.haml +++ b/app/views/projects/find_file/show.html.haml @@ -23,5 +23,4 @@ = _('There are no matching files') %p.text-secondary = _('Try using a different search term to find the file you are looking for.') - .text-center.gl-mt-3.loading - = loading_icon(size: 'md') + = gl_loading_icon(size: 'md', css_class: 'gl-mt-3 loading') diff --git a/app/views/projects/forks/_fork_button.html.haml b/app/views/projects/forks/_fork_button.html.haml deleted file mode 100644 index 84259890a44..00000000000 --- a/app/views/projects/forks/_fork_button.html.haml +++ /dev/null @@ -1,20 +0,0 @@ -- avatar = namespace_icon(namespace, 100) -- can_create_project = current_user.can?(:create_projects, namespace) - -.bordered-box.fork-thumbnail.text-center.gl-m-3.gl-pb-5{ class: ("disabled" unless can_create_project) } - - if /no_((\w*)_)*avatar/.match(avatar) - = group_icon(namespace, class: "avatar rect-avatar s100 identicon mx-auto") - - else - .avatar-container.s100.mx-auto.gl-mt-5 - = image_tag(avatar, class: "avatar s100") - %h5.gl-mt-3 - = namespace.human_name - - if forked_project = namespace.find_fork_of(@project) - = link_to _("Go to project"), project_path(forked_project), class: "btn gl-button btn-default" - - else - %div{ class: ('has-tooltip' unless can_create_project), - title: (_('You have reached your project limit') unless can_create_project) } - = link_to _("Select"), project_forks_path(@project, namespace_key: namespace.id), - data: { qa_selector: 'fork_namespace_button', qa_name: namespace.human_name }, - method: "POST", - class: ["btn gl-button btn-confirm", ("disabled" unless can_create_project)] diff --git a/app/views/projects/forks/error.html.haml b/app/views/projects/forks/error.html.haml index 30e2e9f19d9..7933e0e07b3 100644 --- a/app/views/projects/forks/error.html.haml +++ b/app/views/projects/forks/error.html.haml @@ -4,7 +4,6 @@ title: _('Fork Error!'), variant: :danger, alert_class: 'gl-mt-5', - is_contained: true, dismissible: false do .gl-alert-body %p diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml index 8848fbae9cb..7243852e1f5 100644 --- a/app/views/projects/forks/new.html.haml +++ b/app/views/projects/forks/new.html.haml @@ -1,30 +1,13 @@ - page_title s_("ForkProject|Fork project") -- if Feature.enabled?(:fork_project_form, @project, default_enabled: :yaml) - #fork-groups-mount-element{ data: { fork_illustration: image_path('illustrations/project-create-new-sm.svg'), - endpoint: new_project_fork_path(@project, format: :json), - new_group_path: new_group_path, - project_full_path: project_path(@project), - visibility_help_path: help_page_path("public_access/public_access"), - project_id: @project.id, - project_name: @project.name, - project_path: @project.path, - project_description: @project.description, - project_visibility: @project.visibility, - restricted_visibility_levels: Gitlab::CurrentSettings.restricted_visibility_levels.to_json } } -- else - .row.gl-mt-3 - .col-lg-3 - %h4.gl-mt-0 - = s_("ForkProject|Fork project") - %p - = s_("ForkProject|A fork is a copy of a project.") - %br - = s_('ForkProject|Forking a repository allows you to make changes without affecting the original project.') - .col-lg-9 - - if @own_namespace.present? - .fork-thumbnail-container.js-fork-content - %h5.gl-mt-0.gl-mb-0.gl-ml-3.gl-mr-3 - = s_("ForkProject|Select a namespace to fork the project") - = render 'fork_button', namespace: @own_namespace - #fork-groups-mount-element{ data: { endpoint: new_project_fork_path(@project, format: :json) } } +#fork-groups-mount-element{ data: { fork_illustration: image_path('illustrations/project-create-new-sm.svg'), + endpoint: new_project_fork_path(@project, format: :json), + new_group_path: new_group_path, + project_full_path: project_path(@project), + visibility_help_path: help_page_path("public_access/public_access"), + project_id: @project.id, + project_name: @project.name, + project_path: @project.path, + project_description: @project.description, + project_visibility: @project.visibility, + restricted_visibility_levels: Gitlab::CurrentSettings.restricted_visibility_levels.to_json } } diff --git a/app/views/projects/google_cloud/gcp_regions/index.html.haml b/app/views/projects/google_cloud/gcp_regions/index.html.haml new file mode 100644 index 00000000000..3a6f8ca059d --- /dev/null +++ b/app/views/projects/google_cloud/gcp_regions/index.html.haml @@ -0,0 +1,8 @@ +- add_to_breadcrumbs _('Google Cloud'), @google_cloud_path +- breadcrumb_title _('Regions') +- page_title _('Regions') + +- @content_class = "limit-container-width" unless fluid_layout + += form_tag project_google_cloud_gcp_regions_path(@project), method: 'post' do + #js-google-cloud{ data: @js_data } diff --git a/app/views/projects/harbor/repositories/index.html.haml b/app/views/projects/harbor/repositories/index.html.haml new file mode 100644 index 00000000000..b3f5b91596d --- /dev/null +++ b/app/views/projects/harbor/repositories/index.html.haml @@ -0,0 +1,9 @@ +- page_title _("Harbor Registry") +- @content_class = "limit-container-width" unless fluid_layout + +#js-harbor-registry-list-project{ data: { endpoint: project_harbor_registry_index_path(@project), + "no_containers_image" => image_path('illustrations/docker-empty-state.svg'), + "containers_error_image" => image_path('illustrations/docker-error-state.svg'), + "help_page_path" => help_page_path('user/packages/container_registry/index'), + connection_error: (!!@connection_error).to_s, + invalid_path_error: (!!@invalid_path_error).to_s, } } diff --git a/app/views/projects/imports/show.html.haml b/app/views/projects/imports/show.html.haml index 0c1efab2195..8096bc6cead 100644 --- a/app/views/projects/imports/show.html.haml +++ b/app/views/projects/imports/show.html.haml @@ -4,7 +4,7 @@ .save-project-loader .center %h2 - = loading_icon + = gl_loading_icon(inline: true) = import_in_progress_title - if !has_ci_cd_only_params? && @project.external_import? %p.monospace git clone --bare #{@project.safe_import_url} diff --git a/app/views/projects/issues/_alert_moved_from_service_desk.html.haml b/app/views/projects/issues/_alert_moved_from_service_desk.html.haml index 662270fb8e1..26bd65fbe26 100644 --- a/app/views/projects/issues/_alert_moved_from_service_desk.html.haml +++ b/app/views/projects/issues/_alert_moved_from_service_desk.html.haml @@ -4,7 +4,6 @@ = render 'shared/global_alert', variant: :warning, - is_contained: true, close_button_class: 'js-close', alert_class: 'hide js-alert-moved-from-service-desk-warning gl-mt-5' do .gl-alert-body.gl-mr-3 diff --git a/app/views/projects/issues/_form.html.haml b/app/views/projects/issues/_form.html.haml index d85c448b29a..34e46807fb6 100644 --- a/app/views/projects/issues/_form.html.haml +++ b/app/views/projects/issues/_form.html.haml @@ -1,3 +1,3 @@ = form_for [@project, @issue], - html: { class: 'issue-form common-note-form gl-mt-3 js-quick-submit js-requires-input' } do |f| + html: { class: 'issue-form common-note-form gl-mt-3 js-quick-submit gl-show-field-errors' } do |f| = render 'shared/issuable/form', f: f, issuable: @issue diff --git a/app/views/projects/issues/_service_desk_empty_state.html.haml b/app/views/projects/issues/_service_desk_empty_state.html.haml index 3e0b80700fe..efc319ed8df 100644 --- a/app/views/projects/issues/_service_desk_empty_state.html.haml +++ b/app/views/projects/issues/_service_desk_empty_state.html.haml @@ -6,7 +6,7 @@ - if Gitlab::ServiceDesk.supported? .empty-state .svg-content - = render 'shared/empty_states/icons/service_desk_empty_state.svg' + = render partial: 'shared/empty_states/icons/service_desk_empty_state', formats: :svg .text-content %h4= title_text @@ -25,7 +25,7 @@ - else .empty-state .svg-content - = render 'shared/empty_states/icons/service_desk_setup.svg' + = render partial: 'shared/empty_states/icons/service_desk_setup', formats: :svg .text-content - if can_edit_project_settings %h4= s_('ServiceDesk|Service Desk is not supported') diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index 10c48177ae4..d74b6c0639c 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -14,7 +14,7 @@ project_path: @project.full_path } } - if Feature.enabled?(:vue_issues_list, @project&.group, default_enabled: :yaml) - .js-issues-list{ data: project_issues_list_data(@project, current_user, finder) } + .js-issues-list{ data: project_issues_list_data(@project, current_user) } - if @can_bulk_update = render 'shared/issuable/bulk_update_sidebar', type: :issues - elsif project_issues(@project).exists? diff --git a/app/views/projects/learn_gitlab/index.html.haml b/app/views/projects/learn_gitlab/index.html.haml index 9924b172875..0e950c26d34 100644 --- a/app/views/projects/learn_gitlab/index.html.haml +++ b/app/views/projects/learn_gitlab/index.html.haml @@ -5,8 +5,4 @@ = render 'projects/invite_members_modal', project: @project -- experiment(:confetti_post_signup, actor: current_user) do |e| - - e.control do - #js-learn-gitlab-app{ data: data } - - e.candidate do - #js-learn-gitlab-app{ data: data.merge(invite_members: 'true') } +#js-learn-gitlab-app{ data: data } diff --git a/app/views/projects/merge_requests/_commits.html.haml b/app/views/projects/merge_requests/_commits.html.haml index ecf5df5d3b4..14ddaf8d2b7 100644 --- a/app/views/projects/merge_requests/_commits.html.haml +++ b/app/views/projects/merge_requests/_commits.html.haml @@ -5,7 +5,7 @@ = custom_icon ('illustration_no_commits') %h4 = _('There are no commits yet.') - - if @project&.context_commits_enabled? && can_update_merge_request + - if can_update_merge_request %p = _('Push commits to the source branch or add previously merged commits to review them.') %button.btn.gl-button.btn-confirm.add-review-item-modal-trigger{ type: "button", data: { commits_empty: 'true', context_commits_empty: 'true' } } @@ -14,5 +14,5 @@ %ol#commits-list.list-unstyled = render "projects/commits/commits", merge_request: @merge_request -- if @project&.context_commits_enabled? && can_update_merge_request && @merge_request.iid +- if can_update_merge_request && @merge_request.iid .add-review-item-modal-wrapper{ data: { context_commits_path: context_commits_project_json_merge_request_url(@merge_request&.project, @merge_request, :json), target_branch: @merge_request.target_branch, merge_request_iid: @merge_request.iid, project_id: @merge_request.project.id } } diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml index f2a271da771..d894aeaad65 100644 --- a/app/views/projects/merge_requests/_mr_title.html.haml +++ b/app/views/projects/merge_requests/_mr_title.html.haml @@ -6,12 +6,12 @@ = cache(cache_key, expires_in: 1.day) do - if @merge_request.closed_or_merged_without_fork? - .gl-alert.gl-alert-danger.gl-mb-5 - .gl-alert-container - = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-content - .gl-alert-body - The source project of this merge request has been removed. + = render 'shared/global_alert', + alert_class: 'gl-mb-5', + variant: :danger, + dismissible: false do + .gl-alert-body + = _('The source project of this merge request has been removed.') .detail-page-header.border-bottom-0.pt-0.pb-0 .detail-page-header-body @@ -45,9 +45,9 @@ %li= link_to _('Report abuse'), new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)) - if can_update_merge_request - = link_to _('Edit'), edit_project_merge_request_path(@project, @merge_request), class: "d-none d-md-block btn gl-button btn-default btn-grouped js-issuable-edit", data: { qa_selector: "edit_button" } + = link_to _('Edit'), edit_project_merge_request_path(@project, @merge_request), class: "gl-display-none gl-md-display-block btn gl-button btn-default btn-grouped js-issuable-edit", data: { qa_selector: "edit_button" } - if can_update_merge_request && !are_close_and_open_buttons_hidden = render 'projects/merge_requests/close_reopen_draft_report_toggle' - elsif !@merge_request.merged? - = link_to _('Report abuse'), new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)), class: 'gl-display-none gl-md-display-block gl-button btn btn-default float-right gl-ml-3', title: _('Report abuse') + = link_to _('Report abuse'), new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)), class: 'gl-display-none gl-md-display-block gl-button btn btn-default gl-float-right gl-ml-3', title: _('Report abuse') diff --git a/app/views/projects/merge_requests/creations/_new_compare.html.haml b/app/views/projects/merge_requests/creations/_new_compare.html.haml index ea778517374..e2ac8ef5abc 100644 --- a/app/views/projects/merge_requests/creations/_new_compare.html.haml +++ b/app/views/projects/merge_requests/creations/_new_compare.html.haml @@ -29,8 +29,7 @@ = dropdown_content = dropdown_loading .card-footer - .text-center - .js-source-loading.mt-1.gl-spinner + = gl_loading_icon(css_class: 'js-source-loading gl-my-3') %ul.list-unstyled.mr_source_commit .col-lg-6 @@ -58,8 +57,7 @@ = dropdown_content = dropdown_loading .card-footer - .text-center - .js-target-loading.mt-1.gl-spinner + = gl_loading_icon(css_class: 'js-target-loading gl-my-3') %ul.list-unstyled.mr_target_commit - if @merge_request.errors.any? diff --git a/app/views/projects/merge_requests/creations/_new_submit.html.haml b/app/views/projects/merge_requests/creations/_new_submit.html.haml index 0036f1b4bde..253f50d5090 100644 --- a/app/views/projects/merge_requests/creations/_new_submit.html.haml +++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml @@ -48,4 +48,4 @@ .mr-loading-status .loading.hide - .gl-spinner.gl-spinner-md + = gl_loading_icon(size: 'md') diff --git a/app/views/projects/merge_requests/invalid.html.haml b/app/views/projects/merge_requests/invalid.html.haml index 28fd0b83824..aa68fe031bb 100644 --- a/app/views/projects/merge_requests/invalid.html.haml +++ b/app/views/projects/merge_requests/invalid.html.haml @@ -9,16 +9,15 @@ = render "projects/merge_requests/mr_title" = render "projects/merge_requests/mr_box" - .gl-alert.gl-alert-danger - .gl-alert-container - = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-content{ role: 'alert' } - .gl-alert-body - - if @merge_request.for_fork? && !@merge_request.source_project - = err_fork_project_removed - - elsif !@merge_request.source_branch_exists? - = err_source_branch.html_safe % { branch_badge: gl_badge_tag(@merge_request.source_branch, variant: :info, size: :sm), path_badge: gl_badge_tag(@merge_request.source_project_path, variant: :info, size: :sm) } - - elsif !@merge_request.target_branch_exists? - = err_target_branch.html_safe % { branch_badge: gl_badge_tag(@merge_request.target_branch, variant: :info, size: :sm), path_badge: gl_badge_tag(@merge_request.source_project_path, variant: :info, size: :sm) } - - else - = err_internal + = render 'shared/global_alert', + variant: :danger, + dismissible: false do + .gl-alert-body + - if @merge_request.for_fork? && !@merge_request.source_project + = err_fork_project_removed + - elsif !@merge_request.source_branch_exists? + = err_source_branch.html_safe % { branch_badge: gl_badge_tag(@merge_request.source_branch, variant: :info, size: :sm), path_badge: gl_badge_tag(@merge_request.source_project_path, variant: :info, size: :sm) } + - elsif !@merge_request.target_branch_exists? + = err_target_branch.html_safe % { branch_badge: gl_badge_tag(@merge_request.target_branch, variant: :info, size: :sm), path_badge: gl_badge_tag(@merge_request.source_project_path, variant: :info, size: :sm) } + - else + = err_internal diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index a7667d03138..008f2588dbd 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -76,14 +76,12 @@ = render "projects/merge_requests/tabs/pane", name: "pipelines", id: "pipelines", class: "pipelines" do - if @number_of_pipelines.nonzero? = render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_project_merge_request_path(@project, @merge_request) - - params = request.query_parameters - - if Feature.enabled?(:default_merge_ref_for_diffs, @project, default_enabled: :yaml) - - params = params.merge(diff_head: true) + - params = request.query_parameters.merge(diff_head: true) = render "projects/merge_requests/tabs/pane", name: "diffs", id: "js-diffs-app", class: "diffs", data: diffs_tab_pane_data(@project, @merge_request, params) .mr-loading-status .loading.hide - .gl-spinner.gl-spinner-md + = gl_loading_icon(size: 'lg') = render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, reviewers: @merge_request.reviewers, source_branch: @merge_request.source_branch @@ -94,5 +92,8 @@ #js-review-bar +- if Feature.enabled?(:mr_attention_requests, default_enabled: :yaml) + #js-need-attention-sidebar-onboarding + = render 'projects/invite_members_modal', project: @project = render 'shared/web_ide_path' diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index dbde3346b81..225f8c7dd66 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -15,7 +15,6 @@ = render 'shared/global_alert', variant: :info, dismissible: false, - is_contained: true, alert_data: { testid: 'no-issues-alert' }, alert_class: 'gl-mt-3 gl-mb-5' do .gl-alert-body diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index b2fa735f76f..3af95633214 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -37,8 +37,9 @@ .panel-footer = f.submit _('Mirror repository'), class: 'gl-button btn btn-confirm js-mirror-submit qa-mirror-repository-button', name: :update_remote_mirror - else - .gl-alert.gl-alert-info{ role: 'alert' } - = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + = render 'shared/global_alert', + dismissible: false, + variant: :info do .gl-alert-body = _('Mirror settings are only available to GitLab administrators.') diff --git a/app/views/projects/network/show.html.haml b/app/views/projects/network/show.html.haml index 4cabb930433..b6700c9ed1e 100644 --- a/app/views/projects/network/show.html.haml +++ b/app/views/projects/network/show.html.haml @@ -16,5 +16,4 @@ - if @commit .network-graph.gl-bg-white.gl-overflow-scroll.gl-overflow-x-hidden{ data: { url: @url, commit_url: @commit_url, ref: @ref, commit_id: @commit.id } } - .text-center.gl-mt-3 - .gl-spinner.gl-spinner-md + = gl_loading_icon(size: 'md', css_class: 'gl-mt-3') diff --git a/app/views/projects/pages/_ssl_limitations_warning.html.haml b/app/views/projects/pages/_ssl_limitations_warning.html.haml index de74b703e95..24f51aa91e6 100644 --- a/app/views/projects/pages/_ssl_limitations_warning.html.haml +++ b/app/views/projects/pages/_ssl_limitations_warning.html.haml @@ -2,6 +2,6 @@ = sprite_icon("warning-solid", css_class: "gl-text-orange-600") %strong= _("Warning:") - pages_host = Gitlab.config.pages.host - - docs_link_start = "<a href='#{help_page_path('user/project/pages/introduction', anchor: 'limitations')}' target='_blank' rel='noopener noreferrer'>".html_safe + - docs_link_start = "<a href='#{help_page_path('user/project/pages/introduction', anchor: 'subdomains-of-subdomains')}' target='_blank' rel='noopener noreferrer'>".html_safe - link_end = '</a>'.html_safe - = s_("GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with sub-subdomains. This means that if your username/groupname contains a dot it will not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages will continue to work provided you don't redirect HTTP to HTTPS. %{docs_link_start}Learn more.%{link_end}").html_safe % { pages_host: pages_host, docs_link_start: docs_link_start, link_end: link_end } + = s_("GitLabPages|When using Pages under the general domain of a GitLab instance (%{pages_host}), you cannot use HTTPS with subdomains of subdomains. If your namespace or groupname contains a dot, it does not work. This is a limitation of the HTTP Over TLS protocol. HTTP pages work if you don't redirect HTTP to HTTPS. %{docs_link_start}Learn more.%{link_end}").html_safe % { pages_host: pages_host, docs_link_start: docs_link_start, link_end: link_end } diff --git a/app/views/projects/pages_domains/_certificate.html.haml b/app/views/projects/pages_domains/_certificate.html.haml index 33db7896065..861305dc93b 100644 --- a/app/views/projects/pages_domains/_certificate.html.haml +++ b/app/views/projects/pages_domains/_certificate.html.haml @@ -14,14 +14,13 @@ - lets_encrypt_link_start = "<a href=\"%{lets_encrypt_link_url}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-nowrap\">".html_safe % { lets_encrypt_link_url: lets_encrypt_link_url } - lets_encrypt_link_end = "</a>".html_safe = _("Automatic certificate management using %{lets_encrypt_link_start}Let's Encrypt%{lets_encrypt_link_end}").html_safe % { lets_encrypt_link_start: lets_encrypt_link_start, lets_encrypt_link_end: lets_encrypt_link_end } - %button{ type: "button", id: "pages_domain_auto_ssl_enabled_button", - class: "js-project-feature-toggle project-feature-toggle mt-2 #{"is-checked" if auto_ssl_available_and_enabled}", - "aria-label": _("Automatic certificate management using Let's Encrypt") } + = render Pajamas::ToggleComponent.new(id: 'pages_domain_auto_ssl_enabled_button', + classes: 'js-project-feature-toggle js-enable-ssl-gl-toggle mt-2', + is_checked: auto_ssl_available_and_enabled, + label: _("Automatic certificate management using Let's Encrypt"), + label_position: :hidden) = f.hidden_field :auto_ssl_enabled?, class: "js-project-feature-toggle-input" - %span.toggle-icon - = sprite_icon("status_success_borderless", size: 18, css_class: "gl-text-blue-500 toggle-status-checked") - = sprite_icon("status_failed_borderless", size: 18, css_class: "gl-text-gray-400 toggle-status-unchecked") - %p.text-secondary.mt-3 + %p.gl-text-secondary.gl-mt-1 - docs_link_url = help_page_path("user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md") - docs_link_start = "<a href=\"%{docs_link_url}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-nowrap\">".html_safe % { docs_link_url: docs_link_url } - docs_link_end = "</a>".html_safe diff --git a/app/views/projects/pipeline_schedules/_form.html.haml b/app/views/projects/pipeline_schedules/_form.html.haml index 66aee7dedf3..0818c3d5cff 100644 --- a/app/views/projects/pipeline_schedules/_form.html.haml +++ b/app/views/projects/pipeline_schedules/_form.html.haml @@ -15,8 +15,9 @@ = f.text_field :cron_timezone, value: @schedule.cron_timezone, id: 'schedule_cron_timezone', class: 'hidden', name: 'schedule[cron_timezone]', required: true .form-group.row .col-md-9 - = f.label :ref, _('Target Branch'), class: 'label-bold' - = dropdown_tag(_("Select target branch"), options: { toggle_class: 'gl-button btn btn-default js-target-branch-dropdown w-100', dropdown_class: 'git-revision-dropdown w-100', title: _("Select target branch"), filter: true, placeholder: s_("OfSearchInADropdown|Filter"), data: { data: @project.repository.branch_names, default_branch: @project.default_branch } } ) + = f.label :ref, Feature.enabled?(:pipeline_schedules_with_tags, default_enabled: :yaml) ? _('Target branch or tag') : _('Target branch'), class: 'label-bold' + %div{ data: { testid: 'schedule-target-ref' } } + .js-target-ref-dropdown{ data: { project_id: @project.id, default_branch: @project.default_branch } } = f.text_field :ref, value: @schedule.ref, id: 'schedule_ref', class: 'hidden', name: 'schedule[ref]', required: true .form-group.row.js-ci-variable-list-section .col-md-9 @@ -24,8 +25,8 @@ #{ s_('PipelineSchedules|Variables') } %ul.ci-variable-list - @schedule.variables.each do |variable| - = render 'ci/variables/variable_row', form_field: 'schedule', variable: variable, only_key_value: true - = render 'ci/variables/variable_row', form_field: 'schedule', only_key_value: true + = render 'ci/variables/variable_row', form_field: 'schedule', variable: variable + = render 'ci/variables/variable_row', form_field: 'schedule' - if @schedule.variables.size > 0 %button.gl-button.btn.btn-confirm-secondary.gl-mt-3.js-secret-value-reveal-button{ type: 'button', data: { secret_reveal_status: "#{@schedule.variables.size == 0}" } } - if @schedule.variables.size == 0 diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index 908de68f825..edcd44563f7 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -3,9 +3,12 @@ %td = pipeline_schedule.description %td.branch-name-cell - = sprite_icon('fork', size: 12) + - if pipeline_schedule.for_tag? + = sprite_icon('tag', size: 12) + - else + = sprite_icon('fork', size: 12) - if pipeline_schedule.ref.present? - = link_to pipeline_schedule.ref, project_ref_path(@project, pipeline_schedule.ref), class: "ref-name" + = link_to pipeline_schedule.ref_for_display, project_ref_path(@project, pipeline_schedule.ref_for_display), class: "ref-name" %td - if pipeline_schedule.last_pipeline .status-icon-container{ class: "ci-status-icon-#{pipeline_schedule.last_pipeline.status}" } diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index 4e93d7a04e7..54435f675a7 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -27,7 +27,7 @@ - if @pipeline.latest? = gl_badge_tag s_('Pipelines|latest'), { variant: :success, size: :sm }, { class: 'js-pipeline-url-latest has-tooltip', title: _("Latest pipeline for the most recent commit on this branch") } - if @pipeline.merge_train_pipeline? - = gl_badge_tag s_('Pipelines|train'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-train has-tooltip', title: _("This is a merge train pipeline") } + = gl_badge_tag s_('Pipelines|merge train'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-train has-tooltip', title: s_("Pipelines|This pipeline ran on the contents of this merge request combined with the contents of all other merge requests queued for merging into the target branch.") } - if @pipeline.has_yaml_errors? = gl_badge_tag s_('Pipelines|yaml invalid'), { variant: :danger, size: :sm }, { class: 'js-pipeline-url-yaml has-tooltip', title: @pipeline.yaml_errors } - if @pipeline.failure_reason? @@ -38,7 +38,7 @@ - popover_content_text = _('Learn more about Auto DevOps') = gl_badge_tag s_('Pipelines|Auto DevOps'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-autodevops', href: "#", tabindex: "0", role: "button", data: { container: 'body', toggle: 'popover', placement: 'top', html: 'true', triggers: 'focus', title: "<div class='gl-font-weight-normal gl-line-height-normal'>#{popover_title_text}</div>", content: "<a href='#{popover_content_url}' target='_blank' rel='noopener noreferrer nofollow'>#{popover_content_text}</a>" } } - if @pipeline.detached_merge_request_pipeline? - = gl_badge_tag s_('Pipelines|detached'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-mergerequest has-tooltip', title: _('Merge request pipelines are configured. A detached pipeline runs in the context of the merge request, and not against the merged result. Learn more in the documentation for merge request pipelines.') } + = gl_badge_tag s_('Pipelines|merge request'), { variant: :info, size: :sm }, { class: 'js-pipeline-url-mergerequest has-tooltip', title: s_("Pipelines|This pipeline ran on the contents of this merge request's source branch, not the target branch.") } - if @pipeline.stuck? = gl_badge_tag s_('Pipelines|stuck'), { variant: :warning, size: :sm }, { class: 'js-pipeline-url-stuck has-tooltip' } diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index e844a3d4779..88e6b98b115 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -29,20 +29,7 @@ #js-tab-builds.tab-pane - if stages.present? - - if Feature.enabled?(:jobs_tab_vue, @project, default_enabled: :yaml) - #js-pipeline-jobs-vue{ data: { full_path: @project.full_path, pipeline_iid: @pipeline.iid } } - - else - .table-holder.pipeline-holder - %table.table.ci-table.pipeline - %thead - %tr - %th= _('Status') - %th= _('Name') - %th= _('Job ID') - %th - %th= _('Coverage') - %th - = render partial: "projects/stage/stage", collection: stages, as: :stage + #js-pipeline-jobs-vue{ data: { full_path: @project.full_path, pipeline_iid: @pipeline.iid } } - if @pipeline.failed_builds.present? #js-tab-failures.build-failures.tab-pane.build-page diff --git a/app/views/projects/pipelines/charts.html.haml b/app/views/projects/pipelines/charts.html.haml index 547e2c8a7f4..5a655e7e83d 100644 --- a/app/views/projects/pipelines/charts.html.haml +++ b/app/views/projects/pipelines/charts.html.haml @@ -5,4 +5,5 @@ should_render_quality_summary: should_render_quality_summary.to_s, failed_pipelines_link: project_pipelines_path(@project, page: '1', scope: 'all', status: 'failed'), coverage_chart_path: charts_project_graph_path(@project, @project.default_branch), + test_runs_empty_state_image_path: image_path('illustrations/pipeline.svg'), default_branch: @project.default_branch } } diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index ae76d4905e0..f4b242ffc40 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -1,28 +1,10 @@ - page_title _('Pipelines') - add_page_specific_style 'page_bundles/pipelines' - add_page_specific_style 'page_bundles/ci_status' -- artifacts_endpoint_placeholder = ':pipeline_artifacts_id' = render_if_exists "shared/shared_runners_minutes_limit_flash_message" -- list_url = project_pipelines_path(@project, format: :json, code_quality_walkthrough: params[:code_quality_walkthrough]) +- list_url = project_pipelines_path(@project, format: :json) - add_page_startup_api_call list_url -#pipelines-list-vue{ data: { endpoint: list_url, - project_id: @project.id, - params: params.to_json, - "artifacts-endpoint" => downloadable_artifacts_project_pipeline_path(@project, artifacts_endpoint_placeholder, format: :json), - "artifacts-endpoint-placeholder" => artifacts_endpoint_placeholder, - "pipeline-schedule-url" => pipeline_schedules_path(@project), - "empty-state-svg-path" => image_path('illustrations/pipelines_empty.svg'), - "error-state-svg-path" => image_path('illustrations/pipelines_failed.svg'), - "no-pipelines-svg-path" => image_path('illustrations/pipelines_pending.svg'), - "can-create-pipeline" => can?(current_user, :create_pipeline, @project).to_s, - "new-pipeline-path" => can?(current_user, :create_pipeline, @project) && new_project_pipeline_path(@project), - "ci-lint-path" => can?(current_user, :create_pipeline, @project) && project_ci_lint_path(@project), - "reset-cache-path" => can?(current_user, :admin_pipeline, @project) && reset_cache_project_settings_ci_cd_path(@project), - "has-gitlab-ci" => has_gitlab_ci?(@project).to_s, - "pipeline-editor-path" => can?(current_user, :create_pipeline, @project) && project_ci_pipeline_editor_path(@project), - "suggested-ci-templates" => suggested_ci_templates.to_json, - "code-quality-page-path" => @project.present(current_user: current_user).add_code_quality_ci_yml_path, - "ci-runner-settings-path" => project_settings_ci_cd_path(@project, ci_runner_templates: true, anchor: 'js-runners-settings') } } +#pipelines-list-vue{ data: pipelines_list_data(@project, list_url) } diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index 70815dbe7a7..ba498352278 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -20,7 +20,7 @@ .bs-callout.bs-callout-danger %h4= _('Found errors in your %{gitlab_ci_yml}:') % { gitlab_ci_yml: '.gitlab-ci.yml' } %ul - - @pipeline.yaml_errors.split(",").each do |error| + - @pipeline.yaml_errors.split("\n").each do |error| %li= error - lint_link_url = project_ci_pipeline_editor_path(@project, tab: "LINT_TAB") - lint_link_start = '<a href="%{url}" class="gl-text-blue-500!">'.html_safe % { url: lint_link_url } diff --git a/app/views/projects/project_members/import.html.haml b/app/views/projects/project_members/import.html.haml deleted file mode 100644 index 2f953db0d65..00000000000 --- a/app/views/projects/project_members/import.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -- page_title _("Import members") - -%h3.page-title - = _("Import members from another project") -%p.light - = _("Only project members will be imported. Group members will be skipped.") -%hr -= form_tag apply_import_project_project_members_path(@project), method: 'post' do - .form-group.row - = label_tag :source_project_id, _("Project"), class: 'col-form-label col-sm-2' - .col-sm-10= select_tag(:source_project_id, options_from_collection_for_select(@projects, :id, :name_with_namespace), prompt: "Select project", class: "select2 lg", required: true) - - .form-actions - = button_tag _('Import project members'), class: "btn gl-button btn-success" - = link_to _("Cancel"), project_project_members_path(@project), class: "btn gl-button btn-cancel" diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 220e44679cd..f97b9a2b02f 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -23,7 +23,7 @@ .js-invite-group-trigger{ data: { classes: 'gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3', display_text: _('Invite a group') } } = render 'projects/invite_groups_modal', project: @project - if can_admin_project_member?(@project) - .js-invite-members-trigger{ data: { variant: 'success', + .js-invite-members-trigger{ data: { variant: 'confirm', classes: 'gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3', trigger_source: 'project-members-page', display_text: _('Invite members') } } @@ -39,51 +39,9 @@ %p = html_escape(_("Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}")) % { i_open: '<i>'.html_safe, i_close: '</i>'.html_safe } - - if Feature.disabled?(:invite_members_group_modal, @project.group, default_enabled: :yaml) && can?(current_user, :admin_project_member, @project) && project_can_be_shared? - - if !membership_locked? && @project.allowed_to_share_with_group? - %ul.nav-links.nav.nav-tabs.gitlab-tabs{ role: 'tablist' } - %li.nav-tab{ role: 'presentation' } - %a.nav-link.active{ href: '#invite-member-pane', id: 'invite-member-tab', data: { toggle: 'tab' }, role: 'tab' }= _("Invite member") - %li.nav-tab{ role: 'presentation', class: ('active' if membership_locked?) } - %a.nav-link{ href: '#invite-group-pane', id: 'invite-group-tab', data: { toggle: 'tab', qa_selector: 'invite_group_tab' }, role: 'tab' }= _("Invite group") - - .tab-content.gitlab-tab-content - .tab-pane.active{ id: 'invite-member-pane', role: 'tabpanel' } - = render 'shared/members/invite_member', - submit_url: project_project_members_path(@project), - access_levels: ProjectMember.access_level_roles, - default_access_level: @project_member.access_level, - can_import_members?: can_admin_project_member?(@project), - import_path: import_project_project_members_path(@project) - .tab-pane{ id: 'invite-group-pane', role: 'tabpanel', class: ('active' if membership_locked?) } - = render 'shared/members/invite_group', - submit_url: project_group_links_path(@project), - access_levels: ProjectGroupLink.access_options, - default_access_level: ProjectGroupLink.default_access, - group_link_field: 'link_group_id', - group_access_field: 'link_group_access', - groups_select_tag_data: { min_access_level: Gitlab::Access::GUEST, skip_groups: @skip_groups } - - elsif !membership_locked? - .invite-member - = render 'shared/members/invite_member', - submit_url: project_project_members_path(@project), - access_levels: ProjectMember.access_level_roles, - default_access_level: @project_member.access_level, - can_import_members?: can_admin_project_member?(@project), - import_path: import_project_project_members_path(@project) - - elsif @project.allowed_to_share_with_group? - .invite-group - = render 'shared/members/invite_group', - access_levels: ProjectGroupLink.access_options, - default_access_level: ProjectGroupLink.default_access, - submit_url: project_group_links_path(@project), - group_link_field: 'link_group_id', - group_access_field: 'link_group_access', - groups_select_tag_data: { min_access_level: Gitlab::Access::GUEST, skip_groups: @skip_groups } .js-project-members-list-app{ data: { members_data: project_members_app_data_json(@project, members: @project_members, group_links: @group_links, invited: @invited_members, access_requests: @requesters) } } - .loading - .gl-spinner.gl-spinner-md + = gl_loading_icon(css_class: 'gl-my-5', size: 'md') diff --git a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml index 57fc9a16c0a..e5810930be2 100644 --- a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml +++ b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml @@ -24,8 +24,9 @@ .form-group.row = f.label :allow_force_push, s_("ProtectedBranch|Allowed to force push:"), class: 'col-md-2 gl-text-left text-md-right' .col-md-10 - = render "shared/buttons/project_feature_toggle", class_list: "js-force-push-toggle project-feature-toggle" - .form-text.gl-text-gray-600.gl-mt-0 + = render Pajamas::ToggleComponent.new(classes: 'js-force-push-toggle', + label: s_("ProtectedBranch|Allowed to force push"), + label_position: :hidden) do - force_push_docs_url = help_page_url('topics/git/git_rebase', anchor: 'force-push') - force_push_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: force_push_docs_url } = (s_("ProtectedBranch|Allow all users with push access to %{tag_start}force push%{tag_end}.") % { tag_start: force_push_link_start, tag_end: '</a>' }).html_safe diff --git a/app/views/projects/registry/repositories/index.html.haml b/app/views/projects/registry/repositories/index.html.haml index 3efe1fd2e82..aab5e9fca98 100644 --- a/app/views/projects/registry/repositories/index.html.haml +++ b/app/views/projects/registry/repositories/index.html.haml @@ -15,6 +15,7 @@ "expiration_policy_help_page_path" => help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'cleanup-policy'), "garbage_collection_help_page_path" => help_page_path('administration/packages/container_registry', anchor: 'container-registry-garbage-collection'), "run_cleanup_policies_help_page_path" => help_page_path('administration/packages/container_registry', anchor: 'run-the-cleanup-policy-now'), + "container_registry_importing_help_page_path" => help_page_path('user/packages/container_registry/index', anchor: 'tags-temporarily-cannot-be-marked-for-deletion'), "project_path": @project.full_path, "gid_prefix": container_repository_gid_prefix, "is_admin": current_user&.admin.to_s, diff --git a/app/views/projects/runners/_group_runners.html.haml b/app/views/projects/runners/_group_runners.html.haml index c25fd7a7587..8134ee8f417 100644 --- a/app/views/projects/runners/_group_runners.html.haml +++ b/app/views/projects/runners/_group_runners.html.haml @@ -28,7 +28,11 @@ = _('This group does not have any group runners yet.') - if can?(current_user, :admin_group_runners, @project.group) - - group_link = link_to _("group's CI/CD settings."), group_settings_ci_cd_path(@project.group) + - if Feature.enabled?(:runner_list_group_view_vue_ui, @group, default_enabled: :yaml) + - register_runners_path = group_runners_path(@project.group) + - else + - register_runners_path = group_settings_ci_cd_path(@project.group) + - group_link = link_to _("group's CI/CD settings."), register_runners_path = _('Group owners can register group runners in the %{link}').html_safe % { link: group_link } - else = _('Ask your group owner to set up a group runner.') diff --git a/app/views/projects/runners/_runner.html.haml b/app/views/projects/runners/_runner.html.haml index 28e5618f8b0..5eaf6c9d22b 100644 --- a/app/views/projects/runners/_runner.html.haml +++ b/app/views/projects/runners/_runner.html.haml @@ -16,10 +16,10 @@ = link_to edit_project_runner_path(@project, runner), class: 'btn gl-button btn-icon', title: _('Edit'), aria: { label: _('Edit') }, data: { testid: 'edit-runner-link', toggle: 'tooltip', placement: 'top', container: 'body' } do = sprite_icon('pencil') - if runner.active? - = link_to pause_project_runner_path(@project, runner), method: :post, class: 'btn gl-button btn-icon', title: _('Pause'), aria: { label: _('Pause') }, data: { toggle: 'tooltip', placement: 'top', container: 'body', confirm: _("Are you sure?") } do + = link_to pause_project_runner_path(@project, runner), method: :post, class: 'btn gl-button btn-icon', title: s_('Runners|Pause from accepting jobs'), aria: { label: _('Pause') }, data: { toggle: 'tooltip', container: 'body', confirm: _("Are you sure?") } do = sprite_icon('pause') - else - = link_to resume_project_runner_path(@project, runner), method: :post, class: 'btn gl-button btn-icon', title: _('Resume'), aria: { label: _('Resume') }, data: { toggle: 'tooltip', placement: 'top', container: 'body' } do + = link_to resume_project_runner_path(@project, runner), method: :post, class: 'btn gl-button btn-icon', title: s_('Runners|Resume accepting jobs'), aria: { label: _('Resume') }, data: { toggle: 'tooltip', container: 'body' } do = sprite_icon('play') - if runner.belongs_to_one_project? = link_to _('Remove runner'), project_runner_path(@project, runner), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn gl-button btn-danger' diff --git a/app/views/projects/runners/_specific_runners.html.haml b/app/views/projects/runners/_specific_runners.html.haml index 1357846876e..3634bacb6ec 100644 --- a/app/views/projects/runners/_specific_runners.html.haml +++ b/app/views/projects/runners/_specific_runners.html.haml @@ -2,7 +2,7 @@ = _('Specific runners') .bs-callout.help-callout - - if valid_runner_registrars.include?('project') + - if can?(current_user, :register_project_runners, @project) = _('These runners are specific to this project.') - if params[:ci_runner_templates] %hr diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index 65b93dc930a..7a47b504b7c 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -1,6 +1,17 @@ - if lookup_context.template_exists?('top', "projects/services/#{integration.to_param}", true) = render "projects/services/#{integration.to_param}/top", integration: integration +- if integration.activate_disabled_reason.present? && integration.activate_disabled_reason[:trackers].any? + -# When using integration.activate_disabled_reason[:trackers], it's potentially insecure to use the raw records + -# when passed directly to the frontend. Only use specific fields that are needed for render. + -# For example, we can get the link to each tracker with scoped_edit_integration_path(tracker, tracker.project) + = render 'shared/global_alert', + title: s_('ExternalIssueIntegration|Another issue tracker is already in use'), + variant: :warning, + dismissible: false do + .gl-alert-body + = s_('ExternalIssueIntegration|Only one issue tracker integration can be active at a time. Please disable the active tracker first and try again.') + %h3.page-title = integration.title - if integration.operating? diff --git a/app/views/projects/services/prometheus/_custom_metrics.html.haml b/app/views/projects/services/prometheus/_custom_metrics.html.haml index 4586ee844c0..896249c6163 100644 --- a/app/views/projects/services/prometheus/_custom_metrics.html.haml +++ b/app/views/projects/services/prometheus/_custom_metrics.html.haml @@ -18,7 +18,7 @@ .flash-text .loading-metrics.js-loading-custom-metrics %p.m-3 - = loading_icon(css_class: 'metrics-load-spinner') + = gl_loading_icon(inline: true, css_class: 'metrics-load-spinner') = s_('PrometheusService|Finding custom metrics...') .empty-metrics.hidden.js-empty-custom-metrics %p.text-tertiary.m-3.js-no-active-integration-text.hidden diff --git a/app/views/projects/services/prometheus/_metrics.html.haml b/app/views/projects/services/prometheus/_metrics.html.haml index 0d41584652f..8794f3e24da 100644 --- a/app/views/projects/services/prometheus/_metrics.html.haml +++ b/app/views/projects/services/prometheus/_metrics.html.haml @@ -16,7 +16,7 @@ .card-body .loading-metrics.js-loading-metrics %p.m-3 - = loading_icon(css_class: 'metrics-load-spinner') + = gl_loading_icon(inline: true, css_class: 'metrics-load-spinner') = s_('PrometheusService|Finding and configuring metrics...') .empty-metrics.hidden.js-empty-metrics %p.text-tertiary.m-3 diff --git a/app/views/projects/settings/_general.html.haml b/app/views/projects/settings/_general.html.haml index 960b1d67610..3a62c6f41cc 100644 --- a/app/views/projects/settings/_general.html.haml +++ b/app/views/projects/settings/_general.html.haml @@ -23,7 +23,7 @@ .row .form-group.col-md-9 = f.label :description, _('Project description (optional)'), class: 'label-bold' - = f.text_area :description, class: 'form-control gl-form-input', rows: 3, maxlength: 250 + = f.text_area :description, class: 'form-control gl-form-input', rows: 3 .row= render_if_exists 'projects/classification_policy_settings', f: f diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index c70e153ae41..66a1cbb4649 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -94,7 +94,7 @@ .input-group-text / %p.form-text.text-muted = html_escape(_('The regular expression used to find test coverage output in the job log. For example, use %{regex} for Simplecov (Ruby). Leave blank to disable.')) % { regex: '<code>\(\d+.\d+%\)</code>'.html_safe } - = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'add-test-coverage-results-to-a-merge-request-deprecated'), target: '_blank', rel: 'noopener noreferrer' + = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'add-test-coverage-results-using-project-settings-deprecated'), target: '_blank', rel: 'noopener noreferrer' = f.submit _('Save changes'), class: "btn gl-button btn-confirm", data: { qa_selector: 'save_general_pipelines_changes_button' } diff --git a/app/views/projects/settings/packages_and_registries/show.html.haml b/app/views/projects/settings/packages_and_registries/show.html.haml index 07910899aa0..658b2f2e65c 100644 --- a/app/views/projects/settings/packages_and_registries/show.html.haml +++ b/app/views/projects/settings/packages_and_registries/show.html.haml @@ -9,7 +9,7 @@ older_than_options: older_than_options.to_json, is_admin: current_user&.admin.to_s, admin_settings_path: ci_cd_admin_application_settings_path(anchor: 'js-registry-settings'), - enable_historic_entries: container_expiration_policies_historic_entry_enabled?(@project).to_s, + enable_historic_entries: container_expiration_policies_historic_entry_enabled?.to_s, help_page_path: help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'cleanup-policy'), show_cleanup_policy_on_alert: show_cleanup_policy_on_alert(@project).to_s, tags_regex_help_page_path: help_page_path('user/packages/container_registry/reduce_container_registry_storage', anchor: 'regex-pattern-examples') } } diff --git a/app/views/projects/stage/_stage.html.haml b/app/views/projects/stage/_stage.html.haml deleted file mode 100644 index 387c8fb3234..00000000000 --- a/app/views/projects/stage/_stage.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -- stage = stage.present(current_user: current_user) - -%tr - %th{ colspan: 10 } - %strong - %a{ name: stage.name } - %span{ class: "ci-status-link ci-status-icon-#{stage.status}" } - = ci_icon_for_status(stage.status) - - = stage.name.titleize -= render stage.latest_ordered_statuses, stage: false, ref: false, pipeline_link: false, allow_retry: true -= render stage.retried_ordered_statuses, stage: false, ref: false, pipeline_link: false, retried: true -%tr - %td{ colspan: 10 } - diff --git a/app/views/projects/triggers/_trigger.html.haml b/app/views/projects/triggers/_trigger.html.haml index 9d082436aa7..ce036606a1c 100644 --- a/app/views/projects/triggers/_trigger.html.haml +++ b/app/views/projects/triggers/_trigger.html.haml @@ -33,5 +33,5 @@ = link_to edit_project_trigger_path(@project, trigger), method: :get, title: "Edit", class: "gl-button btn btn-default btn-icon" do = sprite_icon('pencil') - if can?(current_user, :manage_trigger, trigger) - = link_to project_trigger_path(@project, trigger), data: { confirm: revoke_trigger_confirmation, testid: 'trigger_revoke_button' }, method: :delete, title: "Revoke", class: "gl-button btn btn-default btn-icon btn-trigger-revoke gl-ml-3" do + = link_to project_trigger_path(@project, trigger), aria: { label: _('Revoke') }, data: { confirm: revoke_trigger_confirmation, testid: 'trigger_revoke_button', confirm_btn_variant: "danger" }, method: :delete, title: "Revoke", class: "gl-button btn btn-default btn-icon btn-trigger-revoke gl-ml-3" do = sprite_icon('remove') |