diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /app/views/projects | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'app/views/projects')
176 files changed, 760 insertions, 640 deletions
diff --git a/app/views/projects/_commit_button.html.haml b/app/views/projects/_commit_button.html.haml index 9962e03995b..19943aa68a3 100644 --- a/app/views/projects/_commit_button.html.haml +++ b/app/views/projects/_commit_button.html.haml @@ -1,4 +1,4 @@ -.form-actions.gl-display-flex +.gl-display-flex.gl-mt-7 - submit_button_options = { type: :submit, variant: :confirm, button_options: { id: 'commit-changes', class: 'js-commit-button', data: { qa_selector: 'commit_button' } } } = render Pajamas::ButtonComponent.new(**submit_button_options) do = _('Commit changes') diff --git a/app/views/projects/_deletion_failed.html.haml b/app/views/projects/_deletion_failed.html.haml index 489d303c5b9..29551505a7e 100644 --- a/app/views/projects/_deletion_failed.html.haml +++ b/app/views/projects/_deletion_failed.html.haml @@ -4,6 +4,6 @@ = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_options: { class: 'project-deletion-failed-message' }) do |c| - = c.body do + - c.with_body do 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 e2d1a50ae5e..5c7f83fc579 100644 --- a/app/views/projects/_files.html.haml +++ b/app/views/projects/_files.html.haml @@ -1,4 +1,3 @@ -- @no_breadcrumb_border = true - show_auto_devops_callout = show_auto_devops_callout?(@project) - is_project_overview = local_assigns.fetch(:is_project_overview, false) - ref = local_assigns.fetch(:ref) { current_ref } @@ -7,18 +6,17 @@ - if readme_path = @project.repository.readme_path - add_page_startup_api_call project_blob_path(@project, tree_join(@ref, readme_path), viewer: "rich", format: "json") -#tree-holder.tree-holder.clearfix.js-per-page{ data: { blame_per_page: Projects::BlameService::PER_PAGE } } - .info-well.gl-display-none.gl-sm-display-flex.project-last-commit.gl-flex-direction-column +#tree-holder.tree-holder.clearfix.js-per-page{ data: { blame_per_page: Gitlab::Git::BlamePagination::PAGINATION_PER_PAGE } } + .info-well.gl-display-none.gl-sm-display-flex.project-last-commit.gl-flex-direction-column.gl-mt-5 #js-last-commit.gl-m-auto = gl_loading_icon(size: 'md') - #js-code-owners + #js-code-owners{ data: { branch: @ref, can_view_branch_rules: can_view_branch_rules?, branch_rules_path: branch_rules_path } } .nav-block.gl-display-flex.gl-xs-flex-direction-column.gl-align-items-stretch = render 'projects/tree/tree_header', tree: @tree, is_project_overview: is_project_overview - - if project.forked? && Feature.enabled?(:fork_divergence_counts, @project.fork_source) - - #js-fork-info{ data: vue_fork_divergence_data(project, ref), project_id: @project.id } + - if project.forked? + #js-fork-info{ data: vue_fork_divergence_data(project, ref) } - if is_project_overview .project-buttons.gl-mb-5.js-show-on-project-root{ data: { qa_selector: 'project_buttons' } } diff --git a/app/views/projects/_flash_messages.html.haml b/app/views/projects/_flash_messages.html.haml index 2d9f7e49ddc..dc0c9547901 100644 --- a/app/views/projects/_flash_messages.html.haml +++ b/app/views/projects/_flash_messages.html.haml @@ -10,5 +10,5 @@ - if show_auto_devops_callout?(@project) = render 'shared/auto_devops_callout' = render_if_exists 'projects/above_size_limit_warning', project: project - = render_if_exists 'shared/shared_runners_minutes_limit', project: project, classes: [container_class, ("limit-container-width" unless fluid_layout)] + = render_if_exists 'shared/shared_runners_minutes_limit', project: project = render_if_exists 'projects/terraform_banner', project: project diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index b9aeed188fa..9cb5ec39de2 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -1,9 +1,8 @@ - empty_repo = @project.empty_repo? - show_auto_devops_callout = show_auto_devops_callout?(@project) - emails_disabled = @project.emails_disabled? -- cache_enabled = Feature.enabled?(:cache_home_panel, @project, type: :development) -.project-home-panel.js-show-on-project-root.gl-my-5{ class: [("empty-project" if empty_repo)] } +.project-home-panel.js-show-on-project-root.gl-mt-4.gl-mb-5{ class: [("empty-project" if empty_repo)] } .gl-display-flex.gl-justify-content-space-between.gl-flex-wrap.gl-sm-flex-direction-column.gl-mb-3.gl-gap-5 .home-panel-title-row.gl-display-flex.gl-align-items-center %div{ class: 'avatar-container rect-avatar s64 home-panel-avatar gl-flex-shrink-0 gl-w-11 gl-h-11 gl-mr-3! float-none' } @@ -25,28 +24,26 @@ %span.gl-ml-3.gl-mb-3 = render 'shared/members/access_request_links', source: @project - = cache_if(cache_enabled, [@project, @project.star_count, @project.forks_count, :buttons, current_user, @notification_setting], expires_in: 1.day) do - .project-repo-buttons.gl-display-flex.gl-justify-content-md-end.gl-align-items-center.gl-flex-wrap.gl-gap-3 - - if current_user - - if current_user.admin? - = link_to [:admin, @project], class: 'btn btn-default gl-button btn-icon', title: _('View project in admin area'), - data: {toggle: 'tooltip', placement: 'top', container: 'body'} do - = sprite_icon('admin') - - if @notification_setting - .js-vue-notification-dropdown{ data: { disabled: emails_disabled.to_s, dropdown_items: notification_dropdown_items(@notification_setting).to_json, notification_level: @notification_setting.level, help_page_path: help_page_path('user/profile/notifications'), project_id: @project.id, no_flip: 'true' } } + .project-repo-buttons.gl-display-flex.gl-justify-content-md-end.gl-align-items-center.gl-flex-wrap.gl-gap-3 + - if current_user + - if current_user.admin? + = link_to [:admin, @project], class: 'btn btn-default gl-button btn-icon', title: _('View project in admin area'), + data: {toggle: 'tooltip', placement: 'top', container: 'body'} do + = sprite_icon('admin') + - if @notification_setting + .js-vue-notification-dropdown{ data: { disabled: emails_disabled.to_s, dropdown_items: notification_dropdown_items(@notification_setting).to_json, notification_level: @notification_setting.level, help_page_path: help_page_path('user/profile/notifications'), project_id: @project.id, no_flip: 'true' } } - = render 'projects/buttons/star' - = render 'projects/buttons/fork' + = render 'projects/buttons/star' + = render 'projects/buttons/fork' - if can?(current_user, :read_code, @project) - = cache_if(cache_enabled, [@project, :read_code], expires_in: 1.minute) do - %nav.project-stats - - if @project.empty_repo? - = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_anchors - - else - = render 'stat_anchor_list', anchors: @project.statistics_anchors(show_auto_devops_callout: show_auto_devops_callout) + %nav.project-stats + - if @project.empty_repo? + = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_anchors + - else + = render 'stat_anchor_list', anchors: @project.statistics_anchors(show_auto_devops_callout: show_auto_devops_callout) .gl-my-3 - = render "shared/projects/topics", project: @project, cache_enabled: cache_enabled + = render "shared/projects/topics", project: @project .home-panel-home-desc.mt-1 - if @project.description.present? .home-panel-description.text-break @@ -55,15 +52,6 @@ %button.btn.gl-button.btn-blank.btn-link.js-read-more-trigger.d-lg-none{ type: "button" } = _("Read more") - - if @project.forked? && Feature.disabled?(:fork_divergence_counts, @project.fork_source) - %p - - source = visible_fork_source(@project) - - if source - #{ s_('ForkedFromProjectPath|Forked from') } - = link_to source.full_name, project_path(source), data: { qa_selector: 'forked_from_link' } - - else - = s_('ForkedFromProjectPath|Forked from an inaccessible project.') - = render_if_exists "projects/home_mirror" - if @project.badges.present? diff --git a/app/views/projects/_import_project_pane.html.haml b/app/views/projects/_import_project_pane.html.haml index 412c91544a6..947a1007fd5 100644 --- a/app/views/projects/_import_project_pane.html.haml +++ b/app/views/projects/_import_project_pane.html.haml @@ -11,7 +11,7 @@ = render Pajamas::AlertComponent.new(variant: :tip, alert_options: { class: 'gl-my-3' }, dismissible: false) do |c| - = c.body do + - c.with_body do - docs_link_url = help_page_path('user/group/import/index') + '#migrate-groups-by-direct-transfer-recommended' - docs_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: docs_link_url } = html_escape(_("Importing GitLab projects? Migrating GitLab projects when migrating groups by direct transfer is in Beta. %{link_start}Learn more.%{link_end}")) % { link_start: docs_link, link_end: '</a>'.html_safe } @@ -21,11 +21,6 @@ = render Pajamas::ButtonComponent.new(href: '#', icon: 'tanuki', button_options: { class: '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 = _('GitLab export') - - if gitlab_import_enabled? - %div - = render Pajamas::ButtonComponent.new(href: status_import_gitlab_path(namespace_id: namespace_id), icon: 'tanuki', button_options: { class: "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 - GitLab.com - - if github_import_enabled? %div = render Pajamas::ButtonComponent.new(href: new_import_github_path(namespace_id: namespace_id), icon: 'github', button_options: { class: 'js-import-github js-import-project-btn', data: { platform: 'github', **tracking_attrs_data(track_label, 'click_button', 'github') } }) do @@ -63,11 +58,6 @@ = render Pajamas::ButtonComponent.new(href: new_import_manifest_path(namespace_id: namespace_id), icon: 'doc-text', button_options: { class: 'import_manifest js-import-project-btn', data: { platform: 'manifest_file', **tracking_attrs_data(track_label, 'click_button', 'manifest_file') } }) do = _('Manifest file') - - if phabricator_import_enabled? - %div - = render Pajamas::ButtonComponent.new(href: new_import_phabricator_path(namespace_id: namespace_id), icon: 'issues', button_options: { class: 'import_phabricator js-import-project-btn', data: { platform: 'phabricator', track_label: "#{track_label}", track_action: "click_button", track_property: "phabricator" } }) do - = _('Phabricator tasks') - = render_if_exists "projects/gitee_import_button", namespace_id: namespace_id, track_label: track_label diff --git a/app/views/projects/_invite_members_empty_project.html.haml b/app/views/projects/_invite_members_empty_project.html.haml index 5bc53339bf0..18d06c7d0bb 100644 --- a/app/views/projects/_invite_members_empty_project.html.haml +++ b/app/views/projects/_invite_members_empty_project.html.haml @@ -6,8 +6,4 @@ .js-invite-members-trigger{ data: { variant: 'confirm', classes: 'gl-mb-8 gl-xs-w-full', display_text: s_('InviteMember|Invite members'), - trigger_source: 'project-empty-page', - event: 'click_button', - label: 'invite_members_empty_project' } } - -= render 'projects/invite_members_modal', project: @project + trigger_source: 'project-empty-page' } } diff --git a/app/views/projects/_invite_members_modal.html.haml b/app/views/projects/_invite_members_modal.html.haml index 53f74a0f270..a1b0bdd6c56 100644 --- a/app/views/projects/_invite_members_modal.html.haml +++ b/app/views/projects/_invite_members_modal.html.haml @@ -2,5 +2,5 @@ .js-invite-members-modal{ data: { is_project: 'true', access_levels: ProjectMember.permissible_access_level_roles(current_user, project).to_json, - reload_page_on_submit: local_assigns.fetch(:reload_page_on_submit, false).to_s, + reload_page_on_submit: current_path?('project_members#index').to_s, help_link: help_page_url('user/permissions') }.merge(common_invite_modal_dataset(project)).merge(users_filter_data(project.group)) } diff --git a/app/views/projects/_invite_members_side_nav_link.html.haml b/app/views/projects/_invite_members_side_nav_link.html.haml deleted file mode 100644 index b96a7608ce2..00000000000 --- a/app/views/projects/_invite_members_side_nav_link.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -.js-invite-members-trigger{ data: { trigger_source: 'project-side-nav', - icon: 'users', - display_text: title, - trigger_element: 'side-nav', - qa_selector: 'invite_members_sidebar_button' } } - -= render partial: 'shared/nav/sidebar_submenu', locals: { sidebar_menu: sidebar_menu } -= render 'projects/invite_members_modal', project: project diff --git a/app/views/projects/_invite_members_top_nav_link.html.haml b/app/views/projects/_invite_members_top_nav_link.html.haml new file mode 100644 index 00000000000..35a8d4d9944 --- /dev/null +++ b/app/views/projects/_invite_members_top_nav_link.html.haml @@ -0,0 +1,5 @@ +- data = local_assigns.fetch(:data) +- data[:display_text] = local_assigns.fetch(:display_text) +- data[:icon] = local_assigns.fetch(:icon) + +.js-invite-members-trigger{ data: data } diff --git a/app/views/projects/_last_push.html.haml b/app/views/projects/_last_push.html.haml index 5b493772f0a..89c91887d19 100644 --- a/app/views/projects/_last_push.html.haml +++ b/app/views/projects/_last_push.html.haml @@ -3,7 +3,7 @@ = render Pajamas::AlertComponent.new(variant: :success, alert_options: { class: 'gl-mt-3' }, close_button_options: { class: 'js-close-banner' }) do |c| - = c.body do + - c.with_body do %span= s_("LastPushEvent|You pushed to") %strong.gl-display-inline-flex.gl-max-w-50p{ data: { toggle: 'tooltip' }, title: event.ref_name } = link_to event.ref_name, project_commits_path(event.project, event.ref_name), class: 'ref-name gl-text-truncate' @@ -15,6 +15,6 @@ #{time_ago_with_tooltip(event.created_at)} - if create_mr_button_from_event?(event) - = c.actions do + - c.with_actions do = render Pajamas::ButtonComponent.new(variant: :confirm, href: create_mr_path_from_push_event(event), button_options: { data: { qa_selector: 'create_merge_request_button' }}) do = _('Create merge request') diff --git a/app/views/projects/_new_project_fields.html.haml b/app/views/projects/_new_project_fields.html.haml index 53a1abdff33..70a2476c8e5 100644 --- a/app/views/projects/_new_project_fields.html.haml +++ b/app/views/projects/_new_project_fields.html.haml @@ -46,7 +46,7 @@ = render Pajamas::AlertComponent.new(alert_options: { class: "gl-mb-4 gl-display-none js-user-readme-repo" }, dismissible: false, variant: :success) do |c| - = c.body do + - c.with_body do - 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 } @@ -81,21 +81,21 @@ = render Pajamas::CheckboxTagComponent.new(name: 'project[initialize_with_readme]', checked: true, checkbox_options: { data: { qa_selector: 'initialize_with_readme_checkbox', track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_readme' } }) do |c| - = c.label do + - c.with_label do = s_('ProjectsNew|Initialize repository with a README') - = c.help_text do + - c.with_help_text do = s_('ProjectsNew|Allows you to immediately clone this project’s repository. Skip this if you plan to push up an existing repository.') .form-group = render Pajamas::CheckboxTagComponent.new(name: 'project[initialize_with_sast]', checkbox_options: { data: { qa_selector: 'initialize_with_sast_checkbox', track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_sast' } }) do |c| - = c.label do + - c.with_label do = s_('ProjectsNew|Enable Static Application Security Testing (SAST)') - = c.help_text do + - c.with_help_text do = s_('ProjectsNew|Analyze your source code for known security vulnerabilities.') = link_to _('Learn more.'), help_page_path('user/application_security/sast/index'), target: '_blank', rel: 'noopener noreferrer', data: { track_action: 'followed' } -# this partial is from JiHu, see details in https://jihulab.com/gitlab-cn/gitlab/-/merge_requests/675 = render_if_exists 'shared/other_project_options', f: f, visibility_level: visibility_level, track_label: track_label = f.submit _('Create project'), class: "js-create-project-button", data: { qa_selector: 'project_create_button', track_label: "#{track_label}", track_action: "click_button", track_property: "create_project", track_value: "" }, pajamas_button: true -= 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: "" } += link_to _('Cancel'), @parent_group || dashboard_groups_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/_remove.html.haml b/app/views/projects/_remove.html.haml index ed238dab4ff..dec3199ffe1 100644 --- a/app/views/projects/_remove.html.haml +++ b/app/views/projects/_remove.html.haml @@ -7,7 +7,6 @@ %h4.danger-title= _('Delete project') %p %strong= _('Deleting the project will delete its repository and all related resources, including issues and merge requests.') - = link_to _('Learn more.'), help_page_path('user/project/settings/index', anchor: 'remove-a-fork-relationship'), target: '_blank', rel: 'noopener noreferrer' %p %strong= _('Deleted projects cannot be restored!') #js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: delete_confirm_phrase(project), is_fork: project.forked?.to_s, issues_count: number_with_delimiter(issues_count), merge_requests_count: number_with_delimiter(merge_requests_count), forks_count: number_with_delimiter(forks_count), stars_count: number_with_delimiter(project.star_count) } } diff --git a/app/views/projects/_remove_fork.html.haml b/app/views/projects/_remove_fork.html.haml index bfc1e77118a..260c2b2272e 100644 --- a/app/views/projects/_remove_fork.html.haml +++ b/app/views/projects/_remove_fork.html.haml @@ -7,6 +7,5 @@ = form_for @project, url: remove_fork_project_path(@project), method: :delete, html: { id: remove_form_id } do |f| %p - %strong= _('Once removed, the fork relationship cannot be restored. This project will no longer be able to receive or send merge requests to the source project or other forks.') - = link_to _('Learn more.'), help_page_path('user/project/settings/index', anchor: 'remove-a-fork-relationship'), target: '_blank', rel: 'noopener noreferrer' + %strong= _('After it is removed, the fork relationship can only be restored by using the API. This project will no longer be able to receive or send merge requests to the upstream project or other forks.') .js-confirm-danger{ data: remove_fork_project_confirm_json(@project, remove_form_id) } diff --git a/app/views/projects/_service_desk_settings.html.haml b/app/views/projects/_service_desk_settings.html.haml index 349cd88437f..7654677d8a8 100644 --- a/app/views/projects/_service_desk_settings.html.haml +++ b/app/views/projects/_service_desk_settings.html.haml @@ -12,7 +12,7 @@ enabled: "#{@project.service_desk_enabled}", incoming_email: (@project.service_desk_incoming_address if @project.service_desk_enabled), custom_email: (@project.service_desk_custom_address if @project.service_desk_enabled), - custom_email_enabled: "#{Gitlab::ServiceDeskEmail.enabled?}", + custom_email_enabled: "#{Gitlab::Email::ServiceDeskEmail.enabled?}", selected_template: "#{@project.service_desk_setting&.issue_template_key}", selected_file_template_project_id: "#{@project.service_desk_setting&.file_template_project_id}", outgoing_name: "#{@project.service_desk_setting&.outgoing_name}", diff --git a/app/views/projects/_terraform_banner.html.haml b/app/views/projects/_terraform_banner.html.haml index 881e4ccd9df..24711fc39d8 100644 --- a/app/views/projects/_terraform_banner.html.haml +++ b/app/views/projects/_terraform_banner.html.haml @@ -1,5 +1,3 @@ -- @content_class = "container-limited limit-container-width" unless fluid_layout - - if show_terraform_banner?(project) .container-fluid{ class: @content_class } .js-terraform-notification{ data: { terraform_image_path: image_path('illustrations/third-party-logos/ci_cd-template-logos/terraform.svg') } } diff --git a/app/views/projects/airflow/dags/index.html.haml b/app/views/projects/airflow/dags/index.html.haml deleted file mode 100644 index d631d084db1..00000000000 --- a/app/views/projects/airflow/dags/index.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -- breadcrumb_title s_('Airflow|Airflow DAGs') -- page_title s_('Airflow|Airflow DAGs') - -.page-title-holder - %h1.page-title.gl-font-size-h-display= s_('Airflow|Airflow DAGs') - -#js-show-airflow-dags{ data: { - dags: @dags.to_json, - pagination: @pagination.to_json - } -} diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml index 3359ea5f63b..ccda06c7e4c 100644 --- a/app/views/projects/artifacts/browse.html.haml +++ b/app/views/projects/artifacts/browse.html.haml @@ -12,7 +12,7 @@ .nav-block %ul.breadcrumb.repo-breadcrumb %li.breadcrumb-item - = link_to 'Artifacts', browse_project_job_artifacts_path(@project, @build) + = link_to _('Artifacts'), browse_project_job_artifacts_path(@project, @build) - path_breadcrumbs do |title, path| %li.breadcrumb-item = link_to truncate(title, length: 40), browse_project_job_artifacts_path(@project, @build, path) diff --git a/app/views/projects/aws/configuration/index.html.haml b/app/views/projects/aws/configuration/index.html.haml new file mode 100644 index 00000000000..27d8652c625 --- /dev/null +++ b/app/views/projects/aws/configuration/index.html.haml @@ -0,0 +1,7 @@ +- add_to_breadcrumbs _('AWS'), project_aws_path(@project) +- breadcrumb_title s_('CloudSeed|Configuration') +- page_title s_('CloudSeed|Configuration') + +- @content_class = "limit-container-width" unless fluid_layout + +#js-aws-configuration{ data: @js_data } diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index 74b85a93c8e..e2cad2fb3d7 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -1,6 +1,17 @@ - page_title _("Blame"), @blob.path, @ref - add_page_specific_style 'page_bundles/tree' -- dataset = { testid: 'blob-content-holder', qa_selector: 'blame_file_content', per_page: @blame_per_page } +- blame_streaming_url = blame_pages_streaming_url(@id, @project) + +- if @blame_mode.streaming? && @blame_pagination.total_extra_pages > 0 + - content_for :startup_js do + = javascript_tag do + :plain + window.blamePageStream = (() => { + const url = new URL("#{blame_streaming_url}"); + url.searchParams.set('page', 2); + return fetch(url).then(response => response.body); + })(); +- dataset = { testid: 'blob-content-holder', qa_selector: 'blame_file_content', per_page: @blame_pagination.per_page, total_extra_pages: @blame_pagination.total_extra_pages - 1, pages_url: blame_streaming_url } #blob-content-holder.tree-holder.js-per-page{ data: dataset } = render "projects/blob/breadcrumb", blob: @blob, blame: true @@ -26,11 +37,20 @@ .blame-table-wrapper = render partial: 'page' - - if @blame_pagination && @blame_pagination.total_pages > 1 + - if @blame_mode.streaming? + #blame-stream-container.blame-stream-container + + - if @blame_mode.pagination? && @blame_pagination.total_pages > 1 .gl-display-flex.gl-justify-content-center.gl-flex-direction-column.gl-align-items-center.gl-p-3.gl-bg-gray-50.gl-border-t-solid.gl-border-t-1.gl-border-gray-100 - = _('For faster browsing, not all history is shown.') - = render Pajamas::ButtonComponent.new(href: namespace_project_blame_path(namespace_id: @project.namespace, project_id: @project, id: @id, no_pagination: true), size: :small, button_options: { class: 'gl-mt-3' }) do |c| - = _('View entire blame') + = render Pajamas::ButtonComponent.new(href: entire_blame_path(@id, @project), size: :small, button_options: { class: 'gl-mt-3' }) do |c| + = _('Show full blame') + + - if @blame_mode.streaming? + #blame-stream-loading.blame-stream-loading + .gradient + = gl_loading_icon(size: 'sm') + %span.gl-mx-2 + = _('Loading full blame...') - - if @blame_pagination - = paginate(@blame_pagination, theme: "gitlab") + - if @blame_mode.pagination? + = paginate(@blame_pagination.paginator, theme: "gitlab") diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml index 17d5ef69b76..453a60a62f4 100644 --- a/app/views/projects/blob/_blob.html.haml +++ b/app/views/projects/blob/_blob.html.haml @@ -10,19 +10,19 @@ %ul.blob-commit-info = render 'projects/commits/commit', commit: @last_commit, project: @project, ref: @ref - #js-code-owners{ data: { blob_path: blob.path, project_path: @project.full_path, branch: @ref } } + #js-code-owners{ data: { blob_path: blob.path, project_path: @project.full_path, branch: @ref, can_view_branch_rules: can_view_branch_rules?, branch_rules_path: branch_rules_path } } = render "projects/blob/auxiliary_viewer", blob: blob -#blob-content-holder.blob-content-holder.js-per-page{ data: { blame_per_page: Projects::BlameService::PER_PAGE } } +- if project.forked? + #js-fork-info{ data: vue_fork_divergence_data(project, ref) } + +#blob-content-holder.blob-content-holder.js-per-page{ data: { blame_per_page: Gitlab::Git::BlamePagination::PAGINATION_PER_PAGE } } - if @code_navigation_path #js-code-navigation{ data: { code_navigation_path: @code_navigation_path, blob_path: blob.path, definition_path_prefix: project_blob_path(@project, @ref) } } - if !expanded -# Data info will be removed once we migrate this to use GraphQL -# Follow-up issue: https://gitlab.com/gitlab-org/gitlab/-/issues/330406 - #js-view-blob-app{ data: { blob_path: blob.path, - project_path: @project.full_path, - target_branch: project.empty_repo? ? ref : @ref, - original_branch: @ref } } + #js-view-blob-app{ data: vue_blob_app_data(project, blob, ref) } = gl_loading_icon(size: 'md') - else %article.file-holder diff --git a/app/views/projects/blob/_breadcrumb.html.haml b/app/views/projects/blob/_breadcrumb.html.haml index 7c2caf34fd1..79b13dc861a 100644 --- a/app/views/projects/blob/_breadcrumb.html.haml +++ b/app/views/projects/blob/_breadcrumb.html.haml @@ -2,7 +2,7 @@ .nav-block .tree-ref-container .tree-ref-holder - = render 'shared/ref_switcher', destination: 'blob' + #js-tree-ref-switcher{ data: { project_id: @project.id, project_root_path: project_path(@project), ref: current_ref, ref_type: @ref_type.to_s } } %ul.breadcrumb.repo-breadcrumb %li.breadcrumb-item diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 87a6b54d697..621cd251bdf 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -2,8 +2,8 @@ - file_name = params[:id].split("/").last ||= "" - is_markdown = Gitlab::MarkupHelper.gitlab_markdown?(file_name) -.file-holder-bottom-radius.file-holder.file.gl-mb-3 - .js-file-title.file-title.gl-display-flex.gl-align-items-center.clearfix{ data: { current_action: action } } +.file-holder.file.gl-mb-3 + .js-file-title.file-title.gl-display-flex.gl-align-items-center.gl-rounded-top-base{ data: { current_action: action } } .editor-ref.block-truncated.has-tooltip{ title: ref } = sprite_icon('branch', size: 12) = ref @@ -16,7 +16,7 @@ - if current_action?(:new) || current_action?(:create) %span.float-left.gl-mr-3 \/ - = text_field_tag 'file_name', params[:file_name], placeholder: "File name", data: { qa_selector: 'file_name_field' }, + = text_field_tag 'file_name', params[:file_name], placeholder: "Filename", data: { qa_selector: 'file_name_field' }, required: true, class: 'form-control gl-form-input new-file-name js-file-path-name-input', value: params[:file_name] || (should_suggest_gitlab_ci_yml? ? '.gitlab-ci.yml' : '') = render 'template_selectors' - if should_suggest_gitlab_ci_yml? @@ -26,15 +26,18 @@ dismiss_key: @project.id, human_access: human_access } } - .file-buttons.gl-display-flex.gl-align-items-center.gl-justify-content-end - - if is_markdown - - unless Feature.enabled?(:source_editor_toolbar, current_user) - = render 'shared/blob/markdown_buttons', show_fullscreen_button: false, supports_file_upload: false - %span.soft-wrap-toggle - = render Pajamas::ButtonComponent.new(icon: 'soft-unwrap', button_options: { class: 'no-wrap' }) do - = _("No wrap") - = render Pajamas::ButtonComponent.new(icon: 'soft-wrap', button_options: { class: 'soft-wrap' }) do - = _("Soft wrap") + - unless Feature.enabled?(:source_editor_toolbar, current_user) + .file-buttons.gl-display-flex.gl-align-items-center.gl-justify-content-end + - if is_markdown + .md-header.gl-display-flex.gl-px-2.gl-rounded-base.gl-mx-2.gl-mt-2 + .gl-display-flex.gl-align-items-center.gl-flex-wrap.gl-justify-content-space-between + .md-header-toolbar.gl-display-flex.gl-py-2.gl-flex-wrap{ class: "gl-m-0!" } + = render 'shared/blob/markdown_buttons', supports_file_upload: false + %span.soft-wrap-toggle + = render Pajamas::ButtonComponent.new(icon: 'soft-unwrap', button_options: { class: 'no-wrap' }) do + = _("No wrap") + = render Pajamas::ButtonComponent.new(icon: 'soft-wrap', button_options: { class: 'soft-wrap' }) do + = _("Soft wrap") .file-editor.code - if Feature.enabled?(:source_editor_toolbar, current_user) diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index 528999f5c89..195dc03632a 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -3,18 +3,20 @@ - content_for :prefetch_asset_tags do - webpack_preload_asset_tag('monaco') - add_page_specific_style 'page_bundles/editor' - - if @conflict = render Pajamas::AlertComponent.new(alert_options: { class: 'gl-mb-5 gl-mt-5' }, variant: :danger, dismissible: false) do |c| - - 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 } - = c.body do - = _('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 } - + - c.with_body do + - blob_link_start = '<a href="%{url}" class="gl-link" target="_blank" rel="noopener noreferrer">'.html_safe + - link_end = '</a>'.html_safe + - external_link_icon = content_tag 'span', { aria: { label: _('Opens new window') }} do + - sprite_icon('external-link', css_class: 'gl-icon').html_safe + - if @different_project + = _("Error: Can't edit this file. The fork and upstream project have diverged. %{link_start}Edit the file on the fork %{icon}%{link_end}, and create a merge request.").html_safe % {link_start: blob_link_start % { url: project_blob_path(@project_to_commit_into, @id) } , link_end: link_end, icon: external_link_icon } + - else + - blob_url = project_blob_path(@project, @id) + = _('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 % { url: blob_url }, link_end: link_end , icon: external_link_icon } %h1.page-title.gl-font-size-h-display.blob-edit-page-title Edit file diff --git a/app/views/projects/blob/viewers/_csv.html.haml b/app/views/projects/blob/viewers/_csv.html.haml index 3a58bc9902c..3538ba1dd0d 100644 --- a/app/views/projects/blob/viewers/_csv.html.haml +++ b/app/views/projects/blob/viewers/_csv.html.haml @@ -1 +1 @@ -.file-content#js-csv-viewer{ data: { data: viewer.blob.data } } +.file-content#js-csv-viewer{ data: { data: blob_raw_path } } diff --git a/app/views/projects/branch_defaults/_branch_names_fields.html.haml b/app/views/projects/branch_defaults/_branch_names_fields.html.haml index 393b19e6c5a..4e4a72c154f 100644 --- a/app/views/projects/branch_defaults/_branch_names_fields.html.haml +++ b/app/views/projects/branch_defaults/_branch_names_fields.html.haml @@ -10,5 +10,6 @@ %p.form-text.text-muted = s_('ProjectSettings|Leave empty to use default template.') = sprintf(s_('ProjectSettings|Maximum %{maxLength} characters.'), { maxLength: Issue::MAX_BRANCH_TEMPLATE }) - - branch_name_help_link = help_page_path('user/project/merge_requests/creating_merge_requests.md', anchor: 'from-an-issue') + - branch_name_help_link = help_page_path('user/project/repository/branches/index.md', anchor: 'name-your-branch') = link_to _('What variables can I use?'), branch_name_help_link, target: "_blank" + = render_if_exists 'projects/branch_defaults/branch_names_help' diff --git a/app/views/projects/branch_rules/_show.html.haml b/app/views/projects/branch_rules/_show.html.haml index 27525b441ab..605715e2899 100644 --- a/app/views/projects/branch_rules/_show.html.haml +++ b/app/views/projects/branch_rules/_show.html.haml @@ -1,12 +1,16 @@ - expanded = expanded_by_default? +- show_code_owners = @project.licensed_feature_available?(:code_owner_approval_required) +- show_status_checks = @project.licensed_feature_available?(:external_status_checks) +- show_approvers = @project.licensed_feature_available?(:merge_request_approvers) -%section.settings.no-animate#branch-rules{ class: ('expanded' if expanded) } +%section.settings.no-animate#branch-rules{ class: ('expanded' if expanded), data: { qa_selector: 'branch_rules_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Branch rules') = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _('Define rules for who can push, merge, and the required approvals for each branch.') + = link_to(_('Leave feedback.'), 'https://gitlab.com/gitlab-org/gitlab/-/issues/388149', target: '_blank', rel: 'noopener noreferrer') .settings-content.gl-pr-0 - #js-branch-rules{ data: { project_path: @project.full_path, branch_rules_path: project_settings_repository_branch_rules_path(@project) } } + #js-branch-rules{ data: { project_path: @project.full_path, branch_rules_path: project_settings_repository_branch_rules_path(@project), show_code_owners: show_code_owners.to_s, show_status_checks: show_status_checks.to_s, show_approvers: show_approvers.to_s } } diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 51c218f40b9..dbc1fe24d96 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -1,50 +1,51 @@ - merged = local_assigns.fetch(:merged, false) - commit = @repository.commit(branch.dereferenced_target) - merge_project = merge_request_source_project_for_project(@project) -%li{ class: "branch-item gl-display-flex! gl-align-items-center! js-branch-item js-branch-#{branch.name}", data: { name: branch.name, qa_selector: 'branch_container', qa_name: branch.name } } - .branch-info - .gl-display-flex.gl-align-items-center - = sprite_icon('branch', size: 12, css_class: 'gl-flex-shrink-0') - = link_to project_tree_path(@project, branch.name), class: 'item-title str-truncated-100 ref-name gl-ml-3', data: { qa_selector: 'branch_link' } do - = branch.name - = clipboard_button(text: branch.name, title: _("Copy branch name")) - - if branch.name == @repository.root_ref - = gl_badge_tag s_('DefaultBranchLabel|default'), { variant: :info, size: :sm }, { class: 'gl-ml-2', data: { qa_selector: 'badge_content' } } - - elsif merged - = gl_badge_tag s_('Branches|merged'), { variant: :info, size: :sm }, { class: 'gl-ml-2', title: s_('Branches|Merged into %{default_branch}') % { default_branch: @repository.root_ref }, data: { toggle: 'tooltip', container: 'body', qa_selector: 'badge_content' } } - - if protected_branch?(@project, branch) - = gl_badge_tag s_('Branches|protected'), { variant: :success, size: :sm }, { class: 'gl-ml-2', data: { qa_selector: 'badge_content' } } - - = render_if_exists 'projects/branches/diverged_from_upstream', branch: branch - - .block-truncated - - if commit - = render 'projects/branches/commit', commit: commit, project: @project - - else - = s_('Branches|Can’t find HEAD commit for this branch') - - - if branch.name != @repository.root_ref - .js-branch-divergence-graph - - .controls.d-none.d-md-block< - - if commit_status - = render 'ci/status/icon', size: 24, status: commit_status, option_css_classes: 'gl-display-inline-flex gl-vertical-align-middle gl-mr-5' - - elsif show_commit_status - .gl-display-inline-flex.gl-vertical-align-middle.gl-mr-5 - %svg.s24 - - - if merge_project && create_mr_button?(from: branch.name, source_project: @project) - = render Pajamas::ButtonComponent.new(href: create_mr_path(from: branch.name, source_project: @project)) do - = _('Merge request') +%li{ class: "branch-item gl-py-3! js-branch-item js-branch-#{branch.name}", data: { name: branch.name, qa_selector: 'branch_container', qa_name: branch.name } } + .branch-item-content.gl-display-flex.gl-align-items-center.gl-px-3.gl-py-2 + .branch-info + .gl-display-flex.gl-align-items-center + = sprite_icon('branch', size: 12, css_class: 'gl-flex-shrink-0') + = link_to project_tree_path(@project, branch.name), class: 'item-title str-truncated-100 ref-name gl-ml-3', data: { qa_selector: 'branch_link' } do + = branch.name + = clipboard_button(text: branch.name, title: _("Copy branch name")) + - if branch.name == @repository.root_ref + = gl_badge_tag s_('DefaultBranchLabel|default'), { variant: :info, size: :sm }, { class: 'gl-ml-2', data: { qa_selector: 'badge_content' } } + - elsif merged + = gl_badge_tag s_('Branches|merged'), { variant: :info, size: :sm }, { class: 'gl-ml-2', title: s_('Branches|Merged into %{default_branch}') % { default_branch: @repository.root_ref }, data: { toggle: 'tooltip', container: 'body', qa_selector: 'badge_content' } } + - if protected_branch?(@project, branch) + = gl_badge_tag s_('Branches|protected'), { variant: :success, size: :sm }, { class: 'gl-ml-2', data: { qa_selector: 'badge_content' } } + + = render_if_exists 'projects/branches/diverged_from_upstream', branch: branch + + .block-truncated + - if commit + = render 'projects/branches/commit', commit: commit, project: @project + - else + = s_('Branches|Can’t find HEAD commit for this branch') - if branch.name != @repository.root_ref - = link_to project_compare_index_path(@project, from: @repository.root_ref, to: branch.name), - class: "gl-button btn btn-default js-onboarding-compare-branches #{'gl-ml-3' unless merge_project}", - method: :post, - title: s_('Branches|Compare') do - = s_('Branches|Compare') - - = render 'projects/buttons/download', project: @project, ref: branch.name, pipeline: @refs_pipelines[branch.name], class: 'gl-vertical-align-top' - - - if can?(current_user, :push_code, @project) - = render 'projects/branches/delete_branch_modal_button', project: @project, branch: branch, merged: merged + .js-branch-divergence-graph + + .controls.d-none.d-md-block< + - if commit_status + = render 'ci/status/icon', size: 24, status: commit_status, option_css_classes: 'gl-display-inline-flex gl-vertical-align-middle gl-mr-5' + - elsif show_commit_status + .gl-display-inline-flex.gl-vertical-align-middle.gl-mr-5 + %svg.s24 + + - if merge_project && create_mr_button?(from: branch.name, source_project: @project) + = render Pajamas::ButtonComponent.new(href: create_mr_path(from: branch.name, source_project: @project)) do + = _('Merge request') + + - if branch.name != @repository.root_ref + = link_to project_compare_index_path(@project, from: @repository.root_ref, to: branch.name), + class: "gl-button btn btn-default js-onboarding-compare-branches #{'gl-ml-3' unless merge_project}", + method: :post, + title: s_('Branches|Compare') do + = s_('Branches|Compare') + + = render 'projects/buttons/download', project: @project, ref: branch.name, pipeline: @refs_pipelines[branch.name], class: 'gl-vertical-align-top' + + - if can?(current_user, :push_code, @project) + = render 'projects/branches/delete_branch_modal_button', project: @project, branch: branch, merged: merged diff --git a/app/views/projects/branches/_branch_rules_info.haml b/app/views/projects/branches/_branch_rules_info.haml new file mode 100644 index 00000000000..451d0f9928c --- /dev/null +++ b/app/views/projects/branches/_branch_rules_info.haml @@ -0,0 +1,12 @@ +- return unless show_branch_rules_info? += render Pajamas::AlertComponent.new(variant: :info, + title: s_("Branches|See all branch-related settings together with branch rules"), + alert_options: { class: 'js-branch-rules-info-callout gl-mb-6 gl-mt-4', data: { feature_id: Users::CalloutsHelper::BRANCH_RULES_INFO_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' } }) do |c| + - c.with_body do + = s_("Branches|You can now find an overview of settings for protected branches, merge request approvals, status checks, and security approvals conveniently in one spot.") + + - c.with_actions do + = render Pajamas::ButtonComponent.new(variant: :confirm, href: project_settings_repository_path(@project, anchor: 'js-branch-rules'), button_options: { class: 'deferred-link gl-alert-action' }) do + = s_("Branches|View branch rules") + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-close'}) do + = _('Dismiss') diff --git a/app/views/projects/branches/_commit.html.haml b/app/views/projects/branches/_commit.html.haml index e33e9509e3a..cfa0cf6d07b 100644 --- a/app/views/projects/branches/_commit.html.haml +++ b/app/views/projects/branches/_commit.html.haml @@ -6,4 +6,4 @@ %span.str-truncated = link_to_markdown commit.title, project_commit_path(project, commit.id), class: "commit-row-message cgray" · - #{time_ago_with_tooltip(commit.committed_date)} + %span.gl-text-secondary= time_ago_with_tooltip(commit.committed_date) diff --git a/app/views/projects/branches/_panel.html.haml b/app/views/projects/branches/_panel.html.haml index a1f93d21647..a632e29d34f 100644 --- a/app/views/projects/branches/_panel.html.haml +++ b/app/views/projects/branches/_panel.html.haml @@ -7,13 +7,14 @@ - return unless branches.any? -= render Pajamas::CardComponent.new(card_options: {class: 'gl-mb-5'}, body_options: {class: 'gl-py-0'}, footer_options: {class: 'gl-text-center'}) do |c| - - c.header do - = panel_title - - c.body do - %ul.content-list.all-branches{ data: { qa_selector: 'all_branches_container' } } += render Pajamas::CardComponent.new(card_options: {class: 'gl-mt-5 gl-bg-gray-10'}, header_options: {class: 'gl-px-5 gl-py-4 gl-bg-white'}, body_options: {class: 'gl-px-3 gl-py-0'}, footer_options: {class: 'gl-bg-white'}) do |c| + - c.with_header do + %h3.card-title.h5.gl-line-height-24.gl-m-0 + = panel_title + - c.with_body do + %ul.content-list.branches-list.all-branches{ data: { qa_selector: 'all_branches_container' } } - branches.first(overview_max_branches).each do |branch| = render "projects/branches/branch", branch: branch, merged: project.repository.merged_to_root_ref?(branch), commit_status: @branch_pipeline_statuses[branch.name], show_commit_status: @branch_pipeline_statuses.any? - if branches.size > overview_max_branches - - c.footer do + - c.with_footer do = link_to show_more_text, project_branches_filtered_path(project, state: state), id: "state-#{state}", data: { state: state } diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml index f43d19e2542..64adf97b1b5 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -1,13 +1,15 @@ - add_page_specific_style 'page_bundles/branches' - page_title _('Branches') - add_to_breadcrumbs(_('Repository'), project_tree_path(@project)) +- is_branch_rules_available = (can? current_user, :maintainer_access, @project) && Feature.enabled?(:branch_rules, @project) +- can_push_code = (can? current_user, :push_code, @project) -# Possible values for variables passed down from the projects/branches_controller.rb -# -# @mode - overview|active|stale|all (default:overview) -# @sort - name_asc|updated_asc|updated_desc -.top-area.gl-border-0 +.top-area = gl_tabs_nav({ class: 'gl-flex-grow-1 gl-border-b-0' }) do = gl_tab_link_to s_('Branches|Overview'), project_branches_path(@project), { item_active: @mode == 'overview', title: s_('Branches|Show overview of the branches') } = gl_tab_link_to s_('Branches|Active'), project_branches_filtered_path(@project, state: 'active'), { title: s_('Branches|Show active branches') } @@ -22,16 +24,23 @@ sorted_by: @sort } } - - if can? current_user, :push_code, @project + - if is_branch_rules_available + = link_to project_settings_repository_path(@project, anchor: 'js-branch-rules'), class: 'gl-button btn btn-default' do + = s_('Branches|View branch rules') + + - if can_push_code + = link_to new_project_branch_path(@project), class: 'gl-button btn btn-confirm' do + = s_('Branches|New branch') .js-delete-merged-branches{ data: { default_branch: @project.repository.root_ref, form_path: project_merged_branches_path(@project) } } - = link_to new_project_branch_path(@project), class: 'gl-button btn btn-confirm' do - = s_('Branches|New branch') = render_if_exists 'projects/commits/mirror_status' +- if is_branch_rules_available + = render 'branch_rules_info' + .js-branch-list{ data: { diverging_counts_endpoint: diverging_commit_counts_namespace_project_branches_path(@project.namespace, @project, format: :json), default_branch: @project.default_branch } } - if @gitaly_unavailable diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml index 91efd5ef048..9fd9943fd26 100644 --- a/app/views/projects/branches/new.html.haml +++ b/app/views/projects/branches/new.html.haml @@ -3,26 +3,21 @@ - if @error = render Pajamas::AlertComponent.new(variant: :danger) do |c| - = c.body do + - c.with_body do = @error %h1.page-title.gl-font-size-h-display = _('New Branch') -%hr = form_tag namespace_project_branches_path, method: :post, id: "new-branch-form", class: "js-create-branch-form js-requires-input" do - .form-group.row - = label_tag :branch_name, _('Branch name'), class: 'col-form-label col-sm-2' - .col-sm-10 - = text_field_tag :branch_name, params[:branch_name], required: true, autofocus: true, class: 'form-control js-branch-name monospace' - .form-text.text-muted.text-danger.js-branch-name-error - .form-group.row - = label_tag :ref, _('Create from'), class: 'col-form-label col-sm-2' - .col-sm-auto.create-from - .js-new-branch-ref-selector{ data: { project_id: @project.id, default_branch_name: default_ref, hidden_input_name: 'ref' } } - .form-text.text-muted - = _('Existing branch name, tag, or commit SHA') - .form-actions - = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { type: 'submit', class: 'gl-mr-3' }) do - = _('Create branch') - = link_to _('Cancel'), project_branches_path(@project), class: 'gl-button btn btn-default btn-cancel' - + .form-group.gl-max-w-80 + = label_tag :branch_name, _('Branch name') + = text_field_tag :branch_name, params[:branch_name], required: true, autofocus: true, class: 'form-control js-branch-name monospace' + .form-text.text-muted.text-danger.js-branch-name-error{ 'aria-live': 'assertive' } + .form-group.gl-max-w-80 + = label_tag :ref, _('Create from') + .js-new-branch-ref-selector{ data: { project_id: @project.id, default_branch_name: default_ref, hidden_input_name: 'ref' } } + .form-text.text-muted + = _('Existing branch name, tag, or commit SHA') + = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { type: 'submit', class: 'gl-mr-3' }) do + = _('Create branch') + = link_to _('Cancel'), project_branches_path(@project), class: 'gl-button btn btn-default btn-cancel' diff --git a/app/views/projects/buttons/_clone.html.haml b/app/views/projects/buttons/_clone.html.haml index a8a911adb7d..ab026d9c6ac 100644 --- a/app/views/projects/buttons/_clone.html.haml +++ b/app/views/projects/buttons/_clone.html.haml @@ -13,7 +13,7 @@ %label.label-bold = _('Clone with SSH') .input-group.btn-group - = text_field_tag :ssh_project_clone, project.ssh_url_to_repo, class: "js-select-on-focus form-control", readonly: true, aria: { label: _('Repository clone URL') }, data: { qa_selector: 'ssh_clone_url_content' } + = text_field_tag :ssh_project_clone, ssh_clone_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: _('Repository clone URL') }, data: { qa_selector: 'ssh_clone_url_content' } .input-group-append = clipboard_button(target: '#ssh_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") = render_if_exists 'projects/buttons/geo' @@ -22,7 +22,7 @@ %label.label-bold = _('Clone with %{http_label}') % { http_label: gitlab_config.protocol.upcase } .input-group.btn-group - = text_field_tag :http_project_clone, project.http_url_to_repo, class: "js-select-on-focus form-control", readonly: true, aria: { label: _('Repository clone URL') }, data: { qa_selector: 'http_clone_url_content' } + = text_field_tag :http_project_clone, http_clone_url_to_repo(project), class: "js-select-on-focus form-control", readonly: true, aria: { label: _('Repository clone URL') }, data: { qa_selector: 'http_clone_url_content' } .input-group-append = clipboard_button(target: '#http_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") = render_if_exists 'projects/buttons/geo' @@ -32,12 +32,12 @@ %label.label-bold{ class: 'gl-px-4!' } = _('Open in your IDE') - if ssh_enabled? - - escaped_ssh_url_to_repo = CGI.escape(project.ssh_url_to_repo) + - escaped_ssh_url_to_repo = CGI.escape(ssh_clone_url_to_repo(project)) %a.dropdown-item.open-with-link{ href: 'vscode://vscode.git/clone?url=' + escaped_ssh_url_to_repo } .gl-dropdown-item-text-wrapper = _('Visual Studio Code (SSH)') - if http_enabled? - - escaped_http_url_to_repo = CGI.escape(project.http_url_to_repo) + - escaped_http_url_to_repo = CGI.escape(http_clone_url_to_repo(project)) %a.dropdown-item.open-with-link{ href: 'vscode://vscode.git/clone?url=' + escaped_http_url_to_repo } .gl-dropdown-item-text-wrapper = _('Visual Studio Code (HTTPS)') diff --git a/app/views/projects/commit/_pipelines_list.haml b/app/views/projects/commit/_pipelines_list.haml index 16df743475d..f7ae462e8f9 100644 --- a/app/views/projects/commit/_pipelines_list.haml +++ b/app/views/projects/commit/_pipelines_list.haml @@ -3,7 +3,8 @@ #commit-pipeline-table-view{ data: { disable_initialization: disable_initialization, endpoint: endpoint, - "empty-state-svg-path" => image_path('illustrations/pipelines_empty.svg'), + full_path: @project.full_path, + "empty-state-svg-path" => image_path('illustrations/empty-state/empty-pipeline-md.svg'), "error-state-svg-path" => image_path('illustrations/pipelines_failed.svg'), "project-id": @project.id, "artifacts-endpoint" => downloadable_artifacts_project_pipeline_path(@project, artifacts_endpoint_placeholder, format: :json), diff --git a/app/views/projects/commit/_signature_badge.html.haml b/app/views/projects/commit/_signature_badge.html.haml index 88631f14e56..9cca928e794 100644 --- a/app/views/projects/commit/_signature_badge.html.haml +++ b/app/views/projects/commit/_signature_badge.html.haml @@ -29,5 +29,5 @@ = link_to(_('Learn about signing commits'), help_page_path('user/project/repository/gpg_signed_commits/index.md'), class: 'gl-link gl-display-block gl-mt-3') -%a.signature-badge.gl-display-flex{ role: 'button', tabindex: 0, data: { toggle: 'popover', html: 'true', placement: 'top', title: title, content: content } } +%a.signature-badge.gl-display-inline-block{ role: 'button', tabindex: 0, data: { toggle: 'popover', html: 'true', placement: 'top', title: title, content: content } } = gl_badge_tag label, variant: variant diff --git a/app/views/projects/commit/diff_files.html.haml b/app/views/projects/commit/diff_files.html.haml index 0c52c1a15a4..7287d10a109 100644 --- a/app/views/projects/commit/diff_files.html.haml +++ b/app/views/projects/commit/diff_files.html.haml @@ -1 +1,5 @@ -= render partial: 'projects/diffs/file', collection: diffs.diff_files, as: :diff_file, locals: { project: diffs.project, environment: environment, diff_page_context: 'is-commit' } +- diff_files = conditionally_paginate_diff_files(diffs, paginate: true, page: params[:page], per: Projects::CommitController::COMMIT_DIFFS_PER_PAGE) + += render partial: 'projects/diffs/file', collection: diff_files, as: :diff_file, locals: { project: diffs.project, environment: environment, diff_page_context: 'is-commit' } + += paginate(diff_files, theme: "gitlab", params: { action: :show }) diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml index feaac255d8c..0868475c49f 100644 --- a/app/views/projects/commit/show.html.haml +++ b/app/views/projects/commit/show.html.haml @@ -3,13 +3,11 @@ - add_to_breadcrumbs _('Commits'), project_commits_path(@project) - breadcrumb_title @commit.short_id - container_class = !fluid_layout && diff_view == :inline ? 'container-limited' : '' -- limited_container_width = fluid_layout ? '' : 'limit-container-width' -- @content_class = limited_container_width - page_title "#{@commit.title} (#{@commit.short_id})", _('Commits') - page_description @commit.description - add_page_specific_style 'page_bundles/pipelines' -.container-fluid{ class: [limited_container_width, container_class] } +.container-fluid{ class: [container_class] } = render "commit_box" = render "ci_menu" = render "projects/diffs/diffs", diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index b5481f19352..6209ef48f96 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -15,6 +15,7 @@ - ref = local_assigns.fetch(:ref) { merge_request&.source_branch } - commit = commit.present(current_user: current_user) - commit_status = commit.detailed_status_for(ref) +- tags = commit.tags_for_display - collapsible = local_assigns.fetch(:collapsible, true) - link_data_attrs = local_assigns.fetch(:link_data_attrs, {}) - link = commit_path(project, commit, merge_request: merge_request) @@ -55,6 +56,13 @@ = preserve(markdown_field(commit, :description)) .commit-actions.flex-row + - if tags.present? + = gl_badge_tag(variant: :neutral, icon: 'tag', class: 'gl-font-monospace') do + - if tags.size > 1 + = link_to _('%{count} tags') % { count: tags.size } , project_commit_path(project, commit.id) + - else + = link_to tags.first, project_commits_path(project, tags.first, ref_type: 'tags'), class: 'gl-text-truncate gl-max-w-15' + - if request.xhr? = render partial: 'projects/commit/signature', object: commit.signature - else diff --git a/app/views/projects/commits/_commit_list.html.haml b/app/views/projects/commits/_commit_list.html.haml index 23b25b5dcbd..22f4594c1d5 100644 --- a/app/views/projects/commits/_commit_list.html.haml +++ b/app/views/projects/commits/_commit_list.html.haml @@ -3,9 +3,9 @@ - commits = Commit.decorate(commits, @project) = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5'}, body_options: { class: 'gl-py-0'}) do |c| - - c.header do + - c.with_header do Commits (#{@total_commit_count}) - - c.body do + - c.with_body do - if hidden > 0 %ul.content-list - commits.each do |commit| diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml index b79f17ae7b3..9cbabaee774 100644 --- a/app/views/projects/commits/_commits.html.haml +++ b/app/views/projects/commits/_commits.html.haml @@ -8,8 +8,9 @@ - hidden = @hidden_commit_count - commits.chunk { |c| c.committed_date.in_time_zone.to_date }.each do |day, daily_commits| - %li.commit-header.js-commit-header{ data: { day: day } } - %span.day= l(day, format: '%d %b, %Y') + %li.js-commit-header.gl-mt-7.gl-pb-2.gl-border-b{ data: { day: day } } + %span.day.font-weight-bold= l(day, format: '%d %b, %Y') + %span - %span.commits-count= n_("%d commit", "%d commits", daily_commits.size) % daily_commits.size %li.commits-row{ data: { day: day } } @@ -20,7 +21,7 @@ = render partial: 'projects/commits/commit', collection: daily_commits, locals: { project: project, ref: ref, merge_request: merge_request } - if context_commits.present? - %li.commit-header.js-commit-header + %li.js-commit-header.gl-mt-7.gl-pb-2.gl-border-b %span.font-weight-bold= n_("%d previously merged commit", "%d previously merged commits", context_commits.count) % context_commits.count - if can_update_merge_request = render Pajamas::ButtonComponent.new(button_options: { class: 'gl-ml-3 add-review-item-modal-trigger', data: { context_commits_empty: 'false' } }) do @@ -37,7 +38,7 @@ %li = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false) do |c| - = c.body do + - c.with_body do = 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 can_update_merge_request && context_commits&.empty? && !(defined?(@next_page) && @next_page) diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index 689862eae8a..4c5a9acdf83 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -6,7 +6,7 @@ = auto_discovery_link_tag(:atom, project_commits_path(@project, @ref, rss_url_options), title: "#{@project.name}:#{@ref} commits") .js-project-commits-show{ 'data-commits-limit' => @limit } - .tree-holder + .tree-holder.gl-mt-5 .nav-block .tree-ref-container .tree-ref-holder.gl-max-w-26 diff --git a/app/views/projects/compare/index.html.haml b/app/views/projects/compare/index.html.haml index b3590eea631..58da76a3231 100644 --- a/app/views/projects/compare/index.html.haml +++ b/app/views/projects/compare/index.html.haml @@ -1,5 +1,5 @@ -- breadcrumb_title _("Compare Revisions") -- page_title _("Compare") +- breadcrumb_title _("Compare revisions") +- page_title _("Compare revisions") %h1.page-title.gl-font-size-h-display = _("Compare Git revisions") diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml index 1bdf3d1e6e3..9185afc0771 100644 --- a/app/views/projects/compare/show.html.haml +++ b/app/views/projects/compare/show.html.haml @@ -1,4 +1,4 @@ -- add_to_breadcrumbs _("Compare Revisions"), project_compare_index_path(@project) +- add_to_breadcrumbs _("Compare revisions"), project_compare_index_path(@project) - page_title "#{params[:from]}...#{params[:to]}" .sub-header-block.gl-border-b-0.gl-mb-0 @@ -18,7 +18,7 @@ paginate_diffs_per_page: Projects::CompareController::COMMIT_DIFFS_PER_PAGE - else = render Pajamas::CardComponent.new(card_options: { class: "gl-bg-gray-50 gl-mb-5 gl-border-none gl-text-center" }) do |c| - - c.body do + - c.with_body do %h4 = s_("CompareBranches|There isn't anything to compare.") %p.gl-mb-4.gl-line-height-24 diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index ba79f0ee3cb..1e8b1255f0c 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -1,6 +1,5 @@ - page_title _("Value Stream Analytics") - data_attributes = @request_params.valid? ? @request_params.to_data_attributes : {} -- data_attributes.merge!(cycle_analytics_initial_data(@project, @group)) - add_page_specific_style 'page_bundles/cycle_analytics' #js-cycle-analytics{ data: data_attributes } diff --git a/app/views/projects/diffs/_content.html.haml b/app/views/projects/diffs/_content.html.haml index 780bb3404cc..0a87ae145ac 100644 --- a/app/views/projects/diffs/_content.html.haml +++ b/app/views/projects/diffs/_content.html.haml @@ -1,7 +1,7 @@ - diff_file = local_assigns.fetch(:diff_file, nil) - file_hash = hexdigest(diff_file.file_path) -.diff-content +.diff-content.gl-rounded-bottom-base - if diff_file.has_renderable? .hidden{ id: "#raw-diff-#{file_hash}", data: { file_hash: file_hash, diff_toggle_entity: 'rawViewer' } } = render 'projects/diffs/viewer', viewer: diff_file.viewer diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index 8ff6d348d95..982ecbbae51 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -2,22 +2,20 @@ - show_whitespace_toggle = local_assigns.fetch(:show_whitespace_toggle, true) - can_create_note = !@diff_notes_disabled && can?(current_user, :create_note, diffs.project) - diff_page_context = local_assigns.fetch(:diff_page_context, nil) -- load_diff_files_async = Feature.enabled?(:async_commit_diff_files, @project) && diff_page_context == "is-commit" -- paginate_diffs = local_assigns.fetch(:paginate_diffs, false) && !load_diff_files_async +- load_diff_files_async = diff_page_context == "is-commit" +- paginate_diffs = local_assigns.fetch(:paginate_diffs, false) - paginate_diffs_per_page = local_assigns.fetch(:paginate_diffs_per_page, nil) - page = local_assigns.fetch(:page, nil) - diff_files = conditionally_paginate_diff_files(diffs, paginate: paginate_diffs, page: page, per: paginate_diffs_per_page) -.content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed +.js-diff-files-changed.gl-py-3 .files-changed-inner - .inline-parallel-buttons.gl-display-none.gl-md-display-flex + .inline-parallel-buttons.gl-display-none.gl-md-display-flex.gl-relative - if !diffs_expanded? && diff_files.any?(&:collapsed?) = link_to _('Expand all'), url_for(safe_params.merge(expanded: 1, format: nil)), class: 'gl-button btn btn-default' - if show_whitespace_toggle - if current_controller?(:commit) = commit_diff_whitespace_link(diffs.project, @commit, class: 'd-none d-sm-inline-block') - - elsif current_controller?('projects/merge_requests/diffs') - = diff_merge_request_whitespace_link(diffs.project, @merge_request, class: 'd-none d-sm-inline-block') - elsif current_controller?(:compare) = diff_compare_whitespace_link(diffs.project, params[:from], params[:to], class: 'd-none d-sm-inline-block') - elsif current_controller?(:wikis) @@ -32,7 +30,7 @@ .files{ data: { can_create_note: can_create_note } } - if load_diff_files_async - - url = url_for(safe_params.merge(action: 'diff_files')) + - url = url_for(safe_params.merge(action: 'diff_files', page: page)) .js-diffs-batch{ data: { diff_files_path: url } } = gl_loading_icon(size: "md", css_class: "gl-mt-4") - else diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index e87005434e4..02a69f25985 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -1,12 +1,19 @@ - breadcrumb_title _("General Settings") - page_title _("General") - add_page_specific_style 'page_bundles/projects_edit' -- @content_class = "limit-container-width" unless fluid_layout - expanded = expanded_by_default? - reduce_visibility_form_id = 'reduce-visibility-form' +- @force_desktop_expanded_sidebar = true = render_if_exists 'shared/ultimate_feature_removal_banner', project: @project +- if Feature.enabled?(:show_pages_in_deployments_menu, current_user, type: :experiment) + = render Pajamas::AlertComponent.new(variant: :info, + title: _('GitLab Pages has moved'), + alert_options: { class: 'gl-my-5', data: { feature_id: Users::CalloutsHelper::PAGES_MOVED_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' } }) do |c| + - c.with_body do + = _('To go to GitLab Pages, on the left sidebar, select %{pages_link}.').html_safe % {pages_link: link_to('Deployments > Pages', project_pages_path(@project)).html_safe} + %section.settings.general-settings.no-animate.expanded#js-general-settings .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Naming, topics, avatar') @@ -27,16 +34,15 @@ %input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' } %template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data(@project).to_json.html_safe .js-project-permissions-form{ data: visibility_confirm_modal_data(@project, reduce_visibility_form_id) } - - if show_merge_request_settings_callout?(@project) %section.settings.expanded = render Pajamas::AlertComponent.new(variant: :info, title: _('Merge requests and approvals settings have moved.'), alert_options: { class: 'js-merge-request-settings-callout gl-my-5', data: { feature_id: Users::CalloutsHelper::MERGE_REQUEST_SETTINGS_MOVED_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' } }) do |c| - = c.body do + - c.with_body do = _('On the left sidebar, select %{merge_requests_link} to view them.').html_safe % { merge_requests_link: link_to('Settings > Merge requests', project_settings_merge_requests_path(@project)).html_safe } -= render_if_exists 'projects/settings/analytics_dashboards', expanded: expanded += render_if_exists 'projects/settings/analytics', expanded: expanded %section.settings.no-animate{ class: ('expanded' if expanded), data: { qa_selector: 'badges_settings_content' } } .settings-header @@ -56,6 +62,8 @@ = render 'projects/service_desk_settings' += render_if_exists 'product_analytics/project_settings', expanded: expanded + %section.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded), data: { qa_selector: 'advanced_settings_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Advanced') diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 43159a759f4..a51d1080d96 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -1,4 +1,3 @@ -- @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 diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index e4b8750b96c..7ddaf868a35 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -8,4 +8,5 @@ "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 } } + "default-branch-name" => @project.default_branch_or_main, + "kas-tunnel-url" => ::Gitlab::Kas.tunnel_url } } diff --git a/app/views/projects/environments/new.html.haml b/app/views/projects/environments/new.html.haml index de7f976717b..11c36b5ea6d 100644 --- a/app/views/projects/environments/new.html.haml +++ b/app/views/projects/environments/new.html.haml @@ -1,5 +1,6 @@ -- breadcrumb_title _("Environments") -- page_title _("New Environment") +- add_to_breadcrumbs s_("Environments|Environments"), project_environments_path(@project) +- breadcrumb_title s_("Environments|New") +- page_title s_("Environments|New Environment") - add_page_specific_style 'page_bundles/environments' #js-new-environment{ data: { project_environments_path: project_environments_path(@project) } } diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml index 53b2af88511..e97cae911d9 100644 --- a/app/views/projects/environments/show.html.haml +++ b/app/views/projects/environments/show.html.haml @@ -20,7 +20,9 @@ %p = html_escape(_("Define environments in the deploy stage(s) in %{code_open}.gitlab-ci.yml%{code_close} to track deployments here.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } .text-center - = link_to _("Read more"), help_page_path("ci/environments/index.md"), class: "gl-button btn btn-confirm" + = render Pajamas::ButtonComponent.new(variant: :confirm, href: help_page_path("ci/environments/index.md")) do + = _('Read more') + - else .table-holder.gl-overflow-visible .ci-table.environments{ role: 'grid' } diff --git a/app/views/projects/feature_flags/edit.html.haml b/app/views/projects/feature_flags/edit.html.haml index 121dcd31a13..28a8f8729dd 100644 --- a/app/views/projects/feature_flags/edit.html.haml +++ b/app/views/projects/feature_flags/edit.html.haml @@ -1,7 +1,7 @@ - @gfm_form = true -- add_to_breadcrumbs s_('FeatureFlags|Feature Flags'), project_feature_flags_path(@project) +- add_to_breadcrumbs s_('FeatureFlags|Feature flags'), project_feature_flags_path(@project) - breadcrumb_title @feature_flag.name -- page_title s_('FeatureFlags|Edit Feature Flag'), @feature_flag.name +- page_title s_('FeatureFlags|Edit Feature flag'), @feature_flag.name #js-edit-feature-flag{ data: edit_feature_flag_data } diff --git a/app/views/projects/feature_flags/index.html.haml b/app/views/projects/feature_flags/index.html.haml index 53fe30422ca..e473a6f3cfd 100644 --- a/app/views/projects/feature_flags/index.html.haml +++ b/app/views/projects/feature_flags/index.html.haml @@ -1,4 +1,4 @@ -- page_title s_('FeatureFlags|Feature Flags') +- page_title s_('FeatureFlags|Feature flags') #feature-flags-vue{ data: { endpoint: project_feature_flags_path(@project, format: :json), "project-id" => @project.id, @@ -6,7 +6,7 @@ "error-state-svg-path" => image_path('illustrations/feature_flag.svg'), "feature-flags-help-page-path" => help_page_path("operations/feature_flags"), "feature-flags-client-libraries-help-page-path" => help_page_path("operations/feature_flags", anchor: "choose-a-client-library"), - "feature-flags-client-example-help-page-path" => help_page_path("operations/feature_flags", anchor: "golang-application-example"), + "feature-flags-client-example-help-page-path" => help_page_path("operations/feature_flags", anchor: "go-application-example"), "feature-flags-limit-exceeded" => @project.actual_limits.exceeded?(:project_feature_flags, @project.operations_feature_flags.count), "feature-flags-limit" => @project.actual_limits.project_feature_flags, "unleash-api-url" => (unleash_api_url(@project) if can?(current_user, :admin_feature_flag, @project)), diff --git a/app/views/projects/feature_flags/new.html.haml b/app/views/projects/feature_flags/new.html.haml index c91487ad198..3a32a249d1e 100644 --- a/app/views/projects/feature_flags/new.html.haml +++ b/app/views/projects/feature_flags/new.html.haml @@ -1,7 +1,7 @@ - @breadcrumb_link = new_project_feature_flag_path(@project) -- add_to_breadcrumbs s_('FeatureFlags|Feature Flags'), project_feature_flags_path(@project) +- add_to_breadcrumbs s_('FeatureFlags|Feature flags'), project_feature_flags_path(@project) - breadcrumb_title s_('FeatureFlags|New') -- page_title s_('FeatureFlags|New Feature Flag') +- page_title s_('FeatureFlags|New feature flag') #js-new-feature-flag{ data: { endpoint: project_feature_flags_path(@project, format: :json), feature_flags_path: project_feature_flags_path(@project), diff --git a/app/views/projects/feature_flags_user_lists/edit.html.haml b/app/views/projects/feature_flags_user_lists/edit.html.haml index 1ff488ff0f0..417b6354ec0 100644 --- a/app/views/projects/feature_flags_user_lists/edit.html.haml +++ b/app/views/projects/feature_flags_user_lists/edit.html.haml @@ -1,4 +1,4 @@ -- add_to_breadcrumbs s_('FeatureFlags|Feature Flags'), project_feature_flags_path(@project) +- add_to_breadcrumbs s_('FeatureFlags|Feature flags'), project_feature_flags_path(@project) - add_to_breadcrumbs s_('FeatureFlags|User Lists'), project_feature_flags_user_lists_path(@project) - breadcrumb_title s_('FeatureFlags|Edit User List') - page_title s_('FeatureFlags|Edit User List') diff --git a/app/views/projects/feature_flags_user_lists/index.html.haml b/app/views/projects/feature_flags_user_lists/index.html.haml index f0e3c36992a..c0e98b27d29 100644 --- a/app/views/projects/feature_flags_user_lists/index.html.haml +++ b/app/views/projects/feature_flags_user_lists/index.html.haml @@ -1,6 +1,6 @@ -- add_to_breadcrumbs s_('FeatureFlags|Feature Flags'), project_feature_flags_path(@project) +- add_to_breadcrumbs s_('FeatureFlags|Feature flags'), project_feature_flags_path(@project) - breadcrumb_title s_('FeatureFlags|User Lists') -- page_title s_('FeatureFlags|Feature Flag User Lists') +- page_title s_('FeatureFlags|Feature flag User Lists') #js-user-lists{ data: { project_id: @project.id, feature_flags_help_page_path: help_page_path("operations/feature_flags"), diff --git a/app/views/projects/feature_flags_user_lists/new.html.haml b/app/views/projects/feature_flags_user_lists/new.html.haml index f2e1ea38d9c..cea55c0ca2a 100644 --- a/app/views/projects/feature_flags_user_lists/new.html.haml +++ b/app/views/projects/feature_flags_user_lists/new.html.haml @@ -1,5 +1,5 @@ - @breadcrumb_link = new_project_feature_flags_user_list_path(@project) -- add_to_breadcrumbs s_('FeatureFlags|Feature Flags'), project_feature_flags_path(@project) +- add_to_breadcrumbs s_('FeatureFlags|Feature flags'), project_feature_flags_path(@project) - add_to_breadcrumbs s_('FeatureFlags|User Lists'), project_feature_flags_user_lists_path(@project) - breadcrumb_title s_('FeatureFlags|New User List') - page_title s_('FeatureFlags|New User List') diff --git a/app/views/projects/feature_flags_user_lists/show.html.haml b/app/views/projects/feature_flags_user_lists/show.html.haml index 2c88f3da66b..5c4e93e7707 100644 --- a/app/views/projects/feature_flags_user_lists/show.html.haml +++ b/app/views/projects/feature_flags_user_lists/show.html.haml @@ -1,7 +1,7 @@ -- add_to_breadcrumbs s_('FeatureFlags|Feature Flags'), project_feature_flags_path(@project) +- add_to_breadcrumbs s_('FeatureFlags|Feature flags'), project_feature_flags_path(@project) - add_to_breadcrumbs s_('FeatureFlags|User Lists'), project_feature_flags_user_lists_path(@project) - breadcrumb_title s_('FeatureFlags|List details') -- page_title s_('FeatureFlags|Feature Flag User List Details') +- page_title s_('FeatureFlags|Feature flag user list details') #js-edit-user-list{ data: { project_id: @project.id, user_list_iid: @user_list.iid, diff --git a/app/views/projects/find_file/show.html.haml b/app/views/projects/find_file/show.html.haml index 1d4e907dd61..afb49c48146 100644 --- a/app/views/projects/find_file/show.html.haml +++ b/app/views/projects/find_file/show.html.haml @@ -17,8 +17,8 @@ %table.table.files-slider{ class: "table_#{@hex_path} tree-table" } %tbody .col-12.empty-state.hidden - .svg-250.svg-content - = image_tag('illustrations/profile-page/personal-projects.svg', alt: 'No files svg', lazy: true) + .svg-150.svg-content + = image_tag('illustrations/empty-state/empty-search-md.svg', alt: 'No files svg', lazy: true) .text-center %h4 = _('There are no matching files') diff --git a/app/views/projects/forks/error.html.haml b/app/views/projects/forks/error.html.haml index 022a96b15a7..cff5899b960 100644 --- a/app/views/projects/forks/error.html.haml +++ b/app/views/projects/forks/error.html.haml @@ -4,7 +4,7 @@ variant: :danger, alert_options: { class: 'gl-mt-5' }, dismissible: false) do |c| - = c.body do + - c.with_body do %p = _("You tried to fork %{link_to_the_project} but it failed for the following reason:").html_safe % { link_to_the_project: link_to_project(@project) } @@ -17,5 +17,5 @@ - else = error - = c.actions do + - c.with_actions do = link_to _('Try to fork again'), new_project_fork_path(@project), title: _("Fork"), class: "btn gl-alert-action btn-info btn-md gl-button" diff --git a/app/views/projects/google_cloud/configuration/index.html.haml b/app/views/projects/google_cloud/configuration/index.html.haml index dab49d5032a..07aaf9b2513 100644 --- a/app/views/projects/google_cloud/configuration/index.html.haml +++ b/app/views/projects/google_cloud/configuration/index.html.haml @@ -2,6 +2,4 @@ - breadcrumb_title s_('CloudSeed|Configuration') - page_title s_('CloudSeed|Configuration') -- @content_class = "limit-container-width" unless fluid_layout - #js-google-cloud-configuration{ data: @js_data } diff --git a/app/views/projects/google_cloud/databases/cloudsql_form.html.haml b/app/views/projects/google_cloud/databases/cloudsql_form.html.haml index 05838717b49..ea0a53010ef 100644 --- a/app/views/projects/google_cloud/databases/cloudsql_form.html.haml +++ b/app/views/projects/google_cloud/databases/cloudsql_form.html.haml @@ -3,7 +3,5 @@ - breadcrumb_title @title - page_title @title -- @content_class = "limit-container-width" unless fluid_layout - = form_tag project_google_cloud_databases_path(@project), method: 'post' do #js-google-cloud-databases-cloudsql-form{ data: @js_data } diff --git a/app/views/projects/google_cloud/databases/index.html.haml b/app/views/projects/google_cloud/databases/index.html.haml index 0528ac3d1f5..0d54c1618e4 100644 --- a/app/views/projects/google_cloud/databases/index.html.haml +++ b/app/views/projects/google_cloud/databases/index.html.haml @@ -2,6 +2,4 @@ - breadcrumb_title s_('CloudSeed|Databases') - page_title s_('CloudSeed|Databases') -- @content_class = "limit-container-width" unless fluid_layout - #js-google-cloud-databases{ data: @js_data } diff --git a/app/views/projects/google_cloud/deployments/index.html.haml b/app/views/projects/google_cloud/deployments/index.html.haml index 22a365671bc..96f73fc3dd1 100644 --- a/app/views/projects/google_cloud/deployments/index.html.haml +++ b/app/views/projects/google_cloud/deployments/index.html.haml @@ -2,6 +2,4 @@ - breadcrumb_title s_('CloudSeed|Deployments') - page_title s_('CloudSeed|Deployments') -- @content_class = "limit-container-width" unless fluid_layout - #js-google-cloud-deployments{ data: @js_data } diff --git a/app/views/projects/google_cloud/gcp_regions/index.html.haml b/app/views/projects/google_cloud/gcp_regions/index.html.haml index 4cc218ff548..378ec592a74 100644 --- a/app/views/projects/google_cloud/gcp_regions/index.html.haml +++ b/app/views/projects/google_cloud/gcp_regions/index.html.haml @@ -2,7 +2,5 @@ - breadcrumb_title s_('CloudSeed|Regions') - page_title s_('CloudSeed|Regions') -- @content_class = "limit-container-width" unless fluid_layout - = form_tag project_google_cloud_gcp_regions_path(@project), method: 'post' do #js-google-cloud-gcp-regions{ data: @js_data } diff --git a/app/views/projects/google_cloud/service_accounts/index.html.haml b/app/views/projects/google_cloud/service_accounts/index.html.haml index 8f70818abd9..0e114350193 100644 --- a/app/views/projects/google_cloud/service_accounts/index.html.haml +++ b/app/views/projects/google_cloud/service_accounts/index.html.haml @@ -2,7 +2,5 @@ - breadcrumb_title s_('CloudSeed|Service Account') - page_title s_('CloudSeed|Service Account') -- @content_class = "limit-container-width" unless fluid_layout - = form_tag project_google_cloud_service_accounts_path(@project), method: 'post' do #js-google-cloud-service-accounts{ data: @js_data } diff --git a/app/views/projects/graphs/show.html.haml b/app/views/projects/graphs/show.html.haml index 754de2db8f3..9d6f67bd190 100644 --- a/app/views/projects/graphs/show.html.haml +++ b/app/views/projects/graphs/show.html.haml @@ -1,4 +1,4 @@ -- page_title _('Contributors') +- page_title _('Contributor statistics') - graph_path = project_graph_path(@project, current_ref, ref_type: @ref_type, format: :json) - commits_path = project_commits_path(@project, current_ref, ref_type: @ref_type) diff --git a/app/views/projects/harbor/repositories/index.html.haml b/app/views/projects/harbor/repositories/index.html.haml index e6f0e3e950c..b6f6fb64451 100644 --- a/app/views/projects/harbor/repositories/index.html.haml +++ b/app/views/projects/harbor/repositories/index.html.haml @@ -1,5 +1,4 @@ - page_title _("Harbor Registry") -- @content_class = "limit-container-width" unless fluid_layout #js-harbor-registry-list-project{ data: { endpoint: project_harbor_repositories_path(@project), "no_containers_image" => image_path('illustrations/docker-empty-state.svg'), diff --git a/app/views/projects/hook_logs/show.html.haml b/app/views/projects/hook_logs/show.html.haml index d610ef21400..0f4dc4b5e32 100644 --- a/app/views/projects/hook_logs/show.html.haml +++ b/app/views/projects/hook_logs/show.html.haml @@ -1,4 +1,3 @@ -- @content_class = 'limit-container-width' unless fluid_layout - add_to_breadcrumbs _('Webhook Settings'), namespace_project_hooks_path - page_title _('Webhook Logs') diff --git a/app/views/projects/hooks/edit.html.haml b/app/views/projects/hooks/edit.html.haml index 3e63faaf448..b553249c4b8 100644 --- a/app/views/projects/hooks/edit.html.haml +++ b/app/views/projects/hooks/edit.html.haml @@ -1,4 +1,3 @@ -- @content_class = 'limit-container-width' unless fluid_layout - add_to_breadcrumbs _('Webhook Settings'), project_hooks_path(@project) - page_title _('Webhook') diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml index 15cb7869dc5..4d71161c96e 100644 --- a/app/views/projects/hooks/index.html.haml +++ b/app/views/projects/hooks/index.html.haml @@ -1,6 +1,6 @@ -- @content_class = 'limit-container-width' unless fluid_layout - breadcrumb_title _('Webhook Settings') - page_title _('Webhooks') +- @force_desktop_expanded_sidebar = true .row.gl-mt-3.js-search-settings-section .col-lg-4 diff --git a/app/views/projects/imports/new.html.haml b/app/views/projects/imports/new.html.haml index efb364bd013..af337082141 100644 --- a/app/views/projects/imports/new.html.haml +++ b/app/views/projects/imports/new.html.haml @@ -9,7 +9,7 @@ dismissible: false, variant: :danger, alert_options: { class: 'gl-mb-5' }) do |c| - = c.body do + - c.with_body do = @project.import_state.last_error = gitlab_ui_form_for @project, url: project_import_path(@project), method: :post, html: { class: 'js-project-import' } do |f| diff --git a/app/views/projects/imports/show.html.haml b/app/views/projects/imports/show.html.haml index 9fe541c5912..7f509aee07c 100644 --- a/app/views/projects/imports/show.html.haml +++ b/app/views/projects/imports/show.html.haml @@ -1,5 +1,4 @@ - page_title import_in_progress_title -- @content_class = "limit-container-width" unless fluid_layout .save-project-loader .center diff --git a/app/views/projects/issues/_design_management.html.haml b/app/views/projects/issues/_design_management.html.haml index c5ce0549816..de8725df871 100644 --- a/app/views/projects/issues/_design_management.html.haml +++ b/app/views/projects/issues/_design_management.html.haml @@ -1,4 +1,4 @@ -- return if @issue.incident? +- return if @issue.work_item_type&.incident? - requirements_link_url = help_page_path('user/project/issues/design_management', anchor: 'requirements') - requirements_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: requirements_link_url } @@ -12,7 +12,8 @@ issue_iid: @issue.iid, issue_path: project_issue_path(@project, @issue), register_path: new_user_registration_path(redirect_to_referer: 'yes'), - sign_in_path: new_session_path(:user, redirect_to_referer: 'yes') } } + sign_in_path: new_session_path(:user, redirect_to_referer: 'yes'), + new_comment_template_path: profile_comment_templates_path } } - else .gl-border-solid.gl-border-1.gl-border-gray-100.gl-rounded-base.gl-mt-5.gl-p-3.gl-text-center = enable_lfs_message diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index c86f9c79912..c6e5102889a 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -12,4 +12,5 @@ show_timeline_view_toggle: show_timeline_view_toggle?(@issue).to_s, current_user_data: UserSerializer.new.represent(current_user, {only_path: true}, CurrentUserEntity).to_json, can_add_timeline_events: "#{can?(current_user, :admin_incident_management_timeline_event, @issue)}", - report_abuse_path: add_category_abuse_reports_path } } + report_abuse_path: add_category_abuse_reports_path, + new_comment_template_path: profile_comment_templates_path } } diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index 18975bc3db6..fc6ef2ea153 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -50,10 +50,10 @@ %ul.controls - if issue.closed? && issue.moved? %li.issuable-status - = _('CLOSED (MOVED)') + = render Pajamas::BadgeComponent.new(_('Closed (moved)'), size: 'sm', variant: 'info') - elsif issue.closed? %li.issuable-status - = _('CLOSED') + = render Pajamas::BadgeComponent.new(_('Closed'), size: 'sm', variant: 'info') - if issue.assignees.any? %li.gl-display-flex = render 'shared/issuable/assignees', project: @project, issuable: issue diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml index f9798d25b06..90d99d51d29 100644 --- a/app/views/projects/issues/_new_branch.html.haml +++ b/app/views/projects/issues/_new_branch.html.haml @@ -11,18 +11,18 @@ .create-mr-dropdown-wrap.d-inline-block.full-width-mobile.js-create-mr{ data: { project_path: @project.full_path, project_id: @project.id, can_create_path: can_create_path, create_mr_path: create_mr_path(from: @issue.to_branch_name, source_project: @project, to: @project.default_branch, mr_params: { issue_iid: @issue.iid }), create_branch_path: create_branch_path, refs_path: refs_path, is_confidential: can_create_confidential_merge_request?.to_s } } .btn-group.unavailable - %button.gl-button.btn{ type: 'button', disabled: 'disabled' } + = render Pajamas::ButtonComponent.new(button_options: { disabled: 'disabled' }) do = gl_loading_icon(inline: true, css_class: 'js-create-mr-spinner gl-button-icon gl-display-none') %span.text - Checking branch availability… + = _('Checking branch availability…') + .btn-group.available.hidden - %button.gl-button.btn.js-create-merge-request.btn-confirm{ type: 'button', data: { action: data_action } } - = gl_loading_icon(css_class: 'js-create-mr-spinner js-spinner gl-mr-2 gl-display-none') + = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'js-create-merge-request', data: { action: data_action } }) do + = gl_loading_icon(inline: true , css_class: 'js-create-mr-spinner js-spinner gl-display-none') = value - %button.gl-button.btn.btn-confirm.btn-icon.dropdown-toggle.create-merge-request-dropdown-toggle.js-dropdown-toggle{ type: 'button', data: { dropdown: { trigger: '#create-merge-request-dropdown' }, display: 'static' } } - = sprite_icon('chevron-down') + = render Pajamas::ButtonComponent.new(variant: :confirm, icon: 'chevron-down', button_options: { class: 'js-dropdown-toggle dropdown-toggle create-merge-request-dropdown-toggle', data: { 'dropdown-trigger': '#create-merge-request-dropdown', display: 'static' } }) .droplab-dropdown %ul#create-merge-request-dropdown.create-merge-request-dropdown-menu.dropdown-menu.dropdown-menu-right.gl-show-field-errors{ class: ("create-confidential-merge-request-dropdown-menu" if can_create_confidential_merge_request?), data: { dropdown: true } } @@ -57,7 +57,7 @@ %span.js-ref-message.form-text .form-group - %button.btn.gl-button.btn-confirm.js-create-target{ type: 'button', data: { action: 'create-mr' } } + = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'js-create-target', data: { action: 'create-mr' } }) do = create_mr_text - if can_create_confidential_merge_request? diff --git a/app/views/projects/issues/_related_branches.html.haml b/app/views/projects/issues/_related_branches.html.haml index 466eca2fdb0..3d6a266dc4d 100644 --- a/app/views/projects/issues/_related_branches.html.haml +++ b/app/views/projects/issues/_related_branches.html.haml @@ -1,12 +1,24 @@ - if @related_branches.any? - %h2.gl-font-lg - = pluralize(@related_branches.size, 'Related Branch') - %ul.related-merge-requests.gl-pl-0.gl-mb-3 - - @related_branches.each do |branch| - %li.gl-display-flex.gl-align-items-center - - if branch[:pipeline_status].present? - %span.related-branch-ci-status - = render 'ci/status/icon', status: branch[:pipeline_status] - %span.related-branch-info - %strong - = link_to branch[:name], branch[:link], class: "ref-name" + - if @related_branches.any? + = render Pajamas::CardComponent.new(card_options: { class: 'gl-bg-gray-10 gl-mt-5 gl-mb-0' }, header_options: { class: 'gl-bg-white gl-pl-5 gl-pr-4 gl-py-4' } , body_options: { class: 'gl-py-3 gl-px-4' }) do |c| + - c.with_header do + %h3.card-title.h5.gl-my-0.gl-display-flex.gl-align-items-center.gl-flex-grow-1.gl-relative.gl-line-height-24 + = link_to "", "#related-branches", class: "gl-link anchor position-absolute gl-text-decoration-none", "aria-hidden": true + = _('Related branches') + .gl-display-inline-flex.gl-mx-3.gl-text-gray-500 + .gl-display-inline-flex.gl-align-items-center + = sprite_icon('branch', css_class: "gl-mr-2 gl-text-gray-500 gl-icon") + = @related_branches.size + - c.with_body do + %ul.related-merge-requests.content-list.gl-p-3! + - @related_branches.each do |branch| + %li.list-item{ class: "gl-py-0! gl-border-0!" } + .item-body.gl-display-flex.align-items-center.gl-px-3.gl-pr-2.gl-mx-n2 + .item-contents.gl-display-flex.gl-align-items-center.gl-flex-wrap.gl-flex-grow-1.gl-min-h-7 + .item-title.gl-display-flex.mb-xl-0.gl-min-w-0 + - if branch[:pipeline_status].present? + %span.related-branch-ci-status + = render 'ci/status/icon', status: branch[:pipeline_status] + %span.related-branch-info + %strong + = link_to branch[:name], branch[:link], class: "ref-name" diff --git a/app/views/projects/issues/_related_issues.html.haml b/app/views/projects/issues/_related_issues.html.haml index 80f2b8b189c..2409c61fbf2 100644 --- a/app/views/projects/issues/_related_issues.html.haml +++ b/app/views/projects/issues/_related_issues.html.haml @@ -5,4 +5,5 @@ has_issue_weights_feature: @project.licensed_feature_available?(:issue_weights).to_s, help_path: help_page_path('user/project/issues/related_issues'), show_categorized_issues: @project.licensed_feature_available?(:blocked_issues).to_s, - has_iterations_feature: @project.licensed_feature_available?(:iterations).to_s } } + has_iterations_feature: @project.licensed_feature_available?(:iterations).to_s, + report_abuse_path: add_category_abuse_reports_path } } diff --git a/app/views/projects/issues/_work_item_links.html.haml b/app/views/projects/issues/_work_item_links.html.haml index 3deceacec8d..981021c97e6 100644 --- a/app/views/projects/issues/_work_item_links.html.haml +++ b/app/views/projects/issues/_work_item_links.html.haml @@ -1,5 +1,5 @@ -.js-work-item-links-root{ data: { issuable_id: @issue.id, iid: @issue.iid, - project_path: @project.full_path, +.js-work-item-links-root{ data: { issuable_id: @issue.id, + full_path: @project.full_path, wi: work_items_index_data(@project), register_path: new_user_registration_path(redirect_to_referer: 'yes'), sign_in_path: new_session_path(:user, redirect_to_referer: 'yes') } } diff --git a/app/views/projects/issues/new.html.haml b/app/views/projects/issues/new.html.haml index 617579cdd6f..d344ae6a4e6 100644 --- a/app/views/projects/issues/new.html.haml +++ b/app/views/projects/issues/new.html.haml @@ -2,7 +2,7 @@ - breadcrumb_title _("New") - page_title _("New Issue") -.top-area.gl-lg-flex-direction-row.gl-border-bottom-0 +.page-title-holder %h1.page-title.gl-font-size-h-display= _("New Issue") = render "form" diff --git a/app/views/projects/issues/service_desk/_alert_moved_from_service_desk.html.haml b/app/views/projects/issues/service_desk/_alert_moved_from_service_desk.html.haml index cc8d5bdaeec..b087a1d0151 100644 --- a/app/views/projects/issues/service_desk/_alert_moved_from_service_desk.html.haml +++ b/app/views/projects/issues/service_desk/_alert_moved_from_service_desk.html.haml @@ -4,5 +4,5 @@ = render Pajamas::AlertComponent.new(variant: :warning, alert_options: { class: 'hide js-alert-moved-from-service-desk-warning gl-mt-5' }) do |c| - = c.body do + - c.with_body do = s_('This project does not have %{service_desk_link_start}Service Desk%{service_desk_link_end} enabled, so the user who created the issue will no longer receive email notifications about new activity.').html_safe % { service_desk_link_start: service_desk_link_start, service_desk_link_end: '</a>'.html_safe } diff --git a/app/views/projects/issues/service_desk/_nav_btns.html.haml b/app/views/projects/issues/service_desk/_nav_btns.html.haml index 8d16c3d978f..a0a290f340a 100644 --- a/app/views/projects/issues/service_desk/_nav_btns.html.haml +++ b/app/views/projects/issues/service_desk/_nav_btns.html.haml @@ -1,20 +1,34 @@ - show_feed_buttons = local_assigns.fetch(:show_feed_buttons, true) - show_import_button = local_assigns.fetch(:show_import_button, true) && can?(current_user, :import_issues, @project) - show_export_button = local_assigns.fetch(:show_export_button, true) -- issuable_type = 'issues' +- issuable_type = 'issue' - can_edit = can?(current_user, :admin_project, @project) - notification_email = @current_user.present? ? @current_user.notification_email_or_default : nil .nav-controls.issues-nav-controls.gl-font-size-0 - - if show_feed_buttons - = render 'shared/issuable/feed_buttons' - - .js-csv-import-export-buttons{ data: { show_export_button: show_export_button.to_s, show_import_button: show_import_button.to_s, issuable_type: issuable_type, issuable_count: issuables_count_for_state(issuable_type.to_sym, params[:state]), email: notification_email, export_csv_path: export_csv_project_issues_path(@project, request.query_parameters), import_csv_issues_path: import_csv_namespace_project_issues_path, container_class: 'gl-mr-3', can_edit: can_edit.to_s, project_import_jira_path: project_import_jira_path(@project), max_attachment_size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes) } } - - if @can_bulk_update - = button_tag _("Edit issues"), class: "gl-button btn btn-default gl-mr-3 js-bulk-update-toggle" + = button_tag _("Bulk edit"), class: "gl-button btn btn-default gl-mr-3 js-bulk-update-toggle" - if show_new_issue_link?(@project) = link_to _("New issue"), new_project_issue_path(@project, issue: { milestone_id: finder.milestones.first.try(:id) }), - class: "gl-button btn btn-confirm", + class: "gl-button btn btn-confirm gl-mr-3", id: "new_issue_link" + +.dropdown.gl-dropdown + = button_tag type: 'button', class: "btn dropdown-toggle btn-default btn-md gl-button gl-dropdown gl-dropdown-toggle btn-default-tertiary dropdown-icon-only dropdown-toggle-no-caret has-tooltip gl-display-none! gl-md-display-inline-flex!", data: { toggle: 'dropdown', title: _('Actions') } do + = sprite_icon "ellipsis_v", size: 16, css_class: "dropdown-icon gl-icon" + %span.gl-sr-only + = _('Actions') + = button_tag type: 'button', class: "btn dropdown-toggle btn-default btn-md btn-block gl-button gl-dropdown-toggle gl-md-display-none!", data: { 'toggle' => 'dropdown' } do + %span.gl-dropdown-button-text= _('Actions') + = sprite_icon "chevron-down", size: 16, css_class: "dropdown-icon gl-icon" + .dropdown-menu.dropdown-menu-right + .gl-dropdown-inner + .gl-dropdown-contents + %ul + .js-csv-import-export-buttons{ data: { show_export_button: show_export_button.to_s, show_import_button: show_import_button.to_s, issuable_type: issuable_type, issuable_count: issuables_count_for_state(issuable_type.to_sym, params[:state]), email: notification_email, export_csv_path: export_csv_project_issues_path(@project, request.query_parameters), import_csv_issues_path: import_csv_namespace_project_issues_path, can_edit: can_edit.to_s, project_import_jira_path: project_import_jira_path(@project), max_attachment_size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes) } } + %li.gl-dropdown-divider + %hr.dropdown-divider + %li.gl-dropdown-item + - if show_feed_buttons + = render 'shared/issuable/feed_buttons' diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index a8edf87b696..7e8bf4ae57f 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -8,4 +8,3 @@ - add_page_specific_style 'page_bundles/work_items' = render 'projects/issuable/show', issuable: @issue, api_awards_path: award_emoji_issue_api_path(@issue) -= render 'projects/invite_members_modal', project: @project diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml index f95689c0b1d..ce7006001c7 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -9,18 +9,20 @@ #js-promote-label-modal = render 'shared/labels/nav', labels_or_filters: labels_or_filters, can_admin_label: can_admin_label - .labels-container.gl-mt-5 - - if can_admin_label && search.blank? - %p.text-muted - = _('Labels can be applied to issues and merge requests. Star a label to make it a priority label.') + - if can_admin_label && search.blank? + %p.text-muted.gl-mt-5 + = _('Labels can be applied to issues and merge requests. Star a label to make it a priority label.') + .labels-container -# Only show it in the first page - hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1') - .prioritized-labels.gl-mb-7{ class: [('hide' if hide), ('is-not-draggable' unless can_admin_label)] } - %h4.gl-mt-3= _('Prioritized Labels') - %p.text-muted - = _('Drag to reorder prioritized labels and change their relative priority.') - .manage-labels-list.js-prioritized-labels{ data: { url: set_priorities_project_labels_path(@project), sortable: can_admin_label } } + .prioritized-labels.gl-rounded-base.gl-border.gl-bg-gray-10.gl-mt-4{ class: [('hide' if hide), ('is-not-draggable' unless can_admin_label)] } + .gl-px-5.gl-py-4.gl-bg-white.gl-rounded-base.gl-border-b{ class: 'gl-rounded-bottom-left-none! gl-rounded-bottom-right-none!' } + %h3.card-title.h5.gl-m-0.gl-relative.gl-line-height-24 + = _('Prioritized labels') + .gl-font-sm.gl-font-weight-semibold.gl-text-gray-500 + = _('Drag to reorder prioritized labels and change their relative priority.') + .js-prioritized-labels.gl-px-3.gl-rounded-base.manage-labels-list{ data: { url: set_priorities_project_labels_path(@project), sortable: can_admin_label } } #js-priority-labels-empty-state.priority-labels-empty-state{ class: "#{'hidden' unless @prioritized_labels.empty? && search.blank?}" } = render 'shared/empty_states/priority_labels' - if @prioritized_labels.any? @@ -30,16 +32,18 @@ = _('No prioritized labels with such name or description') - if @labels.any? - .other-labels - %h4{ class: ('hide' if hide) }= _('Other Labels') - .manage-labels-list.js-other-labels + .other-labels.gl-rounded-base.gl-border.gl-bg-gray-10.gl-mt-4 + .gl-px-5.gl-py-4.gl-bg-white.gl-rounded-base.gl-border-b{ class: 'gl-rounded-bottom-left-none! gl-rounded-bottom-right-none!' } + %h3.card-title.h5.gl-m-0.gl-relative.gl-line-height-24{ class: ('hide' if hide) }= _('Other labels') + .js-other-labels.gl-px-3.gl-rounded-base.manage-labels-list = render partial: 'shared/label', collection: @labels, as: :label, locals: { subject: @project } = paginate @labels, theme: 'gitlab' + - elsif search.present? .other-labels - if @available_labels.any? %h4 - = _('Other Labels') + = _('Other labels') .nothing-here-block = _('No other labels with such name or description') - else @@ -53,5 +57,5 @@ = render 'shared/empty_states/labels' %template#js-badge-item-template - %li.js-priority-badge.inline.gl-ml-3 - .label-badge.gl-bg-blue-50= _('Prioritized label') + %li.js-priority-badge.inline.gl-mr-3 + .label-badge.gl-bg-blue-50= _('Prioritized') diff --git a/app/views/projects/mattermosts/_team_selection.html.haml b/app/views/projects/mattermosts/_team_selection.html.haml index 98221125443..397f96d6846 100644 --- a/app/views/projects/mattermosts/_team_selection.html.haml +++ b/app/views/projects/mattermosts/_team_selection.html.haml @@ -2,7 +2,7 @@ This service will be installed on the Mattermost instance at %strong= link_to Gitlab.config.mattermost.host, Gitlab.config.mattermost.host %hr -= form_for(:mattermost, method: :post, url: project_mattermost_path(@project), html: { class: 'js-requires-input' }) do |f| += gitlab_ui_form_for(:mattermost, method: :post, url: project_mattermost_path(@project), html: { class: 'js-requires-input' }) do |f| %h4 Team %p = @teams.one? ? 'The team' : 'Select the team' @@ -42,5 +42,6 @@ %hr .clearfix .float-right - = link_to _('Cancel'), edit_project_settings_integration_path(@project, @integration), class: 'gl-button btn btn-lg' - = f.submit 'Install', class: 'gl-button btn btn-confirm btn-lg' + = render Pajamas::ButtonComponent.new(href: edit_project_settings_integration_path(@project, @integration)) do + = _('Cancel') + = f.submit s_('MattermostService|Install'), pajamas_button: true diff --git a/app/views/projects/mattermosts/new.html.haml b/app/views/projects/mattermosts/new.html.haml index 8254198bd41..c73c256c1c3 100644 --- a/app/views/projects/mattermosts/new.html.haml +++ b/app/views/projects/mattermosts/new.html.haml @@ -2,11 +2,10 @@ - add_to_breadcrumbs @integration.title, scoped_edit_integration_path(@integration, project: @project, group: @group) - breadcrumb_title _('New') - page_title @integration.title, _('Integrations') -- @content_class = 'limit-container-width' unless fluid_layout - if @teams_error_message = render Pajamas::AlertComponent.new(variant: :danger) do |c| - = c.body do + - c.with_body do = @teams_error_message %h3 diff --git a/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml b/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml index 92b0a5a0b90..9bfa0e7a309 100644 --- a/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml +++ b/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml @@ -1,7 +1,8 @@ - display_issuable_type = issuable_display_type(@merge_request) .btn-group.gl-md-ml-3.gl-display-flex.dropdown.gl-dropdown.gl-md-w-auto.gl-w-full - = button_tag type: 'button', class: "btn dropdown-toggle btn-default btn-md gl-button gl-dropdown-toggle btn-default-tertiary dropdown-icon-only dropdown-toggle-no-caret has-tooltip gl-display-none! gl-md-display-inline-flex!", data: { toggle: 'dropdown', title: _('Merge request actions'), testid: 'merge-request-actions', 'aria-label': _('Merge request actions') } do + %span.js-sidebar-header-popover + = button_tag type: 'button', id: "new-actions-header-dropdown", class: "btn dropdown-toggle btn-default btn-md gl-button gl-dropdown-toggle btn-default-tertiary dropdown-icon-only dropdown-toggle-no-caret gl-display-none! gl-md-display-inline-flex!", title: _('Merge request actions'), 'aria-label': _('Merge request actions'), data: { toggle: 'dropdown', testid: 'merge-request-actions' } do = sprite_icon "ellipsis_v", size: 16, css_class: "dropdown-icon gl-icon" = button_tag type: 'button', class: "btn dropdown-toggle btn-default btn-md btn-block gl-button gl-dropdown-toggle gl-md-display-none!", data: { 'toggle' => 'dropdown' } do %span.gl-dropdown-button-text= _('Merge request actions') diff --git a/app/views/projects/merge_requests/_code_dropdown.html.haml b/app/views/projects/merge_requests/_code_dropdown.html.haml index 2ef89a7bf04..4cab6fac388 100644 --- a/app/views/projects/merge_requests/_code_dropdown.html.haml +++ b/app/views/projects/merge_requests/_code_dropdown.html.haml @@ -32,7 +32,7 @@ %li.gl-dropdown-item = link_to merge_request_path(@merge_request, format: :patch), class: 'dropdown-item', download: '', data: { qa_selector: 'download_email_patches_menu_item' } do .gl-dropdown-item-text-wrapper - = _('Email patches') + = _('Patches') %li.gl-dropdown-item = link_to merge_request_path(@merge_request, format: :diff), class: 'dropdown-item', download: '', data: { qa_selector: 'download_plain_diff_menu_item' } do .gl-dropdown-item-text-wrapper diff --git a/app/views/projects/merge_requests/_description.html.haml b/app/views/projects/merge_requests/_description.html.haml index 1dd4cc6495c..5590f9e6184 100644 --- a/app/views/projects/merge_requests/_description.html.haml +++ b/app/views/projects/merge_requests/_description.html.haml @@ -1,6 +1,6 @@ %div - if @merge_request.description.present? - .description{ class: can?(current_user, :update_merge_request, @merge_request) ? 'js-task-list-container' : '' , data: { qa_selector: 'description_content' } } + .description{ class: ['gl-mt-4!', can?(current_user, :update_merge_request, @merge_request) ? 'js-task-list-container' : ''], data: { qa_selector: 'description_content' } } .md = markdown_field(@merge_request, :description) %textarea.hidden.js-task-list-field{ data: { value: @merge_request.description } } diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index b96d869e9d7..9142893d400 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -4,7 +4,7 @@ = render Pajamas::CheckboxTagComponent.new(name: dom_id(merge_request, "selected"), value: nil, checkbox_options: { 'data-id' => merge_request.id }) do |c| - = c.label do + - c.with_label do %span.gl-sr-only = merge_request.title @@ -15,43 +15,42 @@ = hidden_merge_request_icon(merge_request) = link_to merge_request.title, merge_request_path(merge_request), class: 'js-prefetch-document' - if merge_request.tasks? - %span.task-status.d-none.d-sm-inline-block + %span.task-status.d-none.d-sm-inline-block.gl-font-sm = merge_request.task_status .issuable-info %span.issuable-reference #{issuable_reference(merge_request)} - %span.issuable-authored.d-none.d-sm-inline-block + %span.issuable-authored.d-none.d-sm-inline-block.gl-text-gray-500! · - #{s_('IssueList|created %{timeAgoString} by %{user}').html_safe % { timeAgoString: time_ago_with_tooltip(merge_request.created_at, placement: 'bottom'), user: link_to_member(@project, merge_request.author, avatar: false) }} + #{s_('IssueList|created %{timeAgoString} by %{user}').html_safe % { timeAgoString: time_ago_with_tooltip(merge_request.created_at, placement: 'bottom'), user: link_to_member(@project, merge_request.author, avatar: false, extra_class: 'gl-text-gray-500!') }} = render_if_exists 'shared/issuable/gitlab_team_member_badge', author: merge_request.author - if merge_request.milestone - %span.issuable-milestone.d-none.d-sm-inline-block + %span.issuable-milestone.d-none.d-sm-inline-block.gl-text-truncate.gl-max-w-26.gl-vertical-align-bottom - = link_to project_merge_requests_path(merge_request.project, milestone_title: merge_request.milestone.title), data: { html: 'true', toggle: 'tooltip', title: milestone_tooltip_due_date(merge_request.milestone) } do - = sprite_icon('clock', css_class: 'gl-vertical-align-text-bottom') + = link_to project_merge_requests_path(merge_request.project, milestone_title: merge_request.milestone.title), class: 'gl-text-gray-500!', data: { html: 'true', toggle: 'tooltip', title: milestone_tooltip_due_date(merge_request.milestone) } do + = sprite_icon('clock', size: 12, css_class: 'gl-vertical-align-text-bottom') = merge_request.milestone.title - if merge_request.target_project.default_branch != merge_request.target_branch - %span.project-ref-path.has-tooltip{ title: _('Target branch') } + %span.project-ref-path.has-tooltip.d-inline-block.gl-text-truncate.gl-max-w-26.gl-vertical-align-bottom{ title: _('Target branch: %{target_branch}') % {target_branch: merge_request.target_branch} } - = link_to project_ref_path(merge_request.project, merge_request.target_branch), class: 'ref-name' do + = link_to project_ref_path(merge_request.project, merge_request.target_branch), class: 'ref-name gl-text-gray-500!' do = sprite_icon('branch', size: 12, css_class: 'fork-sprite') = merge_request.target_branch - if merge_request.labels.any? - - - presented_labels_sorted_by_title(merge_request.labels, merge_request.project).each do |label| - = link_to_label(label, type: :merge_request, small: true) + .gl-mt-1{ role: 'group', 'aria-label': _('Labels') } + - presented_labels_sorted_by_title(merge_request.labels, merge_request.project).each do |label| + = link_to_label(label, type: :merge_request, small: true) .issuable-meta %ul.controls.d-flex.align-items-end - if merge_request.merged? - %li.issuable-status.d-none.d-sm-inline-block - = _('MERGED') + %li.d-none.d-sm-flex + = render Pajamas::BadgeComponent.new(_('Merged'), size: 'sm', variant: 'info') - elsif merge_request.closed? - %li.issuable-status.d-none.d-sm-inline-block - = sprite_icon('cancel', css_class: 'gl-vertical-align-text-bottom') - = _('CLOSED') + %li.d-none.d-sm-flex + = render Pajamas::BadgeComponent.new(_('Closed'), size: 'sm', variant: 'danger') = render 'shared/merge_request_pipeline_status', merge_request: merge_request - if merge_request.open? && merge_request.broken? %li.issuable-pipeline-broken.d-none.d-sm-flex @@ -67,6 +66,7 @@ = render 'shared/issuable_meta_data', issuable: merge_request - .float-right.issuable-updated-at.d-none.d-sm-inline-block - %span - = _('updated %{time_ago}').html_safe % { time_ago: time_ago_with_tooltip(merge_request.updated_at, placement: 'bottom', html_class: 'merge_request_updated_ago') } + - if merge_request.updated_at != merge_request.created_at + .float-right.issuable-updated-at.d-none.d-sm-inline-block.gl-text-gray-500 + %span + = _('updated %{time_ago}').html_safe % { time_ago: time_ago_with_tooltip(merge_request.updated_at, placement: 'bottom', html_class: 'merge_request_updated_ago') } diff --git a/app/views/projects/merge_requests/_mr_box.html.haml b/app/views/projects/merge_requests/_mr_box.html.haml index 901a2ebfd1e..6f662b81dd7 100644 --- a/app/views/projects/merge_requests/_mr_box.html.haml +++ b/app/views/projects/merge_requests/_mr_box.html.haml @@ -1,3 +1,3 @@ -.detail-page-description.py-2.gl-display-flex.gl-align-items-center.gl-flex-wrap{ class: "#{'is-merge-request' if moved_mr_sidebar_enabled? && !fluid_layout}" } +.detail-page-description.gl-pt-2.gl-pb-4.gl-display-flex.gl-align-items-center.gl-flex-wrap{ class: "#{'is-merge-request' if moved_mr_sidebar_enabled? && !fluid_layout}" } = render 'shared/issuable/status_box', issuable: @merge_request = merge_request_header(@project, @merge_request) diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml index 9d25603994a..15339becb74 100644 --- a/app/views/projects/merge_requests/_mr_title.html.haml +++ b/app/views/projects/merge_requests/_mr_title.html.haml @@ -1,4 +1,3 @@ -- @no_breadcrumb_border = true - can_update_merge_request = can?(current_user, :update_merge_request, @merge_request) - can_reopen_merge_request = can?(current_user, :reopen_merge_request, @merge_request) - are_close_and_open_buttons_hidden = merge_request_button_hidden?(@merge_request, true) && merge_request_button_hidden?(@merge_request, false) @@ -10,10 +9,10 @@ = render Pajamas::AlertComponent.new(alert_options: { class: 'gl-mb-5' }, variant: :danger, dismissible: false) do |c| - = c.body do + - c.with_body do = _('The source project of this merge request has been removed.') - .detail-page-header.border-bottom-0.pt-0.pb-0.gl-display-block{ class: "gl-md-display-flex! #{'is-merge-request' if moved_mr_sidebar_enabled? && !fluid_layout}" } + .detail-page-header.border-bottom-0.gl-display-block.gl-pt-5{ class: "gl-md-display-flex! #{'is-merge-request' if moved_mr_sidebar_enabled? && !fluid_layout}" } .detail-page-header-body .issuable-meta.gl-display-flex #js-issuable-header-warnings{ data: { hidden: @merge_request.hidden?.to_s } } @@ -27,7 +26,8 @@ .detail-page-header-actions.gl-align-self-start.is-merge-request.js-issuable-actions.gl-display-flex - if can_update_merge_request - = link_to _('Edit'), edit_project_merge_request_path(@project, @merge_request), class: "gl-display-none gl-md-display-block btn gl-button btn-default js-issuable-edit", data: { qa_selector: "edit_button" } + = render Pajamas::ButtonComponent.new(href: edit_project_merge_request_path(@project, @merge_request), button_options: {class: "gl-display-none gl-md-display-block js-issuable-edit", data: { qa_selector: "edit_button" }}) do + = _('Edit') - if @merge_request.source_project = render 'projects/merge_requests/code_dropdown' diff --git a/app/views/projects/merge_requests/_nav_btns.html.haml b/app/views/projects/merge_requests/_nav_btns.html.haml index 1efea6a1d37..80085cc6a34 100644 --- a/app/views/projects/merge_requests/_nav_btns.html.haml +++ b/app/views/projects/merge_requests/_nav_btns.html.haml @@ -1,12 +1,27 @@ -- issuable_type = 'merge-requests' +- issuable_type = 'merge_request' - notification_email = @current_user.present? ? @current_user.notification_email_or_default : nil -= render 'shared/issuable/feed_buttons', show_calendar_button: false -.js-csv-import-export-buttons{ data: { show_export_button: "true", issuable_type: issuable_type, issuable_count: issuables_count_for_state(issuable_type.to_sym, params[:state]), email: notification_email, export_csv_path: export_csv_project_merge_requests_path(@project, request.query_parameters), container_class: 'gl-mr-3' } } - - if @can_bulk_update = render Pajamas::ButtonComponent.new(type: :submit, button_options: { class: 'gl-mr-3 js-bulk-update-toggle' }) do - = _("Edit merge requests") + = _("Bulk edit") - if merge_project = render Pajamas::ButtonComponent.new(href: new_merge_request_path, variant: :confirm) do = _("New merge request") + +.dropdown.gl-dropdown + = button_tag type: 'button', class: "btn dropdown-toggle btn-default btn-md gl-button gl-dropdown gl-dropdown-toggle btn-default-tertiary dropdown-icon-only dropdown-toggle-no-caret has-tooltip gl-display-none! gl-md-display-inline-flex!", data: { toggle: 'dropdown', title: _('Actions') } do + = sprite_icon "ellipsis_v", size: 16, css_class: "dropdown-icon gl-icon" + %span.gl-sr-only + = _('Actions') + = button_tag type: 'button', class: "btn dropdown-toggle btn-default btn-md btn-block gl-button gl-dropdown-toggle gl-md-display-none!", data: { 'toggle' => 'dropdown' } do + %span.gl-dropdown-button-text= _('Actions') + = sprite_icon "chevron-down", size: 16, css_class: "dropdown-icon gl-icon" + .dropdown-menu.dropdown-menu-right + .gl-dropdown-inner + .gl-dropdown-contents + %ul + .js-csv-import-export-buttons{ data: { show_export_button: "true", issuable_type: issuable_type, issuable_count: issuables_count_for_state(issuable_type.to_sym, params[:state]), email: notification_email, export_csv_path: export_csv_project_merge_requests_path(@project, request.query_parameters) } } + %li.gl-dropdown-divider + %hr.dropdown-divider + %li.gl-dropdown-item + = render 'shared/issuable/feed_buttons', show_calendar_button: false diff --git a/app/views/projects/merge_requests/_page.html.haml b/app/views/projects/merge_requests/_page.html.haml index 880bffc43ab..3e56148f777 100644 --- a/app/views/projects/merge_requests/_page.html.haml +++ b/app/views/projects/merge_requests/_page.html.haml @@ -16,7 +16,7 @@ - add_page_specific_style 'page_bundles/ci_status' - add_page_startup_api_call @endpoint_metadata_url -- if mr_action == 'diffs' +- if mr_action == 'diffs' && (!@file_by_file_default || !single_file_file_by_file?) - add_page_startup_api_call @endpoint_diff_batch_url .merge-request{ data: { mr_action: mr_action, url: merge_request_path(@merge_request, format: :json), project_path: project_path(@merge_request.project), lock_version: @merge_request.lock_version, diffs_batch_cache_key: @diffs_batch_cache_key } } @@ -36,7 +36,7 @@ = render "projects/merge_requests/tabs/tab", name: "commits", class: "commits-tab", qa_selector: "commits_tab" do = tab_link_for @merge_request, :commits do = _("Commits") - = gl_badge_tag @commits_count, { size: :sm } + = gl_badge_tag tab_count_display(@merge_request, @commits_count), { size: :sm }, { class: 'js-commits-count' } - if @project.builds_enabled? = render "projects/merge_requests/tabs/tab", name: "pipelines", class: "pipelines-tab" do = tab_link_for @merge_request, :pipelines do @@ -45,7 +45,7 @@ = render "projects/merge_requests/tabs/tab", name: "diffs", class: "diffs-tab js-diffs-tab", id: "diffs-tab", qa_selector: "diffs_tab" do = tab_link_for @merge_request, :diffs do = _("Changes") - = gl_badge_tag @diffs_count, { size: :sm } + = gl_badge_tag tab_count_display(@merge_request, @diffs_count), { size: :sm } .d-flex.flex-wrap.align-items-center.justify-content-lg-end #js-vue-discussion-counter{ data: { blocks_merge: @project.only_allow_merge_if_all_discussions_are_resolved?.to_s } } - if moved_mr_sidebar_enabled? @@ -81,7 +81,8 @@ help_page_path: suggest_changes_help_path, current_user_data: @current_user_data, is_locked: @merge_request.discussion_locked.to_s, - report_abuse_path: add_category_abuse_reports_path } } + report_abuse_path: add_category_abuse_reports_path, + new_comment_template_path: profile_comment_templates_path } } - if moved_mr_sidebar_enabled? = render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, reviewers: @merge_request.reviewers, source_branch: @merge_request.source_branch @@ -90,7 +91,7 @@ = render "projects/merge_requests/tabs/pane", name: "pipelines", id: "pipelines", class: "pipelines" do - if @project.builds_enabled? = render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_project_merge_request_path(@project, @merge_request) - - params = request.query_parameters.merge(diff_head: true) + - params = request.query_parameters.merge(ck: @diffs_batch_cache_key, 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 @@ -105,10 +106,9 @@ - if @merge_request.can_be_cherry_picked? = render "projects/commit/change", type: 'cherry-pick', commit: @merge_request.merge_commit -#js-review-bar +#js-review-bar{ data: { new_comment_template_path: profile_comment_templates_path } } - if current_user && Feature.enabled?(:mr_experience_survey, current_user) #js-mr-experience-survey{ data: { account_age: current_user.account_age_in_days } } -= render 'projects/invite_members_modal', project: @project = render 'shared/web_ide_path' diff --git a/app/views/projects/merge_requests/_widget.html.haml b/app/views/projects/merge_requests/_widget.html.haml index 4f6983c6fe3..576fed58609 100644 --- a/app/views/projects/merge_requests/_widget.html.haml +++ b/app/views/projects/merge_requests/_widget.html.haml @@ -11,12 +11,12 @@ window.gl.mrWidgetData.ci_troubleshooting_docs_path = '#{help_page_path('ci/troubleshooting.md')}'; window.gl.mrWidgetData.mr_troubleshooting_docs_path = '#{help_page_path('user/project/merge_requests/reviews/index.md', anchor: 'troubleshooting')}'; window.gl.mrWidgetData.pipeline_must_succeed_docs_path = '#{help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds.md', anchor: 'require-a-successful-pipeline-for-merge')}'; - window.gl.mrWidgetData.security_approvals_help_page_path = '#{help_page_path('user/application_security/index.md', anchor: 'security-approvals-in-merge-requests')}'; + window.gl.mrWidgetData.code_coverage_check_help_page_path = '#{help_page_path('ci/testing/code_coverage.md', anchor: 'coverage-check-approval-rule')}'; window.gl.mrWidgetData.security_configuration_path = '#{project_security_configuration_path(@project)}'; - window.gl.mrWidgetData.license_compliance_docs_path = '#{help_page_path('user/compliance/license_compliance/index.md', anchor: 'policies')}'; + window.gl.mrWidgetData.license_compliance_docs_path = '#{help_page_path('user/compliance/license_compliance/index.md')}'; window.gl.mrWidgetData.eligible_approvers_docs_path = '#{help_page_path('user/project/merge_requests/approvals/rules.md', anchor: 'eligible-approvers')}'; window.gl.mrWidgetData.approvals_help_path = '#{help_page_path("user/project/merge_requests/approvals/index.md")}'; - window.gl.mrWidgetData.pipelines_empty_svg_path = '#{image_path('illustrations/pipelines_empty.svg')}'; + window.gl.mrWidgetData.pipelines_empty_svg_path = '#{image_path('illustrations/empty-state/empty-pipeline-md.svg')}'; window.gl.mrWidgetData.codequality_help_path = '#{help_page_path("user/project/merge_requests/code_quality", anchor: "code-quality-reports")}'; window.gl.mrWidgetData.false_positive_doc_url = '#{help_page_path('user/application_security/vulnerabilities/index')}'; window.gl.mrWidgetData.can_view_false_positive = '#{@merge_request.project.licensed_feature_available?(:sast_fp_reduction).to_s}'; diff --git a/app/views/projects/merge_requests/conflicts/show.html.haml b/app/views/projects/merge_requests/conflicts/show.html.haml index a882196ffa2..3facca4d4f7 100644 --- a/app/views/projects/merge_requests/conflicts/show.html.haml +++ b/app/views/projects/merge_requests/conflicts/show.html.haml @@ -1,3 +1,6 @@ +- add_to_breadcrumbs _("Merge requests"), project_merge_requests_path(@project) +- add_to_breadcrumbs @merge_request.to_reference, project_merge_request_path(@project, @merge_request) +- breadcrumb_title _("Merge conflicts") - page_title _("Merge Conflicts"), "#{@merge_request.title} (#{@merge_request.to_reference}", _("Merge requests") - add_page_specific_style 'page_bundles/merge_conflicts' 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 1246c45a529..35e8b30e6e9 100644 --- a/app/views/projects/merge_requests/creations/_new_submit.html.haml +++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml @@ -10,12 +10,24 @@ - if params[:nav_source].present? = hidden_field_tag(:nav_source, params[:nav_source]) -.mr-compare.merge-request.js-merge-request-new-submit{ 'data-mr-submit-action': "#{j params[:tab].presence || 'new'}" } +.mr-compare.merge-request.js-merge-request-new-submit.gl-mt-5{ 'data-mr-submit-action': "#{j params[:tab].presence || 'new'}" } - if @commits.empty? - .commits-empty - %h4 - = _("There are no commits yet.") - = custom_icon ('illustration_no_commits') + .merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') } + .merge-request-tabs-container.gl-display-flex.gl-justify-content-space-between + .scrolling-tabs-container.inner-page-scroll-tabs.is-smaller + .fade-left= sprite_icon('chevron-lg-left', size: 12) + .fade-right= sprite_icon('chevron-lg-right', size: 12) + %ul.merge-request-tabs.nav.nav-tabs.nav-links.no-top.no-bottom.gl-display-flex.gl-flex-nowrap.gl-m-0.gl-p-0.js-tabs-affix + %li.commits-tab.new-tab + = link_to url_for(safe_params), data: {target: 'div#commits', action: 'new', toggle: 'tabvue'} do + = _("Commits") + = gl_badge_tag @total_commit_count, { size: :sm }, { class: 'gl-tab-counter-badge' } + + #diff-notes-app.tab-content + #new.commits.tab-pane.active + .commits-empty.gl-text-left.gl-my-5.gl-text-gray-500 + %p + = _("There are no commits yet.") - else .merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') } .merge-request-tabs-container.gl-display-flex.gl-justify-content-space-between diff --git a/app/views/projects/merge_requests/invalid.html.haml b/app/views/projects/merge_requests/invalid.html.haml index 4596fcd280d..4ea33cbbd99 100644 --- a/app/views/projects/merge_requests/invalid.html.haml +++ b/app/views/projects/merge_requests/invalid.html.haml @@ -11,7 +11,7 @@ = render Pajamas::AlertComponent.new(variant: :danger, dismissible: false) do |c| - = c.body do + - c.with_body do - if @merge_request.for_fork? && !@merge_request.source_project = err_fork_project_removed - elsif !@merge_request.source_branch_exists? diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index cdb8a63bca9..be6f9ac83dc 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -1,32 +1,32 @@ -= gitlab_ui_form_for [@project, @milestone], - html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' } do |f| += gitlab_ui_form_for [@project, @milestone], html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' } do |f| = form_errors(@milestone) + + - if @conflict + = render 'shared/model_version_conflict', model_name: _('milestone'), link_path: project_milestone_path(@project, @milestone) + - if @redirect_path.present? = f.hidden_field(:redirect_path, name: :redirect_path, id: :redirect_path, value: @redirect_path) - .form-group.row - .col-form-label.col-sm-2 - = f.label :title, _('Title') - .col-sm-10 - = f.text_field :title, maxlength: 255, class: 'form-control gl-form-input', data: { qa_selector: 'milestone_title_field' }, required: true, autofocus: true + .form-group + = f.label :title, _('Title') + = f.text_field :title, maxlength: 255, class: 'form-control gl-form-input', data: { qa_selector: 'milestone_title_field' }, required: true, autofocus: true = render 'shared/milestones/form_dates', f: f - .form-group.row.milestone-description - .col-form-label.col-sm-2 - = f.label :description, _('Description') - .col-sm-10 - = render layout: 'shared/md_preview', locals: { url: preview_markdown_path(@project) } do - = render 'shared/zen', f: f, attr: :description, - classes: 'note-textarea', - qa_selector: 'milestone_description_field', - supports_autocomplete: true, - placeholder: _('Write milestone description...') - = render 'shared/notes/hints' - .clearfix - .error-alert + .form-group + = f.label :description, _('Description') + = render layout: 'shared/md_preview', locals: { url: preview_markdown_path(@project) } do + = render 'shared/zen', f: f, attr: :description, + classes: 'note-textarea', + qa_selector: 'milestone_description_field', + supports_autocomplete: true, + placeholder: _('Write milestone description...') + = render 'shared/notes/hints' + .clearfix + .error-alert + + = f.hidden_field :lock_version - .form-actions - - if @milestone.new_record? - = f.submit _('Create milestone'), data: { qa_selector: 'create_milestone_button' }, pajamas_button: true - = link_to _('Cancel'), project_milestones_path(@project), class: 'gl-button btn btn-default btn-cancel' - - else - = f.submit _('Save changes'), pajamas_button: true - = link_to _('Cancel'), project_milestone_path(@project, @milestone), class: 'gl-button btn btn-default btn-cancel' + - if @milestone.new_record? + = f.submit _('Create milestone'), data: { qa_selector: 'create_milestone_button' }, class: 'gl-mr-2', pajamas_button: true + = link_to _('Cancel'), project_milestones_path(@project), class: 'gl-button btn btn-default btn-cancel' + - else + = f.submit _('Save changes'), class: 'gl-mr-2', pajamas_button: true + = link_to _('Cancel'), project_milestone_path(@project, @milestone), class: 'gl-button btn btn-default btn-cancel' diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 95ef856daba..36500e157b4 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -16,7 +16,7 @@ = render Pajamas::AlertComponent.new(dismissible: false, alert_options: { class: 'gl-mt-3 gl-mb-5', data: { testid: 'no-issues-alert' }}) do |c| - = c.body do + - c.with_body do = _('Assign some issues to this milestone.') - else = render 'shared/milestones/milestone_complete_alert', milestone: @milestone do diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index 4cfe463fa38..110bc8d82f8 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -33,7 +33,7 @@ = f.submit _('Mirror repository'), class: 'js-mirror-submit', name: :update_remote_mirror, pajamas_button: true, data: { qa_selector: 'mirror_repository_button' } - else = render Pajamas::AlertComponent.new(dismissible: false) do |c| - = c.body do + - c.with_body do = _('Mirror settings are only available to GitLab administrators.') = render 'projects/mirrors/mirror_repos_list' diff --git a/app/views/projects/mirrors/_mirror_repos_list.html.haml b/app/views/projects/mirrors/_mirror_repos_list.html.haml index 46833b5986b..185d86245c5 100644 --- a/app/views/projects/mirrors/_mirror_repos_list.html.haml +++ b/app/views/projects/mirrors/_mirror_repos_list.html.haml @@ -3,14 +3,14 @@ .panel.panel-default .table-responsive - if !@project.mirror? && @project.remote_mirrors.count == 0 - .gl-card.gl-mt-5 - .gl-card-header + = render Pajamas::CardComponent.new(card_options: { class: 'gl-mt-5' }) do |c| + - c.with_header do %strong = _('Mirrored repositories') + ' (0)' - .gl-card-body + - c.with_body do = _('There are currently no mirrored repositories.') - else - %table.table.push-pull-table + %table.table.gl-table.gl-mt-5 %thead %tr %th diff --git a/app/views/projects/ml/candidates/show.html.haml b/app/views/projects/ml/candidates/show.html.haml index 77262243efb..5d5059551d3 100644 --- a/app/views/projects/ml/candidates/show.html.haml +++ b/app/views/projects/ml/candidates/show.html.haml @@ -2,5 +2,7 @@ - add_to_breadcrumbs _("Experiments"), project_ml_experiments_path(@project) - add_to_breadcrumbs experiment.name, project_ml_experiment_path(@project, experiment.iid) - breadcrumb_title "Candidate #{@candidate.iid}" +- add_page_specific_style 'page_bundles/ml_experiment_tracking' +- presenter = ::Ml::CandidateDetailsPresenter.new(@candidate) -#js-show-ml-candidate{ data: { view_model: show_candidate_view_model(@candidate) } } +#js-show-ml-candidate{ data: { view_model: presenter.present } } diff --git a/app/views/projects/ml/experiments/_experiment.html.haml b/app/views/projects/ml/experiments/_experiment.html.haml deleted file mode 100644 index 42823f47469..00000000000 --- a/app/views/projects/ml/experiments/_experiment.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -%li.ml-experiment-row.py-3 - = link_to project_ml_experiment_path(@project, experiment.iid), class: "title" do - = experiment.name diff --git a/app/views/projects/ml/experiments/_experiment_list.html.haml b/app/views/projects/ml/experiments/_experiment_list.html.haml deleted file mode 100644 index a25e814b2b5..00000000000 --- a/app/views/projects/ml/experiments/_experiment_list.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -- if experiments.blank? - .nothing-here-block= s_('MlExperimentsEmptyState|No Experiments to Show') -- else - .ml-experiments-list-holder - %ul.content-list - = render partial: 'experiment', collection: experiments, as: :experiment - = paginate_collection @experiments diff --git a/app/views/projects/ml/experiments/_incubation_banner.html.haml b/app/views/projects/ml/experiments/_incubation_banner.html.haml deleted file mode 100644 index e34f3fd2d2f..00000000000 --- a/app/views/projects/ml/experiments/_incubation_banner.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -= render Pajamas::AlertComponent.new(variant: :warning, - title: _('Machine Learning Experiment Tracking is in Incubating Phase'), - alert_options: { class: 'gl-my-3' }) do |c| - = c.body do - = _('GitLab incubates features to explore new use cases. These features are updated regularly, and support is limited') - = link_to _('Learn more.'), 'https://about.gitlab.com/handbook/engineering/incubation/', target: "_blank" - = c.actions do - = link_to _('Feedback and Updates'), 'https://gitlab.com/groups/gitlab-org/-/epics/8560', target: "_blank" diff --git a/app/views/projects/ml/experiments/index.html.haml b/app/views/projects/ml/experiments/index.html.haml index dd064239e36..612481dbf41 100644 --- a/app/views/projects/ml/experiments/index.html.haml +++ b/app/views/projects/ml/experiments/index.html.haml @@ -3,5 +3,6 @@ #js-project-ml-experiments-index{ data: { experiments: experiments_as_data(@project, @experiments), - page_info: formatted_page_info(@page_info) + page_info: formatted_page_info(@page_info), + empty_state_svg_path: image_path('illustrations/empty-state/empty-dag-md.svg'), } } diff --git a/app/views/projects/ml/experiments/show.html.haml b/app/views/projects/ml/experiments/show.html.haml index 4433d1fafe9..d4a05b613c9 100644 --- a/app/views/projects/ml/experiments/show.html.haml +++ b/app/views/projects/ml/experiments/show.html.haml @@ -1,17 +1,19 @@ - add_to_breadcrumbs _("Experiments"), project_ml_experiments_path(@project) - breadcrumb_title @experiment.name - page_title @experiment.name +- add_page_specific_style 'page_bundles/ml_experiment_tracking' + +- experiment = experiment_as_data(@experiment) - items = candidates_table_items(@candidates) - metrics = unique_logged_names(@candidates, &:latest_metrics) - params = unique_logged_names(@candidates, &:params) - page_info = formatted_page_info(@page_info) -.page-title-holder.d-flex.align-items-center - %h1.page-title.gl-font-size-h-display= @experiment.name - #js-show-ml-experiment{ data: { + experiment: experiment, candidates: items, metrics: metrics, params: params, - page_info: page_info + page_info: page_info, + empty_state_svg_path: image_path('illustrations/empty-state/empty-dag-md.svg'), } } diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 56581fe7b18..59a21cecd39 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -1,14 +1,24 @@ -- @hide_breadcrumbs = true +- @hide_top_bar = true - @hide_top_links = true - page_title _('New Project') - header_title _("Projects"), dashboard_projects_path - add_page_specific_style 'page_bundles/new_namespace' -.project-edit-container.gl-mt-5 +.project-edit-container .project-edit-errors = render 'projects/errors' - .js-new-project-creation{ data: { is_ci_cd_available: (ci_cd_projects_available? if Gitlab.ee?).to_s, has_errors: @project.errors.any?.to_s, new_project_guidelines: brand_new_project_guidelines, push_to_create_project_command: push_to_create_project_command, working_with_projects_help_path: help_page_path("user/project/working_with_projects") } } + .js-new-project-creation{ data: { + is_ci_cd_available: remote_mirror_setting_enabled?.to_s, + has_errors: @project.errors.any?.to_s, + new_project_guidelines: brand_new_project_guidelines, + push_to_create_project_command: push_to_create_project_command, + working_with_projects_help_path: help_page_path("user/project/working_with_projects"), + root_path: root_path, + parent_group_url: @project.parent && group_url(@project.parent), + parent_group_name: @project.parent&.name, + projects_url: dashboard_projects_url, + can_import_projects: params[:namespace_id].presence ? current_user.can?(:import_projects, @namespace).to_s : 'true' } } .row{ 'v-cloak': true } #blank-project-pane.tab-pane.active @@ -17,7 +27,7 @@ #create-from-template-pane.tab-pane = render Pajamas::CardComponent.new(card_options: { class: 'gl-my-5' }) do |c| - = c.body do + - c.with_body do %div - contributing_templates_url = 'https://gitlab.com/gitlab-org/project-templates/contributing' - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: contributing_templates_url } diff --git a/app/views/projects/packages/infrastructure_registry/index.html.haml b/app/views/projects/packages/infrastructure_registry/index.html.haml index 5a118997ff9..9577f6383e9 100644 --- a/app/views/projects/packages/infrastructure_registry/index.html.haml +++ b/app/views/projects/packages/infrastructure_registry/index.html.haml @@ -1,5 +1,4 @@ - page_title _("Infrastructure Registry") -- @content_class = "limit-container-width" unless fluid_layout .row .col-12 diff --git a/app/views/projects/packages/infrastructure_registry/show.html.haml b/app/views/projects/packages/infrastructure_registry/show.html.haml index e7c77478170..8624fdacda7 100644 --- a/app/views/projects/packages/infrastructure_registry/show.html.haml +++ b/app/views/projects/packages/infrastructure_registry/show.html.haml @@ -1,8 +1,7 @@ -- add_to_breadcrumbs _("Infrastructure Registry"), project_infrastructure_registry_index_path(@project) +- add_to_breadcrumbs _("Terraform Module Registry"), project_infrastructure_registry_index_path(@project) - add_to_breadcrumbs @package.name, project_infrastructure_registry_index_path(@project) - breadcrumb_title @package.version -- page_title _("Infrastructure Registry") -- @content_class = "limit-container-width" unless fluid_layout +- page_title _("Terraform Module Registry") .row .col-12 diff --git a/app/views/projects/packages/packages/index.html.haml b/app/views/projects/packages/packages/index.html.haml index 4ab16f25dd2..48aaf0884c8 100644 --- a/app/views/projects/packages/packages/index.html.haml +++ b/app/views/projects/packages/packages/index.html.haml @@ -1,5 +1,4 @@ - page_title _("Package Registry") -- @content_class = "limit-container-width" unless fluid_layout .row .col-12 @@ -10,4 +9,5 @@ empty_list_illustration: image_path('illustrations/no-packages.svg'), npm_instance_url: package_registry_instance_url(:npm), project_list_url: project_packages_path(@project), + settings_path: show_package_registry_settings(@project) ? project_settings_packages_and_registries_path(@project) : '', group_list_url: '' } } diff --git a/app/views/projects/pages/_access.html.haml b/app/views/projects/pages/_access.html.haml index 28f04d78861..50e48187be3 100644 --- a/app/views/projects/pages/_access.html.haml +++ b/app/views/projects/pages/_access.html.haml @@ -1,20 +1,18 @@ - if @project.pages_deployed? + - pages_url = @project.pages_url(with_unique_domain: true) + = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5', data: { qa_selector: 'access_page_container' } }, footer_options: { class: 'gl-alert-warning' }) do |c| - - c.header do + - c.with_header do = s_('GitLabPages|Access pages') - - c.body do - %p - %strong - = s_('GitLabPages|Your pages are served under:') - + - c.with_body do %p - = external_link(@project.pages_url, @project.pages_url) + = external_link(pages_url, pages_url) - @project.pages_domains.each do |domain| %p = external_link(domain.url, domain.url) - unless @project.public_pages? - - c.footer do + - c.with_footer do - help_page = help_page_path('user/project/pages/pages_access_control') - link_start = '<a href="%{url}" target="_blank" class="gl-alert-link" rel="noopener noreferrer">'.html_safe % { url: help_page } - link_end = '</a>'.html_safe diff --git a/app/views/projects/pages/_destroy.haml b/app/views/projects/pages/_destroy.haml index ff30c9ce1ea..3d95fa8a655 100644 --- a/app/views/projects/pages/_destroy.haml +++ b/app/views/projects/pages/_destroy.haml @@ -1,16 +1,13 @@ - if @project.pages_deployed? - if can?(current_user, :remove_pages, @project) - = render Pajamas::CardComponent.new(card_options: { class: 'border-danger' }, header_options: {class: 'bg-danger text-white'}) do |c| - - c.with_header do + .gl-bg-red-50.gl-inset-border-l-3-red-600.gl-py-5.gl-px-6 + %h4.gl-font-lg.gl-mt-0= s_('GitLabPages|Remove pages') + %p= s_('GitLabPages|Removing pages will prevent them from being exposed to the outside world.') + = render Pajamas::ButtonComponent.new(href: project_pages_path(@project), + variant: :danger, + method: :delete, + button_options: {data: { confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger'}, "aria-label": s_('GitLabPages|Remove pages')}) do = s_('GitLabPages|Remove pages') - - c.with_body do - = s_('GitLabPages|Removing pages will prevent them from being exposed to the outside world.') - - c.with_footer do - = render Pajamas::ButtonComponent.new(href: project_pages_path(@project), - variant: :danger, - method: :delete, - button_options: {data: { confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger'}, "aria-label": s_('GitLabPages|Remove pages')}) do - = s_('GitLabPages|Remove pages') - else .nothing-here-block = s_('GitLabPages|Only project maintainers can remove pages') diff --git a/app/views/projects/pages/_header.html.haml b/app/views/projects/pages/_header.html.haml index cf51796e878..c34034ccafc 100644 --- a/app/views/projects/pages/_header.html.haml +++ b/app/views/projects/pages/_header.html.haml @@ -1,10 +1,7 @@ -- can_add_new_domain = can_create_pages_custom_domains?(current_user, @project) +- @content_class = 'limit-container-width' -%h1.page-title.gl-font-size-h-display.with-button +%h4.page-title = s_('GitLabPages|Pages') - - if can_add_new_domain - = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'float-right'}, href: new_project_pages_domain_path(@project)) do - = s_('GitLabPages|New Domain') %p - docs_link_start = "<a href='#{help_page_path('user/project/pages/index')}' target='_blank' rel='noopener noreferrer'>".html_safe - docs_link_end = '</a>'.html_safe diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml index 32e67fdadb8..57371aa49f6 100644 --- a/app/views/projects/pages/_list.html.haml +++ b/app/views/projects/pages/_list.html.haml @@ -1,39 +1,47 @@ +- can_add_new_domain = can_create_pages_custom_domains?(current_user, @project) - verification_enabled = Gitlab::CurrentSettings.pages_domain_verification_enabled? -- if can?(current_user, :update_pages, @project) && @domains.any? - = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5'}) do |c| - - c.header do +- if can?(current_user, :update_pages, @project) + = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5'}, header_options: { class: 'gl-display-flex gl-align-items-center gl-justify-content-space-between' }) do |c| + - c.with_header do Domains (#{@domains.size}) - - c.body do - %ul.list-group.list-group-flush - - @domains.each do |domain| - %li.list-group-item.gl-display-flex.gl-justify-content-space-between.gl-align-items-center.gl-p-0 - .gl-display-flex.gl-align-items-center - - if verification_enabled - - tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success'] - .domain-status.ci-status-icon.has-tooltip{ class: "gl-mr-5 ci-status-icon-#{status}", title: tooltip } - = sprite_icon("status_#{status}") - .domain-name - = external_link(domain.url, domain.url) - - if domain.certificate - %div - = gl_badge_tag(s_('GitLabPages|Certificate: %{subject}') % { subject: domain.pages_domain.subject }) - - if domain.expired? - = gl_badge_tag s_('GitLabPages|Expired'), variant: :danger - %div - = link_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: "btn gl-button btn-sm btn-grouped btn-confirm btn-inverted" - = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger'}, "aria-label": s_("GitLabPages|Remove domain"), method: :delete, class: "btn gl-button btn-danger btn-sm btn-grouped" - - if domain.needs_verification? - %li.list-group-item.bs-callout-warning - - details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe - - details_link_end = '</a>'.html_safe - = s_('GitLabPages|%{domain} is not verified. To learn how to verify ownership, visit your %{link_start}domain details%{link_end}.').html_safe % { domain: domain.domain, - link_start: details_link_start, - link_end: details_link_end } - - if domain.show_auto_ssl_failed_warning? - %li.list-group-item.bs-callout-warning - - details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe - - details_link_end = '</a>'.html_safe - = s_("GitLabPages|Something went wrong while obtaining the Let's Encrypt certificate for %{domain}. To retry visit your %{link_start}domain details%{link_end}.").html_safe % { domain: domain.domain, - link_start: details_link_start, - link_end: details_link_end } + - if can_add_new_domain + = render Pajamas::ButtonComponent.new(variant: :confirm, href: new_project_pages_domain_path(@project)) do + = s_('GitLabPages|New Domain') + - c.with_body do + - if @domains.any? + %ul.list-group.list-group-flush + - @domains.each do |domain| + %li.list-group-item.gl-display-flex.gl-justify-content-space-between.gl-align-items-center.gl-p-0 + .gl-display-flex.gl-align-items-center + - if verification_enabled + - tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success'] + .domain-status.ci-status-icon.has-tooltip{ class: "gl-mr-5 ci-status-icon-#{status}", title: tooltip } + = sprite_icon("status_#{status}") + .domain-name + = external_link(domain.url, domain.url) + - if domain.certificate + %div + = gl_badge_tag(s_('GitLabPages|Certificate: %{subject}') % { subject: domain.pages_domain.subject }) + - if domain.expired? + = gl_badge_tag s_('GitLabPages|Expired'), variant: :danger + %div + = link_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: "btn gl-button btn-sm btn-grouped btn-confirm btn-inverted" + = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger'}, "aria-label": s_("GitLabPages|Remove domain"), method: :delete, class: "btn gl-button btn-danger btn-sm btn-grouped" + - if domain.needs_verification? + %li.list-group-item.bs-callout-warning + - details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe + - details_link_end = '</a>'.html_safe + = s_('GitLabPages|%{domain} is not verified. To learn how to verify ownership, visit your %{link_start}domain details%{link_end}.').html_safe % { domain: domain.domain, + link_start: details_link_start, + link_end: details_link_end } + - if domain.show_auto_ssl_failed_warning? + %li.list-group-item.bs-callout-warning + - details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe + - details_link_end = '</a>'.html_safe + = s_("GitLabPages|Something went wrong while obtaining the Let's Encrypt certificate for %{domain}. To retry visit your %{link_start}domain details%{link_end}.").html_safe % { domain: domain.domain, + link_start: details_link_start, + link_end: details_link_end } + - else + .gl-text-center + = s_("You currently have no custom domains.") diff --git a/app/views/projects/pages/_no_domains.html.haml b/app/views/projects/pages/_no_domains.html.haml index eee7d062d00..97c3ad11f1a 100644 --- a/app/views/projects/pages/_no_domains.html.haml +++ b/app/views/projects/pages/_no_domains.html.haml @@ -1,6 +1,11 @@ +- can_add_new_domain = can_create_pages_custom_domains?(current_user, @project) + - if can?(current_user, :update_pages, @project) = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5'}, body_options: { class: 'gl-text-center nothing-here-block' }) do |c| - - c.header do + - c.with_header do = s_('GitLabPages|Domains') - - c.body do + - if can_add_new_domain + = render Pajamas::ButtonComponent.new(variant: :confirm, href: new_project_pages_domain_path(@project)) do + = s_('GitLabPages|New Domain') + - c.with_body do = s_("GitLabPages|Support for domains and certificates is disabled. Ask your system's administrator to enable it.") diff --git a/app/views/projects/pages/_pages_settings.html.haml b/app/views/projects/pages/_pages_settings.html.haml index 0010564081e..4c8ec21db39 100644 --- a/app/views/projects/pages/_pages_settings.html.haml +++ b/app/views/projects/pages/_pages_settings.html.haml @@ -17,5 +17,14 @@ %p.gl-pl-6 = s_("GitLabPages|When enabled, all attempts to visit your website through HTTP are automatically redirected to HTTPS using a response with status code 301. Requires a valid certificate for all domains. %{docs_link_start}Learn more.%{link_end}").html_safe % { docs_link_start: docs_link_start, link_end: link_end } + - if Feature.enabled?(:pages_unique_domain, @project) + .form-group + = f.fields_for :project_setting do |settings| + = settings.gitlab_ui_checkbox_component :pages_unique_domain_enabled, + s_('GitLabPages|Use unique domain'), + label_options: { class: 'label-bold' } + %p.gl-pl-6 + = s_("GitLabPages|When enabled, a unique domain is generated to access pages.").html_safe + .gl-mt-3 - = f.submit s_('GitLabPages|Save changes'), class: 'btn btn-confirm gl-button' + = f.submit s_('GitLabPages|Save changes'), pajamas_button: true diff --git a/app/views/projects/pages/_use.html.haml b/app/views/projects/pages/_use.html.haml index dccf61c6ec5..4c39c1be060 100644 --- a/app/views/projects/pages/_use.html.haml +++ b/app/views/projects/pages/_use.html.haml @@ -1,8 +1,8 @@ - unless @project.pages_deployed? = render Pajamas::CardComponent.new(card_options: { class: 'gl-border-blue-500' }, header_options: { class: 'gl-bg-blue-500 gl-text-white' }) do |c| - - c.header do + - c.with_header do = s_('GitLabPages|Configure pages') - - c.body do + - c.with_body do - docs_link_start = "<a href='#{help_page_path('user/project/pages/index')}' target='_blank' rel='noopener noreferrer' data-track-action='click_link' data-track-label='pages_docs_link'>".html_safe - samples_link_start = "<a href='https://gitlab.com/pages' target='_blank' rel='noopener noreferrer' data-track-action='click_link' data-track-label='pages_samples_link'>".html_safe - link_end = '</a>'.html_safe diff --git a/app/views/projects/pages_domains/_certificate.html.haml b/app/views/projects/pages_domains/_certificate.html.haml index 4ba3e084dc4..f80fd495695 100644 --- a/app/views/projects/pages_domains/_certificate.html.haml +++ b/app/views/projects/pages_domains/_certificate.html.haml @@ -30,10 +30,10 @@ - if has_user_defined_certificate .row .col-sm-10.offset-sm-2 - .card - .card-header + = render Pajamas::CardComponent.new(body_options: { class: 'gl-display-flex gl-align-items-center gl-justify-content-space-between gl-p-5' }) do |c| + - c.with_header do = _('Certificate') - .d-flex.justify-content-between.align-items-center.p-3 + - c.with_body do %span = domain_presenter.pages_domain.subject || _('missing') = link_to _('Remove'), diff --git a/app/views/projects/pages_domains/_dns.html.haml b/app/views/projects/pages_domains/_dns.html.haml index 2c6b808eb1c..3e6a92d8bc0 100644 --- a/app/views/projects/pages_domains/_dns.html.haml +++ b/app/views/projects/pages_domains/_dns.html.haml @@ -13,7 +13,6 @@ %p.form-text.text-muted = _("To access this domain create a new DNS record") - if verification_enabled - - verification_record = "#{domain_presenter.verification_domain} TXT #{domain_presenter.keyed_verification_code}" .form-group.border-section .row .col-sm-2 @@ -24,7 +23,7 @@ = gl_badge_tag text, variant: status = link_to sprite_icon("redo"), verify_project_pages_domain_path(@project, domain_presenter), method: :post, class: "gl-ml-2 gl-button btn btn-sm btn-default has-tooltip", title: _("Retry verification") .input-group - = text_field_tag :domain_verification, verification_record, class: "monospace js-select-on-focus form-control", readonly: true + = text_field_tag :domain_verification, domain_presenter.verification_record, class: "monospace js-select-on-focus form-control", readonly: true .input-group-append = clipboard_button(target: '#domain_verification', class: 'btn-default d-none d-sm-block') %p.form-text.text-muted diff --git a/app/views/projects/pages_domains/_form.html.haml b/app/views/projects/pages_domains/_form.html.haml index 9d9603b0947..bca955dcdae 100644 --- a/app/views/projects/pages_domains/_form.html.haml +++ b/app/views/projects/pages_domains/_form.html.haml @@ -1,6 +1,6 @@ - if domain_presenter.errors.any? = render Pajamas::AlertComponent.new(variant: :danger, dismissible: false) do |c| - = c.body do + - c.with_body do - domain_presenter.errors.full_messages.each do |msg| = msg diff --git a/app/views/projects/pages_domains/show.html.haml b/app/views/projects/pages_domains/show.html.haml index 5de5188ae6a..89e64d607a6 100644 --- a/app/views/projects/pages_domains/show.html.haml +++ b/app/views/projects/pages_domains/show.html.haml @@ -7,7 +7,7 @@ - if verification_enabled && domain_presenter.unverified? = content_for :flash_message do = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false) do |c| - = c.body do + - c.with_body do .container-fluid.container-limited = _("This domain is not verified. You will need to verify ownership before access is enabled.") diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index 0de31f59033..37b2b3ecfde 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -37,7 +37,7 @@ - if can?(current_user, :play_pipeline_schedule, pipeline_schedule) = link_to play_pipeline_schedule_path(pipeline_schedule), method: :post, title: _('Play'), class: 'btn gl-button btn-default btn-icon' do = sprite_icon('play') - - if can?(current_user, :take_ownership_pipeline_schedule, pipeline_schedule) + - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) && pipeline_schedule.owner != current_user = render Pajamas::ButtonComponent.new(button_options: { class: 'js-take-ownership-button has-tooltip', title: s_('PipelineSchedule|Take ownership to edit'), data: { url: take_ownership_pipeline_schedule_path(pipeline_schedule) } }) do = s_('PipelineSchedules|Take ownership') - if can?(current_user, :update_pipeline_schedule, pipeline_schedule) diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index 8f7f0a15e69..3ff370dfaa4 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -11,17 +11,17 @@ = preserve(markdown(commit.description, pipeline: :single_line)) .info-well - .well-segment.pipeline-info{ class: "gl-align-items-baseline!" } - .icon-container - = sprite_icon('clock', css_class: 'gl-top-0!') - - jobs = n_('%d job', '%d jobs', @pipeline.total_size) % @pipeline.total_size - - if @pipeline.duration - = s_('Pipelines|%{jobs} %{ref_text} in %{duration}').html_safe % { jobs: jobs, ref_text: @pipeline.ref_text, duration: time_interval_in_words(@pipeline.duration) } - - else - = jobs + .well-segment.pipeline-info{ class: "gl-align-items-baseline! gl-flex-direction-column" } + %div + .icon-container + = sprite_icon('clock', css_class: 'gl-top-0!') + = n_('%d job', '%d jobs', @pipeline.total_size) % @pipeline.total_size = @pipeline.ref_text - - if @pipeline.queued_duration - = s_("Pipelines|(queued for %{queued_duration})") % { queued_duration: time_interval_in_words(@pipeline.queued_duration)} + - if @pipeline.finished_at + - duration = time_interval_in_words(@pipeline.duration) + - queued_duration = time_interval_in_words(@pipeline.queued_duration) + %span.gl-pl-7{ 'data-testid': 'pipeline-stats-text' } + = render_if_exists 'projects/pipelines/pipeline_stats_text', duration: duration, pipeline: @pipeline, queued_duration: queued_duration - if has_pipeline_badges?(@pipeline) .well-segment diff --git a/app/views/projects/pipelines/_pipeline_stats_text.html.haml b/app/views/projects/pipelines/_pipeline_stats_text.html.haml new file mode 100644 index 00000000000..8adf94e61c4 --- /dev/null +++ b/app/views/projects/pipelines/_pipeline_stats_text.html.haml @@ -0,0 +1 @@ += s_("in %{duration} and was queued for %{queued_duration}").html_safe % { duration: duration, queued_duration: queued_duration } diff --git a/app/views/projects/pipelines/new.html.haml b/app/views/projects/pipelines/new.html.haml index d2b2a58fcf8..210f9c35c79 100644 --- a/app/views/projects/pipelines/new.html.haml +++ b/app/views/projects/pipelines/new.html.haml @@ -1,4 +1,5 @@ -- breadcrumb_title _('Pipelines') +- breadcrumb_title s_('Pipeline|Run pipeline') +- add_to_breadcrumbs s_('Pipeline|Pipelines'), project_pipelines_path(@project) - page_title s_('Pipeline|Run pipeline') %h1.page-title.gl-font-size-h-display @@ -7,8 +8,9 @@ #js-new-pipeline{ data: { project_id: @project.id, pipelines_path: project_pipelines_path(@project), - config_variables_path: config_variables_namespace_project_pipelines_path(@project.namespace, @project), default_branch: @project.default_branch, + pipelines_editor_path: project_ci_pipeline_editor_path(@project), + can_view_pipeline_editor: can_view_pipeline_editor?(@project), ref_param: params[:ref] || @project.default_branch, var_param: params[:var].to_json, file_param: params[:file_var].to_json, diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index 9b0a81a2f60..a7d670f8475 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -17,11 +17,17 @@ = render "projects/pipelines/info", commit: @pipeline.commit - if pipeline_has_errors - .bs-callout.bs-callout-danger - %h4= _('Unable to create pipeline') - %ul - - @pipeline.yaml_errors.split("\n").each do |error| - %li= error + = render Pajamas::AlertComponent.new(title: s_('Pipelines|Unable to create pipeline'), + variant: :danger, + dismissible: false, + alert_options: { class: 'gl-mb-5' }) do |c| + - c.with_body do + %ul + - @pipeline.yaml_errors.split("\n").each do |error| + %li= error + - if can_view_pipeline_editor?(@project) + = render Pajamas::ButtonComponent.new(href: project_ci_pipeline_editor_path(@project), variant: :confirm) do + = s_("Pipelines|Go to the pipeline editor") - else #js-pipeline-tabs{ data: js_pipeline_tabs_data(@project, @pipeline, @current_user) } diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 4ac0e28d386..a0a90fbe204 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -25,7 +25,6 @@ classes: 'gl-md-w-auto gl-w-full gl-md-ml-3 gl-md-mt-0 gl-mt-3', trigger_source: 'project-members-page', display_text: _('Invite members') } } - = render 'projects/invite_members_modal', project: @project, reload_page_on_submit: true - else - if project_can_be_shared? %h4 diff --git a/app/views/projects/protected_tags/_create_protected_tag.html.haml b/app/views/projects/protected_tags/_create_protected_tag.html.haml index d19a6401fc8..ef3974b04b5 100644 --- a/app/views/projects/protected_tags/_create_protected_tag.html.haml +++ b/app/views/projects/protected_tags/_create_protected_tag.html.haml @@ -1,9 +1,9 @@ - content_for :create_access_levels do .create_access_levels-container = dropdown_tag('Select', - options: { toggle_class: 'js-allowed-to-create wide', + options: { toggle_class: 'js-allowed-to-create js-multiselect wide', dropdown_class: 'dropdown-menu-selectable capitalize-header', - dropdown_qa_selector: 'access_levels_content', + dropdown_qa_selector: 'access_levels_content', dropdown_testid: 'allowed-to-create-dropdown', data: { field_name: 'protected_tag[create_access_levels_attributes][0][access_level]', input_id: 'create_access_levels_attributes', qa_selector: 'access_levels_dropdown' }}) = render 'projects/protected_tags/shared/create_protected_tag' diff --git a/app/views/projects/protected_tags/_protected_tag.html.haml b/app/views/projects/protected_tags/_protected_tag.html.haml index e0912bf39c0..68e4a5e97a3 100644 --- a/app/views/projects/protected_tags/_protected_tag.html.haml +++ b/app/views/projects/protected_tags/_protected_tag.html.haml @@ -1,4 +1,4 @@ = render layout: 'projects/protected_tags/shared/protected_tag', locals: { protected_tag: protected_tag } do - %td - = render 'projects/protected_tags/protected_tag_create_access_levels', protected_tag: protected_tag, create_access_level: protected_tag.create_access_levels.for_role.first + %td.create_access_levels-container + = render 'projects/protected_tags/protected_tag_create_access_levels', protected_tag: protected_tag, create_access_level: protected_tag.create_access_levels.for_role = render_if_exists 'projects/protected_tags/protected_tag_extra_create_access_levels', protected_tag: protected_tag diff --git a/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml b/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml index 1d4e9565156..30b9e3e9005 100644 --- a/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml +++ b/app/views/projects/protected_tags/_protected_tag_create_access_levels.haml @@ -1,8 +1,8 @@ - protected_tag = local_assigns.fetch(:protected_tag) - create_access_level = local_assigns.fetch(:create_access_level) -- dropdown_label = create_access_level&.humanize || 'Select' +- dropdown_label = create_access_level.first&.humanize || 'Select' -= hidden_field_tag "allowed_to_create_#{protected_tag.id}", create_access_level&.access_level += hidden_field_tag "allowed_to_create_#{protected_tag.id}", create_access_level.first&.access_level = dropdown_tag(dropdown_label, - options: { toggle_class: 'js-allowed-to-create', dropdown_class: 'dropdown-menu-selectable capitalize-header js-allowed-to-create-container', - data: { field_name: "allowed_to_create_#{protected_tag.id}", access_level_id: create_access_level&.id }}) + options: { toggle_class: 'js-allowed-to-create js-multiselect', dropdown_class: 'dropdown-menu-selectable capitalize-header js-allowed-to-create-container', + data: { field_name: "allowed_to_create_#{protected_tag.id}", preselected_items: access_levels_data(create_access_level) }}) diff --git a/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml b/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml index 1db1da5e428..d67c3dc19d7 100644 --- a/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml +++ b/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml @@ -1,9 +1,9 @@ = gitlab_ui_form_for [@project, @protected_tag], html: { class: 'new-protected-tag js-new-protected-tag' } do |f| %input{ type: 'hidden', name: 'update_section', value: 'js-protected-tags-settings' } = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }) do |c| - - c.header do + - c.with_header do = _('Protect a tag') - - c.body do + - c.with_body do = form_errors(@protected_tag) .form-group.row = f.label :name, _('Tag:'), class: 'col-md-2 text-left text-md-right' @@ -19,5 +19,5 @@ .create_access_levels-container = yield :create_access_levels - - c.footer do + - c.with_footer do = f.submit _('Protect'), pajamas_button: true, disabled: true, data: { qa_selector: 'protect_tag_button' } diff --git a/app/views/projects/readme_templates/default.md.tt b/app/views/projects/readme_templates/default.md.tt index cd0b2db1d31..ad1d6cce08d 100644 --- a/app/views/projects/readme_templates/default.md.tt +++ b/app/views/projects/readme_templates/default.md.tt @@ -17,8 +17,8 @@ Already a pro? Just edit this README.md and make it your own. Want to make it ea ``` cd existing_repo git remote add origin <%= project.http_url_to_repo %> -git branch -M <%= project.default_branch_or_main %> -git push -uf origin <%= project.default_branch_or_main %> +git branch -M <%= params[:default_branch] %> +git push -uf origin <%= params[:default_branch] %> ``` ## Integrate with your tools diff --git a/app/views/projects/registry/repositories/index.html.haml b/app/views/projects/registry/repositories/index.html.haml index 910aab6da72..e1ec510d271 100644 --- a/app/views/projects/registry/repositories/index.html.haml +++ b/app/views/projects/registry/repositories/index.html.haml @@ -1,5 +1,4 @@ - page_title _("Container Registry") -- @content_class = "limit-container-width" unless fluid_layout - add_page_startup_graphql_call('container_registry/get_container_repositories', { fullPath: @project.full_path, first: 10, name: nil, isGroupPage: false, sort: nil}) %section @@ -19,6 +18,7 @@ "gid_prefix": container_repository_gid_prefix, "is_admin": current_user&.admin.to_s, "show_cleanup_policy_link": show_cleanup_policy_link(@project).to_s, + "show_container_registry_settings": show_container_registry_settings(@project).to_s, "cleanup_policies_settings_path": project_settings_packages_and_registries_path(@project), connection_error: (!!@connection_error).to_s, invalid_path_error: (!!@invalid_path_error).to_s, diff --git a/app/views/projects/releases/new.html.haml b/app/views/projects/releases/new.html.haml index 4348035a324..908cbd00f47 100644 --- a/app/views/projects/releases/new.html.haml +++ b/app/views/projects/releases/new.html.haml @@ -1,3 +1,5 @@ -- page_title s_('Releases|New Release') +- add_to_breadcrumbs s_("Releases|Releases"), project_releases_path(@project) +- page_title s_('Releases|New') +- add_page_specific_style 'page_bundles/releases' #js-new-release-page{ data: data_for_new_release_page } diff --git a/app/views/projects/runners/_project_runners.html.haml b/app/views/projects/runners/_project_runners.html.haml index 543a564568b..1d4e45c71b5 100644 --- a/app/views/projects/runners/_project_runners.html.haml +++ b/app/views/projects/runners/_project_runners.html.haml @@ -2,18 +2,26 @@ = s_('Runners|Project runners') .bs-callout.help-callout - - if can?(current_user, :register_project_runners, @project) - = s_('Runners|These runners are assigned to this project.') - %hr - = render partial: 'ci/runner/how_to_setup_runner', - locals: { registration_token: @project.runners_token, - type: _('project'), - reset_token_url: reset_registration_token_namespace_project_settings_ci_cd_path, - project_path: @project.path_with_namespace, - group_path: '' } + %p= s_('Runners|These runners are assigned to this project.') + - if Feature.enabled?(:create_runner_workflow_for_namespace, @project.namespace) + - if can?(current_user, :create_runner, @project) + = render Pajamas::ButtonComponent.new(href: new_project_runner_path(@project), variant: :confirm) do + = s_('Runners|New project runner') + #js-project-runner-registration-dropdown{ data: { registration_token: @project.runners_token, project_id: @project.id } } + - else + = _('Please contact an admin to create runners.') + = link_to _('Learn more.'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'restrict-runner-registration-by-all-users-in-an-instance'), target: '_blank', rel: 'noopener noreferrer' - else - = _('Please contact an admin to register runners.') - = link_to _('Learn more.'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'restrict-runner-registration-by-all-users-in-an-instance'), target: '_blank', rel: 'noopener noreferrer' + - if can?(current_user, :register_project_runners, @project) + = render partial: 'ci/runner/how_to_setup_runner', + locals: { registration_token: @project.runners_token, + type: _('project'), + reset_token_url: reset_registration_token_namespace_project_settings_ci_cd_path, + project_path: @project.path_with_namespace, + group_path: '' } + - else + = _('Please contact an admin to register runners.') + = link_to _('Learn more.'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'restrict-runner-registration-by-all-users-in-an-instance'), target: '_blank', rel: 'noopener noreferrer' %hr diff --git a/app/views/projects/runners/edit.html.haml b/app/views/projects/runners/edit.html.haml index ce56b160187..58955663bfa 100644 --- a/app/views/projects/runners/edit.html.haml +++ b/app/views/projects/runners/edit.html.haml @@ -1,10 +1,11 @@ +- runner_name = runner_short_name(@runner) - breadcrumb_title _('Edit') -- page_title _('Edit'), "##{@runner.id} (#{@runner.short_sha})" +- page_title _('Edit'), runner_name - add_to_breadcrumbs _('CI/CD Settings'), project_settings_ci_cd_path(@project) -- add_to_breadcrumbs "#{@runner.short_sha}", project_runner_path(@project, @runner) +- add_to_breadcrumbs runner_name, project_runner_path(@project, @runner) %h1.page-title.gl-font-size-h-display - = s_('Runners|Runner #%{runner_id}' % { runner_id: @runner.id }) + = s_('Runners|Runner #%{runner_id}') % { runner_id: @runner.id } = render 'shared/runners/runner_type_badge', runner: @runner = render 'shared/runners/runner_type_alert', runner: @runner diff --git a/app/views/projects/runners/new.html.haml b/app/views/projects/runners/new.html.haml new file mode 100644 index 00000000000..4aeed910452 --- /dev/null +++ b/app/views/projects/runners/new.html.haml @@ -0,0 +1,5 @@ +- add_to_breadcrumbs _('CI/CD Settings'), project_settings_ci_cd_path(@project) +- breadcrumb_title s_('Runners|New runner') +- page_title s_('Runners|Create a project runner') + +#js-project-new-runner{ data: { project_id: @project.to_global_id } } diff --git a/app/views/projects/runners/register.html.haml b/app/views/projects/runners/register.html.haml new file mode 100644 index 00000000000..a8ce08f051f --- /dev/null +++ b/app/views/projects/runners/register.html.haml @@ -0,0 +1,6 @@ +- runner_name = runner_short_name(@runner) +- add_to_breadcrumbs _('CI/CD Settings'), project_settings_ci_cd_path(@project) +- breadcrumb_title s_('Runners|Register runner') +- page_title s_('Runners|Register'), runner_name + +#js-project-register-runner{ data: { runner_id: @runner.id, runners_path: project_runners_path(@project) } } diff --git a/app/views/projects/runners/show.html.haml b/app/views/projects/runners/show.html.haml index cb7984729c8..60f403b1015 100644 --- a/app/views/projects/runners/show.html.haml +++ b/app/views/projects/runners/show.html.haml @@ -1,3 +1,6 @@ +- runner_name = runner_short_name(@runner) +- breadcrumb_title runner_name +- page_title runner_name - add_to_breadcrumbs _('CI/CD Settings'), project_settings_ci_cd_path(@project) = render 'shared/runners/runner_details', runner: @runner diff --git a/app/views/projects/security/configuration/show.html.haml b/app/views/projects/security/configuration/show.html.haml index 4b82f74d035..63e175f96e5 100644 --- a/app/views/projects/security/configuration/show.html.haml +++ b/app/views/projects/security/configuration/show.html.haml @@ -1,6 +1,5 @@ -- breadcrumb_title _("Security Configuration") -- page_title _("Security Configuration") -- @content_class = "limit-container-width" unless fluid_layout +- breadcrumb_title _("Security configuration") +- page_title _("Security configuration") #js-security-configuration{ data: { **@configuration.to_html_data_attribute, vulnerability_training_docs_path: vulnerability_training_docs_path, diff --git a/app/views/projects/settings/_general.html.haml b/app/views/projects/settings/_general.html.haml index 5f1dee39e25..847f9ad3e2a 100644 --- a/app/views/projects/settings/_general.html.haml +++ b/app/views/projects/settings/_general.html.haml @@ -16,7 +16,6 @@ .row .form-group.col-md-9 - = f.label :topics, _('Topics'), class: 'label-bold' .js-topics-selector{ data: { hidden_input_id: hidden_topics_field_id } } = f.hidden_field :topics, value: @project.topic_list.join(', '), id: hidden_topics_field_id @@ -31,8 +30,7 @@ = render_if_exists 'shared/repository_size_limit_setting', form: f, type: :project .form-group.gl-mt-3.gl-mb-3 - .avatar-container.rect-avatar.s90 - = project_icon(@project, alt: _('Project avatar'), class: 'avatar project-avatar s90') + = render Pajamas::AvatarComponent.new(@project, size: 96, alt: '', class: 'gl-float-left gl-mr-5') = f.label :avatar, _('Project avatar'), class: 'label-bold d-block' = render 'shared/choose_avatar_button', f: f - if @project.avatar? diff --git a/app/views/projects/settings/access_tokens/index.html.haml b/app/views/projects/settings/access_tokens/index.html.haml index f6c5c4e2950..26c08fcdfe4 100644 --- a/app/views/projects/settings/access_tokens/index.html.haml +++ b/app/views/projects/settings/access_tokens/index.html.haml @@ -2,7 +2,7 @@ - page_title _('Project Access Tokens') - type = _('project access token') - type_plural = _('project access tokens') -- @content_class = 'limit-container-width' unless fluid_layout +- @force_desktop_expanded_sidebar = true .row.gl-mt-3.js-search-settings-section .col-lg-4 diff --git a/app/views/projects/settings/branch_rules/index.html.haml b/app/views/projects/settings/branch_rules/index.html.haml index 80a41bb579b..efebc4223d9 100644 --- a/app/views/projects/settings/branch_rules/index.html.haml +++ b/app/views/projects/settings/branch_rules/index.html.haml @@ -1,6 +1,9 @@ - add_to_breadcrumbs _('Repository Settings'), project_settings_repository_path(@project) +- add_to_breadcrumbs _('Branch rules'), project_settings_repository_path(@project, anchor: 'branch-rules') +- breadcrumb_title _('Details') +- @breadcrumb_link = '#' - page_title s_('BranchRules|Branch rules details') -%h3.gl-mb-5= s_('BranchRules|Branch rules details') +%h3.gl-mb-5= page_title -#js-branch-rules{ data: { project_path: @project.full_path, protected_branches_path: project_settings_repository_path(@project, anchor: 'js-protected-branches-settings'), approval_rules_path: project_settings_merge_requests_path(@project, anchor: 'js-merge-request-approval-settings'), status_checks_path: project_settings_merge_requests_path(@project, anchor: 'js-merge-request-settings'), branches_path: project_branches_path(@project) } } +#js-branch-rules{ data: branch_rules_data(@project) } diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml index 86238a41f0b..46cfcf20535 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -20,15 +20,15 @@ %fieldset.builds-feature.js-auto-devops-settings .form-group = f.fields_for :auto_devops_attributes, @auto_devops do |form| - .card.gl-mb-3 - .card-body + = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-3' }, footer_options: { class: auto_devops_enabled || 'hidden' }) do |c| + - c.with_body do - autodevops_help_link = link_to _('Learn more.'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer' - auto_devops_badge = auto_devops_enabled ? (gl_badge_tag badge_for_auto_devops_scope(@project), { variant: :info }, { class: 'js-instance-default-badge gl-ml-3 gl-mt-n1'}) : '' = form.gitlab_ui_checkbox_component :enabled, (s_('CICD|Default to Auto DevOps pipeline') + auto_devops_badge).html_safe, checkbox_options: { class: 'js-toggle-extra-settings', checked: auto_devops_enabled, data: { qa_selector: 'enable_autodevops_checkbox' } }, help_text: (s_('CICD|The Auto DevOps pipeline runs if no alternative CI configuration file is found.') + ' ' + autodevops_help_link).html_safe - .card-footer.js-extra-settings{ class: auto_devops_enabled || 'hidden' } + - c.with_footer do - if @project.all_clusters.empty? %p.settings-message.text-center = s_('CICD|Add a %{kubernetes_cluster_link_start}Kubernetes cluster integration%{link_end} with a domain, or create an AUTO_DEVOPS_PLATFORM_TARGET CI variable.').html_safe % { kubernetes_cluster_link_start: kubernetes_cluster_link_start, link_end: link_end } diff --git a/app/views/projects/settings/ci_cd/_badge.html.haml b/app/views/projects/settings/ci_cd/_badge.html.haml index 99eef38827b..e9766b36c79 100644 --- a/app/views/projects/settings/ci_cd/_badge.html.haml +++ b/app/views/projects/settings/ci_cd/_badge.html.haml @@ -3,14 +3,14 @@ %h4 = badge.title.capitalize = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, header_options: { class: 'gl-display-flex gl-align-items-center' }) do |c| - - c.header do + - c.with_header do .gl-flex-grow-1 %b = badge.title.capitalize · = badge.to_html - = render 'shared/ref_switcher', destination: 'badges', align_right: true - - c.body do + .js-ref-switcher-badge{ id: "js-project-ci-cd-ref-switcher-#{badge.title.parameterize(separator: '-') }", data: { project_id: @project.id, ref: @ref } } + - c.with_body do .row .col-md-2.gl-text-center Markdown diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 68dc7f2be8d..6f64d3f3f76 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -18,7 +18,7 @@ _("Auto-cancel redundant pipelines"), checked_value: 'enabled', unchecked_value: 'disabled', - help_text: (_('New pipelines cause older pending or running pipelines on the same branch to be cancelled.') + ' ' + help_link_auto_canceling).html_safe + help_text: (_('Pipelines for new changes cause older pending or running pipelines on the same branch to be cancelled.') + ' ' + help_link_auto_canceling).html_safe .form-group = f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form| diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index b27f5a0e5ed..c7bb6a7f5da 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -1,6 +1,6 @@ -- @content_class = "limit-container-width" unless fluid_layout - page_title _("CI/CD Settings") - page_title _("CI/CD") +- @force_desktop_expanded_sidebar = true - expanded = expanded_by_default? - general_expanded = @project.errors.empty? ? expanded : true @@ -58,7 +58,7 @@ %p = _("A job artifact is an archive of files and directories saved by a job when it finishes.") .settings-content - #js-artifacts-settings-app{ data: { full_path: @project.full_path, help_page_path: help_page_path('ci/pipelines/job_artifacts', anchor: 'keep-artifacts-from-most-recent-successful-jobs') } } + #js-artifacts-settings-app{ data: { full_path: @project.full_path, help_page_path: help_page_path('ci/jobs/job_artifacts', anchor: 'keep-artifacts-from-most-recent-successful-jobs') } } %section.settings.no-animate#js-cicd-variables-settings{ class: ('expanded' if expanded), data: { qa_selector: 'variables_settings_content' } } .settings-header diff --git a/app/views/projects/settings/integrations/_form.html.haml b/app/views/projects/settings/integrations/_form.html.haml index 9d74f99bb19..39dfd410727 100644 --- a/app/views/projects/settings/integrations/_form.html.haml +++ b/app/views/projects/settings/integrations/_form.html.haml @@ -8,9 +8,12 @@ = render Pajamas::AlertComponent.new(title: s_('ExternalIssueIntegration|Another issue tracker is already in use'), variant: :warning, dismissible: false) do |c| - = c.body do + - c.with_body do = s_('ExternalIssueIntegration|Only one issue tracker integration can be active at a time. Please disable the active tracker first and try again.') +- if integration.to_param === 'slack' + = render 'shared/integrations/slack_notifications_deprecation_alert' + %h2.gl-mb-4 = integration.title - if integration.operating? diff --git a/app/views/projects/settings/integrations/edit.html.haml b/app/views/projects/settings/integrations/edit.html.haml index 46276e6c6c9..84d3ac2ded9 100644 --- a/app/views/projects/settings/integrations/edit.html.haml +++ b/app/views/projects/settings/integrations/edit.html.haml @@ -1,7 +1,6 @@ - breadcrumb_title @integration.title - add_to_breadcrumbs _('Integration Settings'), project_settings_integrations_path(@project) - page_title @integration.title, _('Integrations') -- @content_class = 'limit-container-width' unless fluid_layout = render 'form', integration: @integration diff --git a/app/views/projects/settings/integrations/index.html.haml b/app/views/projects/settings/integrations/index.html.haml index 2077d244b24..59cdda5bb92 100644 --- a/app/views/projects/settings/integrations/index.html.haml +++ b/app/views/projects/settings/integrations/index.html.haml @@ -1,6 +1,8 @@ -- @content_class = "limit-container-width" unless fluid_layout - breadcrumb_title _('Integration Settings') - page_title _('Integrations') +- @force_desktop_expanded_sidebar = true + += render 'shared/integrations/slack_notifications_deprecation_alert' %section.js-search-settings-section %h3= _('Integrations') diff --git a/app/views/projects/settings/members/show.html.haml b/app/views/projects/settings/members/show.html.haml index 5fca734222b..5c9389c9c1c 100644 --- a/app/views/projects/settings/members/show.html.haml +++ b/app/views/projects/settings/members/show.html.haml @@ -1,5 +1,3 @@ -- @content_class = "limit-container-width" unless fluid_layout - - page_title _("Members") = render "projects/project_members/index" diff --git a/app/views/projects/settings/merge_requests/show.html.haml b/app/views/projects/settings/merge_requests/show.html.haml index 7dfd304e07b..ef528d17fc9 100644 --- a/app/views/projects/settings/merge_requests/show.html.haml +++ b/app/views/projects/settings/merge_requests/show.html.haml @@ -1,6 +1,6 @@ - breadcrumb_title _('Merge requests') - page_title _('Merge requests') -- @content_class = 'limit-container-width' unless fluid_layout +- @force_desktop_expanded_sidebar = true %section.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings.expanded{ class: [('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)], data: { qa_selector: 'merge_request_settings_content' } } .settings-header diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml index 90e0ccce8b4..d44ebf1eb83 100644 --- a/app/views/projects/settings/operations/show.html.haml +++ b/app/views/projects/settings/operations/show.html.haml @@ -1,10 +1,15 @@ -- @content_class = 'limit-container-width' unless fluid_layout - page_title _('Monitor Settings') - breadcrumb_title _('Monitor Settings') +- @force_desktop_expanded_sidebar = true + +- if Feature.disabled?(:remove_monitor_metrics) + = render 'projects/settings/operations/metrics_dashboard' -= render 'projects/settings/operations/metrics_dashboard' = render 'projects/settings/operations/error_tracking' = render 'projects/settings/operations/alert_management' = render 'projects/settings/operations/incidents' -= render 'projects/settings/operations/grafana_integration' + +- if Feature.disabled?(:remove_monitor_metrics) + = render 'projects/settings/operations/grafana_integration' + = render_if_exists 'projects/settings/operations/status_page' diff --git a/app/views/projects/settings/packages_and_registries/cleanup_tags.html.haml b/app/views/projects/settings/packages_and_registries/cleanup_tags.html.haml index d27d268d65e..ad9ba0b506c 100644 --- a/app/views/projects/settings/packages_and_registries/cleanup_tags.html.haml +++ b/app/views/projects/settings/packages_and_registries/cleanup_tags.html.haml @@ -1,6 +1,5 @@ - add_to_breadcrumbs _('Packages and registries settings'), project_settings_packages_and_registries_path(@project) -- breadcrumb_title s_('ContainerRegistry|Clean up image tags') -- page_title s_('ContainerRegistry|Clean up image tags'), _('Packages and registries settings') -- @content_class = 'limit-container-width' unless fluid_layout +- breadcrumb_title s_('ContainerRegistry|Cleanup policies') +- page_title s_('ContainerRegistry|Cleanup policies'), _('Packages and registries settings') #js-registry-settings-cleanup-image-tags{ data: cleanup_settings_data } 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 c81b38f44dd..6f38a3ace92 100644 --- a/app/views/projects/settings/packages_and_registries/show.html.haml +++ b/app/views/projects/settings/packages_and_registries/show.html.haml @@ -1,5 +1,5 @@ - breadcrumb_title _('Packages and registries settings') - page_title _('Packages and registries settings') -- @content_class = 'limit-container-width' unless fluid_layout +- @force_desktop_expanded_sidebar = true #js-registry-settings{ data: settings_data } diff --git a/app/views/projects/settings/repository/show.html.haml b/app/views/projects/settings/repository/show.html.haml index de171a25e8d..12404180362 100644 --- a/app/views/projects/settings/repository/show.html.haml +++ b/app/views/projects/settings/repository/show.html.haml @@ -1,7 +1,7 @@ - breadcrumb_title _("Repository Settings") - page_title _("Repository") -- @content_class = "limit-container-width" unless fluid_layout - deploy_token_description = s_('DeployTokens|Deploy tokens allow access to packages, your repository, and registry images.') +- @force_desktop_expanded_sidebar = true = render "projects/branch_defaults/show" - if Feature.enabled?(:branch_rules, @project) diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 5fa70c3af32..8a35db357ee 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,5 +1,4 @@ - current_route_path = request.fullpath.match(%r{-/tree/[^/]+/(.+$)}).to_a[1] -- @content_class = "limit-container-width" unless fluid_layout - @skip_current_level_breadcrumb = true - add_page_specific_style 'page_bundles/project' - add_page_specific_style 'page_bundles/tree' @@ -8,7 +7,9 @@ = auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity") = render_if_exists 'shared/ultimate_feature_removal_banner', project: @project += render_if_exists 'shared/promotions/promote_mobile_devops', project: @project = render partial: 'flash_messages', locals: { project: @project } + = render 'clusters_deprecation_alert' = render "projects/last_push" diff --git a/app/views/projects/snippets/edit.html.haml b/app/views/projects/snippets/edit.html.haml index d9bf064ad24..6e1ebdeedf0 100644 --- a/app/views/projects/snippets/edit.html.haml +++ b/app/views/projects/snippets/edit.html.haml @@ -1,7 +1,6 @@ - add_to_breadcrumbs _("Snippets"), project_snippets_path(@project) - breadcrumb_title @snippet.to_reference - page_title _("Edit"), "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets") -- @content_class = "limit-container-width" unless fluid_layout %h1.page-title.gl-font-size-h-display = _("Edit Snippet") diff --git a/app/views/projects/snippets/index.html.haml b/app/views/projects/snippets/index.html.haml index f53b2051835..7c936c849d0 100644 --- a/app/views/projects/snippets/index.html.haml +++ b/app/views/projects/snippets/index.html.haml @@ -4,7 +4,7 @@ - if @snippets.exists? - if current_user .top-area - - include_private = @project.team.member?(current_user) || current_user.admin? + - include_private = @project.member?(current_user) || current_user.admin? = render partial: 'snippets/snippets_scope_menu', locals: { subject: @project, include_private: include_private, counts: @snippet_counts } - if new_project_snippet_link.present? diff --git a/app/views/projects/snippets/new.html.haml b/app/views/projects/snippets/new.html.haml index 5086b5eaa3d..fd74ffef425 100644 --- a/app/views/projects/snippets/new.html.haml +++ b/app/views/projects/snippets/new.html.haml @@ -1,9 +1,7 @@ - add_to_breadcrumbs _("Snippets"), project_snippets_path(@project) - breadcrumb_title _("New") - page_title _("New Snippet") -- @content_class = "limit-container-width" unless fluid_layout %h1.page-title.gl-font-size-h-display = _("New Snippet") -%hr = render "shared/snippets/form", url: project_snippets_path(@project, @snippet) diff --git a/app/views/projects/starrers/_starrer.html.haml b/app/views/projects/starrers/_starrer.html.haml index c1cd2488142..16ae003255c 100644 --- a/app/views/projects/starrers/_starrer.html.haml +++ b/app/views/projects/starrers/_starrer.html.haml @@ -1,8 +1,8 @@ - starrer = local_assigns.fetch(:starrer) .col-lg-3.col-md-4.col-sm-12 - .card - .card-body.gl-display-flex + = render Pajamas::CardComponent.new(body_options: { class: 'gl-display-flex' }) do |c| + - c.with_body do = render Pajamas::AvatarComponent.new(starrer.user, size: 48, alt: "", class: 'gl-mr-3') .user-info diff --git a/app/views/projects/tags/_edit_release_button.html.haml b/app/views/projects/tags/_edit_release_button.html.haml index 1c2626e5612..9a6c18df2ca 100644 --- a/app/views/projects/tags/_edit_release_button.html.haml +++ b/app/views/projects/tags/_edit_release_button.html.haml @@ -5,5 +5,5 @@ - if release - release_btn_text = s_('TagsPage|Edit release') - release_btn_path = edit_project_release_path(project, release) -= link_to release_btn_path, class: css_classes, title: release_btn_text, data: { container: "body" } do - = sprite_icon('pencil', css_class: 'gl-icon') += link_to release_btn_path, class: css_classes do + = release_btn_text diff --git a/app/views/projects/tags/_release_link.html.haml b/app/views/projects/tags/_release_link.html.haml index 6c79b13f438..9284204af77 100644 --- a/app/views/projects/tags/_release_link.html.haml +++ b/app/views/projects/tags/_release_link.html.haml @@ -1,5 +1,5 @@ - if can?(current_user, :read_release, release) - .gl-text-secondary - = sprite_icon("rocket", size: 12) - = _("Release") + %span + = sprite_icon("rocket", size: 12, css_class: "gl-text-secondary") + = _("Release:") = link_to release.name, project_release_path(project, release), class: "gl-text-blue-600!" diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index fcad8509a7d..cc49ff9e293 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -2,9 +2,9 @@ - release = @releases.find { |release| release.tag == tag.name } - commit_status = @tag_pipeline_statuses[tag.name] unless @tag_pipeline_statuses.nil? -%li.flex-row.js-tag-list{ class: "gl-white-space-normal! gl-align-items-flex-start!" } +%li.gl-justify-content-space-between{ class: "gl-md-display-flex! gl-align-items-flex-start!", data: { testid: 'tag-row' } } .row-main-content - = sprite_icon('tag') + = sprite_icon('tag', css_class: "gl-text-secondary") = link_to tag.name, project_tag_path(@project, tag.name), class: 'item-title ref-name' - if protected_tag?(@project, tag) @@ -21,12 +21,13 @@ = render 'release_link', project: @project, release: release - if tag.message.present? - %pre.wrap + %pre.wrap.gl-mt-3.gl-max-w-80 = strip_signature(tag.message) - .row-fixed-content.controls.flex-row + .row-fixed-content.flex-row - if tag.has_signature? - = render partial: 'projects/commit/signature', object: tag.signature + .gl-mr-3 + = render partial: 'projects/commit/signature', object: tag.signature - if commit_status = render 'ci/status/icon', size: 24, status: commit_status, option_css_classes: 'gl-display-inline-flex gl-vertical-align-middle gl-mr-5' @@ -34,8 +35,11 @@ .gl-display-inline-flex.gl-vertical-align-middle.gl-mr-5 %svg.s24 - = render 'projects/buttons/download', project: @project, ref: tag.name, pipeline: @tags_pipelines[tag.name] - - if can?(current_user, :admin_tag, @project) = render 'edit_release_button', tag: tag, project: @project, release: release, option_css_classes: 'gl-mr-3!' + + .gl-mr-3 + = render 'projects/buttons/download', project: @project, ref: tag.name, pipeline: @tags_pipelines[tag.name] + + - if can?(current_user, :admin_tag, @project) = render 'projects/buttons/remove_tag', project: @project, tag: tag diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index 2f8291d255f..1df323e7451 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -1,9 +1,10 @@ -- page_title s_('TagsPage|New Tag') +- add_to_breadcrumbs s_('TagsPage|Tags'), project_tags_path(@project) +- page_title s_('TagsPage|New') - default_ref = params[:ref] || @project.default_branch - if @error = render Pajamas::AlertComponent.new(variant: :danger, dismissible: true) do |c| - = c.body do + - c.with_body do = @error %h1.page-title.gl-font-size-h-display @@ -37,4 +38,3 @@ = s_('TagsPage|Create tag') = render Pajamas::ButtonComponent.new(href: project_tags_path(@project)) do = s_('TagsPage|Cancel') - diff --git a/app/views/projects/tags/show.html.haml b/app/views/projects/tags/show.html.haml index a9c3309e38c..3124f47c832 100644 --- a/app/views/projects/tags/show.html.haml +++ b/app/views/projects/tags/show.html.haml @@ -57,13 +57,5 @@ %pre.wrap{ data: { qa_selector: 'tag_message_content' } } = strip_signature(@tag.message) -- if can?(current_user, :read_release, @release) - .gl-mb-3.gl-mt-3 - - if @release&.description.present? - .description.md{ data: { qa_selector: 'tag_release_notes_content' } } - = markdown_field(@release, :description) - - else - = s_('TagsPage|This tag has no release notes.') - - if can?(current_user, :admin_tag, @project) .js-delete-tag-modal diff --git a/app/views/projects/terraform/index.html.haml b/app/views/projects/terraform/index.html.haml index 21a4fe5eae6..2182778469a 100644 --- a/app/views/projects/terraform/index.html.haml +++ b/app/views/projects/terraform/index.html.haml @@ -1,6 +1,6 @@ - add_page_specific_style 'page_bundles/ci_status' -- breadcrumb_title _('Terraform') -- page_title _('Terraform') +- breadcrumb_title s_('Terraform|Terraform states') +- page_title s_('Terraform|Terraform states') #js-terraform-list{ data: js_terraform_list_data(current_user, @project) } diff --git a/app/views/projects/tree/_tree_header.html.haml b/app/views/projects/tree/_tree_header.html.haml index d494d9cc36d..c834a0bc818 100644 --- a/app/views/projects/tree/_tree_header.html.haml +++ b/app/views/projects/tree/_tree_header.html.haml @@ -1,7 +1,7 @@ - is_project_overview = local_assigns.fetch(:is_project_overview, false) .tree-ref-container.gl-display-flex.gl-flex-wrap.gl-gap-2.mb-2.mb-md-0 - .tree-ref-holder.gl-max-w-26 + .tree-ref-holder.gl-max-w-26{ data: { qa_selector: 'ref_dropdown_container' } } #js-tree-ref-switcher{ data: { project_id: @project.id, ref_type: @ref_type.to_s, project_root_path: project_path(@project) } } #js-repo-breadcrumb{ data: breadcrumb_data_attributes } diff --git a/app/views/projects/tree/show.html.haml b/app/views/projects/tree/show.html.haml index 6d1ab80bdc5..fbbf1c04613 100644 --- a/app/views/projects/tree/show.html.haml +++ b/app/views/projects/tree/show.html.haml @@ -4,7 +4,6 @@ - add_page_startup_graphql_call('repository/permissions', { projectPath: @project.full_path }) - add_page_startup_graphql_call('repository/files', { nextPageCursor: "", pageSize: 100, projectPath: @project.full_path, ref: current_ref, path: current_route_path || "/"}) - breadcrumb_title _("Repository") -- @content_class = "limit-container-width" unless fluid_layout - page_title @path.presence || _("Files"), @ref = content_for :meta_tags do diff --git a/app/views/projects/triggers/_index.html.haml b/app/views/projects/triggers/_index.html.haml index de127d15351..b68aad24b50 100644 --- a/app/views/projects/triggers/_index.html.haml +++ b/app/views/projects/triggers/_index.html.haml @@ -1,13 +1,13 @@ .row.gl-mt-3.gl-mb-3 .col-lg-12 = render Pajamas::CardComponent.new do |c| - - c.header do + - c.with_header do = _("Manage your project's triggers") - - c.body do + - c.with_body do = render 'projects/triggers/form', btn_text: _('Add trigger') .gl-mb-5 #js-ci-pipeline-triggers-list.triggers-list{ data: { triggers: @triggers_json } } - - c.footer do + - c.with_footer do %p = _("These examples show how to trigger this project's pipeline for a branch or tag.") diff --git a/app/views/projects/usage_quotas/index.html.haml b/app/views/projects/usage_quotas/index.html.haml index 5e2217d3c9f..aad96151678 100644 --- a/app/views/projects/usage_quotas/index.html.haml +++ b/app/views/projects/usage_quotas/index.html.haml @@ -1,11 +1,13 @@ - page_title s_("UsageQuota|Usage") +- add_page_specific_style 'page_bundles/projects_usage_quotas' +- @force_desktop_expanded_sidebar = true = render_if_exists 'shared/ultimate_feature_removal_banner', project: @project = render Pajamas::AlertComponent.new(title: _('Repository usage recalculation started'), variant: :info, alert_options: { class: 'js-recalculation-started-alert gl-mt-4 gl-mb-5 gl-display-none' }) do |c| - = c.body do + - c.with_body do = _('To view usage, refresh this page in a few minutes.') %h1.page-title.gl-font-size-h-display @@ -17,10 +19,12 @@ %a{ href: help_page_path('user/usage_quotas.md'), target: '_blank', rel: 'noopener noreferrer' } = s_('UsageQuota|Learn more about usage quotas') + '.' -= gl_tabs_nav do += gl_tabs_nav({ id: 'js-project-usage-quotas-tabs' }) do = gl_tab_link_to '#storage-quota-tab', item_active: true do = s_('UsageQuota|Storage') + = render_if_exists 'projects/usage_quotas/transfer_tab_link' .tab-content .tab-pane.active#storage-quota-tab #js-project-storage-count-app{ data: { project_path: @project.full_path } } + = render_if_exists 'projects/usage_quotas/transfer_tab_content' diff --git a/app/views/projects/work_items/index.html.haml b/app/views/projects/work_items/index.html.haml index 69597aab7ef..01b27eed267 100644 --- a/app/views/projects/work_items/index.html.haml +++ b/app/views/projects/work_items/index.html.haml @@ -1,7 +1,7 @@ -- page_title s_('WorkItem|Work Items') +- page_title "##{request.params['work_items_path']}" +- add_to_breadcrumbs _("Issues"), project_issues_path(@project) - add_page_specific_style 'page_bundles/work_items' - @gfm_form = true - @noteable_type = 'WorkItem' #js-work-items{ data: work_items_index_data(@project) } -= render 'projects/invite_members_modal', project: @project |