diff options
Diffstat (limited to 'app/views/projects/blob')
13 files changed, 28 insertions, 15 deletions
diff --git a/app/views/projects/blob/_content.html.haml b/app/views/projects/blob/_content.html.haml index 7afbd85cd6d..11946f22811 100644 --- a/app/views/projects/blob/_content.html.haml +++ b/app/views/projects/blob/_content.html.haml @@ -1,6 +1,10 @@ - simple_viewer = blob.simple_viewer - rich_viewer = blob.rich_viewer - rich_viewer_active = rich_viewer && params[:viewer] != 'simple' +- blob_data = defined?(@blob) ? @blob.data : {} +- filename = defined?(@blob) ? @blob.name : '' + +#js-blob-toggle-graph-preview{ data: { blob_data: blob_data, filename: filename } } = render 'projects/blob/viewer', viewer: simple_viewer, hidden: rich_viewer_active diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 787dc3b030f..cea65bf9b4e 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -23,6 +23,7 @@ .js-suggest-gitlab-ci-yml{ data: { toggle: 'popover', target: '#gitlab-ci-yml-selector', track_label: 'suggest_gitlab_ci_yml', + merge_request_path: params[:mr_path], dismiss_key: @project.id, human_access: human_access } } diff --git a/app/views/projects/blob/_pipeline_tour_success.html.haml b/app/views/projects/blob/_pipeline_tour_success.html.haml index cf1427df044..3ea2defb2b3 100644 --- a/app/views/projects/blob/_pipeline_tour_success.html.haml +++ b/app/views/projects/blob/_pipeline_tour_success.html.haml @@ -1,3 +1,4 @@ .js-success-pipeline-modal{ data: { 'commit-cookie': suggest_pipeline_commit_cookie_name, 'go-to-pipelines-path': project_pipelines_path(@project), + 'project-merge-requests-path': project_merge_requests_path(@project), 'human-access': @project.team.human_max_access(current_user&.id) } } diff --git a/app/views/projects/blob/_template_selectors.html.haml b/app/views/projects/blob/_template_selectors.html.haml index 2aefcdc5762..b4962f4e78e 100644 --- a/app/views/projects/blob/_template_selectors.html.haml +++ b/app/views/projects/blob/_template_selectors.html.haml @@ -1,4 +1,4 @@ -.template-selectors-menu.gl-pl-2-deprecated-no-really-do-not-use-me +.template-selectors-menu.gl-pl-3 .template-selector-dropdowns-wrap .template-type-selector.js-template-type-selector-wrap.hidden - toggle_text = should_suggest_gitlab_ci_yml? ? '.gitlab-ci.yml' : 'Select a template type' diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index 7d072ba5899..9bb4342ffb4 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -2,10 +2,16 @@ - page_title _("Edit"), @blob.path, @ref - if @conflict - .alert.alert-danger - Someone edited the file the same time you did. Please check out - = link_to "the file", project_blob_path(@project, tree_join(@branch_name, @file_path)), target: "_blank", rel: 'noopener noreferrer' - and make sure your changes will not unintentionally remove theirs. + .gl-alert.gl-alert-danger.gl-mb-5.gl-mt-5 + = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body + Someone edited the file the same time you did. Please check out + = link_to "the file", project_blob_path(@project, tree_join(@branch_name, @file_path)), target: "_blank", rel: 'noopener noreferrer', class: 'gl-link' + and make sure your changes will not unintentionally remove theirs. + +- if editing_ci_config? && show_web_ide_alert? + #js-suggest-web-ide-ci{ data: { dismiss_endpoint: user_callouts_path, feature_id: UserCalloutsHelper::WEB_IDE_ALERT_DISMISSED, edit_path: ide_edit_path } } + .editor-title-row %h3.page-title.blob-edit-page-title Edit file diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index 48ffd80aa9c..a939f43d5e2 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -15,6 +15,7 @@ - if should_suggest_gitlab_ci_yml? .js-suggest-gitlab-ci-yml-commit-changes{ data: { toggle: 'popover', target: '#commit-changes', + merge_request_path: params[:mr_path], track_label: 'suggest_commit_first_project_gitlab_ci_yml', dismiss_key: @project.id, human_access: human_access } } diff --git a/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml b/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml index 10cbf6a2f7a..379a6c3084a 100644 --- a/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml +++ b/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml @@ -1,4 +1,4 @@ -= icon('spinner spin fw') += loading_icon(css_class: "gl-vertical-align-text-bottom mr-1") Validating GitLab CI configuration… = link_to 'Learn more', help_page_path('ci/yaml/README') diff --git a/app/views/projects/blob/viewers/_loading.html.haml b/app/views/projects/blob/viewers/_loading.html.haml index 5fbe9b0df0c..18fd0d87ce6 100644 --- a/app/views/projects/blob/viewers/_loading.html.haml +++ b/app/views/projects/blob/viewers/_loading.html.haml @@ -1,2 +1,2 @@ -.text-center.gl-mt-3.gl-mb-3 - = icon('spinner spin 2x', 'aria-hidden' => 'true', 'aria-label' => 'Loading content…', class: 'qa-spinner') +.text-center.gl-mt-4.gl-mb-3 + = loading_icon(size: "md", css_class: "qa-spinner") diff --git a/app/views/projects/blob/viewers/_loading_auxiliary.html.haml b/app/views/projects/blob/viewers/_loading_auxiliary.html.haml index c7dc9e3250a..5a6c1a493a5 100644 --- a/app/views/projects/blob/viewers/_loading_auxiliary.html.haml +++ b/app/views/projects/blob/viewers/_loading_auxiliary.html.haml @@ -1,2 +1,2 @@ -= icon('spinner spin fw') += loading_icon(css_class: "gl-vertical-align-text-bottom") Analyzing file… 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 9ec1d7d0d67..de9c6c5320f 100644 --- a/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml +++ b/app/views/projects/blob/viewers/_metrics_dashboard_yml.html.haml @@ -5,7 +5,7 @@ = icon('warning fw') = _('Metrics Dashboard YAML definition is invalid:') %ul - - viewer.errors.messages.each do |error| - %li= error.join(': ') + - viewer.errors.each do |error| + %li= error = link_to _('Learn more'), help_page_path('operations/metrics/dashboards/index.md') diff --git a/app/views/projects/blob/viewers/_route_map_loading.html.haml b/app/views/projects/blob/viewers/_route_map_loading.html.haml index 1d768bd1ca4..8610847fbc9 100644 --- a/app/views/projects/blob/viewers/_route_map_loading.html.haml +++ b/app/views/projects/blob/viewers/_route_map_loading.html.haml @@ -1,4 +1,4 @@ -= icon('spinner spin fw') += loading_icon(css_class: "gl-vertical-align-text-bottom gl-mr-1") Validating Route Map… = link_to 'Learn more', help_page_path('ci/environments/index.md', anchor: 'going-from-source-files-to-public-pages') diff --git a/app/views/projects/blob/viewers/_sketch.html.haml b/app/views/projects/blob/viewers/_sketch.html.haml index aa8d1dd326f..08c21258d3f 100644 --- a/app/views/projects/blob/viewers/_sketch.html.haml +++ b/app/views/projects/blob/viewers/_sketch.html.haml @@ -1,3 +1,3 @@ .file-content#js-sketch-viewer{ data: { endpoint: blob_raw_path } } - .js-loading-icon.text-center.gl-mt-3.gl-mb-3.js-loading-icon{ 'aria-label' => 'Loading Sketch preview' } - = icon('spinner spin 2x', 'aria-hidden' => 'true'); + .text-center.gl-mt-4.gl-mb-3.js-loading-icon + = loading_icon(size: "md") diff --git a/app/views/projects/blob/viewers/_stl.html.haml b/app/views/projects/blob/viewers/_stl.html.haml index 6983c3cc81b..44c986595df 100644 --- a/app/views/projects/blob/viewers/_stl.html.haml +++ b/app/views/projects/blob/viewers/_stl.html.haml @@ -1,6 +1,6 @@ .file-content.is-stl-loading .text-center#js-stl-viewer{ data: { endpoint: blob_raw_path } } - = icon('spinner spin 2x', class: 'gl-mt-3 gl-mb-3', 'aria-hidden' => 'true', 'aria-label' => 'Loading') + = loading_icon(size: "md", css_class: "gl-mt-4 gl-mb-3") .text-center.gl-mt-3.gl-mb-3.stl-controls .btn-group %button.btn.btn-default.btn-sm.js-material-changer{ data: { type: 'wireframe' } } |