diff options
Diffstat (limited to 'app/views')
35 files changed, 266 insertions, 295 deletions
diff --git a/app/views/admin/applications/index.html.haml b/app/views/admin/applications/index.html.haml index 2cdf98075d1..758d722cc63 100644 --- a/app/views/admin/applications/index.html.haml +++ b/app/views/admin/applications/index.html.haml @@ -19,7 +19,8 @@ %tr{ :id => "application_#{application.id}" } %td= link_to application.name, admin_application_path(application) %td= application.redirect_uri - %td= application.access_tokens.map(&:resource_owner_id).uniq.count + %td= @application_counts[application.id].to_i %td= application.trusted? ? 'Y': 'N' %td= link_to 'Edit', edit_admin_application_path(application), class: 'btn btn-link' %td= render 'delete_form', application: application += paginate @applications, theme: 'gitlab' diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 8aca61efe7b..8fad42436ca 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -35,41 +35,7 @@ = link_to 'New group', new_admin_group_path, class: "btn btn-success" .row .col-md-4 - .info-well - .well-segment.admin-well.admin-well-statistics - %h4 Statistics - %p - Forks - %span.light.float-right - = approximate_fork_count_with_delimiters(@counts) - %p - Issues - %span.light.float-right - = approximate_count_with_delimiters(@counts, Issue) - %p - Merge Requests - %span.light.float-right - = approximate_count_with_delimiters(@counts, MergeRequest) - %p - Notes - %span.light.float-right - = approximate_count_with_delimiters(@counts, Note) - %p - Snippets - %span.light.float-right - = approximate_count_with_delimiters(@counts, Snippet) - %p - SSH Keys - %span.light.float-right - = approximate_count_with_delimiters(@counts, Key) - %p - Milestones - %span.light.float-right - = approximate_count_with_delimiters(@counts, Milestone) - %p - Active Users - %span.light.float-right - = number_with_delimiter(User.active.count) + #js-admin-statistics-container .col-md-4 .info-well .well-segment.admin-well.admin-well-features diff --git a/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml b/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml new file mode 100644 index 00000000000..f707c6585ec --- /dev/null +++ b/app/views/clusters/clusters/cloud_providers/_cloud_provider_button.html.haml @@ -0,0 +1,8 @@ +- provider = local_assigns.fetch(:provider) +- logo_path = local_assigns.fetch(:logo_path) +- label = local_assigns.fetch(:label) + += link_to clusterable.new_path(provider: provider), class: 'btn gl-button btn-outline flex-fill d-inline-flex flex-column mr-3 justify-content-center align-items-center' do + = image_tag logo_path, alt: label, class: 'gl-w-13 gl-h-13' + %span + = label diff --git a/app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml b/app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml new file mode 100644 index 00000000000..24506205243 --- /dev/null +++ b/app/views/clusters/clusters/cloud_providers/_cloud_provider_selector.html.haml @@ -0,0 +1,11 @@ +- gke_label = s_('ClusterIntegration|Google GKE') +- eks_label = s_('ClusterIntegration|Amazon EKS') +- create_cluster_label = s_('ClusterIntegration|Create cluster on') +.d-flex.flex-column + %h5 + = create_cluster_label + .d-flex + = render partial: 'clusters/clusters/cloud_providers/cloud_provider_button', + locals: { provider: 'gke', label: gke_label, logo_path: '' } + = render partial: 'clusters/clusters/cloud_providers/cloud_provider_button', + locals: { provider: 'eks', label: eks_label, logo_path: '' } diff --git a/app/views/clusters/clusters/eks/_index.html.haml b/app/views/clusters/clusters/eks/_index.html.haml new file mode 100644 index 00000000000..ca8e9ba527a --- /dev/null +++ b/app/views/clusters/clusters/eks/_index.html.haml @@ -0,0 +1 @@ +.js-create-eks-cluster-form-container diff --git a/app/views/clusters/clusters/new.html.haml b/app/views/clusters/clusters/new.html.haml index 6a8af23e5e8..fb182d99ff0 100644 --- a/app/views/clusters/clusters/new.html.haml +++ b/app/views/clusters/clusters/new.html.haml @@ -1,6 +1,8 @@ - breadcrumb_title _('Kubernetes') - page_title _('Kubernetes Cluster') -- active_tab = local_assigns.fetch(:active_tab, 'gcp') +- create_eks_enabled = Feature.enabled?(:create_eks_clusters) +- active_tab = local_assigns.fetch(:active_tab, 'create') +- link_end = '<a/>'.html_safe = javascript_include_tag 'https://apis.google.com/js/api.js' = render_gcp_signup_offer @@ -11,26 +13,36 @@ .col-md-9.js-toggle-container %ul.nav-links.nav-tabs.gitlab-tabs.nav{ role: 'tablist' } %li.nav-item{ role: 'presentation' } - %a.nav-link{ href: '#create-gcp-cluster-pane', id: 'create-gcp-cluster-tab', class: active_when(active_tab == 'gcp'), data: { toggle: 'tab' }, role: 'tab' } + %a.nav-link{ href: '#create-cluster-pane', id: 'create-cluster-tab', class: active_when(active_tab == 'create'), data: { toggle: 'tab' }, role: 'tab' } %span Create new Cluster on GKE %li.nav-item{ role: 'presentation' } - %a.nav-link{ href: '#add-user-cluster-pane', id: 'add-user-cluster-tab', class: active_when(active_tab == 'user'), data: { toggle: 'tab' }, role: 'tab' } + %a.nav-link{ href: '#add-cluster-pane', id: 'add-cluster-tab', class: active_when(active_tab == 'add'), data: { toggle: 'tab' }, role: 'tab' } %span Add existing cluster .tab-content.gitlab-tab-content - .tab-pane{ id: 'create-gcp-cluster-pane', class: active_when(active_tab == 'gcp'), role: 'tabpanel' } - = render 'clusters/clusters/gcp/header' - - if @valid_gcp_token - = render 'clusters/clusters/gcp/form' - - elsif @authorize_url - .signin-with-google - = link_to(image_tag('auth_buttons/signin_with_google.png', width: '191px'), @authorize_url) - = _('or') - = link_to('create a new Google account', 'https://accounts.google.com/SignUpWithoutGmail?service=cloudconsole&continue=https%3A%2F%2Fconsole.cloud.google.com%2Ffreetrial%3Futm_campaign%3D2018_cpanel%26utm_source%3Dgitlab%26utm_medium%3Dreferral', target: '_blank', rel: 'noopener noreferrer') - - else - - link = link_to(s_('ClusterIntegration|properly configured'), help_page_path("integration/google"), target: '_blank', rel: 'noopener noreferrer') - = s_('Google authentication is not %{link_to_documentation}. Ask your GitLab administrator if you want to use this service.').html_safe % { link_to_documentation: link } + - if create_eks_enabled + .tab-pane{ id: 'create-cluster-pane', class: active_when(active_tab == 'create'), role: 'tabpanel' } + - if @gke_selected && @valid_gcp_token + = render 'clusters/clusters/gcp/header' + = render 'clusters/clusters/gcp/form' + - elsif @eks_selected + = render 'clusters/clusters/eks/index' + - else + = render 'clusters/clusters/cloud_providers/cloud_provider_selector' + - else + .tab-pane{ id: 'create-cluster-pane', class: active_when(active_tab == 'create'), role: 'tabpanel' } + = render 'clusters/clusters/gcp/header' + - if @valid_gcp_token + = render 'clusters/clusters/gcp/form' + - elsif @authorize_url + .signin-with-google + - create_account_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: 'https://accounts.google.com/SignUpWithoutGmail?service=cloudconsole&continue=https%3A%2F%2Fconsole.cloud.google.com%2Ffreetrial%3Futm_campaign%3D2018_cpanel%26utm_source%3Dgitlab%26utm_medium%3Dreferral' } + = link_to(image_tag('auth_buttons/signin_with_google.png', width: '191px', alt: _('Sign in with Google')), @authorize_url) + = s_('or %{link_start}create a new Google account%{link_end}').html_safe % { link_start: create_account_link, link_end: link_end } + - else + - documentation_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path("integration/google") } + = s_('Google authentication is not %{link_start}property configured%{link_end}. Ask your GitLab administrator if you want to use this service.').html_safe % { link_start: documentation_link_start, link_end: link_end } - .tab-pane{ id: 'add-user-cluster-pane', class: active_when(active_tab == 'user'), role: 'tabpanel' } + .tab-pane{ id: 'add-cluster-pane', class: active_when(active_tab == 'add'), role: 'tabpanel' } = render 'clusters/clusters/user/header' = render 'clusters/clusters/user/form' diff --git a/app/views/clusters/clusters/user/_form.html.haml b/app/views/clusters/clusters/user/_form.html.haml index 5507f12b73b..a6acf948ed4 100644 --- a/app/views/clusters/clusters/user/_form.html.haml +++ b/app/views/clusters/clusters/user/_form.html.haml @@ -1,5 +1,5 @@ - more_info_link = link_to _('More information'), help_page_path('user/project/clusters/index.md', - anchor: 'adding-an-existing-kubernetes-cluster'), target: '_blank' + anchor: 'add-existing-kubernetes-cluster'), target: '_blank' - rbac_help_link = link_to _('More information'), help_page_path('user/project/clusters/index.md', anchor: 'role-based-access-control-rbac-core-only'), target: '_blank' diff --git a/app/views/clusters/clusters/user/_header.html.haml b/app/views/clusters/clusters/user/_header.html.haml index 749177fa6c1..3b9ceaa2b8a 100644 --- a/app/views/clusters/clusters/user/_header.html.haml +++ b/app/views/clusters/clusters/user/_header.html.haml @@ -1,5 +1,5 @@ %h4 = s_('ClusterIntegration|Enter the details for your Kubernetes cluster') %p - - link_to_help_page = link_to(s_('ClusterIntegration|documentation'), help_page_path('user/project/clusters/index', anchor: 'adding-an-existing-kubernetes-cluster'), target: '_blank', rel: 'noopener noreferrer') + - link_to_help_page = link_to(s_('ClusterIntegration|documentation'), help_page_path('user/project/clusters/index', anchor: 'add-existing-kubernetes-cluster'), target: '_blank', rel: 'noopener noreferrer') = s_('ClusterIntegration|Please enter access information for your Kubernetes cluster. If you need help, you can read our %{link_to_help_page} on Kubernetes').html_safe % { link_to_help_page: link_to_help_page } diff --git a/app/views/events/_event.atom.builder b/app/views/events/_event.atom.builder index d56234e6c1a..406e8a93194 100644 --- a/app/views/events/_event.atom.builder +++ b/app/views/events/_event.atom.builder @@ -1,5 +1,7 @@ return unless event.visible_to_user?(current_user) +event = event.present + xml.entry do xml.id "tag:#{request.host},#{event.created_at.strftime("%Y-%m-%d")}:#{event.id}" xml.link href: event_feed_url(event) diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml index 222175c818a..647f0597adb 100644 --- a/app/views/events/_event.html.haml +++ b/app/views/events/_event.html.haml @@ -1,3 +1,5 @@ +- event = event.present + - if event.visible_to_user?(current_user) .event-item .event-item-timestamp diff --git a/app/views/events/_event_scope.html.haml b/app/views/events/_event_scope.html.haml index 98941722434..67e4c538b4a 100644 --- a/app/views/events/_event_scope.html.haml +++ b/app/views/events/_event_scope.html.haml @@ -2,6 +2,5 @@ = event_preposition(event) - if event.project = link_to_project(event.project) - - else - = event.project_name - + - elsif event.group + = link_to event.resource_parent_name, group_path(event.group) diff --git a/app/views/events/event/_common.html.haml b/app/views/events/event/_common.html.haml index b02fdb4b638..50c5885c648 100644 --- a/app/views/events/event/_common.html.haml +++ b/app/views/events/event/_common.html.haml @@ -8,7 +8,7 @@ %span.event-type.d-inline-block.append-right-4{ class: event.action_name } = event.action_name %span.event-target-type.append-right-4= event.target_type.titleize.downcase - = link_to [event.project.namespace.becomes(Namespace), event.project, event.target], class: 'has-tooltip event-target-link append-right-4', title: event.target_title do + = link_to event.target_link_options, class: 'has-tooltip event-target-link append-right-4', title: event.target_title do = event.target.reference_link_text - unless event.milestone? %span.event-target-title.append-right-4{ dir: "auto" } @@ -17,4 +17,4 @@ %span.event-type.d-inline-block.append-right-4{ class: event.action_name } = event_action_name(event) - = render "events/event_scope", event: event + = render "events/event_scope", event: event if event.resource_parent.present? diff --git a/app/views/events/event/_created_project.html.haml b/app/views/events/event/_created_project.html.haml index 2f156603414..606b0febb57 100644 --- a/app/views/events/event/_created_project.html.haml +++ b/app/views/events/event/_created_project.html.haml @@ -10,4 +10,4 @@ - if event.project = link_to_project(event.project) - else - = event.project_name + = event.resource_parent_name diff --git a/app/views/graphiql/rails/editors/show.html.erb b/app/views/graphiql/rails/editors/show.html.erb new file mode 100644 index 00000000000..abb1ed0e772 --- /dev/null +++ b/app/views/graphiql/rails/editors/show.html.erb @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> + <head> + <title><%= GraphiQL::Rails.config.title || 'GraphiQL' %></title> + + <%= stylesheet_link_tag("graphiql/rails/application") %> + <%= javascript_include_tag("graphiql/rails/application", nonce: true) %> + </head> + <body> + <%= content_tag :div, 'Loading...', id: 'graphiql-container', data: { + graphql_endpoint_path: graphql_endpoint_path, + initial_query: GraphiQL::Rails.config.initial_query, + logo: GraphiQL::Rails.config.logo, + headers: GraphiQL::Rails.config.resolve_headers(self), + query_params: GraphiQL::Rails.config.query_params + } %> + </body> +</html> diff --git a/app/views/groups/settings/_advanced.html.haml b/app/views/groups/settings/_advanced.html.haml index d1eb6478997..64fec260f3b 100644 --- a/app/views/groups/settings/_advanced.html.haml +++ b/app/views/groups/settings/_advanced.html.haml @@ -25,7 +25,7 @@ .sub-section %h4.warning-title Transfer group - = form_for @group, url: transfer_group_path(@group), method: :put do |f| + = form_for @group, url: transfer_group_path(@group), method: :put, html: { class: 'js-group-transfer-form' } do |f| .form-group = dropdown_tag('Select parent group', options: { toggle_class: 'js-groups-dropdown', title: 'Parent Group', filter: true, dropdown_class: 'dropdown-open-top dropdown-group-transfer', placeholder: 'Search groups', data: { data: parent_group_options(@group) } }) = hidden_field_tag 'new_parent_group_id' diff --git a/app/views/help/_shortcuts.html.haml b/app/views/help/_shortcuts.html.haml index a996c86a256..f1ba804f920 100644 --- a/app/views/help/_shortcuts.html.haml +++ b/app/views/help/_shortcuts.html.haml @@ -1,5 +1,5 @@ #modal-shortcuts.modal{ tabindex: -1 } - .modal-dialog.modal-lg + .modal-dialog.modal-lg.modal-1040 .modal-content .modal-header %h4.modal-title @@ -11,104 +11,100 @@ .modal-body .row .col-lg-4 - %table.shortcut-mappings + %table.shortcut-mappings.text-2 %tbody %tr %th %th= _('Global Shortcuts') %tr %td.shortcut - %kbd s - %td= _('Focus Search') + %kbd ? + %td= _('Toggle this dialog') %tr %td.shortcut - %kbd f - %td= _('Focus Filter') + %kbd shift p + %td= _('Go to your projects') %tr %td.shortcut - %kbd p - %kbd b - %td= _('Toggle the Performance Bar') + %kbd shift g + %td= _('Go to your groups') %tr %td.shortcut - %kbd ? - %td= _('Show/hide this dialog') + %kbd shift a + %td= _('Go to the activity feed') %tr %td.shortcut - - if browser.platform.mac? - %kbd ⌘ shift p - - else - %kbd ctrl shift p - %td= _('Toggle Markdown preview') + %kbd shift l + %td= _('Go to the milestone list') %tr %td.shortcut - %kbd - %i.fa.fa-arrow-up - %td= _('Edit last comment (when focused on an empty textarea)') + %kbd shift s + %td= _('Go to your snippets') %tr %td.shortcut - %kbd shift t - %td - = _('Go to todos') + %kbd s + %td= _('Start search') %tr %td.shortcut - %kbd shift a - %td - = _('Go to the activity feed') + %kbd shift i + %td= _('Go to your issues') %tr %td.shortcut - %kbd shift p - %td - = _('Go to projects') + %kbd shift m + %td= _('Go to your merge requests') %tr %td.shortcut - %kbd shift i - %td - = _('Go to issues') + %kbd shift t + %td= _('Go to your To-Do list') %tr %td.shortcut - %kbd shift m - %td - = _('Go to merge requests') + %kbd p + %kbd b + %td= _('Toggle the Performance Bar') + %tbody %tr - %td.shortcut - %kbd shift g - %td - = _('Go to groups') + %th + %th= _('Web IDE') %tr %td.shortcut - %kbd shift l - %td - = _('Go to milestones') + - if browser.platform.mac? + %kbd ⌘ p + - else + %kbd ctrl p + %td= _('Go to file') %tr %td.shortcut - %kbd shift s - %td - = _('Go to snippets') + - if browser.platform.mac? + %kbd ⌘ enter + - else + %kbd ctrl enter + %td= _('Commit (when editing commit message)') %tbody %tr %th - %th= _('Finding Project File') + %th= _('Wiki pages') %tr %td.shortcut - %kbd - %i.fa.fa-arrow-up - %td= _('Move selection up') + %kbd e + %td= _('Edit wiki page') + %tbody %tr - %td.shortcut - %kbd - %i.fa.fa-arrow-down - %td= _('Move selection down') + %th + %th= _('Editing') %tr %td.shortcut - %kbd enter - %td= _('Open Selection') + - if browser.platform.mac? + %kbd ⌘ shift p + - else + %kbd ctrl shift p + %td= _('Toggle Markdown preview') %tr %td.shortcut - %kbd esc - %td= _('Go back') + %kbd + %i.fa.fa-arrow-up + %td= _('Edit your most recent comment in a thread (from an empty textarea)') .col-lg-4 - %table.shortcut-mappings + %table.shortcut-mappings.text-2 %tbody %tr %th @@ -117,105 +113,94 @@ %td.shortcut %kbd g %kbd p - %td - = _('Go to the project\'s overview page') + %td= _('Go to the project\'s overview page') %tr %td.shortcut %kbd g %kbd v - %td - = _('Go to the project\'s activity feed') + %td= _('Go to the project\'s activity feed') %tr %td.shortcut %kbd g - %kbd f - %td - = _('Go to files') + %kbd r + %td= _('Go to releases') %tr %td.shortcut %kbd g - %kbd c - %td - = _('Go to commits') + %kbd f + %td= _('Go to files') + %tr + %td.shortcut + %kbd t + %td= _('Go to find file') %tr %td.shortcut %kbd g - %kbd j - %td - = _('Go to jobs') + %kbd c + %td= _('Go to commits') %tr %td.shortcut %kbd g %kbd n - %td - = _('Go to network graph') + %td= _('Go to repository graph') %tr %td.shortcut %kbd g %kbd d - %td - = _('Go to repository charts') + %td= _('Go to repository charts') %tr %td.shortcut %kbd g %kbd i - %td - = _('Go to issues') + %td= _('Go to issues') + %tr + %td.shortcut + %kbd i + %td= _('New issue') %tr %td.shortcut %kbd g %kbd b - %td - = _('Go to issue boards') + %td= _('Go to issue boards') %tr %td.shortcut %kbd g %kbd m - %td - = _('Go to merge requests') + %td= _('Go to merge requests') %tr %td.shortcut %kbd g - %kbd e - %td - = _('Go to environments') + %kbd j + %td= _('Go to jobs') %tr %td.shortcut %kbd g %kbd l - %td - = _('Go to metrics') + %td= _('Go to metrics') + %tr + %td.shortcut + %kbd g + %kbd e + %td= _('Go to environments') %tr %td.shortcut %kbd g %kbd k - %td - = _('Go to kubernetes') + %td= _('Go to kubernetes') %tr %td.shortcut %kbd g %kbd s - %td - = _('Go to snippets') + %td= _('Go to snippets') %tr %td.shortcut %kbd g %kbd w - %td - = _('Go to wiki') - %tr - %td.shortcut - %kbd t - %td= _('Go to finding file') - %tr - %td.shortcut - %kbd i - %td= _('New issue') - + %td= _('Go to wiki') %tbody %tr %th - %th= _('Project Files browsing') + %th= _('Project Files') %tr %td.shortcut %kbd @@ -230,38 +215,87 @@ %td.shortcut %kbd enter %td= _('Open Selection') - %tbody %tr - %th - %th= _('Project File') + %td.shortcut + %kbd esc + %td= _('Go back (while searching for files') %tr %td.shortcut %kbd y - %td= _('Go to file permalink') + %td= _('Go to file permalink (while viewing a file)') + .col-lg-4 + %table.shortcut-mappings.text-2 %tbody %tr %th - %th= _('Web IDE') + %th= _('Issues / Merge Requests') + %tr + %td.shortcut + %kbd a + %td= _('Change assignee') + %tr + %td.shortcut + %kbd m + %td= _('Change milestone') + %tr + %td.shortcut + %kbd r + %td= _('Comment/Reply (quoting selected text)') + %tr + %td.shortcut + %kbd e + %td= _('Edit description') + %tr + %td.shortcut + %kbd l + %td= _('Change label') + %tr + %td.shortcut + %kbd ] + \/ + %kbd j + %td= _('Next file in diff (MRs only)') + %tr + %td.shortcut + %kbd [ + \/ + %kbd k + %td= _('Previous file in diff (MRs only)') %tr %td.shortcut - if browser.platform.mac? %kbd ⌘ p - else %kbd ctrl p - %td= _('Go to file') + %td= _('Go to file (MRs only)') %tr %td.shortcut - - if browser.platform.mac? - %kbd ⌘ enter - - else - %kbd ctrl enter - %td= _('Commit (when editing commit message)') - .col-lg-4 - %table.shortcut-mappings - %tbody.hidden-shortcut.network{ style: 'display:none' } + %kbd n + %td= _('Next unresolved discussion (MRs only)') + %tr + %td.shortcut + %kbd p + %td= _('Previous unresolved discussion (MRs only)') + %tbody %tr %th - %th= _('Network Graph') + %th= _('Epics (Ultimate / Gold license only)') + %tr + %td.shortcut + %kbd r + %td= _('Comment/Reply (quoting selected text)') + %tr + %td.shortcut + %kbd e + %td= _('Edit epic description') + %tr + %td.shortcut + %kbd l + %td= _('Change label') + %tbody + %tr + %th + %th= _('Repository Graph') %tr %td.shortcut %kbd @@ -295,92 +329,12 @@ %kbd shift %i.fa.fa-arrow-up - \/ - %kbd - shift k + \/ k %td= _('Scroll to top') %tr %td.shortcut %kbd shift %i.fa.fa-arrow-down - \/ - %kbd - shift j + \/ j %td= _('Scroll to bottom') - %tbody.hidden-shortcut.issues{ style: 'display:none' } - %tr - %th - %th= _('Issues') - %tr - %td.shortcut - %kbd a - %td= _('Change assignee') - %tr - %td.shortcut - %kbd m - %td= _('Change milestone') - %tr - %td.shortcut - %kbd r - %td= _('Reply (quoting selected text)') - %tr - %td.shortcut - %kbd e - %td= _('Edit issue') - %tr - %td.shortcut - %kbd l - %td= _('Change Label') - %tbody.hidden-shortcut.merge_requests{ style: 'display:none' } - %tr - %th - %th= _('Merge Requests') - %tr - %td.shortcut - %kbd a - %td= _('Change assignee') - %tr - %td.shortcut - %kbd m - %td= _('Change milestone') - %tr - %td.shortcut - %kbd r - %td= _('Reply (quoting selected text)') - %tr - %td.shortcut - %kbd e - %td= _('Edit merge request') - %tr - %td.shortcut - %kbd l - %td= _('Change Label') - %tr - %td.shortcut - %kbd ] - \/ - %kbd j - %td= _('Move to next file') - %tr - %td.shortcut - %kbd [ - \/ - %kbd k - %td= _('Move to previous file') - %tr - %td.shortcut - %kbd n - %td= _('Move to next unresolved discussion') - %tr - %td.shortcut - %kbd p - %td= _('Move to previous unresolved discussion') - %tbody.hidden-shortcut.wiki{ style: 'display:none' } - %tr - %th - %th= _('Wiki pages') - %tr - %td.shortcut - %kbd e - %td= _('Edit wiki page') diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml index c1f4b3adfec..7cc7d1783c4 100644 --- a/app/views/layouts/nav/sidebar/_group.html.haml +++ b/app/views/layouts/nav/sidebar/_group.html.haml @@ -48,14 +48,14 @@ - if group_sidebar_link?(:issues) = nav_link(path: group_issues_sub_menu_items) do - = link_to issues_group_path(@group) do + = link_to issues_group_path(@group), data: { qa_selector: 'group_issues_item' } do .nav-icon-container = sprite_icon('issues') %span.nav-item-name = _('Issues') %span.badge.badge-pill.count= number_with_delimiter(issues_count) - %ul.sidebar-sub-level-items + %ul.sidebar-sub-level-items{ data: { qa_selector: 'group_issues_sidebar_submenu'} } = nav_link(path: ['groups#issues', 'labels#index', 'milestones#index'], html_options: { class: "fly-out-top-item" } ) do = link_to issues_group_path(@group) do %strong.fly-out-top-item-name @@ -70,7 +70,7 @@ - if group_sidebar_link?(:boards) = nav_link(path: ['boards#index', 'boards#show']) do - = link_to group_boards_path(@group), title: boards_link_text do + = link_to group_boards_path(@group), title: boards_link_text, data: { qa_selector: 'group_issue_boards_link' } do %span = boards_link_text diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml index bc0a89bea62..4b82eb2c5ef 100644 --- a/app/views/projects/buttons/_fork.html.haml +++ b/app/views/projects/buttons/_fork.html.haml @@ -8,7 +8,7 @@ - else - can_create_fork = current_user.can?(:create_fork) = link_to new_project_fork_path(@project), - class: "btn btn-default has-tooltip count-badge-button d-flex align-items-center fork-btn #{'has-tooltip disabled' unless can_create_fork}", + class: "btn btn-default btn-xs has-tooltip count-badge-button d-flex align-items-center fork-btn #{'has-tooltip disabled' unless can_create_fork}", title: (s_('ProjectOverview|You have reached your project limit') unless can_create_fork) do = sprite_icon('fork', { css_class: 'icon' }) %span= s_('ProjectOverview|Fork') diff --git a/app/views/projects/commit/_pipelines_list.haml b/app/views/projects/commit/_pipelines_list.haml index 68b35072f26..81c354f1c8f 100644 --- a/app/views/projects/commit/_pipelines_list.haml +++ b/app/views/projects/commit/_pipelines_list.haml @@ -5,4 +5,5 @@ "help-auto-devops-path" => help_page_path('topics/autodevops/index.md'), "empty-state-svg-path" => image_path('illustrations/pipelines_empty.svg'), "error-state-svg-path" => image_path('illustrations/pipelines_failed.svg'), + "project-id": @project.id, } } diff --git a/app/views/projects/error_tracking/index.html.haml b/app/views/projects/error_tracking/index.html.haml index bc02c5f0e5a..96f61584a99 100644 --- a/app/views/projects/error_tracking/index.html.haml +++ b/app/views/projects/error_tracking/index.html.haml @@ -1,3 +1,3 @@ - page_title _('Errors') -#js-error_tracking{ data: error_tracking_data(@project) } +#js-error_tracking{ data: error_tracking_data(@current_user, @project) } diff --git a/app/views/projects/forks/index.html.haml b/app/views/projects/forks/index.html.haml index 0397a7034c7..8384561891a 100644 --- a/app/views/projects/forks/index.html.haml +++ b/app/views/projects/forks/index.html.haml @@ -1,6 +1,6 @@ .top-area .nav-text - - full_count_title = "#{@public_forks_count} public and #{@private_forks_count} private" + - full_count_title = "#{@public_forks_count} public, #{@internal_forks_count} internal, and #{@private_forks_count} private" #{pluralize(@total_forks_count, 'fork')}: #{full_count_title} .nav-controls 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 15499c89ffb..928b54ea28f 100644 --- a/app/views/projects/merge_requests/_how_to_merge.html.haml +++ b/app/views/projects/merge_requests/_how_to_merge.html.haml @@ -13,12 +13,13 @@ %pre.dark#merge-info-1 - if @merge_request.for_fork? :preserve - git fetch #{h default_url_to_repo(@merge_request.source_project)} #{h @merge_request.source_branch} - git checkout -b #{h @merge_request.source_project_path}-#{h @merge_request.source_branch} FETCH_HEAD + -# All repo/branch refs have been quoted to allow support for special characters (such as #my-branch) + git fetch "#{h default_url_to_repo(@merge_request.source_project)}" "#{h @merge_request.source_branch}" + git checkout -b "#{h @merge_request.source_project_path}-#{h @merge_request.source_branch}" FETCH_HEAD - else :preserve git fetch origin - git checkout -b #{h @merge_request.source_branch} origin/#{h @merge_request.source_branch} + git checkout -b "#{h @merge_request.source_branch}" "origin/#{h @merge_request.source_branch}" %p %strong Step 2. Review the changes locally @@ -31,20 +32,20 @@ - if @merge_request.for_fork? :preserve git fetch origin - git checkout origin/#{h @merge_request.target_branch} - git merge --no-ff #{h @merge_request.source_project_path}-#{h @merge_request.source_branch} + git checkout "origin/#{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 merge --no-ff #{h @merge_request.source_branch} + git checkout "origin/#{h @merge_request.target_branch}" + git merge --no-ff "#{h @merge_request.source_branch}" %p %strong Step 4. Push the result of the merge to GitLab = clipboard_button(target: "pre#merge-info-4", title: "Copy commands to clipboard") %pre.dark#merge-info-4 :preserve - git push origin #{h @merge_request.target_branch} + git push origin "#{h @merge_request.target_branch}" - unless @merge_request.can_be_merged_by?(current_user) %p Note that pushing to GitLab requires write access to this repository. 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 be01905dd35..c6615b26bc0 100644 --- a/app/views/projects/merge_requests/creations/_new_compare.html.haml +++ b/app/views/projects/merge_requests/creations/_new_compare.html.haml @@ -51,7 +51,7 @@ selected: f.object.target_project_id .merge-request-select.dropdown = f.hidden_field :target_branch - = dropdown_toggle f.object.target_branch, { toggle: "dropdown", 'field-name': "#{f.object_name}[target_branch]", 'refs-url': refs_project_path(f.object.target_project), selected: f.object.target_branch }, { toggle_class: "js-compare-dropdown js-target-branch monospace" } + = dropdown_toggle f.object.target_branch || _("Select target branch"), { toggle: "dropdown", 'field-name': "#{f.object_name}[target_branch]", 'refs-url': refs_project_path(f.object.target_project), selected: f.object.target_branch }, { toggle_class: "js-compare-dropdown js-target-branch monospace" } .dropdown-menu.dropdown-menu-selectable.js-target-branch-dropdown.git-revision-dropdown = dropdown_title(_("Select target branch")) = dropdown_filter(_("Search branches")) diff --git a/app/views/projects/mirrors/_instructions.html.haml b/app/views/projects/mirrors/_instructions.html.haml index 1a163cc4a54..7ff6c0a2019 100644 --- a/app/views/projects/mirrors/_instructions.html.haml +++ b/app/views/projects/mirrors/_instructions.html.haml @@ -3,6 +3,7 @@ %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 %li - minutes = Gitlab.config.gitlab_shell.git_timeout / 60 diff --git a/app/views/projects/releases/index.html.haml b/app/views/projects/releases/index.html.haml index 326b83c856e..4d5b8cc80f7 100644 --- a/app/views/projects/releases/index.html.haml +++ b/app/views/projects/releases/index.html.haml @@ -1,3 +1,3 @@ - page_title _('Releases') -#js-releases-page{ data: { project_id: @project.id, illustration_path: image_path('illustrations/releases.svg'), documentation_path: help_page_path('user/project/releases/index') } } +#js-releases-page{ data: data_for_releases_page } diff --git a/app/views/shared/_import_form.html.haml b/app/views/shared/_import_form.html.haml index d0f9374e832..b2ea45d6f1a 100644 --- a/app/views/shared/_import_form.html.haml +++ b/app/views/shared/_import_form.html.haml @@ -27,6 +27,7 @@ %ul %li = _('The repository must be accessible over <code>http://</code>, <code>https://</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 = _('If your HTTP repository is not publicly accessible, add your credentials.') %li diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index 837707707a9..3b26b8df8a1 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -41,7 +41,7 @@ = link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link float-right', data: { track_label: "right_sidebar", track_property: "milestone", track_event: "click_edit_button", track_value: "" } .value.hide-collapsed - if milestone.present? - = link_to milestone[:title], milestone[:web_url], class: "bold has-tooltip", title: sidebar_milestone_remaining_days(milestone), data: { container: "body", html: 'true', boundary: 'viewport' } + = link_to milestone[:title], milestone[:web_url], class: "bold has-tooltip", title: sidebar_milestone_remaining_days(milestone), data: { container: "body", html: 'true', boundary: 'viewport', qa_selector: 'milestone_link' } - else %span.no-value = _('None') diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml index 1dc538826dc..dfb0e7ed297 100644 --- a/app/views/shared/issuable/_sidebar_assignees.html.haml +++ b/app/views/shared/issuable/_sidebar_assignees.html.haml @@ -1,7 +1,7 @@ - issuable_type = issuable_sidebar[:type] - signed_in = !!issuable_sidebar.dig(:current_user, :id) -#js-vue-sidebar-assignees{ data: { field: "#{issuable_type}[assignee_ids]", signed_in: signed_in } } +#js-vue-sidebar-assignees{ data: { field: "#{issuable_type}", signed_in: signed_in } } .title.hide-collapsed = _('Assignee') = icon('spinner spin') diff --git a/app/views/shared/members/_sort_dropdown.html.haml b/app/views/shared/members/_sort_dropdown.html.haml index feca109dade..5f3d49adff7 100644 --- a/app/views/shared/members/_sort_dropdown.html.haml +++ b/app/views/shared/members/_sort_dropdown.html.haml @@ -1,4 +1,4 @@ -= label_tag :sort_by, 'Sort by', class: 'col-form-label label-bold pr-2' += label_tag :sort_by, 'Sort by', class: 'col-form-label label-bold px-2' .dropdown.inline.qa-user-sort-dropdown = dropdown_toggle(member_sort_options_hash[@sort], { toggle: 'dropdown' }) %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable diff --git a/app/views/shared/notifications/_button.html.haml b/app/views/shared/notifications/_button.html.haml index b4266937a4e..441abd57334 100644 --- a/app/views/shared/notifications/_button.html.haml +++ b/app/views/shared/notifications/_button.html.haml @@ -17,14 +17,14 @@ .js-notification-toggle-btns %div{ class: ("btn-group" if notification_setting.custom?) } - if notification_setting.custom? - %button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn.text-left#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } } + %button.dropdown-new.btn.btn-default.btn-xs.has-tooltip.notifications-btn.text-left#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } } = icon("bell", class: "js-notification-loading") = notification_title(notification_setting.level) %button.btn.dropdown-toggle{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } = icon('caret-down') .sr-only Toggle dropdown - else - %button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } + %button.dropdown-new.btn.btn-default.btn-xs.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } .float-left = icon("bell", class: "js-notification-loading") = notification_title(notification_setting.level) diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml index bb05658c719..d70a1631010 100644 --- a/app/views/shared/projects/_list.html.haml +++ b/app/views/shared/projects/_list.html.haml @@ -42,12 +42,6 @@ avatar: avatar, stars: stars, css_class: css_class, ci: ci, use_creator_avatar: use_creator_avatar, forks: forks, show_last_commit_as_description: show_last_commit_as_description, user: user, merge_requests: merge_requests, issues: issues, pipeline_status: pipeline_status, compact_mode: compact_mode - - - if @private_forks_count && @private_forks_count > 0 - %li.project-row.private-forks-notice - = icon('lock fw', base: 'circle', class: 'fa-lg private-fork-icon') - %strong= pluralize(@private_forks_count, 'private fork') - %span you have no access to. = paginate_collection(projects, remote: remote) unless skip_pagination - else - if @contributed_projects diff --git a/app/views/shared/snippets/_header.html.haml b/app/views/shared/snippets/_header.html.haml index ebb634fe75f..1a9ae68f53d 100644 --- a/app/views/shared/snippets/_header.html.haml +++ b/app/views/shared/snippets/_header.html.haml @@ -17,7 +17,7 @@ = render "snippets/actions" .snippet-header.limited-header-width - %h2.snippet-title.prepend-top-0.append-bottom-0.qa-snippet-title + %h2.snippet-title.prepend-top-0.mb-3.qa-snippet-title = markdown_field(@snippet, :title) - if @snippet.description.present? diff --git a/app/views/shared/snippets/_list.html.haml b/app/views/shared/snippets/_list.html.haml index 5d2152eb411..766f48fff3d 100644 --- a/app/views/shared/snippets/_list.html.haml +++ b/app/views/shared/snippets/_list.html.haml @@ -1,12 +1,11 @@ - remote = local_assigns.fetch(:remote, false) - link_project = local_assigns.fetch(:link_project, false) -- if @snippets.exists? +- if @snippets.to_a.empty? + .nothing-here-block= s_("SnippetsEmptyState|No snippets found") +- else .snippets-list-holder %ul.content-list = render partial: 'shared/snippets/snippet', collection: @snippets, locals: { link_project: link_project } = paginate @snippets, theme: 'gitlab', remote: remote - -- else - .nothing-here-block= s_("SnippetsEmptyState|No snippets found") diff --git a/app/views/shared/snippets/_snippet.html.haml b/app/views/shared/snippets/_snippet.html.haml index 42af97bc6af..0ef626868a2 100644 --- a/app/views/shared/snippets/_snippet.html.haml +++ b/app/views/shared/snippets/_snippet.html.haml @@ -1,4 +1,5 @@ - link_project = local_assigns.fetch(:link_project, false) +- notes_count = @noteable_meta_data[snippet.id].user_notes_count %li.snippet-row = image_tag avatar_icon_for_user(snippet.author), class: "avatar s40 d-none d-sm-block", alt: '' @@ -12,10 +13,9 @@ %ul.controls %li - - note_count = snippet.notes.user.count - = link_to reliable_snippet_path(snippet, anchor: 'notes'), class: ('no-comments' if note_count.zero?) do + = link_to reliable_snippet_path(snippet, anchor: 'notes'), class: ('no-comments' if notes_count.zero?) do = icon('comments') - = note_count + = notes_count %li %span.sr-only = visibility_level_label(snippet.visibility_level) diff --git a/app/views/users/calendar_activities.html.haml b/app/views/users/calendar_activities.html.haml index 3191eaa1e2c..7516dfe1602 100644 --- a/app/views/users/calendar_activities.html.haml +++ b/app/views/users/calendar_activities.html.haml @@ -27,7 +27,7 @@ - if event.project = link_to_project(event.project) - else - = event.project_name + = event.resource_parent_name - else made a private contribution - else |