diff options
Diffstat (limited to 'app/views')
29 files changed, 137 insertions, 112 deletions
diff --git a/app/views/abuse_reports/new.html.haml b/app/views/abuse_reports/new.html.haml index a161fbd064e..c6781e91cfd 100644 --- a/app/views/abuse_reports/new.html.haml +++ b/app/views/abuse_reports/new.html.haml @@ -1,10 +1,10 @@ -- page_title _("Report abuse to GitLab") +- page_title _("Report abuse to admin") %h3.page-title - = _("Report abuse to GitLab") + = _("Report abuse to admin") %p - = _("Please use this form to report users to GitLab who create spam issues, comments or behave inappropriately.") + = _("Please use this form to report to the admin users who create spam issues, comments or behave inappropriately.") %p - = _("A member of GitLab's abuse team will review your report as soon as possible.") + = _("A member of the abuse team will review your report as soon as possible.") %hr = form_for @abuse_report, html: { class: 'js-quick-submit js-requires-input'} do |f| = form_errors(@abuse_report) diff --git a/app/views/ci/variables/_index.html.haml b/app/views/ci/variables/_index.html.haml index 464b9faf282..94102b4dcd0 100644 --- a/app/views/ci/variables/_index.html.haml +++ b/app/views/ci/variables/_index.html.haml @@ -6,7 +6,7 @@ = s_('Environment variables are configured by your administrator to be %{link_start}protected%{link_end} by default').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } .row - .col-lg-12.js-ci-variable-list-section{ data: { save_endpoint: save_endpoint } } + .col-lg-12.js-ci-variable-list-section{ data: { save_endpoint: save_endpoint, maskable_regex: ci_variable_maskable_regex } } .hide.alert.alert-danger.js-ci-variable-error-box %ul.ci-variable-list diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index 214630d245a..8212fb8bb33 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -34,7 +34,7 @@ = icon('spinner spin') .todos-filters - .row-content-block.second-block + .issues-details-filters.row-content-block.second-block = form_tag todos_filter_path(without: [:project_id, :author_id, :type, :action_id]), method: :get, class: 'filter-form d-sm-flex' do .filter-categories.flex-fill .filter-item.inline diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml index 383fd5130ce..5eba819172b 100644 --- a/app/views/devise/shared/_signup_box.html.haml +++ b/app/views/devise/shared/_signup_box.html.haml @@ -1,3 +1,5 @@ +- max_name_length = 128 +- max_username_length = 255 #register-pane.tab-pane.login-box{ role: 'tabpanel' } .login-body = form_for(resource, as: "new_#{resource_name}", url: registration_path(resource_name), html: { class: "new_new_user gl-show-field-errors", "aria-live" => "assertive" }) do |f| @@ -5,13 +7,13 @@ = render "devise/shared/error_messages", resource: resource .name.form-group = f.label :name, _('Full name'), class: 'label-bold' - = f.text_field :name, class: "form-control top qa-new-user-name js-block-emoji", required: true, title: _("This field is required.") + = f.text_field :name, class: "form-control top qa-new-user-name js-block-emoji js-validate-length", :data => { :max_length => max_name_length, :max_length_message => s_("SignUp|Name is too long (maximum is %{max_length} characters).") % { max_length: max_name_length } }, required: true, title: _("This field is required.") .username.form-group = f.label :username, class: 'label-bold' - = f.text_field :username, class: "form-control middle qa-new-user-username js-block-emoji", pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, required: true, title: _("Please create a username with only alphanumeric characters.") - %p.validation-error.hide= _('Username is already taken.') - %p.validation-success.hide= _('Username is available.') - %p.validation-pending.hide= _('Checking username availability...') + = f.text_field :username, class: "form-control middle qa-new-user-username js-block-emoji js-validate-length", :data => { :max_length => max_username_length, :max_length_message => s_("SignUp|Username is too long (maximum is %{max_length} characters).") % { max_length: max_username_length } }, pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, required: true, title: _("Please create a username with only alphanumeric characters.") + %p.validation-error.field-validation.hide= _('Username is already taken.') + %p.validation-success.field-validation.hide= _('Username is available.') + %p.validation-pending.field-validation.hide= _('Checking username availability...') .form-group = f.label :email, class: 'label-bold' = f.email_field :email, class: "form-control middle qa-new-user-email", required: true, title: _("Please provide a valid email address.") diff --git a/app/views/discussions/_notes.html.haml b/app/views/discussions/_notes.html.haml index 30b00ca86b3..0a5541c3e82 100644 --- a/app/views/discussions/_notes.html.haml +++ b/app/views/discussions/_notes.html.haml @@ -19,20 +19,24 @@ .discussion-reply-holder - if can_create_note? + %a.user-avatar-link.d-none.d-sm-block{ href: user_path(current_user) } + = image_tag avatar_icon_for_user(current_user), alt: current_user.to_reference, class: 'avatar s40' - if discussion.potentially_resolvable? - line_type = local_assigns.fetch(:line_type, nil) - .btn-group.discussion-with-resolve-btn{ role: "group" } - .btn-group{ role: "group" } - = link_to_reply_discussion(discussion, line_type) + .discussion-with-resolve-btn + .btn-group.discussion-with-resolve-btn{ role: "group" } + .btn-group{ role: "group" } + = link_to_reply_discussion(discussion, line_type) - = render "discussions/resolve_all", discussion: discussion + = render "discussions/resolve_all", discussion: discussion - .btn-group.discussion-actions - = render "discussions/new_issue_for_discussion", discussion: discussion, merge_request: discussion.noteable - = render "discussions/jump_to_next", discussion: discussion + .btn-group.discussion-actions + = render "discussions/new_issue_for_discussion", discussion: discussion, merge_request: discussion.noteable + = render "discussions/jump_to_next", discussion: discussion - else - = link_to_reply_discussion(discussion) + .discussion-with-resolve-btn + = link_to_reply_discussion(discussion) - elsif !current_user .disabled-comment.text-center Please diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 77fe88dacb7..255a9ad038c 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -9,7 +9,7 @@ = render 'groups/home_panel' .groups-listing{ data: { endpoints: { default: group_children_path(@group, format: :json), shared: group_shared_projects_path(@group, format: :json) } } } - .top-area.group-nav-container + .top-area.group-nav-container.justify-content-between .scrolling-tabs-container.inner-page-scroll-tabs .fade-left= icon('angle-left') .fade-right= icon('angle-right') diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml index 47710b9e9e5..54028dc8554 100644 --- a/app/views/layouts/nav/_dashboard.html.haml +++ b/app/views/layouts/nav/_dashboard.html.haml @@ -19,17 +19,17 @@ - if dashboard_nav_link?(:activity) = nav_link(path: 'dashboard#activity', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do - = link_to activity_dashboard_path, class: 'dashboard-shortcuts-activity', title: _('Activity') do + = link_to activity_dashboard_path, class: 'dashboard-shortcuts-activity' do = _('Activity') - if dashboard_nav_link?(:milestones) = nav_link(controller: 'dashboard/milestones', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do - = link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones', title: _('Milestones') do + = link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones' do = _('Milestones') - if dashboard_nav_link?(:snippets) = nav_link(controller: 'dashboard/snippets', html_options: { class: ["d-none d-xl-block", ("d-lg-block" unless has_extra_nav_icons?)] }) do - = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets qa-snippets-link', title: _('Snippets') do + = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets qa-snippets-link' do = _('Snippets') - if any_dashboard_nav_link?([:groups, :milestones, :activity, :snippets]) @@ -41,47 +41,47 @@ %ul - if dashboard_nav_link?(:activity) = nav_link(path: 'dashboard#activity') do - = link_to activity_dashboard_path, title: _('Activity') do + = link_to activity_dashboard_path do = _('Activity') - if dashboard_nav_link?(:milestones) = nav_link(controller: 'dashboard/milestones') do - = link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones', title: _('Milestones') do + = link_to dashboard_milestones_path, class: 'dashboard-shortcuts-milestones' do = _('Milestones') - if dashboard_nav_link?(:snippets) = nav_link(controller: 'dashboard/snippets') do - = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets', title: _('Snippets') do + = link_to dashboard_snippets_path, class: 'dashboard-shortcuts-snippets' do = _('Snippets') - - = render_if_exists 'dashboard/operations/nav_link' + %li.dropdown.d-lg-none + = render_if_exists 'dashboard/operations/nav_link_list' - if can?(current_user, :read_instance_statistics) - = nav_link(controller: [:conversational_development_index, :cohorts]) do - = link_to instance_statistics_root_path, title: _('Instance Statistics'), aria: { label: _('Instance Statistics') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = nav_link(controller: [:conversational_development_index, :cohorts], html_options: { class: 'd-lg-none' }) do + = link_to instance_statistics_root_path do = _('Instance Statistics') - if current_user.admin? = nav_link(controller: 'admin/dashboard') do - = link_to admin_root_path, class: 'admin-icon qa-admin-area-link', title: _('Admin Area'), aria: { label: _('Admin Area') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = link_to admin_root_path, class: 'd-lg-none admin-icon qa-admin-area-link' do = _('Admin Area') - if Gitlab::Sherlock.enabled? %li - = link_to sherlock_transactions_path, class: 'admin-icon', title: _('Sherlock Transactions'), - data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do + = link_to sherlock_transactions_path, class: 'd-lg-none admin-icon' do = _('Sherlock Transactions') -# Shortcut to Dashboard > Projects - if dashboard_nav_link?(:projects) %li.hidden - = link_to dashboard_projects_path, title: _('Projects'), class: 'dashboard-shortcuts-projects' do + = link_to dashboard_projects_path, class: 'dashboard-shortcuts-projects' do = _('Projects') - if current_controller?('ide') %li.line-separator.d-none.d-sm-block = nav_link(controller: 'ide') do - = link_to '#', class: 'dashboard-shortcuts-web-ide', title: _('Web IDE') do + = link_to '#', class: 'dashboard-shortcuts-web-ide' do = _('Web IDE') - = render_if_exists 'dashboard/operations/nav_link' + %li.dropdown{ class: 'd-none d-lg-block' } + = render_if_exists 'dashboard/operations/nav_link' - if can?(current_user, :read_instance_statistics) = nav_link(controller: [:conversational_development_index, :cohorts], html_options: { class: "d-none d-lg-block d-xl-block"}) do = link_to instance_statistics_root_path, title: _('Instance Statistics'), aria: { label: _('Instance Statistics') }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do diff --git a/app/views/notify/new_user_email.html.haml b/app/views/notify/new_user_email.html.haml index dfbb5c75bd3..ec135ae994f 100644 --- a/app/views/notify/new_user_email.html.haml +++ b/app/views/notify/new_user_email.html.haml @@ -13,4 +13,5 @@ %p = link_to "Click here to set your password", edit_password_url(@user, reset_password_token: @token) %p - = raw reset_token_expire_message + This link is valid for #{password_reset_token_valid_time}. + After it expires, you can #{link_to("request a new one", new_user_password_url(user_email: @user.email))}. diff --git a/app/views/notify/new_user_email.text.erb b/app/views/notify/new_user_email.text.erb index f3f20f3bfba..7e0db75472d 100644 --- a/app/views/notify/new_user_email.text.erb +++ b/app/views/notify/new_user_email.text.erb @@ -1,10 +1,17 @@ Hi <%= sanitize_name(@user.name) %>! +<% if Gitlab::CurrentSettings.allow_signup? %> +Your account has been created successfully. +<% else %> The Administrator created an account for you. Now you are a member of the company GitLab application. +<% end %> login.................. <%= @user.email %> + <% if @user.created_by_id %> - <%= link_to "Click here to set your password", edit_password_url(@user, :reset_password_token => @token) %> +Click here to set your password: +<%= edit_password_url(@user, :reset_password_token => @token) %> - <%= reset_token_expire_message %> +This link is valid for <%= password_reset_token_valid_time %>. After it expires, you can request a new one here: +<%= new_user_password_url(user_email: @user.email) %> <% end %> diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 46384bc28ef..4ebfaff0860 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -5,7 +5,8 @@ .col-lg-4.application-theme %h4.prepend-top-0 = s_('Preferences|Navigation theme') - %p= _('Customize the appearance of the application header and navigation sidebar.') + %p + = s_('Preferences|Customize the appearance of the application header and navigation sidebar.') .col-lg-8.application-theme - Gitlab::Themes.each do |theme| = label_tag do @@ -18,9 +19,9 @@ .col-lg-4.profile-settings-sidebar %h4.prepend-top-0 - = _('Syntax highlighting theme') + = s_('Preferences|Syntax highlighting theme') %p - = _('This setting allows you to customize the appearance of the syntax.') + = s_('Preferences|This setting allows you to customize the appearance of the syntax.') = succeed '.' do = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'syntax-highlighting-theme'), target: '_blank' .col-lg-8.syntax-theme @@ -35,31 +36,31 @@ .col-lg-4.profile-settings-sidebar %h4.prepend-top-0 - = _('Behavior') + = s_('Preferences|Behavior') %p - = _('This setting allows you to customize the behavior of the system layout and default views.') + = s_('Preferences|This setting allows you to customize the behavior of the system layout and default views.') = succeed '.' do = link_to _('Learn more'), help_page_path('user/profile/preferences', anchor: 'behavior'), target: '_blank' .col-lg-8 .form-group = f.label :layout, class: 'label-bold' do - = _('Layout width') + = s_('Preferences|Layout width') = f.select :layout, layout_choices, {}, class: 'form-control' .form-text.text-muted - = _('Choose between fixed (max. 1280px) and fluid (100%%) application layout.') + = s_('Preferences|Choose between fixed (max. 1280px) and fluid (100%%) application layout.') .form-group = f.label :dashboard, class: 'label-bold' do - = _('Default dashboard') + = s_('Preferences|Default dashboard') = f.select :dashboard, dashboard_choices, {}, class: 'form-control' = render_if_exists 'profiles/preferences/group_overview_selector', f: f # EE-specific .form-group = f.label :project_view, class: 'label-bold' do - = _('Project overview content') + = s_('Preferences|Project overview content') = f.select :project_view, project_view_choices, {}, class: 'form-control' .form-text.text-muted - = _('Choose what content you want to see on a project’s overview page.') + = s_('Preferences|Choose what content you want to see on a project’s overview page.') .col-sm-12 %hr diff --git a/app/views/projects/_merge_request_merge_checks_settings.html.haml b/app/views/projects/_merge_request_merge_checks_settings.html.haml index 1ab467a3710..c21d333f21a 100644 --- a/app/views/projects/_merge_request_merge_checks_settings.html.haml +++ b/app/views/projects/_merge_request_merge_checks_settings.html.haml @@ -3,7 +3,7 @@ .form-group %b= s_('ProjectSettings|Merge checks') %p.text-secondary= s_('ProjectSettings|These checks must pass before merge requests can be merged') - .form-check.mb-2.builds-feature{ class: ("hidden" if @project && @project.project_feature.send(:builds_access_level) == 0) } + .form-check.mb-2.builds-feature = form.check_box :only_allow_merge_if_pipeline_succeeds, class: 'form-check-input' = form.label :only_allow_merge_if_pipeline_succeeds, class: 'form-check-label' do = s_('ProjectSettings|Pipelines must succeed') diff --git a/app/views/projects/_new_project_fields.html.haml b/app/views/projects/_new_project_fields.html.haml index 9ae84a909a5..e423631ec99 100644 --- a/app/views/projects/_new_project_fields.html.haml +++ b/app/views/projects/_new_project_fields.html.haml @@ -1,4 +1,4 @@ -- visibility_level = params.dig(:project, :visibility_level) || default_project_visibility +- visibility_level = selected_visibility_level(@project, params.dig(:project, :visibility_level)) - ci_cd_only = local_assigns.fetch(:ci_cd_only, false) - hide_init_with_readme = local_assigns.fetch(:hide_init_with_readme, false) - track_label = local_assigns.fetch(:track_label, 'blank_project') diff --git a/app/views/projects/diffs/_parallel_view.html.haml b/app/views/projects/diffs/_parallel_view.html.haml index 311b0be19ab..9587ea4696b 100644 --- a/app/views/projects/diffs/_parallel_view.html.haml +++ b/app/views/projects/diffs/_parallel_view.html.haml @@ -1,7 +1,7 @@ / Side-by-side diff view .text-file{ data: diff_view_data } - %table.diff-wrap-lines.code.js-syntax-highlight + %table.diff-wrap-lines.code.code-commit.js-syntax-highlight - diff_file.parallel_diff_lines.each do |line| - left = line[:left] - right = line[:right] diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml index 018c5b38536..641a0689c26 100644 --- a/app/views/projects/diffs/_text_file.html.haml +++ b/app/views/projects/diffs/_text_file.html.haml @@ -3,7 +3,7 @@ .suppressed-container %a.show-suppressed-diff.cursor-pointer.js-show-suppressed-diff= _("Changes suppressed. Click to show.") -%table.text-file.diff-wrap-lines.code.js-syntax-highlight.commit-diff{ data: diff_view_data, class: too_big ? 'hide' : '' } +%table.text-file.diff-wrap-lines.code.code-commit.js-syntax-highlight.commit-diff{ data: diff_view_data, class: too_big ? 'hide' : '' } = render partial: "projects/diffs/line", collection: diff_file.highlighted_diff_lines, as: :line, diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml index fbd70cd1906..457b2936278 100644 --- a/app/views/projects/issues/_new_branch.html.haml +++ b/app/views/projects/issues/_new_branch.html.haml @@ -8,18 +8,18 @@ - create_branch_path = project_branches_path(@project, branch_name: @issue.to_branch_name, ref: @project.default_branch, issue_iid: @issue.iid) - refs_path = refs_namespace_project_path(@project.namespace, @project, search: '') - .create-mr-dropdown-wrap.d-inline-block{ data: { can_create_path: can_create_path, create_mr_path: create_mr_path, create_branch_path: create_branch_path, refs_path: refs_path } } - .btn-group.unavailable + .create-mr-dropdown-wrap.d-inline-block.full-width-mobile{ data: { can_create_path: can_create_path, create_mr_path: create_mr_path, create_branch_path: create_branch_path, refs_path: refs_path } } + .btn-group.btn-group-sm.unavailable %button.btn.btn-grouped{ type: 'button', disabled: 'disabled' } = icon('spinner', class: 'fa-spin') %span.text Checking branch availability… - .btn-group.available.hidden + .btn-group.btn-group-sm.available.hidden %button.btn.js-create-merge-request.btn-success.btn-inverted{ type: 'button', data: { action: data_action } } = value - %button.btn.create-merge-request-dropdown-toggle.dropdown-toggle.btn-success.btn-inverted.js-dropdown-toggle{ type: 'button', data: { dropdown: { trigger: '#create-merge-request-dropdown' }, display: 'static' } } + %button.btn.create-merge-request-dropdown-toggle.dropdown-toggle.btn-success.btn-inverted.js-dropdown-toggle.flex-grow-0{ type: 'button', data: { dropdown: { trigger: '#create-merge-request-dropdown' }, display: 'static' } } = icon('caret-down') .droplab-dropdown diff --git a/app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml b/app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml index 03226de120d..7bd5c437942 100644 --- a/app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml +++ b/app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml @@ -1,5 +1,5 @@ %inline-conflict-lines{ "inline-template" => "true", ":file" => "file" } - %table.diff-wrap-lines.code.js-syntax-highlight + %table.diff-wrap-lines.code.code-commit.js-syntax-highlight %tr.line_holder.diff-inline{ "v-for" => "line in file.inlineLines" } %td.diff-line-num.new_line{ ":class" => "lineCssClass(line)", "v-if" => "!line.isHeader" } %a {{line.new_line}} diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 05aeb5d972b..a201fafb949 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -31,29 +31,26 @@ .merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') } .merge-request-tabs-container - .scrolling-tabs-container.inner-page-scroll-tabs.is-smaller - .fade-left= icon('angle-left') - .fade-right= icon('angle-right') - %ul.merge-request-tabs.nav-tabs.nav.nav-links.scrolling-tabs - %li.notes-tab.qa-notes-tab - = tab_link_for @merge_request, :show, force_link: @commit.present? do - = _("Discussion") - %span.badge.badge-pill= @merge_request.related_notes.user.count - - if @merge_request.source_project - %li.commits-tab - = tab_link_for @merge_request, :commits do - = _("Commits") - %span.badge.badge-pill= @commits_count - - if @pipelines.any? - %li.pipelines-tab - = tab_link_for @merge_request, :pipelines do - = _("Pipelines") - %span.badge.badge-pill.js-pipelines-mr-count= @pipelines.size - %li.diffs-tab.qa-diffs-tab - = tab_link_for @merge_request, :diffs do - = _("Changes") - %span.badge.badge-pill= @merge_request.diff_size - .d-inline-flex.flex-wrap + %ul.merge-request-tabs.nav-tabs.nav.nav-links + %li.notes-tab.qa-notes-tab + = tab_link_for @merge_request, :show, force_link: @commit.present? do + = _("Discussion") + %span.badge.badge-pill= @merge_request.related_notes.user.count + - if @merge_request.source_project + %li.commits-tab + = tab_link_for @merge_request, :commits do + = _("Commits") + %span.badge.badge-pill= @commits_count + - if @pipelines.any? + %li.pipelines-tab + = tab_link_for @merge_request, :pipelines do + = _("Pipelines") + %span.badge.badge-pill.js-pipelines-mr-count= @pipelines.size + %li.diffs-tab.qa-diffs-tab + = tab_link_for @merge_request, :diffs do + = _("Changes") + %span.badge.badge-pill= @merge_request.diff_size + .d-flex.flex-wrap.align-items-center.justify-content-lg-end #js-vue-discussion-filter{ data: { default_filter: current_user&.notes_filter_for(@merge_request), notes_filters: UserPreference.notes_filters.to_json } } #js-vue-discussion-counter diff --git a/app/views/projects/notes/_more_actions_dropdown.html.haml b/app/views/projects/notes/_more_actions_dropdown.html.haml index 8de84f82e9f..8a6e5fde99b 100644 --- a/app/views/projects/notes/_more_actions_dropdown.html.haml +++ b/app/views/projects/notes/_more_actions_dropdown.html.haml @@ -11,7 +11,7 @@ - unless is_current_user %li = link_to new_abuse_report_path(user_id: note.author.id, ref_url: noteable_note_url(note)) do - = _('Report abuse to GitLab') + = _('Report abuse to admin') - if note_editable %li = link_to note_url(note), method: :delete, data: { confirm: 'Are you sure you want to delete this comment?' }, remote: true, class: 'js-note-delete' do diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index b38b8e3f686..2d108a1cba5 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -26,6 +26,14 @@ %hr .form-group + = f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form| + = form.label :default_git_depth, _('Git shallow clone'), class: 'label-bold' + = form.number_field :default_git_depth, { class: 'form-control', min: 0, max: 1000 } + %p.form-text.text-muted + = _('The number of changes to be fetched from GitLab when cloning a repository. This can speed up Pipelines execution. Keep empty or set to 0 to disable shallow clone by default and make GitLab CI fetch all branches and tags each time.') + + %hr + .form-group = f.label :build_timeout_human_readable, _('Timeout'), class: 'label-bold' = f.text_field :build_timeout_human_readable, class: 'form-control' %p.form-text.text-muted diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml index 458096f9dd6..2e78b0bff3e 100644 --- a/app/views/projects/tags/index.html.haml +++ b/app/views/projects/tags/index.html.haml @@ -9,7 +9,7 @@ .nav-text.row-main-content = s_('TagsPage|Tags give the ability to mark specific points in history as being important') - .nav-controls.row-fixed-content + .nav-controls = form_tag(filter_tags_path, method: :get) do = search_field_tag :search, params[:search], { placeholder: s_('TagsPage|Filter by tag name'), id: 'tag-search', class: 'form-control search-text-input input-short', spellcheck: false } diff --git a/app/views/projects/tags/show.html.haml b/app/views/projects/tags/show.html.haml index 0be62bc5612..59232372150 100644 --- a/app/views/projects/tags/show.html.haml +++ b/app/views/projects/tags/show.html.haml @@ -18,7 +18,7 @@ - else = s_("TagsPage|Can't find HEAD commit for this tag") - .nav-controls.controls-flex + .nav-controls - if can?(current_user, :push_code, @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") diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml index cb8a8a24be8..12eb8d7fa81 100644 --- a/app/views/search/_results.html.haml +++ b/app/views/search/_results.html.haml @@ -21,7 +21,7 @@ .search-results - if @scope == 'projects' .term - = render 'shared/projects/list', projects: @search_objects, pipeline_status: false + = render 'shared/projects/list', { projects: @search_objects, pipeline_status: false }.merge(@display_options) - else - locals = { projects: blob_projects(@search_objects) } if %w[blobs wiki_blobs].include?(@scope) = render partial: "search/results/#{@scope.singularize}", collection: @search_objects, locals: locals diff --git a/app/views/search/results/_issue.html.haml b/app/views/search/results/_issue.html.haml index 796782035f2..1f055cdfa31 100644 --- a/app/views/search/results/_issue.html.haml +++ b/app/views/search/results/_issue.html.haml @@ -1,7 +1,7 @@ .search-result-row %h4 = confidential_icon(issue) - = link_to [issue.project.namespace.becomes(Namespace), issue.project, issue] do + = link_to namespace_project_issue_path(issue.project.namespace.becomes(Namespace), issue.project, issue) do %span.term.str-truncated= issue.title - if issue.closed? %span.badge.badge-danger.prepend-left-5= _("Closed") diff --git a/app/views/search/results/_merge_request.html.haml b/app/views/search/results/_merge_request.html.haml index f0e0af11f27..074bb9bce8d 100644 --- a/app/views/search/results/_merge_request.html.haml +++ b/app/views/search/results/_merge_request.html.haml @@ -1,6 +1,6 @@ .search-result-row %h4 - = link_to [merge_request.target_project.namespace.becomes(Namespace), merge_request.target_project, merge_request] do + = link_to namespace_project_merge_request_path(merge_request.target_project.namespace.becomes(Namespace), merge_request.target_project, merge_request) do %span.term.str-truncated= merge_request.title - if merge_request.merged? %span.badge.badge-primary.prepend-left-5= _("Merged") diff --git a/app/views/search/results/_milestone.html.haml b/app/views/search/results/_milestone.html.haml index 2daa96e34d1..3201f1a7815 100644 --- a/app/views/search/results/_milestone.html.haml +++ b/app/views/search/results/_milestone.html.haml @@ -1,6 +1,6 @@ .search-result-row %h4 - = link_to [milestone.project.namespace.becomes(Namespace), milestone.project, milestone] do + = link_to namespace_project_milestone_path(milestone.project.namespace.becomes(Namespace), milestone.project, milestone) do %span.term.str-truncated= milestone.title - if milestone.description.present? diff --git a/app/views/shared/members/_group.html.haml b/app/views/shared/members/_group.html.haml index 9ec76d82d18..e83ca5eaab8 100644 --- a/app/views/shared/members/_group.html.haml +++ b/app/views/shared/members/_group.html.haml @@ -2,9 +2,12 @@ - group = group_link.group - can_admin_member = can?(current_user, :admin_project_member, @project) - dom_id = "group_member_#{group_link.id}" -%li.member.group_member{ id: dom_id } - %span.list-item-name - = group_icon(group, class: "avatar s40", alt: '') + +-# Note this is just for groups. For individual members please see shared/members/_member + +%li.member.group_member.py-2.px-3.d-flex.flex-column.flex-md-row{ id: dom_id } + %span.list-item-name.mb-2.m-md-0 + = group_icon(group, class: "avatar s40 flex-shrink-0 flex-grow-0", alt: '') .user-info = link_to group.full_name, group_path(group), class: 'member' .cgray @@ -13,10 +16,10 @@ · %span{ class: ('text-warning' if group_link.expires_soon?) } = _("Expires in %{expires_at}").html_safe % { expires_at: distance_of_time_in_words_to_now(group_link.expires_at) } - .controls.member-controls - = form_tag project_group_link_path(@project, group_link), method: :put, remote: true, class: 'js-edit-member-form form-group row append-right-5' do + .controls.member-controls.align-items-center + = form_tag project_group_link_path(@project, group_link), method: :put, remote: true, class: 'js-edit-member-form form-group d-sm-flex' do = hidden_field_tag "group_link[group_access]", group_link.group_access - .member-form-control.dropdown.append-right-5 + .member-form-control.dropdown.mr-sm-2.d-sm-inline-block %button.dropdown-menu-toggle.js-member-permissions-dropdown{ type: "button", disabled: !can_admin_member, data: { toggle: "dropdown", field_name: "group_link[group_access]" } } @@ -32,14 +35,14 @@ = link_to role, "javascript:void(0)", class: ("is-active" if group_link.group_access == role_id), data: { id: role_id, el_id: dom_id } - .prepend-left-5.clearable-input.member-form-control + .clearable-input.member-form-control.d-sm-inline-block = text_field_tag 'group_link[expires_at]', group_link.expires_at, class: 'form-control js-access-expiration-date js-member-update-control', placeholder: _('Expiration date'), id: "member_expires_at_#{group.id}", disabled: !can_admin_member %i.clear-icon.js-clear-input - if can_admin_member = link_to project_group_link_path(@project, group_link), method: :delete, data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name } }, - class: 'btn btn-remove prepend-left-10' do + class: 'btn btn-remove m-0 ml-sm-2 align-self-center' do %span.d-block.d-sm-none = _("Delete") = icon('trash', class: 'd-none d-sm-block') diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml index afcb2b71472..331283f7eec 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -6,10 +6,12 @@ - source = member.source - override = member.try(:override) -%li.member{ class: [dom_class(member), ("is-overridden" if override)], id: dom_id(member) } - %span.list-item-name +-# Note this is just for individual members. For groups please see shared/members/_group + +%li.member.py-2.px-3.d-flex.flex-column{ class: [dom_class(member), ("is-overridden" if override), ("flex-md-row" unless force_mobile_view)], id: dom_id(member) } + %span.list-item-name.mb-2.m-md-0 - if user - = image_tag avatar_icon_for_user(user, 40), class: "avatar s40", alt: '' + = image_tag avatar_icon_for_user(user, 40), class: "avatar s40 flex-shrink-0 flex-grow-0", alt: '' .user-info = link_to user.name, user_path(user), class: 'member js-user-link', data: { user_id: user.id } = user_status(user) @@ -43,7 +45,7 @@ = _("Expires in %{expires_at}").html_safe % { expires_at: distance_of_time_in_words_to_now(member.expires_at) } - else - = image_tag avatar_icon_for_email(member.invite_email, 40), class: "avatar s40", alt: '' + = image_tag avatar_icon_for_email(member.invite_email, 40), class: "avatar s40 flex-shrink-0 flex-grow-0", alt: '' .user-info .member= member.invite_email .cgray @@ -54,20 +56,20 @@ = time_ago_with_tooltip(member.created_at) - if show_roles - current_resource = @project || @group - .controls.member-controls + .controls.member-controls.align-items-center = render_if_exists 'shared/members/ee/ldap_tag', can_override: member.can_override? - if show_controls && member.source == current_resource - if member.can_resend_invite? = link_to icon('paper-plane'), polymorphic_path([:resend_invite, member]), method: :post, - class: 'btn btn-default prepend-left-10 d-none d-sm-block', + class: 'btn btn-default align-self-center mr-sm-2', title: _('Resend invite') - if user != current_user && member.can_update? - = form_for member, remote: true, html: { class: 'js-edit-member-form form-group row append-right-5' } do |f| + = form_for member, remote: true, html: { class: "js-edit-member-form form-group #{'d-sm-flex' unless force_mobile_view}" } do |f| = f.hidden_field :access_level - .member-form-control.dropdown.append-right-5 + .member-form-control.dropdown{ class: [("mr-sm-2 d-sm-inline-block" unless force_mobile_view)] } %button.dropdown-menu-toggle.js-member-permissions-dropdown{ type: "button", disabled: member.can_override? && !override, data: { toggle: "dropdown", field_name: "#{f.object_name}[access_level]" } } @@ -87,7 +89,7 @@ group: @group, member: member, can_override: member.can_override? - .prepend-left-5.clearable-input.member-form-control + .clearable-input.member-form-control{ class: [("d-sm-inline-block" unless force_mobile_view)] } = f.text_field :expires_at, disabled: member.can_override? && !override, class: 'form-control js-access-expiration-date js-member-update-control', @@ -96,12 +98,12 @@ data: { el_id: dom_id(member) } %i.clear-icon.js-clear-input - else - %span.member-access-text= member.human_access + %span.member-access-text.user-access-role= member.human_access - if member.can_approve? = link_to polymorphic_path([:approve_access_request, member]), method: :post, - class: 'btn btn-success prepend-left-10', + class: "btn btn-success align-self-center m-0 mb-2 #{'mb-sm-0 ml-sm-2' unless force_mobile_view}", title: _('Grant access') do %span{ class: ('d-block d-sm-none' unless force_mobile_view) } = _('Grant access') @@ -113,12 +115,12 @@ = link_to icon('sign-out', text: _('Leave')), polymorphic_path([:leave, member.source, :members]), method: :delete, data: { confirm: leave_confirmation_message(member.source) }, - class: 'btn btn-remove prepend-left-10' + class: "btn btn-remove align-self-center m-0 #{'ml-sm-2' unless force_mobile_view}" - else = link_to member, method: :delete, data: { confirm: remove_member_message(member) }, - class: 'btn btn-remove prepend-left-10', + class: "btn btn-remove align-self-center m-0 #{'ml-sm-2' unless force_mobile_view}", title: remove_member_title(member) do %span{ class: ('d-block d-sm-none' unless force_mobile_view) } = _("Delete") @@ -126,6 +128,6 @@ = icon('trash', class: 'd-none d-sm-block') = render_if_exists 'shared/members/ee/override_member_buttons', group: @group, member: member, user: user, action: :edit, can_override: member.can_override? - else - %span.member-access-text= member.human_access + %span.member-access-text.user-access-role= member.human_access = render_if_exists 'shared/members/ee/override_member_buttons', group: @group, member: member, user: user, action: :confirm, can_override: member.can_override? diff --git a/app/views/shared/notes/_note.html.haml b/app/views/shared/notes/_note.html.haml index 6fec435cc87..5c9dd72418e 100644 --- a/app/views/shared/notes/_note.html.haml +++ b/app/views/shared/notes/_note.html.haml @@ -31,7 +31,7 @@ .note-header .note-header-info %a{ href: user_path(note.author) } - %span.note-header-author-name + %span.note-header-author-name.bold = sanitize(note.author.name) = user_status(note.author) %span.note-headline-light diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 6dc61088e65..a71bfd624e4 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -9,7 +9,7 @@ = auto_discovery_link_tag(:atom, user_url(@user, format: :atom), title: "#{@user.name} activity") .user-profile - .cover-block.user-cover-block.top-area + .cover-block.user-cover-block .cover-controls - if @user == current_user = link_to profile_path, class: 'btn btn-default has-tooltip', title: s_('UserProfile|Edit profile'), 'aria-label': 'Edit profile' do |