diff options
Diffstat (limited to 'app/views/projects')
151 files changed, 722 insertions, 427 deletions
diff --git a/app/views/projects/_activity.html.haml b/app/views/projects/_activity.html.haml index 07faf5a66da..c47ca81c431 100644 --- a/app/views/projects/_activity.html.haml +++ b/app/views/projects/_activity.html.haml @@ -1,9 +1,14 @@ +- is_project_overview = local_assigns.fetch(:is_project_overview, false) + %div{ class: container_class } - .nav-block.d-none.d-sm-flex.activities + .nav-block.d-none.d-sm-flex.activities.gl-static = render 'shared/event_filter' - .controls - = link_to project_path(@project, rss_url_options), title: s_("ProjectActivityRSS|Subscribe"), class: 'btn d-none d-sm-inline-block has-tooltip' do - = icon('rss') + .controls.gl-display-flex + = link_to project_path(@project, rss_url_options), title: s_("ProjectActivityRSS|Subscribe"), class: 'btn gl-button btn-default btn-icon d-none d-sm-inline-flex has-tooltip' do + = sprite_icon('rss', css_class: 'qa-rss-icon gl-icon') + - if is_project_overview && can?(current_user, :download_code, @project) + .project-clone-holder.d-none.d-md-inline-flex.gl-ml-2 + = render "projects/buttons/clone", dropdown_class: 'dropdown-menu-right' .content_list.project-activity{ :"data-href" => activity_project_path(@project) } .loading diff --git a/app/views/projects/_export.html.haml b/app/views/projects/_export.html.haml index 7da15e0d8a5..41e13464b1e 100644 --- a/app/views/projects/_export.html.haml +++ b/app/views/projects/_export.html.haml @@ -26,5 +26,6 @@ = link_to _('Generate new export'), generate_new_export_project_path(project), method: :post, class: "btn btn-default" - else - = link_to _('Export project'), export_project_path(project), + .gl-display-flex.gl-justify-content-end + = link_to _('Export project'), export_project_path(project), method: :post, class: "btn btn-default", data: { qa_selector: 'export_project_link' } diff --git a/app/views/projects/_flash_messages.html.haml b/app/views/projects/_flash_messages.html.haml index ab8275ba5e4..f9222387e97 100644 --- a/app/views/projects/_flash_messages.html.haml +++ b/app/views/projects/_flash_messages.html.haml @@ -9,4 +9,3 @@ = render 'shared/auto_devops_implicitly_enabled_banner', project: project = 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/namespace_storage_limit_alert', namespace: project.namespace, classes: [container_class, ("limit-container-width" unless fluid_layout)] diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index 9966baf78f4..94a2bdb3bcb 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -13,7 +13,7 @@ %h1.home-panel-title.gl-mt-3.gl-mb-2{ data: { qa_selector: 'project_name_content' } } = @project.name %span.visibility-icon.text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@project) } - = visibility_level_icon(@project.visibility_level, fw: false, options: {class: 'icon'}) + = visibility_level_icon(@project.visibility_level, options: { class: 'icon' }) = render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: @project .home-panel-metadata.d-flex.flex-wrap.text-secondary - if can?(current_user, :read_project, @project) @@ -24,7 +24,7 @@ = render 'shared/members/access_request_links', source: @project - if @project.tag_list.present? %span.home-panel-topic-list.mt-2.w-100.d-inline-flex - = sprite_icon('tag', size: 16, css_class: 'icon gl-mr-2') + = sprite_icon('tag', css_class: 'icon gl-mr-2') - @project.topics_to_show.each do |topic| - project_topics_classes = "badge badge-pill badge-secondary gl-mr-2" diff --git a/app/views/projects/_import_project_pane.html.haml b/app/views/projects/_import_project_pane.html.haml index bb278fbf311..dd7971f6db0 100644 --- a/app/views/projects/_import_project_pane.html.haml +++ b/app/views/projects/_import_project_pane.html.haml @@ -46,7 +46,7 @@ - if fogbugz_import_enabled? %div = link_to new_import_fogbugz_path, class: 'btn import_fogbugz', **tracking_attrs(track_label, 'click_button', 'fogbugz') do - = icon('bug', text: 'Fogbugz') + = icon('bug', text: 'FogBugz') - if gitea_import_enabled? %div @@ -56,8 +56,9 @@ - if git_import_enabled? %div - %button.btn.js-toggle-button.js-import-git-toggle-button{ type: "button", data: { toggle_open_class: 'active' }, **tracking_attrs(track_label, 'click_button', 'repo_url') } - = icon('git', text: 'Repo by URL') + %button.btn.btn-svg.js-toggle-button.js-import-git-toggle-button{ type: "button", data: { toggle_open_class: 'active' }, **tracking_attrs(track_label, 'click_button', 'repo_url') } + = sprite_icon('link', css_class: 'gl-icon') + = _('Repo by URL') - if manifest_import_enabled? %div diff --git a/app/views/projects/_merge_request_settings.html.haml b/app/views/projects/_merge_request_settings.html.haml index 5ffdeef3558..e69972e8163 100644 --- a/app/views/projects/_merge_request_settings.html.haml +++ b/app/views/projects/_merge_request_settings.html.haml @@ -4,7 +4,7 @@ = render 'projects/merge_request_merge_options_settings', project: @project, form: form -- if Feature.enabled?(:squash_options, @project) +- if Feature.enabled?(:squash_options, @project, default_enabled: true) = render 'projects/merge_request_squash_options_settings', form: form = render 'projects/merge_request_merge_checks_settings', project: @project, form: form diff --git a/app/views/projects/_remove.html.haml b/app/views/projects/_remove.html.haml index 528d802261c..05eab3b3245 100644 --- a/app/views/projects/_remove.html.haml +++ b/app/views/projects/_remove.html.haml @@ -1,9 +1,10 @@ - return unless can?(current_user, :remove_project, project) +- confirm_phrase = s_('DeleteProject|Delete %{name}') % { name: project.full_name } .sub-section - %h4.danger-title= _('Remove project') + %h4.danger-title= _('Delete project') %p - %strong= _('Removing the project will delete its repository and all related resources including issues, merge requests etc.') + %strong= _('Deleting the project will delete its repository and all related resources including issues, merge requests etc.') %p - %strong= _('Removed projects cannot be restored!') - #js-confirm-project-remove{ data: { form_path: project_path(project), confirm_phrase: project.path, warning_message: remove_project_message(project) } } + %strong= _('Deleted projects cannot be restored!') + #js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: confirm_phrase } } diff --git a/app/views/projects/_service_desk_settings.html.haml b/app/views/projects/_service_desk_settings.html.haml index e6842bbb939..7c08955983a 100644 --- a/app/views/projects/_service_desk_settings.html.haml +++ b/app/views/projects/_service_desk_settings.html.haml @@ -10,7 +10,8 @@ - if ::Gitlab::ServiceDesk.supported? .js-service-desk-setting-root{ data: { endpoint: project_service_desk_path(@project), enabled: "#{@project.service_desk_enabled}", - incoming_email: (@project.service_desk_address if @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), selected_template: "#{@project.service_desk_setting&.issue_template_key}", outgoing_name: "#{@project.service_desk_setting&.outgoing_name}", project_key: "#{@project.service_desk_setting&.project_key}", diff --git a/app/views/projects/_visibility_modal.html.haml b/app/views/projects/_visibility_modal.html.haml index 3ef93a40137..144f726572b 100644 --- a/app/views/projects/_visibility_modal.html.haml +++ b/app/views/projects/_visibility_modal.html.haml @@ -7,7 +7,7 @@ .modal-header %h3.page-title= _('Reduce this project’s visibility?') %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } - %span{ "aria-hidden": true }= sprite_icon("close", size: 16) + %span{ "aria-hidden": true }= sprite_icon("close") .modal-body %p - if @project.group @@ -23,8 +23,7 @@ = ("To confirm, type %{phrase_code}").html_safe % { phrase_code: '<code class="js-confirm-danger-match">%{phrase_name}</code>'.html_safe % { phrase_name: @project.full_path } } .form-group = text_field_tag 'confirm_path_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input' - .form-actions.clearfix - .pull-right - %button.btn.btn-default{ type: "button", "data-dismiss": "modal" } - = _('Cancel') - = submit_tag _('Reduce project visibility'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button", disabled: true + .form-actions.gl-display-flex.gl-justify-content-end + %button.btn.btn-default.gl-mr-4{ type: "button", "data-dismiss": "modal" } + = _('Cancel') + = submit_tag _('Reduce project visibility'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button", disabled: true diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index a2d6b2e18a9..2f3d0660caa 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -1,5 +1,5 @@ - page_title _("Blame"), @blob.path, @ref -- link_icon = icon("link") +- link_icon = sprite_icon("link", size: 12) #blob-content-holder.tree-holder = render "projects/blob/breadcrumb", blob: @blob, blame: true diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index b06ae31e73f..787dc3b030f 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -8,13 +8,13 @@ = sprite_icon('fork', size: 12) = ref - if current_action?(:edit) || current_action?(:update) - %span.pull-left.gl-mr-3 + %span.float-left.gl-mr-3 = text_field_tag 'file_path', (params[:file_path] || @path), class: 'form-control new-file-path js-file-path-name-input' = render 'template_selectors' - if current_action?(:new) || current_action?(:create) - %span.pull-left.gl-mr-3 + %span.float-left.gl-mr-3 \/ = text_field_tag 'file_name', params[:file_name], placeholder: "File name", required: true, class: 'form-control new-file-name js-file-path-name-input', value: params[:file_name] || (should_suggest_gitlab_ci_yml? ? '.gitlab-ci.yml' : '') @@ -40,7 +40,8 @@ = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2', tabindex: '-1' .file-editor.code - %pre.js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true } }= params[:content] || local_assigns[:blob_data] + .js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true } }< + %pre.editor-loading-content= params[:content] || local_assigns[:blob_data] - if local_assigns[:path] .js-edit-mode-pane#preview.hide .center diff --git a/app/views/projects/blob/_header_content.html.haml b/app/views/projects/blob/_header_content.html.haml index 32adfb320ff..30356348941 100644 --- a/app/views/projects/blob/_header_content.html.haml +++ b/app/views/projects/blob/_header_content.html.haml @@ -7,6 +7,8 @@ = copy_file_path_button(blob.path) %small.mr-1 + - if blob.mode == Blob::MODE_SYMLINK + = _('Symbolic link') << ' ·' = number_to_human_size(blob.raw_size) - if blob.stored_externally? && blob.external_storage == :lfs diff --git a/app/views/projects/blob/_template_selectors.html.haml b/app/views/projects/blob/_template_selectors.html.haml index ba8029ac32a..2aefcdc5762 100644 --- a/app/views/projects/blob/_template_selectors.html.haml +++ b/app/views/projects/blob/_template_selectors.html.haml @@ -7,6 +7,8 @@ = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-license-selector qa-license-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: licenses_for_select(@project), project: @project.name, fullname: @project.namespace.human_name } } ) .gitignore-selector.js-gitignore-selector-wrap.js-template-selector-wrap.hidden = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-gitignore-selector qa-gitignore-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitignore_names(@project) } } ) + .metrics-dashboard-selector.js-metrics-dashboard-selector-wrap.js-template-selector-wrap.hidden + = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-metrics-dashboard-selector qa-metrics-dashboard-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: metrics_dashboard_ymls(@project) } } ) #gitlab-ci-yml-selector.gitlab-ci-yml-selector.js-gitlab-ci-yml-selector-wrap.js-template-selector-wrap.hidden = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-gitlab-ci-yml-selector qa-gitlab-ci-yml-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitlab_ci_ymls(@project) } } ) .dockerfile-selector.js-dockerfile-selector-wrap.js-template-selector-wrap.hidden diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index 1319c58eb38..7d072ba5899 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -1,8 +1,5 @@ - breadcrumb_title _("Repository") - page_title _("Edit"), @blob.path, @ref -- unless Feature.enabled?(:monaco_blobs) - - content_for :page_specific_javascripts do - = page_specific_javascript_tag('lib/ace.js') - if @conflict .alert.alert-danger diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index 2420c4a4bd5..48ffd80aa9c 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -1,8 +1,5 @@ - breadcrumb_title _("Repository") - page_title _("New File"), @path.presence, @ref -- unless Feature.enabled?(:monaco_blobs) - - content_for :page_specific_javascripts do - = page_specific_javascript_tag('lib/ace.js') .editor-title-row %h3.page-title.blob-new-page-title diff --git a/app/views/projects/blob/viewers/_changelog.html.haml b/app/views/projects/blob/viewers/_changelog.html.haml index 46e3e7f798a..80ead53beff 100644 --- a/app/views/projects/blob/viewers/_changelog.html.haml +++ b/app/views/projects/blob/viewers/_changelog.html.haml @@ -1,4 +1,4 @@ -= icon('history fw') += sprite_icon('history', css_class: 'gl-mr-1 gl-vertical-align-text-bottom') = succeed '.' do To find the state of this project's repository at the time of any of these versions, check out = link_to "the tags", project_tags_path(viewer.project) diff --git a/app/views/projects/blob/viewers/_contributing.html.haml b/app/views/projects/blob/viewers/_contributing.html.haml index 546c064c06f..18559e2908f 100644 --- a/app/views/projects/blob/viewers/_contributing.html.haml +++ b/app/views/projects/blob/viewers/_contributing.html.haml @@ -1,4 +1,4 @@ -= icon('book fw') += sprite_icon('book') After you've reviewed these contribution guidelines, you'll be all set to - options = contribution_options(viewer.project) diff --git a/app/views/projects/blob/viewers/_dependency_manager.html.haml b/app/views/projects/blob/viewers/_dependency_manager.html.haml index 5970d41fdab..e6de420bbb1 100644 --- a/app/views/projects/blob/viewers/_dependency_manager.html.haml +++ b/app/views/projects/blob/viewers/_dependency_manager.html.haml @@ -1,6 +1,5 @@ -= icon('cubes fw') += sprite_icon('package') = succeed '.' do - This project manages its dependencies using - %strong= viewer.manager_name + = _("This project manages its dependencies using %{strong_start}%{manager_name}%{strong_end}").html_safe % { manager_name: viewer.manager_name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } -= link_to 'Learn more', viewer.manager_url, target: '_blank', rel: 'noopener noreferrer' += link_to _('Learn more'), viewer.manager_url, target: '_blank', rel: 'noopener noreferrer' diff --git a/app/views/projects/blob/viewers/_license.html.haml b/app/views/projects/blob/viewers/_license.html.haml index 7ac0e7bb579..d2bd90a898a 100644 --- a/app/views/projects/blob/viewers/_license.html.haml +++ b/app/views/projects/blob/viewers/_license.html.haml @@ -1,6 +1,6 @@ - license = viewer.license -= sprite_icon('scale', size: 16) += sprite_icon('scale') This project is licensed under the = succeed '.' do %strong= license.name diff --git a/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml b/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml index ecbf6d9005d..9ec1d7d0d67 100644 --- a/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml +++ b/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml @@ -8,4 +8,4 @@ - viewer.errors.messages.each do |error| %li= error.join(': ') -= link_to _('Learn more'), help_page_path('operations/metrics/dashboards/index.md', anchor: 'defining-custom-dashboards-per-project') += link_to _('Learn more'), help_page_path('operations/metrics/dashboards/index.md') diff --git a/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml b/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml index 31a0d514444..aedfb64d3e4 100644 --- a/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml +++ b/app/views/projects/blob/viewers/_metrics_dashboard_yml_loading.html.haml @@ -1,4 +1,4 @@ = icon('spinner spin fw') = _('Metrics Dashboard YAML definition') + '…' -= link_to _('Learn more'), help_page_path('user/project/integrations/prometheus.md') += link_to _('Learn more'), help_page_path('operations/metrics/dashboards/yaml.md') diff --git a/app/views/projects/blob/viewers/_readme.html.haml b/app/views/projects/blob/viewers/_readme.html.haml index 6cbd26e2271..86f59146cda 100644 --- a/app/views/projects/blob/viewers/_readme.html.haml +++ b/app/views/projects/blob/viewers/_readme.html.haml @@ -1,4 +1,4 @@ -= icon('info-circle fw') += sprite_icon('information-o', css_class: 'gl-vertical-align-middle! gl-mr-2') = succeed '.' do To learn more about this project, read = link_to "the wiki", wiki_path(viewer.project.wiki) diff --git a/app/views/projects/branches/_panel.html.haml b/app/views/projects/branches/_panel.html.haml index 828371e9656..f03b5cf2eff 100644 --- a/app/views/projects/branches/_panel.html.haml +++ b/app/views/projects/branches/_panel.html.haml @@ -7,7 +7,7 @@ - return unless branches.any? -.card.prepend-top-10 +.card.gl-mt-3 .card-header = panel_title %ul.content-list.all-branches.qa-all-branches diff --git a/app/views/projects/buttons/_dropdown.html.haml b/app/views/projects/buttons/_dropdown.html.haml index 33465953086..5effa5a9e92 100644 --- a/app/views/projects/buttons/_dropdown.html.haml +++ b/app/views/projects/buttons/_dropdown.html.haml @@ -8,9 +8,9 @@ - if show_menu .project-action-button.dropdown.inline< - %a.btn.dropdown-toggle.has-tooltip.qa-create-new-dropdown{ href: '#', title: _('Create new...'), 'data-toggle' => 'dropdown', 'data-container' => 'body', 'aria-label' => _('Create new...'), 'data-display' => 'static' } - = icon('plus') - = icon("caret-down") + %a.btn.btn-default.gl-button.dropdown-toggle.has-tooltip.qa-create-new-dropdown{ href: '#', title: _('Create new...'), 'data-toggle' => 'dropdown', 'data-container' => 'body', 'aria-label' => _('Create new...'), 'data-display' => 'static' } + = sprite_icon('plus', css_class: 'gl-icon') + = sprite_icon("chevron-down", css_class: 'gl-icon') %ul.dropdown-menu.dropdown-menu-right.project-home-dropdown - if can_create_issue || merge_project || can_create_project_snippet %li.dropdown-header= _('This project') diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 4c20ac84b24..23f9a6a8f6c 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -97,7 +97,7 @@ %td .float-right - if can?(current_user, :read_build, job) && job.artifacts? - = link_to download_project_job_artifacts_path(job.project, job), rel: 'nofollow', download: '', title: _('Download artifacts'), class: 'btn btn-build' do + = link_to download_project_job_artifacts_path(job.project, job), rel: 'nofollow', download: '', title: _('Download artifacts'), class: 'btn btn-build gl-button btn-icon btn-svg' do = sprite_icon('download') - if can?(current_user, :update_build, job) - if job.active? @@ -126,5 +126,5 @@ = link_to play_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Play'), class: 'btn btn-build' do = custom_icon('icon_play') - elsif job.retryable? - = link_to retry_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Retry'), class: 'btn btn-build' do - = icon('repeat') + = link_to retry_project_job_path(job.project, job, return_to: request.original_url), method: :post, title: _('Retry'), class: 'btn btn-build gl-button btn-icon btn-default' do + = sprite_icon('repeat', css_class: 'gl-icon') diff --git a/app/views/projects/ci/lints/_create.html.haml b/app/views/projects/ci/lints/_create.html.haml index d65c06aa2a4..5cc89343ba3 100644 --- a/app/views/projects/ci/lints/_create.html.haml +++ b/app/views/projects/ci/lints/_create.html.haml @@ -4,6 +4,8 @@ %b= _("Status:") = _("syntax is correct") + = render "projects/ci/lints/lint_warnings", warnings: @warnings + .table-holder %table.table.table-bordered %thead @@ -11,33 +13,54 @@ %th= _("Parameter") %th= _("Value") %tbody - - @stages.each do |stage| - - @builds.select { |build| build[:stage] == stage }.each do |build| - - job = @jobs[build[:name].to_sym] - %tr - %td #{stage.capitalize} Job - #{build[:name]} - %td - %pre= job[:before_script].to_a.join('\n') - %pre= job[:script].to_a.join('\n') - %pre= job[:after_script].to_a.join('\n') + - if @dry_run + - @stages.each do |stage| + - stage.statuses.each do |job| + %tr + %td #{stage.name.capitalize} Job - #{job.name} + %td + %pre= job.options[:before_script].to_a.join('\n') + %pre= job.options[:script].to_a.join('\n') + %pre= job.options[:after_script].to_a.join('\n') + %br + %b= _("Tag list:") + = job.tag_list.to_a.join(", ") if job.is_a?(Ci::Build) + %br + %b= _("Environment:") + = job.options.dig(:environment, :name) + %br + %b= _("When:") + = job.when + - if job.allow_failure + %b= _("Allowed to fail") - %br - %b= _("Tag list:") - = build[:tag_list].to_a.join(", ") - %br - %b= _("Only policy:") - = job[:only].to_a.join(", ") - %br - %b= _("Except policy:") - = job[:except].to_a.join(", ") - %br - %b= _("Environment:") - = build[:environment] - %br - %b= _("When:") - = build[:when] - - if build[:allow_failure] - %b= _("Allowed to fail") + - else + - @stages.each do |stage| + - @builds.select { |build| build[:stage] == stage }.each do |build| + - job = @jobs[build[:name].to_sym] + %tr + %td #{stage.capitalize} Job - #{build[:name]} + %td + %pre= job[:before_script].to_a.join('\n') + %pre= job[:script].to_a.join('\n') + %pre= job[:after_script].to_a.join('\n') + %br + %b= _("Tag list:") + = build[:tag_list].to_a.join(", ") + %br + %b= _("Only policy:") + = job[:only].to_a.join(", ") + %br + %b= _("Except policy:") + = job[:except].to_a.join(", ") + %br + %b= _("Environment:") + = build[:environment] + %br + %b= _("When:") + = build[:when] + - if build[:allow_failure] + %b= _("Allowed to fail") - else .bs-callout.bs-callout-danger @@ -47,3 +70,5 @@ %pre - @errors.each do |message| %p= message + + = render "projects/ci/lints/lint_warnings", warnings: @warnings diff --git a/app/views/projects/ci/lints/_lint_warnings.html.haml b/app/views/projects/ci/lints/_lint_warnings.html.haml new file mode 100644 index 00000000000..0a5bb8f76ef --- /dev/null +++ b/app/views/projects/ci/lints/_lint_warnings.html.haml @@ -0,0 +1,6 @@ +- if warnings + - warnings.each do |warning| + .bs-callout.bs-callout-warning + %p + %b= _("Warning:") + = markdown(warning) diff --git a/app/views/projects/ci/lints/show.html.haml b/app/views/projects/ci/lints/show.html.haml index 7b87664961e..0c51c978bfe 100644 --- a/app/views/projects/ci/lints/show.html.haml +++ b/app/views/projects/ci/lints/show.html.haml @@ -3,7 +3,7 @@ - content_for :library_javascripts do = page_specific_javascript_tag('lib/ace.js') -%h2.pt-3.pb-3= _("Check your .gitlab-ci.yml") +%h2.pt-3.pb-3= _("Validate your GitLab CI configuration") .project-ci-linter = form_tag project_ci_lint_path(@project), method: :post do @@ -15,8 +15,12 @@ #ci-editor.ci-editor= @content = text_area_tag(:content, @content, class: 'hidden form-control span1', rows: 7, require: true) .col-sm-12 - .float-left.prepend-top-10 + .float-left.gl-mt-3 = submit_tag(_('Validate'), class: 'btn btn-success submit-yml') + - if Gitlab::Ci::Features.lint_creates_pipeline_with_dry_run?(@project) + = check_box_tag(:dry_run, 'true', params[:dry_run]) + = label_tag(:dry_run, _('Simulate a pipeline created for the default branch')) + = link_to icon('question-circle'), help_page_path('ci/lint', anchor: 'pipeline-simulation'), target: '_blank', rel: 'noopener noreferrer' .float-right.prepend-top-10 = button_tag(_('Clear'), type: 'button', class: 'btn btn-default clear-yml') diff --git a/app/views/projects/cleanup/_show.html.haml b/app/views/projects/cleanup/_show.html.haml index 52855d7ee12..f560127fefd 100644 --- a/app/views/projects/cleanup/_show.html.haml +++ b/app/views/projects/cleanup/_show.html.haml @@ -14,8 +14,8 @@ .settings-content - url = cleanup_namespace_project_settings_repository_path(@project.namespace, @project) = form_for @project, url: url, method: :post, authenticity_token: true, html: { class: 'js-requires-input' } do |f| - %fieldset.gl-mt-0.append-bottom-10 - .append-bottom-10 + %fieldset.gl-mt-0.gl-mb-3 + .gl-mb-3 %h5.gl-mt-0 = _("Upload object map") %button.btn.btn-default.js-choose-file{ type: "button" } @@ -25,5 +25,7 @@ = f.file_field :bfg_object_map, class: "hidden js-object-map-input", required: true .form-text.text-muted = _("The maximum file size allowed is %{size}.") % { size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes) } - = f.submit _('Start cleanup'), class: 'btn btn-success' + + .gl-display-flex.gl-justify-content-end + = f.submit _('Start cleanup'), class: 'btn btn-success' diff --git a/app/views/projects/commit/_change.html.haml b/app/views/projects/commit/_change.html.haml index e71615dd1c5..4f5d69c614c 100644 --- a/app/views/projects/commit/_change.html.haml +++ b/app/views/projects/commit/_change.html.haml @@ -21,7 +21,7 @@ .modal-body - if description %p= description - = form_tag [type.underscore, @project.namespace.becomes(Namespace), @project, commit], method: :post, remote: false, class: "js-#{type}-form js-requires-input" do + = form_tag [type.underscore, @project, commit], method: :post, remote: false, class: "js-#{type}-form js-requires-input" do .form-group.branch = label_tag 'start_branch', branch_label, class: 'label-bold' diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 71cf6ca6922..29ee4a69e83 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -93,7 +93,7 @@ - if @merge_request .well-segment - = icon('info-circle fw') + = sprite_icon('information-o', css_class: 'gl-vertical-align-middle! gl-mr-2') - link_to_merge_request = link_to(@merge_request.to_reference, diffs_project_merge_request_path(@project, @merge_request, commit_id: @commit.id)) = _('This commit is part of merge request %{link_to_merge_request}. Comments created here will be created in the context of that merge request.').html_safe % { link_to_merge_request: link_to_merge_request } diff --git a/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml b/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml index d282ab4f520..e56579b162f 100644 --- a/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml +++ b/app/views/projects/commit/_same_user_different_email_signature_badge.html.haml @@ -1,5 +1,5 @@ - title = capture do - = _('This commit was signed with a verified signature, but the committer email is <strong>not verified</strong> to belong to the same user.').html_safe + = html_escape(_('This commit was signed with a verified signature, but the committer email is %{strong_open}not verified%{strong_close} to belong to the same user.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } - locals = { signature: signature, title: title, label: _('Unverified'), css_class: ['invalid'], icon: 'status_notfound_borderless', show_user: true } diff --git a/app/views/projects/commit/_unverified_signature_badge.html.haml b/app/views/projects/commit/_unverified_signature_badge.html.haml index 294f916d18f..0ce8e06382b 100644 --- a/app/views/projects/commit/_unverified_signature_badge.html.haml +++ b/app/views/projects/commit/_unverified_signature_badge.html.haml @@ -1,5 +1,5 @@ - title = capture do - = _('This commit was signed with an <strong>unverified</strong> signature.').html_safe + = html_escape(_('This commit was signed with an %{strong_open}unverified%{strong_close} signature.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } - locals = { signature: signature, title: title, label: _('Unverified'), css_class: 'invalid', icon: 'status_notfound_borderless' } diff --git a/app/views/projects/commit/diff_files.html.haml b/app/views/projects/commit/diff_files.html.haml new file mode 100644 index 00000000000..3a473be3840 --- /dev/null +++ b/app/views/projects/commit/diff_files.html.haml @@ -0,0 +1,3 @@ +- diff_files = diffs.diff_files + += render partial: 'projects/diffs/file', collection: diff_files, as: :diff_file, locals: { project: diffs.project, environment: environment, diff_page_context: 'is-commit' } diff --git a/app/views/projects/commit/x509/_verified_signature_badge.html.haml b/app/views/projects/commit/x509/_verified_signature_badge.html.haml index 4964b1b8ee7..357ad467539 100644 --- a/app/views/projects/commit/x509/_verified_signature_badge.html.haml +++ b/app/views/projects/commit/x509/_verified_signature_badge.html.haml @@ -1,5 +1,5 @@ - title = capture do - = _('This commit was signed with a <strong>verified</strong> signature and the committer email is verified to belong to the same user.').html_safe + = html_escape(_('This commit was signed with a %{strong_open}verified%{strong_close} signature and the committer email is verified to belong to the same user.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } - locals = { signature: signature, title: title, label: _('Verified'), css_class: 'valid', icon: 'status_success_borderless', show_user: true } diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index ab1d855a6e0..33fedde0cd1 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -10,12 +10,13 @@ - ref = local_assigns.fetch(:ref) { merge_request&.source_branch } - commit = commit.present(current_user: current_user) - commit_status = commit.status_for(ref) +- collapsible = local_assigns.fetch(:collapsible, true) - link = commit_path(project, commit, merge_request: merge_request) - show_project_name = local_assigns.fetch(:show_project_name, false) -%li.commit.flex-row.js-toggle-container{ id: "commit-#{commit.short_id}" } +%li{ class: ["commit flex-row", ("js-toggle-container" if collapsible)], id: "commit-#{commit.short_id}" } .avatar-cell.d-none.d-sm-block = author_avatar(commit, size: 40, has_tooltip: false) @@ -29,7 +30,7 @@ %span.commit-row-message.d-inline.d-sm-none · = commit.short_id - - if commit.description? + - if commit.description? && collapsible %button.text-expander.js-toggle-button = sprite_icon('ellipsis_h', size: 12) @@ -41,7 +42,7 @@ = render_if_exists 'projects/commits/project_namespace', show_project_name: show_project_name, project: project - if commit.description? - %pre.commit-row-description.js-toggle-content.gl-mb-3 + %pre{ class: ["commit-row-description gl-mb-3", (collapsible ? "js-toggle-content" : "d-block")] } = preserve(markdown_field(commit, :description)) .commit-actions.flex-row diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml index e413bd78789..293500a6c31 100644 --- a/app/views/projects/commits/_commits.html.haml +++ b/app/views/projects/commits/_commits.html.haml @@ -1,8 +1,10 @@ - merge_request = local_assigns.fetch(:merge_request, nil) - project = local_assigns.fetch(:project) { merge_request&.project } - ref = local_assigns.fetch(:ref) { merge_request&.source_branch } +- can_update_merge_request = can?(current_user, :update_merge_request, @merge_request) - commits = @commits +- context_commits = @context_commits - hidden = @hidden_commit_count - commits.chunk { |c| c.committed_date.in_time_zone.to_date }.each do |day, daily_commits| @@ -14,11 +16,26 @@ %ul.content-list.commit-list.flex-list = 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 + %span.font-weight-bold= n_("%d previously merged commit", "%d previously merged commits", context_commits.count) % context_commits.count + - if project.context_commits_enabled? && can_update_merge_request + %button.btn.btn-default.ml-3.add-review-item-modal-trigger{ type: "button", data: { context_commits_empty: 'false' } } + = _('Add/remove') + + %li.commits-row + %ul.content-list.commit-list.flex-list + = render partial: 'projects/commits/commit', collection: context_commits, locals: { project: project, ref: ref, merge_request: merge_request } + - if hidden > 0 %li.alert.alert-warning = 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 commits.size == 0 +- if project.context_commits_enabled? && can_update_merge_request && context_commits&.empty? + %button.btn.btn-default.mt-3.add-review-item-modal-trigger{ type: "button", data: { context_commits_empty: 'true' } } + = _('Add previously merged commits') + +- if commits.size == 0 && context_commits.nil? .mt-4.text-center .bold = _('Your search didn\'t match any commits.') diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index 737e4f66dd2..28b5dc0cc67 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -26,8 +26,8 @@ = form_tag(project_commits_path(@project, @id), method: :get, class: 'commits-search-form js-signature-container', data: { 'signatures-path' => namespace_project_signatures_path }) do = search_field_tag :search, params[:search], { placeholder: _('Search by message'), id: 'commits-search', class: 'form-control search-text-input input-short gl-mt-3 gl-sm-mt-0 gl-min-w-full', spellcheck: false } .control.d-none.d-md-block - = link_to project_commits_path(@project, @ref, rss_url_options), title: _("Commits feed"), class: 'btn' do - = icon("rss") + = link_to project_commits_path(@project, @ref, rss_url_options), title: _("Commits feed"), class: 'btn btn-svg' do + = sprite_icon('rss', css_class: 'qa-rss-icon') = render_if_exists 'projects/commits/mirror_status' diff --git a/app/views/projects/compare/_form.html.haml b/app/views/projects/compare/_form.html.haml index d10fa69ff47..768acac96c0 100644 --- a/app/views/projects/compare/_form.html.haml +++ b/app/views/projects/compare/_form.html.haml @@ -10,7 +10,7 @@ = hidden_field_tag :to, params[:to] = button_tag type: 'button', title: params[:to], class: "btn form-control compare-dropdown-toggle js-compare-dropdown has-tooltip", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do .dropdown-toggle-text.str-truncated.monospace.float-left= params[:to] || _("Select branch/tag") - = sprite_icon('chevron-down', size: 16, css_class: 'float-right') + = sprite_icon('chevron-down', css_class: 'float-right') = render 'shared/ref_dropdown' .compare-ellipsis.inline ... .form-group.dropdown.compare-form-group.from.js-compare-from-dropdown @@ -21,7 +21,7 @@ = hidden_field_tag :from, params[:from] = button_tag type: 'button', title: params[:from], class: "btn form-control compare-dropdown-toggle js-compare-dropdown has-tooltip", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do .dropdown-toggle-text.str-truncated.monospace.float-left= params[:from] || _("Select branch/tag") - = sprite_icon('chevron-down', size: 16, css_class: 'float-right') + = sprite_icon('chevron-down', css_class: 'float-right') = render 'shared/ref_dropdown' = button_tag s_("CompareBranches|Compare"), class: "btn btn-success commits-compare-btn" diff --git a/app/views/projects/compare/index.html.haml b/app/views/projects/compare/index.html.haml index 93ee1bed809..e45ea209e8c 100644 --- a/app/views/projects/compare/index.html.haml +++ b/app/views/projects/compare/index.html.haml @@ -8,9 +8,9 @@ %code.ref-name master - example_sha = capture do %code.ref-name 4eedf23 - = (_("Choose a branch/tag (e.g. %{master}) or enter a commit (e.g. %{sha}) to see what's changed or to create a merge request.") % { master: example_master, sha: example_sha }).html_safe + = html_escape(_("Choose a branch/tag (e.g. %{master}) or enter a commit (e.g. %{sha}) to see what's changed or to create a merge request.")) % { master: example_master.html_safe, sha: example_sha.html_safe } %br - = (_("Changes are shown as if the <b>source</b> revision was being merged into the <b>target</b> revision.")).html_safe + = html_escape(_("Changes are shown as if the %{b_open}source%{b_close} revision was being merged into the %{b_open}target%{b_close} revision.")) % { b_open: '<b>'.html_safe, b_close: '</b>'.html_safe } .prepend-top-20 = render "form" diff --git a/app/views/projects/default_branch/_show.html.haml b/app/views/projects/default_branch/_show.html.haml index 38bec0361b0..b78535bbe2f 100644 --- a/app/views/projects/default_branch/_show.html.haml +++ b/app/views/projects/default_branch/_show.html.haml @@ -9,7 +9,7 @@ = _('Select the branch you want to set as the default for this project. All merge requests and commits will automatically be made against this branch unless you specify a different one.') .settings-content - = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, anchor: 'default-branch-settings' }, authenticity_token: true do |f| + = form_for @project, remote: true, html: { multipart: true, anchor: 'default-branch-settings' }, authenticity_token: true do |f| %fieldset - if @project.empty_repo? .text-secondary @@ -28,4 +28,5 @@ = _("Issues referenced by merge requests and commits within the default branch will be closed automatically") = link_to icon('question-circle'), help_page_path('user/project/issues/managing_issues.md', anchor: 'disabling-automatic-issue-closing'), target: '_blank' - = f.submit 'Save changes', class: "btn btn-success" + .gl-display-flex.gl-justify-content-end + = f.submit _('Save changes'), class: "btn btn-success" diff --git a/app/views/projects/deploy_keys/edit.html.haml b/app/views/projects/deploy_keys/edit.html.haml index 7fa7036245c..805d4983002 100644 --- a/app/views/projects/deploy_keys/edit.html.haml +++ b/app/views/projects/deploy_keys/edit.html.haml @@ -3,7 +3,7 @@ %hr %div - = form_for [@project.namespace.becomes(Namespace), @project, @deploy_key], include_id: false, html: { class: 'js-requires-input' } do |f| + = form_for [@project, @deploy_key], include_id: false, html: { class: 'js-requires-input' } do |f| = render partial: 'shared/deploy_keys/form', locals: { form: f, deploy_key: @deploy_key } .form-actions = f.submit 'Save changes', class: 'btn-success btn' diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml index c84c376d57b..5127d8b77d5 100644 --- a/app/views/projects/deployments/_actions.haml +++ b/app/views/projects/deployments/_actions.haml @@ -10,5 +10,5 @@ - actions.each do |action| - next unless can?(current_user, :update_build, action) %li - = link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do + = link_to [:play, @project, action], method: :post, rel: 'nofollow' do %span= action.name diff --git a/app/views/projects/deployments/_confirm_rollback_modal.html.haml b/app/views/projects/deployments/_confirm_rollback_modal.html.haml index 9162827b501..3735ead1559 100644 --- a/app/views/projects/deployments/_confirm_rollback_modal.html.haml +++ b/app/views/projects/deployments/_confirm_rollback_modal.html.haml @@ -16,7 +16,7 @@ = s_('Environments|This action will run the job defined by %{environment_name} for commit %{commit_id}, putting the environment in a previous version. You can revert it by re-deploying the latest version of your application. Are you sure you want to continue?').html_safe % {commit_id: commit_sha, environment_name: @environment.name} .modal-footer = button_tag _('Cancel'), type: 'button', class: 'btn btn-cancel', data: { dismiss: 'modal' } - = link_to [:retry, @project.namespace.becomes(Namespace), @project, deployment.deployable], method: :post, class: 'btn btn-danger' do + = link_to [:retry, @project, deployment.deployable], method: :post, class: 'btn btn-danger' do - if deployment.last? = s_('Environments|Re-deploy') - else diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index 4b76dde681e..6ba363e6555 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -3,6 +3,7 @@ - can_create_note = !@diff_notes_disabled && can?(current_user, :create_note, diffs.project) - diff_files = diffs.diff_files - 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" .content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed .files-changed-inner @@ -26,5 +27,12 @@ - if render_overflow_warning?(diffs) = render 'projects/diffs/warning', diff_files: diffs + .files{ data: { can_create_note: can_create_note } } - = render partial: 'projects/diffs/file', collection: diff_files, as: :diff_file, locals: { project: diffs.project, environment: environment, diff_page_context: diff_page_context } + - if load_diff_files_async + - url = url_for(safe_params.merge(action: 'diff_files')) + .js-diffs-batch{ data: { diff_files_path: url } } + .text-center + %span.spinner.spinner-md + - else + = render partial: 'projects/diffs/file', collection: diff_files, as: :diff_file, locals: { project: diffs.project, environment: environment, diff_page_context: diff_page_context } diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index 7395c16c38b..bd023e0442c 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -14,7 +14,7 @@ .file-actions.d-none.d-sm-block - if blob&.readable_text? = link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip', title: _("Toggle comments for this file"), disabled: @diff_notes_disabled do - = sprite_icon('comment', size: 16) + = sprite_icon('comment') \ - if editable_diff?(diff_file) - link_opts = @merge_request.persisted? ? { from_merge_request_iid: @merge_request.iid } : {} diff --git a/app/views/projects/diffs/_stats.html.haml b/app/views/projects/diffs/_stats.html.haml index 0e2a1165ad3..b438fbbf446 100644 --- a/app/views/projects/diffs/_stats.html.haml +++ b/app/views/projects/diffs/_stats.html.haml @@ -22,7 +22,7 @@ - diff_files.each do |diff_file| %li %a.diff-changed-file{ href: "##{hexdigest(diff_file.file_path)}", title: diff_file.new_path } - = sprite_icon(diff_file_changed_icon(diff_file), size: 16, css_class: "#{diff_file_changed_icon_color(diff_file)} diff-file-changed-icon gl-mr-3") + = sprite_icon(diff_file_changed_icon(diff_file), css_class: "#{diff_file_changed_icon_color(diff_file)} diff-file-changed-icon gl-mr-3") %span.diff-changed-file-content.gl-mr-3 - if diff_file.file_path %strong.diff-changed-file-name diff --git a/app/views/projects/diffs/_warning.html.haml b/app/views/projects/diffs/_warning.html.haml index 2cc3d921abc..643d111fedd 100644 --- a/app/views/projects/diffs/_warning.html.haml +++ b/app/views/projects/diffs/_warning.html.haml @@ -9,4 +9,4 @@ = link_to _("Plain diff"), merge_request_path(@merge_request, format: :diff), class: "btn btn-sm" = link_to _("Email patch"), merge_request_path(@merge_request, format: :patch), class: "btn btn-sm" %p - = _("To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed.").html_safe % { display_size: diff_files.size, real_size: diff_files.real_size } + = html_escape(_("To preserve performance only %{strong_open}%{display_size} of %{real_size}%{strong_close} files are displayed.")) % { display_size: diff_files.size, real_size: diff_files.real_size, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index e63b615115a..bf978b01652 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -17,13 +17,14 @@ %p= _('Choose visibility level, enable/disable project features (issues, repository, wiki, snippets) and set permissions.') .settings-content - = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "sharing-permissions-form" }, authenticity_token: true do |f| + = form_for @project, remote: true, html: { multipart: true, class: "sharing-permissions-form" }, authenticity_token: true do |f| %input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' } %template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data_json(@project) .js-project-permissions-form - - if show_visibility_confirm_modal?(@project) - = render "visibility_modal" - = f.submit _('Save changes'), class: "btn btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level } + .gl-display-flex.gl-justify-content-end + - if show_visibility_confirm_modal?(@project) + = render "visibility_modal" + = f.submit _('Save changes'), class: "btn btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level } %section.qa-merge-request-settings.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] } .settings-header @@ -34,10 +35,11 @@ .settings-content = render_if_exists 'shared/promotions/promote_mr_features' - = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f| + = form_for @project, remote: true, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f| %input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' } = render 'projects/merge_request_settings', form: f - = f.submit _('Save changes'), class: "btn btn-success qa-save-merge-request-changes rspec-save-merge-request-changes" + .gl-display-flex.gl-justify-content-end + = f.submit _('Save changes'), class: "btn btn-succes qa-save-merge-request-changes rspec-save-merge-request-changes" = render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded @@ -68,8 +70,9 @@ .sub-section %h4= _('Housekeeping') %p= _('Runs a number of housekeeping tasks within the current repository, such as compressing file revisions and removing unreachable objects.') - = link_to _('Run housekeeping'), housekeeping_project_path(@project), - method: :post, class: "btn btn-default" + .gl-display-flex.gl-justify-content-end + = link_to _('Run housekeeping'), housekeeping_project_path(@project), + method: :post, class: "btn btn-default" = render 'export', project: @project @@ -77,7 +80,7 @@ .sub-section.rename-repository %h4.warning-title= _('Change path') = render 'projects/errors' - = form_for([@project.namespace.becomes(Namespace), @project]) do |f| + = form_for @project do |f| .form-group = f.label :path, _('Path'), class: 'label-bold' .form-group @@ -91,12 +94,13 @@ %li= _('You will need to update your local repositories to point to the new location.') - if @project.deployment_platform.present? %li= _('Your deployment services will be broken, you will need to manually fix the services after renaming.') - = f.submit _('Change path'), class: "btn btn-warning qa-change-path-button" + .gl-display-flex.gl-justify-content-end + = f.submit _('Change path'), class: "btn btn-warning qa-change-path-button" - if can?(current_user, :change_namespace, @project) .sub-section %h4.danger-title= _('Transfer project') - = form_for([@project.namespace.becomes(Namespace), @project], url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'js-project-transfer-form' } ) do |f| + = form_for @project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'js-project-transfer-form' } do |f| .form-group = label_tag :new_namespace_id, nil, class: 'label-bold' do %span= _('Select a new namespace') @@ -107,14 +111,15 @@ %li= _('You can only transfer the project to namespaces you manage.') %li= _('You will need to update your local repositories to point to the new location.') %li= _('Project visibility level will be changed to match namespace rules when transferring to a group.') - = f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) } + .gl-display-flex.gl-justify-content-end + = f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) } - if @project.forked? && can?(current_user, :remove_fork_project, @project) .sub-section %h4.danger-title= _('Remove fork relationship') %p= remove_fork_project_description_message(@project) - = form_for([@project.namespace.becomes(Namespace), @project], url: remove_fork_project_path(@project), method: :delete, remote: true, html: { class: 'transfer-project' }) do |f| + = form_for @project, url: remove_fork_project_path(@project), method: :delete, remote: true, html: { class: 'transfer-project' } do |f| %p %strong= _('Once removed, the fork relationship cannot be restored and you will no longer be able to send merge requests to the source.') = button_to _('Remove fork relationship'), '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_warning_message(@project) } diff --git a/app/views/projects/environments/_form.html.haml b/app/views/projects/environments/_form.html.haml index 39eda493d69..0b8f9fe220d 100644 --- a/app/views/projects/environments/_form.html.haml +++ b/app/views/projects/environments/_form.html.haml @@ -6,7 +6,7 @@ - link_to_read_more = link_to(_("More information"), help_page_path("ci/environments/index.md")) = _("Environments allow you to track deployments of your application %{link_to_read_more}.").html_safe % { link_to_read_more: link_to_read_more } - = form_for [@project.namespace.becomes(Namespace), @project, @environment], html: { class: 'col-lg-9' } do |f| + = form_for [@project, @environment], html: { class: 'col-lg-9' } do |f| = form_errors(@environment) .form-group diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml index d5249662dde..2e665a12a0a 100644 --- a/app/views/projects/environments/show.html.haml +++ b/app/views/projects/environments/show.html.haml @@ -65,7 +65,7 @@ %h4.state-title = _("You don't have any deployments right now.") %p.blank-state-text - = _("Define environments in the deploy stage(s) in <code>.gitlab-ci.yml</code> to track deployments here.").html_safe + = 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"), class: "btn btn-success" - else diff --git a/app/views/projects/forks/_fork_button.html.haml b/app/views/projects/forks/_fork_button.html.haml index eec02a50b85..dd49e8bdb4b 100644 --- a/app/views/projects/forks/_fork_button.html.haml +++ b/app/views/projects/forks/_fork_button.html.haml @@ -1,26 +1,20 @@ - avatar = namespace_icon(namespace, 100) - can_create_project = current_user.can?(:create_projects, namespace) -- if forked_project = namespace.find_fork_of(@project) - .bordered-box.fork-thumbnail.text-center.gl-ml-3.gl-mr-3.gl-mt-3.gl-mb-3.forked - = link_to project_path(forked_project) do - - if /no_((\w*)_)*avatar/.match(avatar) - = group_icon(namespace, class: "avatar rect-avatar s100 identicon mx-auto") - - else - .avatar-container.s100.mx-auto - = image_tag(avatar, class: "avatar s100") - %h5.gl-mt-3 - = namespace.human_name -- else - .bordered-box.fork-thumbnail.text-center.gl-ml-3.gl-mr-3.gl-mt-3.gl-mb-3{ class: ("disabled" unless can_create_project) } - = link_to project_forks_path(@project, namespace_key: namespace.id), - method: "POST", - class: ("disabled has-tooltip" unless can_create_project), - title: (_('You have reached your project limit') unless can_create_project) do - - if /no_((\w*)_)*avatar/.match(avatar) - = group_icon(namespace, class: "avatar rect-avatar s100 identicon mx-auto") - - else - .avatar-container.s100.mx-auto - = image_tag(avatar, class: "avatar s100") - %h5.gl-mt-3{ data: { qa_selector: 'fork_namespace_content', qa_name: namespace.human_name } } - = namespace.human_name +.bordered-box.fork-thumbnail.text-center.gl-m-3{ class: ("disabled" unless can_create_project) } + - if /no_((\w*)_)*avatar/.match(avatar) + = group_icon(namespace, class: "avatar rect-avatar s100 identicon mx-auto") + - else + .avatar-container.s100.mx-auto.gl-mt-5 + = image_tag(avatar, class: "avatar s100") + %h5.gl-mt-3 + = namespace.human_name + - if forked_project = namespace.find_fork_of(@project) + = link_to _("Go to project"), project_path(forked_project), class: "btn" + - else + %div{ class: ('has-tooltip' unless can_create_project), + title: (_('You have reached your project limit') unless can_create_project) } + = link_to _("Select"), project_forks_path(@project, namespace_key: namespace.id), + data: { qa_selector: 'fork_namespace_button', qa_name: namespace.human_name }, + method: "POST", + class: ["btn btn-success", ("disabled" unless can_create_project)] diff --git a/app/views/projects/forks/error.html.haml b/app/views/projects/forks/error.html.haml index b37dba8b35d..5d527f1bcfb 100644 --- a/app/views/projects/forks/error.html.haml +++ b/app/views/projects/forks/error.html.haml @@ -2,7 +2,7 @@ - if @forked_project && !@forked_project.saved? .alert.alert-danger.alert-block %h4 - = sprite_icon('fork', size: 16) + = sprite_icon('fork') = _("Fork Error!") %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) } diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml index 887081d0f35..45d314a1088 100644 --- a/app/views/projects/forks/new.html.haml +++ b/app/views/projects/forks/new.html.haml @@ -5,17 +5,14 @@ %h4.gl-mt-0 = _("Fork project") %p - = _("A fork is a copy of a project.<br />Forking a repository allows you to make changes without affecting the original project.").html_safe + = _("A fork is a copy of a project.") + %br + = _('Forking a repository allows you to make changes without affecting the original project.') .col-lg-9 - - if @namespaces.present? + - if @own_namespace.present? .fork-thumbnail-container.js-fork-content %h5.gl-mt-0.gl-mb-0.gl-ml-3.gl-mr-3 = _("Select a namespace to fork the project") - - @namespaces.each do |namespace| - = render 'fork_button', namespace: namespace - - else - %strong - = _("No available namespaces to fork the project.") - %p.gl-mt-3 - = _("You must have permission to create a project in a namespace before forking.") + = render 'fork_button', namespace: @own_namespace + #fork-groups-mount-element{ data: { endpoint: new_project_fork_path(@project, format: :json), can_create_project: current_user.can_create_project?.to_s } } diff --git a/app/views/projects/hooks/edit.html.haml b/app/views/projects/hooks/edit.html.haml index e0ef0c0d3f9..f728ef5ac1a 100644 --- a/app/views/projects/hooks/edit.html.haml +++ b/app/views/projects/hooks/edit.html.haml @@ -7,7 +7,7 @@ = render 'shared/web_hooks/title_and_docs', hook: @hook .col-lg-9.gl-mb-3 - = form_for [@project.namespace.becomes(Namespace), @project, @hook], as: :hook, url: project_hook_path(@project, @hook) do |f| + = form_for [@project, @hook], as: :hook, url: project_hook_path(@project, @hook) do |f| = render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook } %span>= f.submit 'Save changes', class: 'btn btn-success gl-mr-3' diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml index 1845bd190d3..5c6a87ddb26 100644 --- a/app/views/projects/hooks/index.html.haml +++ b/app/views/projects/hooks/index.html.haml @@ -7,8 +7,9 @@ = render 'shared/web_hooks/title_and_docs', hook: @hook .col-lg-8.gl-mb-3 - = form_for @hook, as: :hook, url: polymorphic_path([@project.namespace.becomes(Namespace), @project, :hooks]) do |f| + = form_for @hook, as: :hook, url: polymorphic_path([@project, :hooks]) do |f| = render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook } - = f.submit 'Add webhook', class: 'btn btn-success' + .gl-display-flex.gl-justify-content-end + = f.submit 'Add webhook', class: 'btn btn-success' = render 'shared/web_hooks/index', hooks: @hooks, hook_class: @hook.class diff --git a/app/views/projects/incidents/index.html.haml b/app/views/projects/incidents/index.html.haml new file mode 100644 index 00000000000..3d66c254601 --- /dev/null +++ b/app/views/projects/incidents/index.html.haml @@ -0,0 +1,3 @@ +- page_title _('Incidents') + +#js-incidents{ data: incidents_data(@project) } diff --git a/app/views/projects/issues/_alert_moved_from_service_desk.html.haml b/app/views/projects/issues/_alert_moved_from_service_desk.html.haml index a6f969f8b10..9b142b08574 100644 --- a/app/views/projects/issues/_alert_moved_from_service_desk.html.haml +++ b/app/views/projects/issues/_alert_moved_from_service_desk.html.haml @@ -3,8 +3,8 @@ - service_desk_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: service_desk_link_url } .hide.gl-alert.gl-alert-warning.js-alert-moved-from-service-desk-warning.gl-mt-5{ role: 'alert' } - = sprite_icon('warning', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + = sprite_icon('warning', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') %button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') } - = sprite_icon('close', size: 16, css_class: 'gl-icon') + = sprite_icon('close', css_class: 'gl-icon') .gl-alert-body.gl-mr-3 = 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/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index bcc74e8d1d9..4273130bbc2 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -1,3 +1,5 @@ +- add_page_startup_api_call discussions_path(@issue) + - @gfm_form = true - content_for :note_actions do diff --git a/app/views/projects/issues/_form.html.haml b/app/views/projects/issues/_form.html.haml index 1be1087b36f..dcc8000c0c5 100644 --- a/app/views/projects/issues/_form.html.haml +++ b/app/views/projects/issues/_form.html.haml @@ -1,3 +1,3 @@ -= form_for [@project.namespace.becomes(Namespace), @project, @issue], += form_for [@project, @issue], html: { class: 'issue-form common-note-form js-quick-submit js-requires-input' } do |f| = render 'shared/issuable/form', f: f, issuable: @issue diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index e7cd35497e8..ba9ab50cb3a 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -1,12 +1,12 @@ -# DANGER: Any changes to this file need to be reflected in issuables_list/components/issuable.vue! -%li{ id: dom_id(issue), class: issue_css_classes(issue), url: issue_path(issue), data: { labels: issue.label_ids, id: issue.id, qa_selector: 'issue', qa_issue_title: issue.title } } +%li{ id: dom_id(issue), class: issue_css_classes(issue), url: issue_path(issue), data: { labels: issue.label_ids, id: issue.id, qa_selector: 'issue_container', qa_issue_title: issue.title } } .issue-box - if @can_bulk_update .issue-check.hidden = check_box_tag dom_id(issue, "selected"), nil, false, 'data-id' => issue.id, class: "selected-issuable" .issuable-info-container .issuable-main-info - .issue-title.title.d-flex.align-items-center + .issue-title.title %span.issue-title-text.js-onboarding-issue-item{ dir: "auto" } - if issue.confidential? %span.has-tooltip{ title: _('Confidential') } @@ -30,7 +30,7 @@ %span.issuable-milestone.d-none.d-sm-inline-block = link_to project_issues_path(issue.project, milestone_title: issue.milestone.title), data: { html: 'true', toggle: 'tooltip', title: milestone_tooltip_due_date(issue.milestone) } do - = icon('clock-o') + = sprite_icon('clock', css_class: 'gl-vertical-align-text-bottom') = issue.milestone.title - if issue.due_date %span.issuable-due-date.d-none.d-sm-inline-block.has-tooltip{ class: "#{'cred' if issue.overdue?}", title: _('Due date') } diff --git a/app/views/projects/issues/_issue_estimate.html.haml b/app/views/projects/issues/_issue_estimate.html.haml index 46797d0f1a0..c49bf626f4e 100644 --- a/app/views/projects/issues/_issue_estimate.html.haml +++ b/app/views/projects/issues/_issue_estimate.html.haml @@ -3,5 +3,5 @@ - if issue.time_estimate > 0 %span.issuable-estimate.d-none.d-sm-inline-block.has-tooltip{ data: { container: 'body', qa_selector: 'issuable_estimate' }, title: _('Estimate') } - = sprite_icon('timer', size: 16, css_class: 'issue-estimate-icon') + = sprite_icon('timer', css_class: 'issue-estimate-icon') = Gitlab::TimeTrackingFormatter.output(issue.time_estimate) diff --git a/app/views/projects/issues/_issues.html.haml b/app/views/projects/issues/_issues.html.haml index c0383c57e63..1e24b08ece2 100644 --- a/app/views/projects/issues/_issues.html.haml +++ b/app/views/projects/issues/_issues.html.haml @@ -1,8 +1,13 @@ - if Feature.enabled?(:vue_issuables_list, @project) - .js-issuables-list{ data: { endpoint: expose_url(api_v4_projects_issues_path(id: @project.id)), + - data_endpoint = local_assigns.fetch(:data_endpoint, expose_path(api_v4_projects_issues_path(id: @project.id))) + - default_empty_state_meta = { create_issue_path: new_project_issue_path(@project), svg_path: image_path('illustrations/issues.svg') } + - data_empty_state_meta = local_assigns.fetch(:data_empty_state_meta, default_empty_state_meta) + - type = local_assigns.fetch(:type, '') + .js-issuables-list{ data: { endpoint: data_endpoint, + 'empty-state-meta': data_empty_state_meta.to_json, 'can-bulk-edit': @can_bulk_update.to_json, - 'empty-svg-path': image_path('illustrations/issues.svg'), - 'sort-key': @sort } } + 'sort-key': @sort, + 'type': type } } - else - empty_state_path = local_assigns.fetch(:empty_state_path, 'shared/empty_states/issues') %ul.content-list.issues-list.issuable-list{ class: ("manual-ordering" if @sort == 'relative_position') } diff --git a/app/views/projects/issues/_service_desk_empty_state.html.haml b/app/views/projects/issues/_service_desk_empty_state.html.haml new file mode 100644 index 00000000000..4f004439f45 --- /dev/null +++ b/app/views/projects/issues/_service_desk_empty_state.html.haml @@ -0,0 +1,33 @@ +- service_desk_enabled = @project.service_desk_enabled? + +- can_edit_project_settings = can?(current_user, :admin_project, @project) +- title_text = _("Use Service Desk to connect with your users (e.g. to offer customer support) through email right inside GitLab") + +- if Gitlab::ServiceDesk.supported? + .empty-state + .svg-content + = render 'shared/empty_states/icons/service_desk_empty_state.svg' + + .text-content + %h4= title_text + + - if can_edit_project_settings && service_desk_enabled + %p + = _("Have your users email") + %code= @project.service_desk_address + + %span= _("Those emails automatically become issues (with the comments becoming the email conversation) listed here.") + = link_to _('Read more'), help_page_path('user/project/service_desk') + + - if can_edit_project_settings && !service_desk_enabled + .text-center + = link_to _("Turn on Service Desk"), edit_project_path(@project), class: 'btn btn-success' +- else + .empty-state + .svg-content + = render 'shared/empty_states/icons/service_desk_setup.svg' + .text-content + %h4= _('Service Desk is enabled but not yet active') + %p + = _("You must set up incoming email before it becomes active.") + = link_to _('More information'), help_page_path('administration/incoming_email', anchor: 'set-it-up') diff --git a/app/views/projects/issues/_service_desk_info_content.html.haml b/app/views/projects/issues/_service_desk_info_content.html.haml index ddd8e545043..7fa2f3fab00 100644 --- a/app/views/projects/issues/_service_desk_info_content.html.haml +++ b/app/views/projects/issues/_service_desk_info_content.html.haml @@ -1,39 +1,23 @@ -- is_empty_state = @issues.blank? - service_desk_enabled = @project.service_desk_enabled? -- callout_selector = is_empty_state ? 'empty-state' : 'non-empty-state media' -- svg_path = !is_empty_state ? 'shared/empty_states/icons/service_desk_callout.svg' : 'shared/empty_states/icons/service_desk_empty_state.svg' - can_edit_project_settings = can?(current_user, :admin_project, @project) - title_text = _("Use Service Desk to connect with your users (e.g. to offer customer support) through email right inside GitLab") -- if Gitlab::ServiceDesk.supported? - %div{ class: "#{callout_selector}" } - .svg-content - = render svg_path +.non-empty-state.media + .svg-content + = render 'shared/empty_states/icons/service_desk_callout.svg' - %div{ class: is_empty_state ? "text-content" : "prepend-top-10 gl-ml-3" } - - if is_empty_state - %h4= title_text - - else - %h5= title_text + .gl-mt-3.gl-ml-3 + %h5= title_text - - if can_edit_project_settings && service_desk_enabled - %p - = _("Have your users email") - %code= @project.service_desk_address + - if can_edit_project_settings && service_desk_enabled + %p + = _("Have your users email") + %code= @project.service_desk_address - %span= _("Those emails automatically become issues (with the comments becoming the email conversation) listed here.") - = link_to _('Read more'), help_page_path('user/project/service_desk') + %span= _("Those emails automatically become issues (with the comments becoming the email conversation) listed here.") + = link_to _('Read more'), help_page_path('user/project/service_desk') - - if can_edit_project_settings && !service_desk_enabled - %div{ class: is_empty_state ? "text-center" : "prepend-top-10" } - = link_to _("Turn on Service Desk"), edit_project_path(@project), class: 'btn btn-success' -- else - .empty-state - .svg-content - = render 'shared/empty_states/icons/service_desk_setup.svg' - .text-content - %h4= _('Service Desk is enabled but not yet active') - %p - = _("You must set up incoming email before it becomes active.") - = link_to _('More information'), help_page_path('administration/incoming_email', anchor: 'set-it-up') + - if can_edit_project_settings && !service_desk_enabled + .gl-mt-3 + = link_to _("Turn on Service Desk"), edit_project_path(@project), class: 'btn btn-success' diff --git a/app/views/projects/issues/export_csv/_modal.html.haml b/app/views/projects/issues/export_csv/_modal.html.haml index 342c3ba27bb..793e43da935 100644 --- a/app/views/projects/issues/export_csv/_modal.html.haml +++ b/app/views/projects/issues/export_csv/_modal.html.haml @@ -8,7 +8,7 @@ .svg-content.import-export-svg-container = image_tag 'illustrations/export-import.svg', alt: _('Import/Export illustration'), class: 'illustration' %a.close{ href: '#', 'data-dismiss' => 'modal' } - = sprite_icon('close', size: 16, css_class: 'gl-icon') + = sprite_icon('close', css_class: 'gl-icon') .modal-body .modal-subheader = icon('check', { class: 'checkmark' }) @@ -16,6 +16,6 @@ - issues_count = issuables_count_for_state(:issues, params[:state]) = n_('%d issue selected', '%d issues selected', issues_count) % issues_count .modal-text - = _('The CSV export will be created in the background. Once finished, it will be sent to <strong>%{email}</strong> in an attachment.').html_safe % { email: @current_user.notification_email } + = html_escape(_('The CSV export will be created in the background. Once finished, it will be sent to %{strong_open}%{email}%{strong_close} in an attachment.')) % { email: @current_user.notification_email, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } .modal-footer = link_to _('Export issues'), export_csv_project_issues_path(@project, request.query_parameters), method: :post, class: 'btn btn-success float-left', title: _('Export issues'), data: { track_label: "export_issues_csv", track_event: "click_button", track_value: "", qa_selector: "export_issues_button" } diff --git a/app/views/projects/issues/service_desk.html.haml b/app/views/projects/issues/service_desk.html.haml index 9b0b3ebc9e0..bd260bdf143 100644 --- a/app/views/projects/issues/service_desk.html.haml +++ b/app/views/projects/issues/service_desk.html.haml @@ -5,9 +5,11 @@ - content_for :breadcrumbs_extra do = render "projects/issues/nav_btns", show_export_button: false, show_rss_button: false -- support_bot_attrs = UserSerializer.new.represent(User.support_bot).to_json +- support_bot_attrs = { service_desk_enabled: @project.service_desk_enabled?, **UserSerializer.new.represent(User.support_bot) }.to_json -%div{ class: "js-service-desk-issues service-desk-issues", data: { support_bot: support_bot_attrs } } +- data_endpoint = "#{expose_path(api_v4_projects_issues_path(id: @project.id))}?author_id=#{User.support_bot.id}" + +%div{ class: "js-service-desk-issues service-desk-issues", data: { support_bot: support_bot_attrs, service_desk_meta: service_desk_meta(@project) } } .top-area = render 'shared/issuable/nav', type: :issues .nav-controls.d-block.d-sm-none @@ -15,7 +17,15 @@ - if @issues.present? = render 'shared/issuable/search_bar', type: :issues - = render 'service_desk_info_content' + - if Gitlab::ServiceDesk.supported? + = render 'service_desk_info_content' + -# TODO Remove empty_state_path once vue_issuables_list FF is removed. + -# https://gitlab.com/gitlab-org/gitlab/-/issues/235652 + -# `empty_state_path` is used to render the empty state in the HAML version of issuables list. .issues-holder - = render 'projects/issues/issues', empty_state_path: 'service_desk_info_content' + = render 'projects/issues/issues', + empty_state_path: 'service_desk_empty_state', + data_endpoint: data_endpoint, + data_empty_state_meta: service_desk_meta(@project), + type: 'service_desk' diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index 2a0dc5e30b9..a7817ad5552 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -9,6 +9,7 @@ - can_reopen_issue = can?(current_user, :reopen_issue, @issue) - can_report_spam = @issue.submittable_as_spam_by?(current_user) - can_create_issue = show_new_issue_link?(@project) +- related_branches_path = related_branches_project_issue_path(@project, @issue) = render_if_exists "projects/issues/alert_blocked", issue: @issue, current_user: current_user = render "projects/issues/alert_moved_from_service_desk", issue: @issue @@ -16,11 +17,11 @@ .detail-page-header .detail-page-header-body .issuable-status-box.status-box.status-box-issue-closed{ class: issue_status_visibility(@issue, status_box: :closed) } - = sprite_icon('mobile-issue-close', size: 16, css_class: 'd-block d-sm-none') + = sprite_icon('mobile-issue-close', css_class: 'd-block d-sm-none') .d-none.d-sm-block = issue_closed_text(@issue, current_user) .issuable-status-box.status-box.status-box-open{ class: issue_status_visibility(@issue, status_box: :open) } - = sprite_icon('issue-open-m', size: 16, css_class: 'd-block d-sm-none') + = sprite_icon('issue-open-m', css_class: 'd-block d-sm-none') %span.d-none.d-sm-block Open .issuable-meta @@ -82,7 +83,8 @@ #js-related-merge-requests{ data: { endpoint: expose_path(api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: @issue.iid)), project_namespace: @project.namespace.path, project_path: @project.path } } - if can?(current_user, :download_code, @project) - #related-branches{ data: { url: related_branches_project_issue_path(@project, @issue) } } + - add_page_startup_api_call related_branches_path + #related-branches{ data: { url: related_branches_path } } -# This element is filled in using JavaScript. .content-block.emoji-block.emoji-block-sticky diff --git a/app/views/projects/issues/verify.html.haml b/app/views/projects/issues/verify.html.haml index 6da7c317f3a..935a3493a37 100644 --- a/app/views/projects/issues/verify.html.haml +++ b/app/views/projects/issues/verify.html.haml @@ -1,5 +1,3 @@ -- form = [@project.namespace.becomes(Namespace), @project, @issue] - -= render layout: 'layouts/recaptcha_verification', locals: { spammable: @issue, form: form } do += render layout: 'layouts/recaptcha_verification', locals: { spammable: @issue } do = hidden_field_tag(:merge_request_to_resolve_discussions_of, params[:merge_request_to_resolve_discussions_of]) = hidden_field_tag(:discussion_to_resolve, params[:discussion_to_resolve]) diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml index ba47712211d..8d8270847a3 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -8,7 +8,7 @@ #promote-label-modal = render 'shared/labels/nav', labels_or_filters: labels_or_filters, can_admin_label: can_admin_label - .labels-container.prepend-top-10 + .labels-container.gl-mt-3 - if can_admin_label && search.blank? %p.text-muted = _('Labels can be applied to issues and merge requests.') @@ -18,7 +18,7 @@ -# Only show it in the first page - hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1') .prioritized-labels{ class: [('hide' if hide), ('is-not-draggable' unless can_admin_label)] } - %h5.prepend-top-10= _('Prioritized Labels') + %h5.gl-mt-3= _('Prioritized Labels') .content-list.manage-labels-list.js-prioritized-labels{ 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' diff --git a/app/views/projects/merge_requests/_approvals_count.html.haml b/app/views/projects/merge_requests/_approvals_count.html.haml index 464cba1bb2d..449e75f26e0 100644 --- a/app/views/projects/merge_requests/_approvals_count.html.haml +++ b/app/views/projects/merge_requests/_approvals_count.html.haml @@ -6,7 +6,7 @@ - final_text = n_("%d approver", "%d approvers", total) % total - final_self_text = n_("%d approver (you've approved)", "%d approvers (you've approved)", total) % total - - approval_icon = sprite_icon((self_approved ? 'approval-solid' : 'approval'), size: 16, css_class: 'align-middle') + - approval_icon = sprite_icon((self_approved ? 'approval-solid' : 'approval'), css_class: 'align-middle') %li.d-none.d-sm-inline-block.has-tooltip.text-success{ title: self_approved ? final_self_text : final_text } = approval_icon diff --git a/app/views/projects/merge_requests/_awards_block.html.haml b/app/views/projects/merge_requests/_awards_block.html.haml index e4a7b9b7e62..e7577e13b68 100644 --- a/app/views/projects/merge_requests/_awards_block.html.haml +++ b/app/views/projects/merge_requests/_awards_block.html.haml @@ -1,6 +1,5 @@ .content-block.content-block-small.emoji-list-container.js-noteable-awards = render 'award_emoji/awards_block', awardable: @merge_request, inline: true do - - if mr_tabs_position_enabled? - .ml-auto.mt-auto.mb-auto - #js-vue-sort-issue-discussions - = render "projects/merge_requests/discussion_filter" + .ml-auto.mt-auto.mb-auto + #js-vue-sort-issue-discussions + = render "projects/merge_requests/discussion_filter" diff --git a/app/views/projects/merge_requests/_commits.html.haml b/app/views/projects/merge_requests/_commits.html.haml index b414518b597..178e57b08b3 100644 --- a/app/views/projects/merge_requests/_commits.html.haml +++ b/app/views/projects/merge_requests/_commits.html.haml @@ -1,8 +1,18 @@ -- if @commits.empty? - .commits-empty - %h4 - There are no commits yet. +- can_update_merge_request = can?(current_user, :update_merge_request, @merge_request) + +- if @commits.empty? && @context_commits.empty? + .commits-empty.mt-5 = custom_icon ('illustration_no_commits') + %h4 + = _('There are no commits yet.') + - if @project&.context_commits_enabled? && can_update_merge_request + %p + = _('Push commits to the source branch or add previously merged commits to review them.') + %button.btn.btn-primary.add-review-item-modal-trigger{ type: "button", data: { commits_empty: 'true', context_commits_empty: 'true' } } + = _('Add previously merged commits') - else %ol#commits-list.list-unstyled = render "projects/commits/commits", merge_request: @merge_request + +- if @project&.context_commits_enabled? && can_update_merge_request && @merge_request.iid + .add-review-item-modal-wrapper{ data: { context_commits_path: context_commits_project_json_merge_request_url(@merge_request&.project, @merge_request, :json), target_branch: @merge_request.target_branch, merge_request_iid: @merge_request.iid, project_id: @merge_request.project.id } } diff --git a/app/views/projects/merge_requests/_form.html.haml b/app/views/projects/merge_requests/_form.html.haml index a7c9e54506d..a68a4318538 100644 --- a/app/views/projects/merge_requests/_form.html.haml +++ b/app/views/projects/merge_requests/_form.html.haml @@ -1,3 +1,3 @@ -= form_for [@project.namespace.becomes(Namespace), @project, @merge_request], += form_for [@project, @merge_request], html: { class: 'merge-request-form common-note-form js-requires-input js-quick-submit' } do |f| = render 'shared/issuable/form', f: f, issuable: @merge_request, presenter: @mr_presenter diff --git a/app/views/projects/merge_requests/_how_to_merge.html.haml b/app/views/projects/merge_requests/_how_to_merge.html.haml index a2da0e707d3..df81e608c3e 100644 --- a/app/views/projects/merge_requests/_how_to_merge.html.haml +++ b/app/views/projects/merge_requests/_how_to_merge.html.haml @@ -32,12 +32,12 @@ - if @merge_request.for_fork? :preserve git fetch origin - git checkout "origin/#{h @merge_request.target_branch}" + git checkout "#{h @merge_request.target_branch}" git merge --no-ff "#{h @merge_request.source_project_path}-#{h @merge_request.source_branch}" - else :preserve git fetch origin - git checkout "origin/#{h @merge_request.target_branch}" + git checkout "#{h @merge_request.target_branch}" git merge --no-ff "#{h @merge_request.source_branch}" %p %strong Step 4. diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index d3e98bac7f9..ad0f4d03f9a 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -25,7 +25,7 @@ %span.issuable-milestone.d-none.d-sm-inline-block = 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 - = icon('clock-o') + = sprite_icon('clock', 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') } @@ -45,13 +45,13 @@ = _('MERGED') - elsif merge_request.closed? %li.issuable-status.d-none.d-sm-inline-block - = icon('ban') + = sprite_icon('cancel', css_class: 'gl-vertical-align-text-bottom') = _('CLOSED') = 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 = link_to merge_request_path(merge_request), class: "has-tooltip", title: _('Cannot be merged automatically') do - = icon('exclamation-triangle') + = sprite_icon('warning-solid') - if merge_request.assignees.any? %li.d-flex = render 'shared/issuable/assignees', project: merge_request.project, issuable: merge_request diff --git a/app/views/projects/merge_requests/_mr_box.html.haml b/app/views/projects/merge_requests/_mr_box.html.haml index ec78b040167..c38cf62b36c 100644 --- a/app/views/projects/merge_requests/_mr_box.html.haml +++ b/app/views/projects/merge_requests/_mr_box.html.haml @@ -1,6 +1,3 @@ -.detail-page-description{ class: ("py-2" if mr_tabs_position_enabled?) } - %h2.title.qa-title{ class: ("mb-0" if mr_tabs_position_enabled?) } +.detail-page-description.py-2 + %h2.title.qa-title.mb-0 = markdown_field(@merge_request, :title) - - - unless mr_tabs_position_enabled? - = render "projects/merge_requests/description" diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml index 72931448432..8aa4a935384 100644 --- a/app/views/projects/merge_requests/_mr_title.html.haml +++ b/app/views/projects/merge_requests/_mr_title.html.haml @@ -7,16 +7,15 @@ .alert.alert-danger The source project of this merge request has been removed. -.detail-page-header{ class: ("border-bottom-0 pt-0 pb-0" if mr_tabs_position_enabled?) } +.detail-page-header.border-bottom-0.pt-0.pb-0 .detail-page-header-body .issuable-status-box.status-box{ class: status_box_class(@merge_request) } - = sprite_icon(state_icon_name, size: 16, css_class: 'd-block d-sm-none') + = sprite_icon(state_icon_name, css_class: 'd-block d-sm-none') %span.d-none.d-sm-block = state_human_name .issuable-meta - - if @merge_request.discussion_locked? - .issuable-warning-icon.inline= sprite_icon('lock', size: 16, css_class: 'icon') + #js-issuable-header-warnings = issuable_meta(@merge_request, @project, "Merge request") %a.btn.btn-default.float-right.d-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" } diff --git a/app/views/projects/merge_requests/_widget.html.haml b/app/views/projects/merge_requests/_widget.html.haml index 16b08cbf648..64b14f8889c 100644 --- a/app/views/projects/merge_requests/_widget.html.haml +++ b/app/views/projects/merge_requests/_widget.html.haml @@ -1,6 +1,3 @@ -- if @merge_request.source_branch_exists? - = render "projects/merge_requests/how_to_merge" - = javascript_tag nonce: true do :plain window.gl = window.gl || {}; diff --git a/app/views/projects/merge_requests/creations/_new_compare.html.haml b/app/views/projects/merge_requests/creations/_new_compare.html.haml index 99537ba8152..874adb19734 100644 --- a/app/views/projects/merge_requests/creations/_new_compare.html.haml +++ b/app/views/projects/merge_requests/creations/_new_compare.html.haml @@ -1,7 +1,7 @@ %h3.page-title New Merge Request -= form_for [@project.namespace.becomes(Namespace), @project, @merge_request], url: project_new_merge_request_path(@project), method: :get, html: { class: "merge-request-form js-requires-input" } do |f| += form_for [@project, @merge_request], url: project_new_merge_request_path(@project), method: :get, html: { class: "merge-request-form js-requires-input" } do |f| - if params[:nav_source].present? = hidden_field_tag(:nav_source, params[:nav_source]) .hide.alert.alert-danger.mr-compare-errors 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 fdf0bfe8e50..79781e4a311 100644 --- a/app/views/projects/merge_requests/creations/_new_submit.html.haml +++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml @@ -1,6 +1,6 @@ %h3.page-title New Merge Request -= form_for [@project.namespace.becomes(Namespace), @project, @merge_request], html: { class: 'merge-request-form common-note-form js-requires-input js-quick-submit' } do |f| += form_for [@project, @merge_request], html: { class: 'merge-request-form common-note-form js-requires-input js-quick-submit' } do |f| = render 'shared/issuable/form', f: f, issuable: @merge_request, commits: @commits, presenter: @mr_presenter = f.hidden_field :source_project_id = f.hidden_field :source_branch diff --git a/app/views/projects/merge_requests/diffs/_commit_widget.html.haml b/app/views/projects/merge_requests/diffs/_commit_widget.html.haml index efc052ca791..c022d2c70d8 100644 --- a/app/views/projects/merge_requests/diffs/_commit_widget.html.haml +++ b/app/views/projects/merge_requests/diffs/_commit_widget.html.haml @@ -2,8 +2,10 @@ WARNING: Please keep changes up-to-date with the following files: - `assets/javascripts/diffs/components/commit_widget.vue` -#----------------------------------------------------------------- +- collapsible = local_assigns.fetch(:collapsible, true) + - if @commit - .info-well.d-none.d-sm-block.gl-mt-3 + .info-well.mw-100.mx-0 .well-segment %ul.blob-commit-info - = render 'projects/commits/commit', commit: @commit, merge_request: @merge_request, view_details: true + = render 'projects/commits/commit', commit: @commit, merge_request: @merge_request, view_details: true, collapsible: collapsible diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 03fa9758587..746d613934c 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -12,22 +12,17 @@ .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 } } = render "projects/merge_requests/mr_title" + - if @merge_request.source_branch_exists? + = render "projects/merge_requests/how_to_merge" + .merge-request-details.issuable-details{ data: { id: @merge_request.project.id } } = render "projects/merge_requests/mr_box" - - - unless mr_tabs_position_enabled? - = render "projects/merge_requests/widget" - = render "projects/merge_requests/awards_block" - .merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') } .merge-request-tabs-container %ul.merge-request-tabs.nav-tabs.nav.nav-links = render "projects/merge_requests/tabs/tab", class: "notes-tab", qa_selector: "notes_tab" do = tab_link_for @merge_request, :show, force_link: @commit.present? do - - if mr_tabs_position_enabled? - = _("Overview") - - else - = _("Discussion") + = _("Overview") %span.badge.badge-pill= @merge_request.related_notes.user.count - if @merge_request.source_project = render "projects/merge_requests/tabs/tab", name: "commits", class: "commits-tab" do @@ -43,11 +38,7 @@ = tab_link_for @merge_request, :diffs do = _("Changes") %span.badge.badge-pill= @merge_request.diff_size - - if mr_tabs_position_enabled? && show_tabs_feature_highlight? - .js-tabs-feature-highlight{ data: { dismiss_endpoint: user_callouts_path, feature_id: UserCalloutsHelper::TABS_POSITION_HIGHLIGHT } } .d-flex.flex-wrap.align-items-center.justify-content-lg-end - - unless mr_tabs_position_enabled? - = render "projects/merge_requests/discussion_filter" #js-vue-discussion-counter .tab-content#diff-notes-app @@ -59,18 +50,18 @@ %section.col-md-12 %script.js-notes-data{ type: "application/json" }= initial_notes_data(true).to_json.html_safe .issuable-discussion.js-vue-notes-event - - if mr_tabs_position_enabled? - - if @merge_request.description.present? - .detail-page-description - = render "projects/merge_requests/description" - = render "projects/merge_requests/widget" - = render "projects/merge_requests/awards_block" + - if @merge_request.description.present? + .detail-page-description + = render "projects/merge_requests/description" + = render "projects/merge_requests/widget" + = render "projects/merge_requests/awards_block" #js-vue-mr-discussions{ data: { notes_data: notes_data(@merge_request).to_json, noteable_data: serialize_issuable(@merge_request, serializer: 'noteable'), noteable_type: 'MergeRequest', target_type: 'merge_request', help_page_path: suggest_changes_help_path, - current_user_data: @current_user_data} } + current_user_data: @current_user_data, + is_locked: @merge_request.discussion_locked.to_s } } = render "projects/merge_requests/tabs/pane", name: "commits", id: "commits", class: "commits" do -# This tab is always loaded via AJAX diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index eeff91f631c..907af326ec5 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -1,4 +1,4 @@ -= form_for [@project.namespace.becomes(Namespace), @project, @milestone], += form_for [@project, @milestone], html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' } do |f| = form_errors(@milestone) .row diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 5239af82ba6..99e626161c4 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -8,7 +8,7 @@ = render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project -- if can?(current_user, :read_issue, @project) && @milestone.total_issues_count.zero? +- if can?(current_user, :read_issue, @project) && @milestone.total_issues_count == 0 .alert.alert-success.gl-mt-3 %span= _('Assign some issues to this milestone.') - elsif @milestone.complete? && @milestone.active? diff --git a/app/views/projects/mirrors/_instructions.html.haml b/app/views/projects/mirrors/_instructions.html.haml index 15c9076c1ab..97b04acea31 100644 --- a/app/views/projects/mirrors/_instructions.html.haml +++ b/app/views/projects/mirrors/_instructions.html.haml @@ -1,10 +1,10 @@ .account-well.gl-mt-3.gl-mb-3 %ul %li - = _('The repository must be accessible over <code>http://</code>, - <code>https://</code>, <code>ssh://</code> or <code>git://</code>.').html_safe - %li= _('When using the <code>http://</code> or <code>https://</code> protocols, please provide the exact URL to the repository. HTTP redirects will not be followed.').html_safe - %li= _('Include the username in the URL if required: <code>https://username@gitlab.company.com/group/project.git</code>.').html_safe + = html_escape(_('The repository must be accessible over %{code_open}http://%{code_close}, + %{code_open}https://%{code_close}, %{code_open}ssh://%{code_close} or %{code_open}git://%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } + %li= html_escape(_('When using the %{code_open}http://%{code_close} or %{code_open}https://%{code_close} protocols, please provide the exact URL to the repository. HTTP redirects will not be followed.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } + %li= html_escape(_('Include the username in the URL if required: %{code_open}https://username@gitlab.company.com/group/project.git%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } %li - minutes = Gitlab.config.gitlab_shell.git_timeout / 60 = _("The update action will time out after %{number_of_minutes} minutes. For big repositories, use a clone/push combination.") % { number_of_minutes: minutes } diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index 38e4fbf73e0..2f55cce70dc 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -3,7 +3,7 @@ - mirror_settings_enabled = can?(current_user, :admin_remote_mirror, @project) - mirror_settings_class = "#{'expanded' if expanded} #{'js-mirror-settings' if mirror_settings_enabled}".strip -%section.settings.project-mirror-settings.no-animate#js-push-remote-settings{ class: mirror_settings_class, data: { qa_selector: 'mirroring_repositories_settings_section' } } +%section.settings.project-mirror-settings.no-animate#js-push-remote-settings{ class: mirror_settings_class, data: { qa_selector: 'mirroring_repositories_settings_content' } } .settings-header %h4= _('Mirroring repositories') %button.btn.js-settings-toggle @@ -27,16 +27,16 @@ = render 'projects/mirrors/mirror_repos_form', f: f - .form-check.append-bottom-10 + .form-check.gl-mb-3 = check_box_tag :only_protected_branches, '1', false, class: 'js-mirror-protected form-check-input' = label_tag :only_protected_branches, _('Only mirror protected branches'), class: 'form-check-label' = link_to icon('question-circle'), help_page_path('user/project/protected_branches'), target: '_blank' - .panel-footer + .panel-footer.gl-display-flex.gl-justify-content-end = f.submit _('Mirror repository'), class: 'btn btn-success js-mirror-submit qa-mirror-repository-button', name: :update_remote_mirror - else .gl-alert.gl-alert-info{ role: 'alert' } - = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') .gl-alert-body = _('Mirror settings are only available to GitLab administrators.') @@ -70,9 +70,8 @@ .badge.mirror-error-badge{ data: { toggle: 'tooltip', html: 'true', qa_selector: 'mirror_error_badge' }, title: html_escape(mirror.last_error.try(:strip)) }= _('Error') %td - if mirror_settings_enabled - .btn-group.mirror-actions-group.pull-right{ role: 'group' } + .btn-group.mirror-actions-group.float-right{ role: 'group' } - if mirror.ssh_key_auth? = clipboard_button(text: mirror.ssh_public_key, class: 'btn btn-default', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button') = render 'shared/remote_mirror_update_button', remote_mirror: mirror %button.js-delete-mirror.qa-delete-mirror.rspec-delete-mirror.btn.btn-danger{ type: 'button', data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' }, title: _('Remove') }= icon('trash-o') - diff --git a/app/views/projects/mirrors/_mirror_repos_push.html.haml b/app/views/projects/mirrors/_mirror_repos_push.html.haml index 9b5b31bfc15..39ceaedab61 100644 --- a/app/views/projects/mirrors/_mirror_repos_push.html.haml +++ b/app/views/projects/mirrors/_mirror_repos_push.html.haml @@ -7,7 +7,7 @@ = rm_f.hidden_field :keep_divergent_refs, class: 'js-mirror-keep-divergent-refs-hidden' = render partial: 'projects/mirrors/ssh_host_keys', locals: { f: rm_f } = render partial: 'projects/mirrors/authentication_method', locals: { f: rm_f } - .form-check.append-bottom-10 + .form-check.gl-mb-3 = check_box_tag :keep_divergent_refs, '1', false, class: 'js-mirror-keep-divergent-refs form-check-input' = label_tag :keep_divergent_refs, _('Keep divergent refs'), class: 'form-check-label' = link_to icon('question-circle'), help_page_path('user/project/repository/repository_mirroring', anchor: 'keep-divergent-refs-core'), target: '_blank' diff --git a/app/views/projects/mirrors/_ssh_host_keys.html.haml b/app/views/projects/mirrors/_ssh_host_keys.html.haml index 236ede32d31..786918c4970 100644 --- a/app/views/projects/mirrors/_ssh_host_keys.html.haml +++ b/app/views/projects/mirrors/_ssh_host_keys.html.haml @@ -6,7 +6,7 @@ %button.btn.btn-inverted.btn-secondary.inline.js-detect-host-keys.gl-mr-3{ type: 'button', data: { qa_selector: 'detect_host_keys' } } .js-spinner.d-none.spinner.mr-1 = _('Detect host keys') - .fingerprint-ssh-info.js-fingerprint-ssh-info.prepend-top-10.append-bottom-10{ class: ('collapse' unless mirror.ssh_mirror_url?) } + .fingerprint-ssh-info.js-fingerprint-ssh-info.gl-mt-3.gl-mb-3{ class: ('collapse' unless mirror.ssh_mirror_url?) } %label.label-bold = _('Fingerprints') .fingerprints-list.js-fingerprints-list{ data: { qa_selector: 'fingerprints_list' } } diff --git a/app/views/projects/no_repo.html.haml b/app/views/projects/no_repo.html.haml index d5030a02cdd..0ab9d9c4005 100644 --- a/app/views/projects/no_repo.html.haml +++ b/app/views/projects/no_repo.html.haml @@ -22,4 +22,4 @@ - if can? current_user, :remove_project, @project .prepend-top-20 - = link_to _('Remove project'), project_path(@project), data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-inverted btn-remove float-right" + = link_to _('Delete project'), project_path(@project), data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-inverted btn-remove float-right" diff --git a/app/views/projects/notes/_actions.html.haml b/app/views/projects/notes/_actions.html.haml index d725098752d..66721a28e62 100644 --- a/app/views/projects/notes/_actions.html.haml +++ b/app/views/projects/notes/_actions.html.haml @@ -1,7 +1,7 @@ - access = note_max_access_for_user(note) - if note.has_special_role?(Note::SpecialRole::FIRST_TIME_CONTRIBUTOR) %span.note-role.note-role-special.has-tooltip{ title: _("This is the author's first Merge Request to this project.") } - = issuable_first_contribution_icon + = sprite_icon('first-contribution', css_class: 'gl-icon gl-vertical-align-top') - if access.nonzero? %span.note-role.user-access-role= Gitlab::Access.human_access(access) diff --git a/app/views/projects/packages/packages/_legacy_package_list.html.haml b/app/views/projects/packages/packages/_legacy_package_list.html.haml new file mode 100644 index 00000000000..43dbb5c3eee --- /dev/null +++ b/app/views/projects/packages/packages/_legacy_package_list.html.haml @@ -0,0 +1,60 @@ +- sort_value = @sort +- sort_title = packages_sort_option_title(sort_value) + +- if @packages.any? + .d-flex.justify-content-end + .dropdown.inline.gl-mt-3.gl-mb-3.package-sort-dropdown + .btn-group{ role: 'group' } + .btn-group{ role: 'group' } + %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown', display: 'static' }, class: 'btn btn-default' } + = sort_title + = icon('chevron-down') + %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable.dropdown-menu-sort + %li + = sortable_item(sort_title_created_date, package_sort_path(sort: sort_value_recently_created), sort_title) + = sortable_item(sort_title_name, package_sort_path(sort: sort_value_name_desc), sort_title) + = sortable_item(sort_title_version, package_sort_path(sort: sort_value_version_desc), sort_title) + = sortable_item(sort_title_type, package_sort_path(sort: sort_value_type_desc), sort_title) + = packages_sort_direction_button(sort_value) + + .table-holder + .gl-responsive-table-row.table-row-header.bg-secondary-50.px-2.border-top{ role: 'row' } + .table-section.section-30{ role: 'rowheader' } + = _('Name') + .table-section.section-20{ role: 'rowheader' } + = _('Version') + .table-section.section-20{ role: 'rowheader' } + = _('Type') + .table-section.section-20{ role: 'rowheader' } + = _('Created') + .table-section.section-10{ role: 'rowheader' } + - @packages.each do |package| + .gl-responsive-table-row.package-row.px-2{ data: { qa_selector: "package_row" } } + .table-section.section-30 + .table-mobile-header{ role: "rowheader" }= _("Name") + .table-mobile-content.flex-truncate-parent + = link_to package.name, project_package_path(@project, package), class: 'flex-truncate-child', data: { qa_selector: "package_link" } + .table-section.section-20 + .table-mobile-header{ role: "rowheader" }= _("Version") + .table-mobile-content + = package.version + .table-section.section-20 + .table-mobile-header{ role: "rowheader" }= _("Type") + .table-mobile-content + = package.package_type + .table-section.section-20 + .table-mobile-header{ role: "rowheader" }= _("Created") + .table-mobile-content + = time_ago_with_tooltip(package.created_at) + .table-section.section-10 + .table-mobile-header{ role: "rowheader" } + .table-mobile-content + - if can_destroy_package + .float-right + = link_to project_package_path(@project, package), method: :delete, data: { confirm: _("Are you sure?") }, class: "btn btn-grouped btn-remove", title: _('Delete Package') do + = icon('trash') + = paginate @packages, theme: "gitlab" +- else + .row.empty-state + .col-12 + = render 'shared/packages/no_packages' diff --git a/app/views/projects/packages/packages/index.html.haml b/app/views/projects/packages/packages/index.html.haml new file mode 100644 index 00000000000..c81326f3760 --- /dev/null +++ b/app/views/projects/packages/packages/index.html.haml @@ -0,0 +1,5 @@ +- page_title _("Packages") + +.row + .col-12 + #js-vue-packages-list{ data: packages_list_data('projects', @project) } diff --git a/app/views/projects/packages/packages/show.html.haml b/app/views/projects/packages/packages/show.html.haml new file mode 100644 index 00000000000..a66ae466d9d --- /dev/null +++ b/app/views/projects/packages/packages/show.html.haml @@ -0,0 +1,25 @@ +- add_to_breadcrumbs _("Packages"), project_packages_path(@project) +- add_to_breadcrumbs @package.name, project_packages_path(@project) +- breadcrumb_title @package.version +- page_title _("Packages") + +.row + .col-12 + #js-vue-packages-detail{ data: { package: package_from_presenter(@package), + can_delete: can?(current_user, :destroy_package, @project).to_s, + destroy_path: project_package_path(@project, @package), + svg_path: image_path('illustrations/no-packages.svg'), + npm_path: package_registry_instance_url(:npm), + npm_help_path: help_page_path('user/packages/npm_registry/index'), + maven_path: package_registry_project_url(@project.id, :maven), + maven_help_path: help_page_path('user/packages/maven_repository/index'), + conan_path: package_registry_instance_url(:conan), + conan_help_path: help_page_path('user/packages/conan_repository/index'), + nuget_path: nuget_package_registry_url(@project.id), + nuget_help_path: help_page_path('user/packages/nuget_repository/index'), + pypi_path: pypi_registry_url(@project.id), + pypi_setup_path: package_registry_project_url(@project.id, :pypi), + pypi_help_path: help_page_path('user/packages/pypi_repository/index'), + composer_path: composer_registry_url(@project&.group&.id), + composer_help_path: help_page_path('user/packages/composer_repository/index'), + project_name: @project.name} } diff --git a/app/views/projects/pages/_access.html.haml b/app/views/projects/pages/_access.html.haml index 08dcba2afd7..63dd7ca1def 100644 --- a/app/views/projects/pages/_access.html.haml +++ b/app/views/projects/pages/_access.html.haml @@ -18,6 +18,6 @@ - help_page = help_page_path('/user/project/pages/pages_access_control') - link_start = '<a href="%{url}" target="_blank" class="alert-link" rel="noopener noreferrer">'.html_safe % { url: help_page } - link_end = '</a>'.html_safe - = s_('GitLabPages|Access Control is enabled for this Pages website; only authorized users will be able to access it. To make your website publicly available, navigate to your project\'s %{strong_start}Settings > General > Visibility%{strong_end} and select %{strong_start}Everyone%{strong_end} in pages section. Read the %{link_start}documentation%{link_end} for more information.').html_safe % { link_start: link_start, link_end: link_end, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } + = html_escape_once(s_('GitLabPages|Access Control is enabled for this Pages website; only authorized users will be able to access it. To make your website publicly available, navigate to your project\'s %{strong_start}Settings > General > Visibility%{strong_end} and select %{strong_start}Everyone%{strong_end} in pages section. Read the %{link_start}documentation%{link_end} for more information.')).html_safe % { link_start: link_start, link_end: link_end, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } .card-footer.alert-primary = s_('GitLabPages|It may take up to 30 minutes before the site is available after the first deployment.') diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml index c116efe521a..af6de10b2a0 100644 --- a/app/views/projects/pages/_list.html.haml +++ b/app/views/projects/pages/_list.html.haml @@ -10,7 +10,7 @@ - if verification_enabled - tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success'] .domain-status.ci-status-icon.has-tooltip{ class: "ci-status-icon-#{status}", title: tooltip } - = sprite_icon("status_#{status}", size: 16 ) + = sprite_icon("status_#{status}" ) .domain-name = external_link(domain.url, domain.url) - if domain.certificate diff --git a/app/views/projects/pages/_pages_settings.html.haml b/app/views/projects/pages/_pages_settings.html.haml index 58eddf630f4..8aa02074205 100644 --- a/app/views/projects/pages/_pages_settings.html.haml +++ b/app/views/projects/pages/_pages_settings.html.haml @@ -1,4 +1,4 @@ -= form_for @project, url: namespace_project_pages_path(@project.namespace.becomes(Namespace), @project), html: { class: 'inline', title: pages_https_only_title } do |f| += form_for @project, url: project_pages_path(@project), html: { class: 'inline', title: pages_https_only_title } do |f| - if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https = render_if_exists 'shared/pages/max_pages_size_input', form: f @@ -9,5 +9,5 @@ %strong = s_('GitLabPages|Force HTTPS (requires valid certificates)') - .prepend-top-10 + .gl-mt-3 = f.submit s_('GitLabPages|Save'), class: 'btn btn-success' diff --git a/app/views/projects/pages/show.html.haml b/app/views/projects/pages/show.html.haml index fc69b390bde..8a01945ffac 100644 --- a/app/views/projects/pages/show.html.haml +++ b/app/views/projects/pages/show.html.haml @@ -25,4 +25,4 @@ = render 'destroy' - else .bs-callout.bs-callout-warning - = s_('GitLabPages|GitLab Pages are disabled for this project. You can enable them on your project\'s %{strong_start}Settings > General > Visibility%{strong_end} page.').html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } + = html_escape_once(s_('GitLabPages|GitLab Pages are disabled for this project. You can enable them on your project\'s %{strong_start}Settings > General > Visibility%{strong_end} page.')).html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } diff --git a/app/views/projects/pages_domains/_certificate.html.haml b/app/views/projects/pages_domains/_certificate.html.haml index 11c7e4a950b..16d949c416b 100644 --- a/app/views/projects/pages_domains/_certificate.html.haml +++ b/app/views/projects/pages_domains/_certificate.html.haml @@ -19,8 +19,8 @@ "aria-label": _("Automatic certificate management using Let's Encrypt") } = f.hidden_field :auto_ssl_enabled?, class: "js-project-feature-toggle-input" %span.toggle-icon - = sprite_icon("status_success_borderless", size: 16, css_class: "toggle-icon-svg toggle-status-checked") - = sprite_icon("status_failed_borderless", size: 16, css_class: "toggle-icon-svg toggle-status-unchecked") + = sprite_icon("status_success_borderless", size: 18, css_class: "gl-text-blue-500 toggle-status-checked") + = sprite_icon("status_failed_borderless", size: 18, css_class: "gl-text-gray-400 toggle-status-unchecked") %p.text-secondary.mt-3 - docs_link_url = help_page_path("user/project/pages/custom_domains_ssl_tls_certification/lets_encrypt_integration.md") - docs_link_start = "<a href=\"%{docs_link_url}\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"text-nowrap\">".html_safe % { docs_link_url: docs_link_url } diff --git a/app/views/projects/pages_domains/new.html.haml b/app/views/projects/pages_domains/new.html.haml index f5dc3ccc60e..0c3ab4f10a6 100644 --- a/app/views/projects/pages_domains/new.html.haml +++ b/app/views/projects/pages_domains/new.html.haml @@ -4,7 +4,7 @@ = _("New Pages Domain") = render 'projects/pages_domains/helper_text' %div - = form_for [@project.namespace.becomes(Namespace), @project, domain_presenter], html: { class: 'fieldset-form' } do |f| + = form_for [@project, domain_presenter], html: { class: 'fieldset-form' } do |f| = render 'form', { f: f } .form-actions = f.submit _('Create New Domain'), class: "btn btn-success" diff --git a/app/views/projects/pages_domains/show.html.haml b/app/views/projects/pages_domains/show.html.haml index e1be7335a3f..20ecf948447 100644 --- a/app/views/projects/pages_domains/show.html.haml +++ b/app/views/projects/pages_domains/show.html.haml @@ -14,7 +14,7 @@ = _('Pages Domain') = render 'projects/pages_domains/helper_text' %div - = form_for [@project.namespace.becomes(Namespace), @project, domain_presenter], html: { class: 'fieldset-form' } do |f| + = form_for [@project, domain_presenter], html: { class: 'fieldset-form' } do |f| = render 'form', { f: f } .form-actions.d-flex.justify-content-between = f.submit _('Save Changes'), class: "btn btn-success" diff --git a/app/views/projects/pipeline_schedules/_form.html.haml b/app/views/projects/pipeline_schedules/_form.html.haml index 20cf2ed63b5..1a8229350d9 100644 --- a/app/views/projects/pipeline_schedules/_form.html.haml +++ b/app/views/projects/pipeline_schedules/_form.html.haml @@ -1,4 +1,4 @@ -= form_for [@project.namespace.becomes(Namespace), @project, @schedule], as: :schedule, html: { id: "new-pipeline-schedule-form", class: "js-pipeline-schedule-form pipeline-schedule-form" } do |f| += form_for [@project, @schedule], as: :schedule, html: { id: "new-pipeline-schedule-form", class: "js-pipeline-schedule-form pipeline-schedule-form" } do |f| = form_errors(@schedule) .form-group.row .col-md-9 @@ -27,7 +27,7 @@ = render 'ci/variables/variable_row', form_field: 'schedule', variable: variable, only_key_value: true = render 'ci/variables/variable_row', form_field: 'schedule', only_key_value: true - if @schedule.variables.size > 0 - %button.btn.btn-info.btn-inverted.prepend-top-10.js-secret-value-reveal-button{ type: 'button', data: { secret_reveal_status: "#{@schedule.variables.size == 0}" } } + %button.btn.btn-info.btn-inverted.gl-mt-3.js-secret-value-reveal-button{ type: 'button', data: { secret_reveal_status: "#{@schedule.variables.size == 0}" } } - if @schedule.variables.size == 0 = n_('Hide value', 'Hide values', @schedule.variables.size) - else diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index f48763cb544..ca71aa8a24d 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -33,8 +33,8 @@ = link_to take_ownership_pipeline_schedule_path(pipeline_schedule), method: :post, title: s_('PipelineSchedules|Take ownership'), class: 'btn' do = s_('PipelineSchedules|Take ownership') - if can?(current_user, :update_pipeline_schedule, pipeline_schedule) - = link_to edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), class: 'btn' do - = icon('pencil') + = link_to edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), class: 'btn gl-display-flex' do + = sprite_icon('pencil') - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) = link_to pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, class: 'btn btn-remove', data: { confirm: _("Are you sure you want to delete this pipeline schedule?") } do - = icon('trash') + = sprite_icon('remove') diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index 85902d51ab0..c54a19b8f61 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -7,8 +7,8 @@ .info-well .well-segment.pipeline-info - .icon-container - = icon('clock-o') + .icon-container.gl-vertical-align-text-bottom + = sprite_icon('clock') = pluralize @pipeline.total_size, "job" = @pipeline.ref_text - if @pipeline.duration @@ -35,7 +35,7 @@ %span.js-pipeline-url-failure.badge.badge-danger.has-tooltip{ title: @pipeline.failure_reason } error - if @pipeline.auto_devops_source? - - popover_title_text = _('This pipeline makes use of a predefined CI/CD configuration enabled by <b>Auto DevOps.</b>').html_safe + - popover_title_text = html_escape(_('This pipeline makes use of a predefined CI/CD configuration enabled by %{b_open}Auto DevOps.%{b_close}')) % { b_open: '<b>'.html_safe, b_close: '</b>'.html_safe } - popover_content_url = help_page_path('topics/autodevops/index.md') - popover_content_text = _('Learn more about Auto DevOps') %a.js-pipeline-url-autodevops.badge.badge-info.autodevops-badge{ href: "#", tabindex: "0", role: "button", data: { container: "body", diff --git a/app/views/projects/pipelines/_pipeline_warnings.html.haml b/app/views/projects/pipelines/_pipeline_warnings.html.haml new file mode 100644 index 00000000000..e27bd440462 --- /dev/null +++ b/app/views/projects/pipelines/_pipeline_warnings.html.haml @@ -0,0 +1,6 @@ +- if warnings.any? + - warnings.map(&:content).each do |warning| + .bs-callout.bs-callout-warning + %p + %b= _("Warning:") + = markdown(warning) diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index be947b42e25..4ae06e1e16f 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -1,4 +1,4 @@ -- test_reports_enabled = Feature.enabled?(:junit_pipeline_view, @project) +- return if pipeline_has_errors - dag_pipeline_tab_enabled = Feature.enabled?(:dag_pipeline_tab, @project, default_enabled: true) .tabs-holder @@ -10,7 +10,6 @@ %li.js-dag-tab-link = link_to dag_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-dag', action: 'dag', toggle: 'tab' }, class: 'dag-tab' do = _('DAG') - %span.badge-pill.gl-badge.sm.gl-bg-blue-500.gl-text-white.gl-ml-2= _('Beta') %li.js-builds-tab-link = link_to builds_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-builds', action: 'builds', toggle: 'tab' }, class: 'builds-tab' do = _('Jobs') @@ -20,11 +19,10 @@ = link_to failures_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-failures', action: 'failures', toggle: 'tab' }, class: 'failures-tab' do = _('Failed Jobs') %span.badge.badge-pill.js-failures-counter= @pipeline.failed_builds.count - - if test_reports_enabled - %li.js-tests-tab-link - = link_to test_report_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-tests', action: 'test_report', toggle: 'tab' }, class: 'test-tab' do - = s_('TestReports|Tests') - %span.badge.badge-pill.js-test-report-badge-counter= Feature.enabled?(:build_report_summary, @project) ? @pipeline.test_report_summary.total_count : '' + %li.js-tests-tab-link + = link_to test_report_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-tests', action: 'test_report', toggle: 'tab' }, class: 'test-tab' do + = s_('TestReports|Tests') + %span.badge.badge-pill.js-test-report-badge-counter= @pipeline.test_report_summary.total[:count] = render_if_exists "projects/pipelines/tabs_holder", pipeline: @pipeline, project: @project .tab-content @@ -71,8 +69,8 @@ = build.present.callout_failure_message %td.responsive-table-cell.build-actions - if can?(current_user, :update_build, job) - = link_to retry_project_job_path(build.project, build, return_to: request.original_url), method: :post, title: _('Retry'), class: 'btn btn-build' do - = icon('repeat') + = link_to retry_project_job_path(build.project, build, return_to: request.original_url), method: :post, title: _('Retry'), class: 'btn btn-build gl-button btn-icon btn-default' do + = sprite_icon('repeat', css_class: 'gl-icon') - if can?(current_user, :read_build, job) %tr.build-trace-row.responsive-table-border-end %td @@ -83,10 +81,9 @@ - if dag_pipeline_tab_enabled #js-tab-dag.tab-pane - #js-pipeline-dag-vue{ data: { pipeline_data_path: dag_project_pipeline_path(@project, @pipeline), empty_svg_path: image_path('illustrations/empty-state/empty-dag-md.svg'), dag_doc_path: help_page_path('ci/yaml/README.md', anchor: 'needs')} } + #js-pipeline-dag-vue{ data: { pipeline_project_path: @project.full_path, pipeline_iid: @pipeline.iid, empty_svg_path: image_path('illustrations/empty-state/empty-dag-md.svg'), dag_doc_path: help_page_path('ci/yaml/README.md', anchor: 'needs')} } #js-tab-tests.tab-pane - #js-pipeline-tests-detail{ data: { full_report_endpoint: test_report_project_pipeline_path(@project, @pipeline, format: :json), - summary_endpoint: Feature.enabled?(:build_report_summary, @project) ? summary_project_pipeline_tests_path(@project, @pipeline, format: :json) : '', - count_endpoint: test_reports_count_project_pipeline_path(@project, @pipeline, format: :json) } } + #js-pipeline-tests-detail{ data: { summary_endpoint: summary_project_pipeline_tests_path(@project, @pipeline, format: :json), + suite_endpoint: project_pipeline_test_path(@project, @pipeline, suite_name: ':suite_name', format: :json) } } = render_if_exists "projects/pipelines/tabs_content", pipeline: @pipeline, project: @project diff --git a/app/views/projects/pipelines/new.html.haml b/app/views/projects/pipelines/new.html.haml index a3e46a0939c..726bf9af223 100644 --- a/app/views/projects/pipelines/new.html.haml +++ b/app/views/projects/pipelines/new.html.haml @@ -6,37 +6,42 @@ = s_('Pipeline|Run Pipeline') %hr -= form_for @pipeline, as: :pipeline, url: project_pipelines_path(@project), html: { id: "new-pipeline-form", class: "js-new-pipeline-form js-requires-input" } do |f| - = form_errors(@pipeline) - .form-group.row - .col-sm-12 - = f.label :ref, s_('Pipeline|Run for'), class: 'col-form-label' - = hidden_field_tag 'pipeline[ref]', params[:ref] || @project.default_branch - = dropdown_tag(params[:ref] || @project.default_branch, - options: { toggle_class: 'js-branch-select wide monospace', - filter: true, dropdown_class: "dropdown-menu-selectable git-revision-dropdown", placeholder: s_("Pipeline|Search branches"), - data: { selected: params[:ref] || @project.default_branch, field_name: 'pipeline[ref]' } }) - .form-text.text-muted - = s_("Pipeline|Existing branch name or tag") +- if Feature.enabled?(:new_pipeline_form) + #js-new-pipeline{ data: { project_id: @project.id, pipelines_path: project_pipelines_path(@project), ref_param: params[:ref] || @project.default_branch, var_param: params[:var].to_json, file_param: params[:file_var].to_json, ref_names: @project.repository.ref_names.to_json.html_safe, settings_link: project_settings_ci_cd_path(@project) } } - .col-sm-12.prepend-top-10.js-ci-variable-list-section - %label - = s_('Pipeline|Variables') - %ul.ci-variable-list - - if params[:var] - - params[:var].each do |variable| - = render 'ci/variables/url_query_variable_row', form_field: 'pipeline', variable: variable - - if params[:file_var] - - params[:file_var].each do |variable| - - variable.push("file") - = render 'ci/variables/url_query_variable_row', form_field: 'pipeline', variable: variable - = render 'ci/variables/variable_row', form_field: 'pipeline', only_key_value: true - .form-text.text-muted - = (s_("Pipeline|Specify variable values to be used in this run. The values specified in %{settings_link} will be used by default.") % {settings_link: settings_link}).html_safe +- else + = form_for @pipeline, as: :pipeline, url: project_pipelines_path(@project), html: { id: "new-pipeline-form", class: "js-new-pipeline-form js-requires-input" } do |f| + = form_errors(@pipeline) + = pipeline_warnings(@pipeline) + .form-group.row + .col-sm-12 + = f.label :ref, s_('Pipeline|Run for'), class: 'col-form-label' + = hidden_field_tag 'pipeline[ref]', params[:ref] || @project.default_branch + = dropdown_tag(params[:ref] || @project.default_branch, + options: { toggle_class: 'js-branch-select wide monospace', + filter: true, dropdown_class: "dropdown-menu-selectable git-revision-dropdown", placeholder: s_("Pipeline|Search branches"), + data: { selected: params[:ref] || @project.default_branch, field_name: 'pipeline[ref]' } }) + .form-text.text-muted + = s_("Pipeline|Existing branch name or tag") - .form-actions - = f.submit s_('Pipeline|Run Pipeline'), class: 'btn btn-success js-variables-save-button', tabindex: 3 - = link_to _('Cancel'), project_pipelines_path(@project), class: 'btn btn-default float-right' + .col-sm-12.gl-mt-3.js-ci-variable-list-section + %label + = s_('Pipeline|Variables') + %ul.ci-variable-list + - if params[:var] + - params[:var].each do |variable| + = render 'ci/variables/url_query_variable_row', form_field: 'pipeline', variable: variable + - if params[:file_var] + - params[:file_var].each do |variable| + - variable.push("file") + = render 'ci/variables/url_query_variable_row', form_field: 'pipeline', variable: variable + = render 'ci/variables/variable_row', form_field: 'pipeline', only_key_value: true + .form-text.text-muted + = (s_("Pipeline|Specify variable values to be used in this run. The values specified in %{settings_link} will be used by default.") % {settings_link: settings_link}).html_safe --# haml-lint:disable InlineJavaScript -%script#availableRefs{ type: "application/json" }= @project.repository.ref_names.to_json.html_safe + .form-actions + = f.submit s_('Pipeline|Run Pipeline'), class: 'btn btn-success js-variables-save-button', tabindex: 3 + = link_to _('Cancel'), project_pipelines_path(@project), class: 'btn btn-default float-right' + + -# haml-lint:disable InlineJavaScript + %script#availableRefs{ type: "application/json" }= @project.repository.ref_names.to_json.html_safe diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index 2b2133b8296..e1a606b1765 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -1,6 +1,7 @@ - add_to_breadcrumbs _('Pipelines'), project_pipelines_path(@project) - breadcrumb_title "##{@pipeline.id}" - page_title _('Pipeline') +- pipeline_has_errors = @pipeline.builds.empty? && @pipeline.yaml_errors.present? .js-pipeline-container{ data: { controller_action: "#{controller.action_name}" } } #js-pipeline-header-vue.pipeline-header-container @@ -8,7 +9,7 @@ - if @pipeline.commit.present? = render "projects/pipelines/info", commit: @pipeline.commit - - if @pipeline.builds.empty? && @pipeline.yaml_errors.present? + - if pipeline_has_errors .bs-callout.bs-callout-danger %h4= _('Found errors in your %{gitlab_ci_yml}:') % { gitlab_ci_yml: '.gitlab-ci.yml' } %ul @@ -17,7 +18,8 @@ - lint_link_url = project_ci_lint_path(@project) - lint_link_start = '<a href="%{url}">'.html_safe % { url: lint_link_url } = s_('You can also test your %{gitlab_ci_yml} in %{lint_link_start}CI Lint%{lint_link_end}').html_safe % { gitlab_ci_yml: '.gitlab-ci.yml', lint_link_start: lint_link_start, lint_link_end: '</a>'.html_safe } - - else - = render "projects/pipelines/with_tabs", pipeline: @pipeline + + = render "projects/pipelines/pipeline_warnings", warnings: @pipeline.warning_messages + = render "projects/pipelines/with_tabs", pipeline: @pipeline, pipeline_has_errors: pipeline_has_errors .js-pipeline-details-vue{ data: { endpoint: project_pipeline_path(@project, @pipeline, format: :json) } } diff --git a/app/views/projects/product_analytics/_graph.html.haml b/app/views/projects/product_analytics/_graph.html.haml new file mode 100644 index 00000000000..fd81a248005 --- /dev/null +++ b/app/views/projects/product_analytics/_graph.html.haml @@ -0,0 +1,6 @@ +- graph = local_assigns.fetch(:graph) + +%h3 + = graph[:id] + +.js-project-analytics-chart{ "data-chart-data": graph.to_json, "data-chart-id": graph[:id] } diff --git a/app/views/projects/product_analytics/_links.html.haml b/app/views/projects/product_analytics/_links.html.haml new file mode 100644 index 00000000000..0797c5baf91 --- /dev/null +++ b/app/views/projects/product_analytics/_links.html.haml @@ -0,0 +1,10 @@ +.mb-3 + %ul.nav-links + = nav_link(path: 'product_analytics#index') do + = link_to _('Events'), project_product_analytics_path(@project) + = nav_link(path: 'product_analytics#graphs') do + = link_to 'Graphs', graphs_project_product_analytics_path(@project) + = nav_link(path: 'product_analytics#test') do + = link_to _('Test'), test_project_product_analytics_path(@project) + = nav_link(path: 'product_analytics#setup') do + = link_to _('Setup'), setup_project_product_analytics_path(@project) diff --git a/app/views/projects/product_analytics/_tracker.html.erb b/app/views/projects/product_analytics/_tracker.html.erb new file mode 100644 index 00000000000..dbb96f19e22 --- /dev/null +++ b/app/views/projects/product_analytics/_tracker.html.erb @@ -0,0 +1,10 @@ +;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[]; +p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments) +};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1; +n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","<%= product_analytics_tracker_url -%>","snowplow<%= @random -%>")); +snowplow<%= @random -%>("newTracker", "sp", "<%= product_analytics_tracker_collector_url -%>", { + appId: "<%= @project_id -%>", + platform: "<%= @platform -%>", + eventMethod: "get" +}); +snowplow<%= @random -%>('trackPageView'); diff --git a/app/views/projects/product_analytics/graphs.html.haml b/app/views/projects/product_analytics/graphs.html.haml new file mode 100644 index 00000000000..89286061594 --- /dev/null +++ b/app/views/projects/product_analytics/graphs.html.haml @@ -0,0 +1,12 @@ +- page_title _('Product Analytics') + += render 'links' + +%p + = _('Showing graphs based on events of the last %{timerange} days.') % { timerange: @timerange } + +- @graphs.each_slice(2) do |pair| + .row.append-bottom-10 + - pair.each do |graph| + .col-md-6{ id: graph[:id] } + = render 'graph', graph: graph diff --git a/app/views/projects/product_analytics/index.html.haml b/app/views/projects/product_analytics/index.html.haml new file mode 100644 index 00000000000..386f9265179 --- /dev/null +++ b/app/views/projects/product_analytics/index.html.haml @@ -0,0 +1,16 @@ +- page_title _('Product Analytics') + += render 'links' + +- if @events.any? + %p + - if @events.total_count > @events.size + = _('Number of events for this project: %{total_count}.') % { total_count: number_with_delimiter(@events.total_count) } + %ol + - @events.each do |event| + %li + %code= event.as_json_wo_empty +- else + .empty-state + .text-content + = _('There are currently no events.') diff --git a/app/views/projects/product_analytics/setup.html.haml b/app/views/projects/product_analytics/setup.html.haml new file mode 100644 index 00000000000..e1819c7d74b --- /dev/null +++ b/app/views/projects/product_analytics/setup.html.haml @@ -0,0 +1,12 @@ +- page_title _('Product Analytics') + += render 'links' + +%p + = _('Copy the code below to implement tracking in your application:') + +%pre + = render "tracker" + +%p.hint + = _('A platform value can be web, mob or app.') diff --git a/app/views/projects/product_analytics/test.html.haml b/app/views/projects/product_analytics/test.html.haml new file mode 100644 index 00000000000..60d897ee138 --- /dev/null +++ b/app/views/projects/product_analytics/test.html.haml @@ -0,0 +1,16 @@ +- page_title _('Product Analytics') + += render 'links' + +%p + = _('This page sends a payload. Go back to the events page to see a newly created event.') + +- if @event + %p + = _('Last item before this page loaded in your browser:') + + %code + = @event.as_json_wo_empty + +:javascript + #{render 'tracker'} diff --git a/app/views/projects/project_members/_groups.html.haml b/app/views/projects/project_members/_groups.html.haml index 353c36d0fed..39ef1e52a0d 100644 --- a/app/views/projects/project_members/_groups.html.haml +++ b/app/views/projects/project_members/_groups.html.haml @@ -1,6 +1,6 @@ .card.project-members-groups .card-header - = _("Groups with access to <strong>%{project_name}</strong>").html_safe % { project_name: sanitize(@project.name, tags: []) } + = html_escape(_("Groups with access to %{strong_open}%{project_name}%{strong_close}")) % { project_name: sanitize(@project.name, tags: []), strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } %span.badge.badge-pill= group_links.size %ul.content-list.members-list - can_admin_member = can?(current_user, :admin_project_member, @project) diff --git a/app/views/projects/project_members/_team.html.haml b/app/views/projects/project_members/_team.html.haml index 5d8005b2e2a..4b3fdf8d0b1 100644 --- a/app/views/projects/project_members/_team.html.haml +++ b/app/views/projects/project_members/_team.html.haml @@ -4,7 +4,7 @@ .card .card-header.flex-project-members-panel %span.flex-project-title - = _("Members of <strong>%{project_name}</strong>").html_safe % { project_name: sanitize(project.name, tags: []) } + = html_escape(_("Members of %{strong_open}%{project_name}%{strong_close}")) % { project_name: sanitize(project.name, tags: []), strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } %span.badge.badge-pill= members.total_count = form_tag project_project_members_path(project), method: :get, class: 'form-inline user-search-form flex-users-form' do .form-group @@ -12,6 +12,7 @@ = search_field_tag :search, params[:search], { placeholder: _('Find existing members by name'), class: 'form-control', spellcheck: false } %button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") } = icon("search") + = label_tag :sort_by, _('Sort by'), class: 'col-form-label label-bold px-2' = render 'shared/members/sort_dropdown' %ul.content-list.members-list{ data: { qa_selector: 'members_list' } } = render partial: 'shared/members/member', collection: members, as: :member diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index ba964e5cd37..9a1e997fce7 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -11,7 +11,7 @@ %p= share_project_description(@project) - else %p - = _("Members can be added by project <i>Maintainers</i> or <i>Owners</i>").html_safe + = html_escape(_("Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}")) % { i_open: '<i>'.html_safe, i_close: '</i>'.html_safe } .light - if can_admin_project_members && project_can_be_shared? diff --git a/app/views/projects/protected_branches/_update_protected_branch.html.haml b/app/views/projects/protected_branches/_update_protected_branch.html.haml index 74bfaa9ff80..b2ec98be056 100644 --- a/app/views/projects/protected_branches/_update_protected_branch.html.haml +++ b/app/views/projects/protected_branches/_update_protected_branch.html.haml @@ -1,10 +1 @@ -%td - = hidden_field_tag "allowed_to_merge_#{protected_branch.id}", protected_branch.merge_access_levels.first.access_level - = dropdown_tag( (protected_branch.merge_access_levels.first.humanize || 'Select') , - options: { toggle_class: 'js-allowed-to-merge qa-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable js-allowed-to-merge-container capitalize-header', - data: { field_name: "allowed_to_merge_#{protected_branch.id}", access_level_id: protected_branch.merge_access_levels.first.id }}) -%td - = hidden_field_tag "allowed_to_push_#{protected_branch.id}", protected_branch.push_access_levels.first.access_level - = dropdown_tag( (protected_branch.push_access_levels.first.humanize || 'Select') , - options: { toggle_class: 'js-allowed-to-push', dropdown_class: 'dropdown-menu-selectable js-allowed-to-push-container capitalize-header', - data: { field_name: "allowed_to_push_#{protected_branch.id}", access_level_id: protected_branch.push_access_levels.first.id }}) += render 'shared/projects/protected_branches/update_protected_branch', protected_branch: protected_branch diff --git a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml index f84c7b39733..7131e9925b3 100644 --- a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml +++ b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml @@ -1,4 +1,4 @@ -= form_for [@project.namespace.becomes(Namespace), @project, @protected_branch], html: { class: 'new-protected-branch js-new-protected-branch' } do |f| += form_for [@project, @protected_branch], html: { class: 'new-protected-branch js-new-protected-branch' } do |f| %input{ type: 'hidden', name: 'update_section', value: 'js-protected-branches-settings' } .card .card-header diff --git a/app/views/projects/protected_branches/shared/_index.html.haml b/app/views/projects/protected_branches/shared/_index.html.haml index 63748d8d85f..f27936703de 100644 --- a/app/views/projects/protected_branches/shared/_index.html.haml +++ b/app/views/projects/protected_branches/shared/_index.html.haml @@ -1,6 +1,6 @@ - expanded = expanded_by_default? -%section.qa-protected-branches-settings.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded) } +%section.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded), data: { qa_selector: 'protected_branches_settings_content' } } .settings-header %h4 Protected Branches diff --git a/app/views/projects/protected_branches/shared/_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_protected_branch.html.haml index 4ca6ebe9c78..d62e9513d56 100644 --- a/app/views/projects/protected_branches/shared/_protected_branch.html.haml +++ b/app/views/projects/protected_branches/shared/_protected_branch.html.haml @@ -20,4 +20,4 @@ - if can_admin_project %td - = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, protected_branch, { update_section: 'js-protected-branches-settings' }], disabled: local_assigns[:disabled], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-warning" + = link_to 'Unprotect', [@project, protected_branch, { update_section: 'js-protected-branches-settings' }], disabled: local_assigns[:disabled], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-warning" 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 8a6ae53a7c4..dc7514badb6 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,4 +1,4 @@ -= form_for [@project.namespace.becomes(Namespace), @project, @protected_tag], html: { class: 'new-protected-tag js-new-protected-tag' } do |f| += 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' } .card .card-header @@ -24,5 +24,5 @@ .create_access_levels-container = yield :create_access_levels - .card-footer - = f.submit 'Protect', class: 'btn-success btn', disabled: true, data: { qa_selector: 'protect_tag_button' } + .card-footer.gl-display-flex.gl-justify-content-end + = f.submit _('Protect'), class: 'btn-success btn', disabled: true, data: { qa_selector: 'protect_tag_button' } diff --git a/app/views/projects/protected_tags/shared/_protected_tag.html.haml b/app/views/projects/protected_tags/shared/_protected_tag.html.haml index b0563163c9c..71c29f9b7b6 100644 --- a/app/views/projects/protected_tags/shared/_protected_tag.html.haml +++ b/app/views/projects/protected_tags/shared/_protected_tag.html.haml @@ -19,4 +19,4 @@ - if can? current_user, :admin_project, @project %td - = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, protected_tag, { update_section: 'js-protected-tags-settings' }], data: { confirm: 'Tag will be writable for developers. Are you sure?' }, method: :delete, class: 'btn btn-warning' + = link_to 'Unprotect', [@project, protected_tag, { update_section: 'js-protected-tags-settings' }], data: { confirm: 'Tag will be writable for developers. Are you sure?' }, method: :delete, class: 'btn btn-warning' diff --git a/app/views/projects/runners/_runner.html.haml b/app/views/projects/runners/_runner.html.haml index 92680a70da2..74b6e981c00 100644 --- a/app/views/projects/runners/_runner.html.haml +++ b/app/views/projects/runners/_runner.html.haml @@ -6,11 +6,12 @@ = link_to _("%{token}...") % { token: runner.short_sha }, project_runner_path(@project, runner), class: 'commit-sha has-tooltip', title: _("Partial token for reference only") - if runner.locked? - = icon('lock', class: 'has-tooltip', title: _('Locked to current projects')) + %span.has-tooltip{ title: _('Locked to current projects') } + = sprite_icon('lock') %small.edit-runner - = link_to edit_project_runner_path(@project, runner) do - %i.fa.fa-edit.btn + = link_to edit_project_runner_path(@project, runner), class: 'btn btn-edit' do + = sprite_icon('pencil') - else %span.commit-sha = runner.short_sha @@ -27,7 +28,7 @@ - runner_project = @project.runner_projects.find_by(runner_id: runner) # rubocop: disable CodeReuse/ActiveRecord = link_to _('Disable for this project'), project_runner_project_path(@project, runner_project), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn btn-danger btn-sm' - elsif runner.project_type? - = form_for [@project.namespace.becomes(Namespace), @project, @project.runner_projects.new] do |f| + = form_for [@project, @project.runner_projects.new] do |f| = f.hidden_field :runner_id, value: runner.id = f.submit _('Enable for this project'), class: 'btn btn-sm' .float-right diff --git a/app/views/projects/runners/_shared_runners.html.haml b/app/views/projects/runners/_shared_runners.html.haml index 080b2c0b0e9..8a17ca3c670 100644 --- a/app/views/projects/runners/_shared_runners.html.haml +++ b/app/views/projects/runners/_shared_runners.html.haml @@ -15,7 +15,7 @@ = _('Enable shared Runners') for this project -- if @shared_runners_count.zero? +- if @shared_runners_count == 0 = _('This GitLab instance does not provide any shared Runners yet. Instance administrators can register shared Runners in the admin area.') - else %h4.underlined-title #{_('Available shared Runners:')} #{@shared_runners_count} diff --git a/app/views/projects/serverless/functions/index.html.haml b/app/views/projects/serverless/functions/index.html.haml index b21965915a2..383c187b398 100644 --- a/app/views/projects/serverless/functions/index.html.haml +++ b/app/views/projects/serverless/functions/index.html.haml @@ -7,7 +7,8 @@ .serverless-functions-page.js-serverless-functions-page{ data: { status_path: status_path, installed: @installed, clusters_path: clusters_path, - help_path: help_page_path('user/project/clusters/serverless/index') } } + help_path: help_page_path('user/project/clusters/serverless/index'), + empty_image_path: image_path('illustrations/empty-state/empty-serverless-lg.svg') } } %div{ class: [('limit-container-width' unless fluid_layout)] } .js-serverless-survey-banner{ data: { user_name: current_user.name, user_email: current_user.email } } @@ -15,5 +16,5 @@ .js-serverless-functions-notice .flash-container - .top-area.adjust.d-flex.justify-content-center + .top-area.adjust.d-flex.justify-content-center.gl-border-none .serverless-functions-table#js-serverless-functions diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index 2e49e74a9b3..24b47f6e4b6 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -3,7 +3,7 @@ .row.gl-mt-3.gl-mb-3 .col-lg-4 - %h4.gl-mt-0 + %h3.page-title.gl-mt-0 = @service.title - [true, false].each do |value| - hide_class = 'd-none' if @service.operating? != value diff --git a/app/views/projects/services/alerts/_top.html.haml b/app/views/projects/services/alerts/_top.html.haml index ebc93978832..e3bcb6bd3a0 100644 --- a/app/views/projects/services/alerts/_top.html.haml +++ b/app/views/projects/services/alerts/_top.html.haml @@ -1,7 +1,7 @@ .row .col-lg-12 - .gl-alert.gl-alert-info.js-alerts-moved-alert{ role: 'alert' } - = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert.gl-alert-info{ role: 'alert' } + = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') .gl-alert-body = _('You can now manage alert endpoint configuration in the Alerts section on the Operations settings page. Fields on this page have been deprecated.') .gl-alert-actions diff --git a/app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml b/app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml index cf73a7055c6..9d81fda68cb 100644 --- a/app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml +++ b/app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml @@ -1,5 +1,5 @@ -- pretty_name = @project&.full_name || _('<project name>') -- run_actions_text = s_("ProjectService|Perform common operations on GitLab project: %{project_name}") % { project_name: pretty_name } +- pretty_name = html_escape(@project&.full_name) || html_escape_once(_('<project name>')).html_safe +- run_actions_text = html_escape(s_("ProjectService|Perform common operations on GitLab project: %{project_name}")) % { project_name: pretty_name } %p= s_("ProjectService|To set up this service:") %ul.list-unstyled.indent-list @@ -7,13 +7,13 @@ 1. = link_to 'https://docs.mattermost.com/developer/slash-commands.html#enabling-custom-commands', target: '_blank', rel: 'noopener noreferrer nofollow' do Enable custom slash commands - = sprite_icon('external-link', size: 16) + = sprite_icon('external-link') on your Mattermost installation %li 2. = link_to 'https://docs.mattermost.com/developer/slash-commands.html#set-up-a-custom-command', target: '_blank', rel: 'noopener noreferrer nofollow' do Add a slash command - = sprite_icon('external-link', size: 16) + = sprite_icon('external-link') in your Mattermost team with these options: %hr @@ -21,7 +21,7 @@ .form-group = label_tag :display_name, _('Display name'), class: 'col-12 col-form-label label-bold' .col-12.input-group - = text_field_tag :display_name, "GitLab / #{pretty_name}", class: 'form-control form-control-sm', readonly: 'readonly' + = text_field_tag :display_name, "GitLab / #{pretty_name}".html_safe, class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append = clipboard_button(target: '#display_name', class: 'input-group-text') diff --git a/app/views/projects/services/mattermost_slash_commands/_help.html.haml b/app/views/projects/services/mattermost_slash_commands/_help.html.haml index cc005dd69b7..1005d9f7990 100644 --- a/app/views/projects/services/mattermost_slash_commands/_help.html.haml +++ b/app/views/projects/services/mattermost_slash_commands/_help.html.haml @@ -6,7 +6,7 @@ = s_("MattermostService|This service allows users to perform common operations on this project by entering slash commands in Mattermost.") = link_to help_page_path('user/project/integrations/mattermost_slash_commands.md'), target: '_blank' do = _("View documentation") - = sprite_icon('external-link', size: 16) + = sprite_icon('external-link') %p.inline = s_("MattermostService|See list of available commands in Mattermost after setting up this service, by entering") %kbd.inline /<trigger> help diff --git a/app/views/projects/services/prometheus/_metrics.html.haml b/app/views/projects/services/prometheus/_metrics.html.haml index 9f5160f3dd5..79f5e846bd7 100644 --- a/app/views/projects/services/prometheus/_metrics.html.haml +++ b/app/views/projects/services/prometheus/_metrics.html.haml @@ -5,7 +5,7 @@ .col-lg-3 %p = s_('PrometheusService|Common metrics are automatically monitored based on a library of metrics from popular exporters.') - = link_to s_('PrometheusService|More information'), help_page_path('user/project/integrations/prometheus_library/index'), target: '_blank', rel: "noopener noreferrer" + = link_to s_('PrometheusService|More information'), help_page_path('user/project/integrations/prometheus'), target: '_blank', rel: "noopener noreferrer" .col-lg-9 .card.js-panel-monitored-metrics{ data: { active_metrics: active_common_project_prometheus_metrics_path(project, :json), metrics_help_path: help_page_path('user/project/integrations/prometheus_library/index') } } diff --git a/app/views/projects/services/prometheus/_top.html.haml b/app/views/projects/services/prometheus/_top.html.haml index 338414be5ab..0238a45b75f 100644 --- a/app/views/projects/services/prometheus/_top.html.haml +++ b/app/views/projects/services/prometheus/_top.html.haml @@ -2,8 +2,8 @@ .row .col-lg-12 - .gl-alert.gl-alert-info.js-alerts-moved-alert{ role: 'alert' } - = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert.gl-alert-info{ role: 'alert' } + = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') .gl-alert-body = s_('AlertSettings|You can now set up alert endpoints for manually configured Prometheus instances in the Alerts section on the Operations settings page. Alert endpoint fields on this page have been deprecated.') .gl-alert-actions diff --git a/app/views/projects/services/slack/_help.haml b/app/views/projects/services/slack/_help.haml index d7ea1b270f5..1fd448020a0 100644 --- a/app/views/projects/services/slack/_help.haml +++ b/app/views/projects/services/slack/_help.haml @@ -3,14 +3,14 @@ .info-well .well-segment - %p= s_('SlackIntegration|This service send notifications about projects\' events to Slack channels. To set up this service:') + %p= s_('SlackIntegration|This service sends notifications about project events to Slack channels. To set up this service:') %ol %li - = s_('SlackIntegration|%{webhooks_link_start}Add an incoming webhook%{webhooks_link_end} in your Slack team. The default channel can be overridden for each event.').html_safe % { webhooks_link_start: webhooks_link_start, webhooks_link_end: '</a>'.html_safe } + = html_escape(s_('SlackIntegration|%{webhooks_link_start}Add an incoming webhook%{webhooks_link_end} in your Slack team. The default channel can be overridden for each event.')) % { webhooks_link_start: webhooks_link_start.html_safe, webhooks_link_end: '</a>'.html_safe } %li - = s_('SlackIntegration|Paste the <strong>Webhook URL</strong> into the field below.').html_safe + = html_escape(s_('SlackIntegration|Paste the %{strong_open}Webhook URL%{strong_close} into the field below.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } %li - = s_('SlackIntegration|Select events below to enable notifications. The <strong>Slack channel names</strong> and <strong>Slack username</strong> fields are optional.').html_safe + = html_escape(s_('SlackIntegration|Select events below to enable notifications. The %{strong_open}Slack channel names%{strong_close} and %{strong_open}Slack username%{strong_close} fields are optional.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } %p.mt-3.mb-0 - = s_('SlackIntegration|<strong>Note:</strong> Usernames and private channels are not supported.').html_safe + = html_escape(s_('SlackIntegration|%{strong_open}Note:%{strong_close} Usernames and private channels are not supported.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } = link_to _('Learn more'), help_page_path('user/project/integrations/slack') diff --git a/app/views/projects/services/slack_slash_commands/_help.html.haml b/app/views/projects/services/slack_slash_commands/_help.html.haml index 0cf78d4f681..86486d95eb7 100644 --- a/app/views/projects/services/slack_slash_commands/_help.html.haml +++ b/app/views/projects/services/slack_slash_commands/_help.html.haml @@ -1,5 +1,5 @@ -- pretty_name = @project&.full_name || _('<project name>') -- run_actions_text = s_("ProjectService|Perform common operations on GitLab project: %{project_name}") % { project_name: pretty_name } +- pretty_name = @project&.full_name || _('<project name>') +- run_actions_text = html_escape_once(s_("ProjectService|Perform common operations on GitLab project: %{project_name}") % { project_name: pretty_name }) .info-well .well-segment @@ -7,7 +7,7 @@ = s_("SlackService|This service allows users to perform common operations on this project by entering slash commands in Slack.") = link_to help_page_path('user/project/integrations/slack_slash_commands.md'), target: '_blank' do = _("View documentation") - = sprite_icon('external-link', size: 16) + = sprite_icon('external-link') %p.inline = s_("SlackService|See list of available commands in Slack after setting up this service, by entering") %kbd.inline /<command> help @@ -18,7 +18,7 @@ 1. = link_to 'https://my.slack.com/services/new/slash-commands', target: '_blank', rel: 'noreferrer noopener nofollow' do Add a slash command - = sprite_icon('external-link', size: 16) + = sprite_icon('external-link') in your Slack team with these options: %hr @@ -67,7 +67,7 @@ .form-group = label_tag :autocomplete_description, _('Autocomplete description'), class: 'col-12 col-form-label label-bold' .col-12.input-group - = text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly' + = text_field_tag :autocomplete_description, run_actions_text.html_safe, class: 'form-control form-control-sm', readonly: 'readonly' .input-group-append = clipboard_button(target: '#autocomplete_description', class: 'input-group-text') @@ -89,6 +89,6 @@ %ul.list-unstyled.indent-list %li - = s_("SlackService|2. Paste the <strong>Token</strong> into the field below").html_safe + = html_escape(s_("SlackService|2. Paste the %{strong_open}Token%{strong_close} into the field below")) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } %li - = s_("SlackService|3. Select the <strong>Active</strong> checkbox, press <strong>Save changes</strong> and start using GitLab inside Slack!").html_safe + = html_escape(s_("SlackService|3. Select the %{strong_open}Active%{strong_close} checkbox, press %{strong_open}Save changes%{strong_close} and start using GitLab inside Slack!")) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } diff --git a/app/views/projects/settings/_archive.html.haml b/app/views/projects/settings/_archive.html.haml index 3307c3775ec..cbeedbd080c 100644 --- a/app/views/projects/settings/_archive.html.haml +++ b/app/views/projects/settings/_archive.html.haml @@ -1,6 +1,6 @@ - return unless can?(current_user, :archive_project, @project) -.sub-section +.sub-section{ data: { qa_selector: 'archive_project_content' } } %h4.warning-title - if @project.archived? = _('Unarchive project') @@ -13,6 +13,7 @@ method: :post, class: "btn btn-success" - else %p= _("Archiving the project will make it entirely read only. It is hidden from the dashboard and doesn't show up in searches. %{strong_start}The repository cannot be committed to, and no issues, comments, or other entities can be created.%{strong_end}").html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - = link_to _('Archive project'), archive_project_path(@project), + .gl-display-flex.gl-justify-content-end + = link_to _('Archive project'), archive_project_path(@project), data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link' }, method: :post, class: "btn btn-warning" diff --git a/app/views/projects/settings/_general.html.haml b/app/views/projects/settings/_general.html.haml index 3ffa029a25d..50f80fd1e2f 100644 --- a/app/views/projects/settings/_general.html.haml +++ b/app/views/projects/settings/_general.html.haml @@ -1,4 +1,4 @@ -= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit-project js-general-settings-form" }, authenticity_token: true do |f| += form_for [@project], remote: true, html: { multipart: true, class: "edit-project js-general-settings-form" }, authenticity_token: true do |f| %input{ name: 'update_section', type: 'hidden', value: 'js-general-settings' } = form_errors(@project) @@ -31,7 +31,7 @@ = render_if_exists 'shared/repository_size_limit_setting', form: f, type: :project - .form-group.gl-mt-3.append-bottom-20 + .form-group.gl-mt-3.gl-mb-3 .avatar-container.s90 = project_icon(@project, alt: _('Project avatar'), class: 'avatar project-avatar s90') = f.label :avatar, _('Project avatar'), class: 'label-bold d-block' @@ -40,5 +40,5 @@ %hr = link_to _('Remove avatar'), project_avatar_path(@project), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'btn btn-link' - - = f.submit _('Save changes'), class: "btn btn-success mt-4 qa-save-naming-topics-avatar-button" + .gl-display-flex.gl-justify-content-end + = f.submit _('Save changes'), class: "btn btn-success mt-4 qa-save-naming-topics-avatar-button" diff --git a/app/views/projects/settings/access_tokens/index.html.haml b/app/views/projects/settings/access_tokens/index.html.haml index 4992288a8c8..100eb5991dc 100644 --- a/app/views/projects/settings/access_tokens/index.html.haml +++ b/app/views/projects/settings/access_tokens/index.html.haml @@ -10,8 +10,9 @@ = page_title %p = _('You can generate an access token scoped to this project for each application to use the GitLab API.') - %p - = _('You can also use project access tokens to authenticate against Git over HTTP.') + -# Commented out until https://gitlab.com/gitlab-org/gitlab/-/issues/219551 is fixed + -# %p + -# = _('You can also use project access tokens to authenticate against Git over HTTP.') .col-lg-8 - if @new_project_access_token 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 7284b4bb55d..b4c9e51f53a 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -34,7 +34,7 @@ - elsif !has_base_domain %p.settings-message.text-center = s_('CICD|You must add a %{base_domain_link_start}base domain%{link_end} to your %{kubernetes_cluster_link_start}Kubernetes cluster%{link_end} in order for your deployment strategy to work.').html_safe % { base_domain_link_start: base_domain_link_start, kubernetes_cluster_link_start: kubernetes_cluster_link_start, link_end: link_end } - %label.prepend-top-10 + %label.gl-mt-3 %strong= s_('CICD|Deployment strategy') .form-check = form.radio_button :deploy_strategy, 'continuous', class: 'form-check-input' @@ -54,4 +54,4 @@ = s_('CICD|Automatic deployment to staging, manual deployment to production') = link_to icon('question-circle'), help_page_path('topics/autodevops/customize.md', anchor: 'incremental-rollout-to-production-premium'), target: '_blank' - = f.submit _('Save changes'), class: "btn btn-success prepend-top-15", data: { qa_selector: 'save_changes_button' } + = f.submit _('Save changes'), class: "btn btn-success gl-mt-5", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index e8e5a5f0256..a0dd06e3304 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -7,7 +7,7 @@ %h5.gl-mt-0 = _("Git strategy for pipelines") %p - = _("Choose between <code>clone</code> or <code>fetch</code> to get the recent application code").html_safe + = html_escape(_("Choose between %{code_open}clone%{code_close} or %{code_open}fetch%{code_close} to get the recent application code")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } = link_to icon('question-circle'), help_page_path('ci/pipelines/settings', anchor: 'git-strategy'), target: '_blank' .form-check = f.radio_button :build_allow_git_fetch, 'false', { class: 'form-check-input' } @@ -54,7 +54,7 @@ = f.label :ci_config_path, _('Custom CI configuration path'), class: 'label-bold' = f.text_field :ci_config_path, class: 'form-control', placeholder: '.gitlab-ci.yml' %p.form-text.text-muted - = _("The path to the CI configuration file. Defaults to <code>.gitlab-ci.yml</code>").html_safe + = html_escape(_("The path to the CI configuration file. Defaults to %{code_open}.gitlab-ci.yml%{code_close}")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } = link_to icon('question-circle'), help_page_path('ci/pipelines/settings', anchor: 'custom-ci-configuration-path'), target: '_blank' %hr diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index b5452fcca55..8e3be5fa086 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -74,3 +74,22 @@ = link_to _('More information'), help_page_path('user/packages/container_registry/index', anchor: 'cleanup-policy', target: '_blank', rel: 'noopener noreferrer') .settings-content = render 'projects/registry/settings/index' + +- if can?(current_user, :create_freeze_period, @project) + %section.settings.no-animate#js-deploy-freeze-settings{ class: ('expanded' if expanded) } + .settings-header + %h4 + = _("Deploy freezes") + %button.btn.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') + %p + - freeze_period_docs = help_page_path('user/project/releases/index', anchor: 'prevent-unintentional-releases-by-setting-a-deploy-freeze') + - freeze_period_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: freeze_period_docs } + = html_escape(s_('DeployFreeze|Specify times when deployments are not allowed for an environment. The %{filename} file must be updated to make deployment jobs aware of the %{freeze_period_link_start}freeze period%{freeze_period_link_end}.')) % { freeze_period_link_start: freeze_period_link_start, freeze_period_link_end: '</a>'.html_safe, filename: tag.code('gitlab-ci.yml') } + + - cron_syntax_url = 'https://crontab.guru/' + - cron_syntax_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: cron_syntax_url } + = s_('DeployFreeze|You can specify deploy freezes using only %{cron_syntax_link_start}cron syntax%{cron_syntax_link_end}.').html_safe % { cron_syntax_link_start: cron_syntax_link_start, cron_syntax_link_end: "</a>".html_safe } + + .settings-content + = render 'ci/deploy_freeze/index' diff --git a/app/views/projects/settings/integrations/show.html.haml b/app/views/projects/settings/integrations/show.html.haml index d9068bde847..18c6cb31874 100644 --- a/app/views/projects/settings/integrations/show.html.haml +++ b/app/views/projects/settings/integrations/show.html.haml @@ -4,9 +4,9 @@ - if show_webhooks_moved_alert? .gl-alert.gl-alert-info.js-webhooks-moved-alert.gl-mt-3{ role: 'alert', data: { feature_id: UserCalloutsHelper::WEBHOOKS_MOVED, dismiss_endpoint: user_callouts_path } } - = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') %button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') } - = sprite_icon('close', size: 16, css_class: 'gl-icon') + = sprite_icon('close', css_class: 'gl-icon') .gl-alert-body = _('Webhooks have moved. They can now be found under the Settings menu.') .gl-alert-actions diff --git a/app/views/projects/settings/operations/_error_tracking.html.haml b/app/views/projects/settings/operations/_error_tracking.html.haml index 393b1f9d21a..62b344b38f1 100644 --- a/app/views/projects/settings/operations/_error_tracking.html.haml +++ b/app/views/projects/settings/operations/_error_tracking.html.haml @@ -5,12 +5,12 @@ %section.settings.no-animate.js-error-tracking-settings .settings-header %h3{ :class => "h4" } - = _('Error Tracking') + = _('Error tracking') %button.btn.js-settings-toggle{ type: 'button' } = _('Expand') %p = _('To link Sentry to GitLab, enter your Sentry URL and Auth Token.') - = link_to _('More information'), help_page_path('user/project/operations/error_tracking'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('More information'), help_page_path('operations/error_tracking'), target: '_blank', rel: 'noopener noreferrer' .settings-content .js-error-tracking-form{ data: { list_projects_endpoint: project_error_tracking_projects_path(@project, format: :json), operations_settings_endpoint: project_settings_operations_path(@project), diff --git a/app/views/projects/settings/operations/_metrics_dashboard.html.haml b/app/views/projects/settings/operations/_metrics_dashboard.html.haml index edbada8444a..056d3e8102b 100644 --- a/app/views/projects/settings/operations/_metrics_dashboard.html.haml +++ b/app/views/projects/settings/operations/_metrics_dashboard.html.haml @@ -1,5 +1,5 @@ .js-operation-settings{ data: { operations_settings_endpoint: project_settings_operations_path(@project), - help_page: help_page_path('user/project/operations/dashboard_settings'), + help_page: help_page_path('operations/metrics/dashboards/settings'), external_dashboard: { url: metrics_external_dashboard_url, - help_page: help_page_path('user/project/operations/linking_to_an_external_dashboard') }, + help_page: help_page_path('operations/metrics/dashboards/settings') }, dashboard_timezone: { setting: metrics_dashboard_timezone.upcase } } } diff --git a/app/views/projects/snippets/verify.html.haml b/app/views/projects/snippets/verify.html.haml index eb56f03b3f4..3c4f08e1df7 100644 --- a/app/views/projects/snippets/verify.html.haml +++ b/app/views/projects/snippets/verify.html.haml @@ -1,4 +1,2 @@ -- form = [@project.namespace.becomes(Namespace), @project, @snippet.becomes(Snippet)] - -= render 'layouts/recaptcha_verification', spammable: @snippet, form: form += render 'layouts/recaptcha_verification', spammable: @snippet diff --git a/app/views/projects/starrers/index.html.haml b/app/views/projects/starrers/index.html.haml index e55ed99f643..97996562e2c 100644 --- a/app/views/projects/starrers/index.html.haml +++ b/app/views/projects/starrers/index.html.haml @@ -22,7 +22,7 @@ = link_to filter_starrer_path(sort: value), class: ("is-active" if @sort == value) do = title - if @starrers.size > 0 - .row.prepend-top-10 + .row.gl-mt-3 = render partial: 'starrer', collection: @starrers, as: :starrer = paginate @starrers, theme: 'gitlab' - else diff --git a/app/views/projects/static_site_editor/show.html.haml b/app/views/projects/static_site_editor/show.html.haml index 8d2649be588..2d817912335 100644 --- a/app/views/projects/static_site_editor/show.html.haml +++ b/app/views/projects/static_site_editor/show.html.haml @@ -1 +1 @@ -#static-site-editor{ data: @config.payload } +#static-site-editor{ data: @config.payload.merge({ merge_requests_illustration_path: image_path('illustrations/merge_requests.svg') }) } diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index 59c7d0401d1..c8a6168edfc 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -37,6 +37,6 @@ - if can?(current_user, :admin_tag, @project) = link_to edit_project_tag_release_path(@project, tag.name), class: 'btn btn-edit has-tooltip', title: s_('TagsPage|Edit release notes'), data: { container: "body" } do - = icon("pencil") + = sprite_icon("pencil") = link_to project_tag_path(@project, tag.name), class: "btn btn-remove remove-row has-tooltip gl-ml-3 #{protected_tag?(@project, tag) ? 'disabled' : ''}", title: s_('TagsPage|Delete tag'), method: :delete, data: { confirm: s_('TagsPage|Deleting the %{tag_name} tag cannot be undone. Are you sure?') % { tag_name: tag.name }, container: 'body' }, remote: true do = icon("trash-o") diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml index e3d3f2226a8..e0def8cf155 100644 --- a/app/views/projects/tags/index.html.haml +++ b/app/views/projects/tags/index.html.haml @@ -26,8 +26,8 @@ - if can?(current_user, :admin_tag, @project) = link_to new_project_tag_path(@project), class: 'btn btn-success new-tag-btn', data: { qa_selector: "new_tag_button" } do = s_('TagsPage|New tag') - = link_to project_tags_path(@project, rss_url_options), title: _("Tags feed"), class: 'btn d-none d-sm-inline-block has-tooltip' do - = icon("rss") + = link_to project_tags_path(@project, rss_url_options), title: _("Tags feed"), class: 'btn btn-svg d-none d-sm-inline-block has-tooltip' do + = sprite_icon('rss', css_class: 'qa-rss-icon') = render_if_exists 'projects/commits/mirror_status' diff --git a/app/views/projects/tags/show.html.haml b/app/views/projects/tags/show.html.haml index edb0577cebd..ff973e2922f 100644 --- a/app/views/projects/tags/show.html.haml +++ b/app/views/projects/tags/show.html.haml @@ -42,18 +42,18 @@ - if @tag.has_signature? = render partial: 'projects/commit/signature', object: @tag.signature - if can?(current_user, :admin_tag, @project) - = link_to edit_project_tag_release_path(@project, @tag.name), class: 'btn btn-edit controls-item has-tooltip', title: s_('TagsPage|Edit release notes') do - = icon("pencil") - = link_to project_tree_path(@project, @tag.name), class: 'btn controls-item has-tooltip', title: s_('TagsPage|Browse files') do - = sprite_icon('folder-open') - = link_to project_commits_path(@project, @tag.name), class: 'btn controls-item has-tooltip', title: s_('TagsPage|Browse commits') do - = icon('history') + = link_to edit_project_tag_release_path(@project, @tag.name), class: 'btn btn-icon btn-edit gl-button controls-item has-tooltip', title: s_('TagsPage|Edit release notes') do + = sprite_icon("pencil", css_class: 'gl-icon') + = link_to project_tree_path(@project, @tag.name), class: 'btn btn-icon gl-button controls-item has-tooltip', title: s_('TagsPage|Browse files') do + = sprite_icon('folder-open', css_class: 'gl-icon') + = link_to project_commits_path(@project, @tag.name), class: 'btn btn-icon gl-button controls-item has-tooltip', title: s_('TagsPage|Browse commits') do + = sprite_icon('history', css_class: 'gl-icon') .btn-container.controls-item = render 'projects/buttons/download', project: @project, ref: @tag.name - if can?(current_user, :admin_tag, @project) .btn-container.controls-item-full - = link_to project_tag_path(@project, @tag.name), class: "btn btn-remove remove-row has-tooltip #{protected_tag?(@project, @tag) ? 'disabled' : ''}", title: s_('TagsPage|Delete tag'), method: :delete, data: { confirm: s_('TagsPage|Deleting the %{tag_name} tag cannot be undone. Are you sure?') % { tag_name: @tag.name } } do - %i.fa.fa-trash-o + = link_to project_tag_path(@project, @tag.name), class: "btn btn-icon btn-danger gl-button remove-row has-tooltip #{protected_tag?(@project, @tag) ? 'disabled' : ''}", title: s_('TagsPage|Delete tag'), method: :delete, data: { confirm: s_('TagsPage|Deleting the %{tag_name} tag cannot be undone. Are you sure?') % { tag_name: @tag.name } } do + = sprite_icon('remove', css_class: 'gl-icon') - if @tag.message.present? %pre.wrap{ data: { qa_selector: 'tag_message_content' } } diff --git a/app/views/projects/triggers/_form.html.haml b/app/views/projects/triggers/_form.html.haml index a9abfac239c..dec71cdb56a 100644 --- a/app/views/projects/triggers/_form.html.haml +++ b/app/views/projects/triggers/_form.html.haml @@ -1,4 +1,4 @@ -= form_for [@project.namespace.becomes(Namespace), @project, @trigger], html: { class: 'gl-show-field-errors' } do |f| += form_for [@project, @trigger], html: { class: 'gl-show-field-errors' } do |f| = form_errors(@trigger) - if @trigger.token |