diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-17 15:10:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-17 15:10:12 +0300 |
commit | 4203215d542505bba491a01d637479934c8005d6 (patch) | |
tree | 000a956ac60247021ff8c36a1a17a1ea6ed1ff38 /app/views | |
parent | 325318e2ddfcaedf0527053dd3c9bd62db547089 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
12 files changed, 16 insertions, 42 deletions
diff --git a/app/views/clusters/clusters/_gitlab_integration_form.html.haml b/app/views/clusters/clusters/_gitlab_integration_form.html.haml index 5ad323d5557..87af74a398f 100644 --- a/app/views/clusters/clusters/_gitlab_integration_form.html.haml +++ b/app/views/clusters/clusters/_gitlab_integration_form.html.haml @@ -1,29 +1,3 @@ = form_for @cluster, url: clusterable.cluster_path(@cluster), as: :cluster, html: { class: 'js-cluster-integration-form' } do |field| = form_errors(@cluster) #js-cluster-integration-form{ data: js_cluster_form_data(@cluster, can?(current_user, :update_cluster, @cluster)) } - .form-group - %h5= s_('ClusterIntegration|Environment scope') - = field.text_field :environment_scope, class: 'col-md-6 form-control js-select-on-focus', placeholder: s_('ClusterIntegration|Environment scope') - - environment_scope_url = help_page_path('user/project/clusters/index', anchor: 'base-domain') - - environment_scope_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: environment_scope_url } - .form-text.text-muted= s_("ClusterIntegration|Choose which of your environments will use this cluster. %{environment_scope_start}More information%{environment_scope_end}").html_safe % { environment_scope_start: environment_scope_start, environment_scope_end: '</a>'.html_safe } - - .form-group - %h5= s_('ClusterIntegration|Base domain') - = field.text_field :base_domain, class: 'col-md-6 form-control js-select-on-focus', data: { qa_selector: 'base_domain_field' } - .form-text.text-muted - - auto_devops_url = help_page_path('topics/autodevops/index') - - auto_devops_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: auto_devops_url } - = s_('ClusterIntegration|Specifying a domain will allow you to use Auto Review Apps and Auto Deploy stages for %{auto_devops_start}Auto DevOps%{auto_devops_end}. The domain should have a wildcard DNS configured matching the domain.').html_safe % { auto_devops_start: auto_devops_start, auto_devops_end: '</a>'.html_safe } - %span{ :class => ["js-ingress-domain-help-text", ("hide" unless @cluster.application_ingress_external_ip.present?)] } - = s_('ClusterIntegration|Alternatively') - %code{ :class => "js-ingress-domain-snippet" } - = s_('ClusterIntegration|%{external_ip}.nip.io').html_safe % { external_ip: @cluster.application_ingress_external_ip } - = s_('ClusterIntegration| can be used instead of a custom domain.') - - custom_domain_url = help_page_path('user/clusters/applications.md', anchor: 'pointing-your-dns-at-the-external-endpoint') - - custom_domain_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: custom_domain_url } - = s_('ClusterIntegration| %{custom_domain_start}More information%{custom_domain_end}.').html_safe % { custom_domain_start: custom_domain_start, custom_domain_end: '</a>'.html_safe } - - - if can?(current_user, :update_cluster, @cluster) - .form-group.gl-display-flex.gl-justify-content-end - = field.submit _('Save changes'), class: 'btn btn-success', data: { qa_selector: 'save_changes_button'} diff --git a/app/views/import/_githubish_status.html.haml b/app/views/import/_githubish_status.html.haml index 9bf1f0c61bb..b181b163375 100644 --- a/app/views/import/_githubish_status.html.haml +++ b/app/views/import/_githubish_status.html.haml @@ -6,6 +6,7 @@ #import-projects-mount-element{ data: { provider: provider, provider_title: provider_title, can_select_namespace: current_user.can_select_namespace?.to_s, ci_cd_only: has_ci_cd_only_params?.to_s, + namespaces_path: import_available_namespaces_path, repos_path: url_for([:status, :import, provider, format: :json]), jobs_path: url_for([:realtime_changes, :import, provider, format: :json]), import_path: url_for([:import, provider, format: :json]), diff --git a/app/views/profiles/chat_names/new.html.haml b/app/views/profiles/chat_names/new.html.haml index 9246a443dec..2134ab2bec6 100644 --- a/app/views/profiles/chat_names/new.html.haml +++ b/app/views/profiles/chat_names/new.html.haml @@ -2,7 +2,7 @@ = _("Authorization required") %main{ :role => "main" } %p.h4 - = _("Authorize <strong>%{user}</strong> to use your account?").html_safe % { user: @chat_name_params[:chat_name] } + = html_escape(_("Authorize %{user} to use your account?")) % { user: tag.strong(@chat_name_params[:chat_name]) } %hr .actions 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/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/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 8e51280383f..e619bf84992 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -12,6 +12,9 @@ .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" 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/services/mattermost_slash_commands/_detailed_help.html.haml b/app/views/projects/services/mattermost_slash_commands/_detailed_help.html.haml index 7557a00679d..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 @@ -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/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index ff17a2c259c..8e3be5fa086 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -85,7 +85,7 @@ %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 } - = s_('DeployFreeze|Specify times when deployments are not allowed for an environment. The <code>gitlab-ci.yml</code> file must be updated to make deployment jobs aware of the %{freeze_period_link_start}freeze period%{freeze_period_link_end}.').html_safe % { freeze_period_link_start: freeze_period_link_start, freeze_period_link_end: '</a>'.html_safe } + = 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 } diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 2e66ed318a0..86cd2923fac 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -83,4 +83,7 @@ = render_if_exists 'shared/issuable/remove_approver' +- if issuable.respond_to?(:issue_type) + = form.hidden_field :issue_type + = form.hidden_field :lock_version diff --git a/app/views/shared/issuable/form/_branch_chooser.html.haml b/app/views/shared/issuable/form/_branch_chooser.html.haml index 3801bbd6512..30a1f0febc3 100644 --- a/app/views/shared/issuable/form/_branch_chooser.html.haml +++ b/app/views/shared/issuable/form/_branch_chooser.html.haml @@ -17,7 +17,9 @@ = link_to _('Change branches'), mr_change_branches_path(issuable) - elsif issuable.for_fork? %code= issuable.target_project_path + ":" - - unless issuable.new_record? + - if issuable.merged? + %code= target_title + - unless issuable.new_record? || issuable.merged? %span.dropdown.gl-ml-2.d-inline-block = form.hidden_field(:target_branch, { class: 'target_branch js-target-branch-select ref-name mw-xl', |