diff options
author | Luke Bennett <lbennett@gitlab.com> | 2018-08-06 10:20:05 +0000 |
---|---|---|
committer | Luke Bennett <lbennett@gitlab.com> | 2018-08-06 10:20:05 +0000 |
commit | 840d54cfcaa72924c3c4a91fb63a20eece780db2 (patch) | |
tree | 892d3e0fac1ffdc574ab0a6dca69bd7f90889ad9 /app/views/projects | |
parent | b2543977ff479e120746a9d826956b7a2cb6f463 (diff) | |
parent | 3bdab23c89cb3985074a7efaa3ac54c154836034 (diff) | |
download | gitlab-ce-840d54cfcaa72924c3c4a91fb63a20eece780db2.tar.gz |
Merge branch 'master' into 'ce-port-3959-mirroring-interface-improvements'
# Conflicts:
# locale/gitlab.pot
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/_project_templates.html.haml | 31 | ||||
-rw-r--r-- | app/views/projects/commit/_commit_box.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/commits/_commit.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/environments/metrics.html.haml | 22 | ||||
-rw-r--r-- | app/views/projects/jobs/_sidebar.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/jobs/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/jobs/terminal.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/labels/index.html.haml | 35 | ||||
-rw-r--r-- | app/views/projects/merge_requests/creations/_new_compare.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/pipelines/_info.html.haml | 65 | ||||
-rw-r--r-- | app/views/projects/pipelines/show.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/project_templates/_built_in_templates.html.haml | 17 | ||||
-rw-r--r-- | app/views/projects/project_templates/_project_fields_form.html.haml | 12 | ||||
-rw-r--r-- | app/views/projects/settings/ci_cd/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/show.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/wikis/_main_links.html.haml | 2 |
16 files changed, 122 insertions, 90 deletions
diff --git a/app/views/projects/_project_templates.html.haml b/app/views/projects/_project_templates.html.haml index 9d8627c9eb1..e90a6355214 100644 --- a/app/views/projects/_project_templates.html.haml +++ b/app/views/projects/_project_templates.html.haml @@ -1,27 +1,8 @@ -.project-templates-buttons.import-buttons - - Gitlab::ProjectTemplate.all.each do |template| - .template-option - = custom_icon(template.logo) - .template-title= template.title - .template-description= template.description - %label.btn.btn-success.template-button.choose-template.append-right-10{ for: template.name } - %input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: template.name, value: template.name } - %span Use template - %a.btn.btn-default{ href: template.preview, rel: 'noopener noreferrer', target: '_blank' } Preview +- f ||= local_assigns[:f] - .project-fields-form - .row - .form-group.col-sm-12 - %label.label-bold - Template - .input-group.template-input-group - .input-group-prepend - .input-group-text - .selected-icon - - Gitlab::ProjectTemplate.all.each do |template| - = custom_icon(template.logo) - .selected-template - .input-group-append - %button.btn.btn-default.change-template{ type: "button" } Change template +.project-templates-buttons.import-buttons.col-sm-12 + = render 'projects/project_templates/built_in_templates' - = render 'new_project_fields', f: f, project_name_id: "template-project-name" +.project-fields-form + = render 'projects/project_templates/project_fields_form' + = render 'projects/new_project_fields', f: f, project_name_id: "template-project-name" diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 78522393d4b..aab5712d197 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -13,6 +13,7 @@ = author_avatar(@commit, size: 24, has_tooltip: false) %strong = commit_author_link(@commit, avatar: true, size: 24) + = user_status(@commit.author) - if @commit.different_committer? %span.light= _('Committed by') %strong @@ -54,7 +55,7 @@ %h3.commit-title = markdown_field(@commit, :title) - if @commit.description.present? - .commit-description< + %pre.commit-description< = preserve(markdown_field(@commit, :description)) .info-well diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index feaf44e8c0a..7951a5ddc9e 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -44,7 +44,7 @@ #{ commit_text.html_safe } - if commit.description? - %pre.commit-row-description.js-toggle-content.prepend-top-8.append-bottom-8 + %pre.commit-row-description.js-toggle-content.append-bottom-8 = preserve(markdown_field(commit, :description)) .commit-actions.flex-row.d-none.d-sm-flex diff --git a/app/views/projects/environments/metrics.html.haml b/app/views/projects/environments/metrics.html.haml index 290970a1045..af86b8e8e67 100644 --- a/app/views/projects/environments/metrics.html.haml +++ b/app/views/projects/environments/metrics.html.haml @@ -2,17 +2,11 @@ - page_title "Metrics for environment", @environment.name .prometheus-container{ class: container_class } - #prometheus-graphs{ data: { "settings-path": edit_project_service_path(@project, 'prometheus'), - "clusters-path": project_clusters_path(@project), - "current-environment-name": @environment.name, - "documentation-path": help_page_path('administration/monitoring/prometheus/index.md'), - "empty-getting-started-svg-path": image_path('illustrations/monitoring/getting_started.svg'), - "empty-loading-svg-path": image_path('illustrations/monitoring/loading.svg'), - "empty-no-data-svg-path": image_path('illustrations/monitoring/no_data.svg'), - "empty-unable-to-connect-svg-path": image_path('illustrations/monitoring/unable_to_connect.svg'), - "metrics-endpoint": additional_metrics_project_environment_path(@project, @environment, format: :json), - "deployment-endpoint": project_environment_deployments_path(@project, @environment, format: :json), - "environments-endpoint": project_environments_path(@project, format: :json), - "project-path": project_path(@project), - "tags-path": project_tags_path(@project), - "has-metrics": "#{@environment.has_metrics?}" } } + .top-area + .row + .col-sm-6 + %h3 + Environment: + = link_to @environment.name, environment_path(@environment) + + #prometheus-graphs{ data: metrics_data(@project, @environment) } diff --git a/app/views/projects/jobs/_sidebar.html.haml b/app/views/projects/jobs/_sidebar.html.haml index b88fe47726d..759efd4e9d4 100644 --- a/app/views/projects/jobs/_sidebar.html.haml +++ b/app/views/projects/jobs/_sidebar.html.haml @@ -86,7 +86,7 @@ - HasStatus::ORDERED_STATUSES.each do |build_status| - builds.select{|build| build.status == build_status}.each do |build| .build-job{ class: sidebar_build_class(build, @build), data: { stage: build.stage } } - - tooltip = build.tooltip_message + - tooltip = sanitize(build.tooltip_message.dup) = link_to(project_job_path(@project, build), data: { toggle: 'tooltip', html: 'true', title: tooltip, container: 'body' }) do = sprite_icon('arrow-right', size:16, css_class: 'icon-arrow-right') %span{ class: "ci-status-icon-#{build.status}" } diff --git a/app/views/projects/jobs/show.html.haml b/app/views/projects/jobs/show.html.haml index 1f33bb3a129..078f40c4477 100644 --- a/app/views/projects/jobs/show.html.haml +++ b/app/views/projects/jobs/show.html.haml @@ -22,7 +22,7 @@ %br Go to - = link_to project_runners_path(@build.project) do + = link_to project_runners_path(@build.project, anchor: 'js-runners-settings') do Runners page - if @build.starts_environment? diff --git a/app/views/projects/jobs/terminal.html.haml b/app/views/projects/jobs/terminal.html.haml index efea666a4d9..f7e7535ee92 100644 --- a/app/views/projects/jobs/terminal.html.haml +++ b/app/views/projects/jobs/terminal.html.haml @@ -5,7 +5,7 @@ - page_title 'Terminal', "#{@build.name} (##{@build.id})", 'Jobs' - content_for :page_specific_javascripts do - = stylesheet_link_tag "xterm/xterm" + = stylesheet_link_tag "xterm.css" .terminal-container{ class: container_class } #terminal{ data: { project_path: terminal_project_job_path(@project, @build, format: :ws) } } diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml index fb5b0fc15c9..768ce9bd103 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -2,32 +2,45 @@ - page_title "Labels" - can_admin_label = can?(current_user, :admin_label, @project) - hide_class = '' +- search = params[:search] - if can_admin_label - content_for(:header_content) do .nav-controls = link_to _('New label'), new_project_label_path(@project), class: "btn btn-new" -- if @labels.exists? || @prioritized_labels.exists? +- if @labels.exists? || @prioritized_labels.exists? || search.present? #promote-label-modal %div{ class: container_class } .top-area.adjust .nav-text = _('Labels can be applied to issues and merge requests.') - - if can_admin_label - = _('Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.') - .labels-container.prepend-top-5 + .nav-controls + = form_tag project_labels_path(@project), method: :get do + .input-group + = search_field_tag :search, params[:search], { placeholder: _('Filter'), id: 'label-search', class: 'form-control search-text-input input-short', spellcheck: false } + %span.input-group-append + %button.btn.btn-default{ type: "submit", "aria-label" => _('Submit search') } + = icon("search") + + .labels-container.prepend-top-10 - if can_admin_label + - if search.blank? + %p.text-muted + = _('Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.') -# Only show it in the first page - hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1') .prioritized-labels{ class: ('hide' if hide) } %h5.prepend-top-10= _('Prioritized Labels') .content-list.manage-labels-list.js-prioritized-labels{ "data-url" => set_priorities_project_labels_path(@project) } - #js-priority-labels-empty-state.priority-labels-empty-state{ class: "#{'hidden' unless @prioritized_labels.empty?}" } + #js-priority-labels-empty-state.priority-labels-empty-state{ class: "#{'hidden' unless @prioritized_labels.empty? && search.blank?}" } = render 'shared/empty_states/priority_labels' - if @prioritized_labels.present? = render partial: 'shared/label', subject: @project, collection: @prioritized_labels, as: :label, locals: { force_priority: true } + - elsif search.present? + .nothing-here-block + = _('No prioritised labels with such name or description') - if @labels.present? .other-labels @@ -36,6 +49,18 @@ .content-list.manage-labels-list.js-other-labels = render partial: 'shared/label', subject: @project, collection: @labels, as: :label = paginate @labels, theme: 'gitlab' + - elsif search.present? + .other-labels + - if @available_labels.any? + %h5 + = _('Other Labels') + .nothing-here-block + = _('No other labels with such name or description') + - else + .nothing-here-block + = _('No labels with such name or description') + + - else = render 'shared/empty_states/labels' 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 ca0f7d6098f..afa7eb06cb4 100644 --- a/app/views/projects/merge_requests/creations/_new_compare.html.haml +++ b/app/views/projects/merge_requests/creations/_new_compare.html.haml @@ -27,7 +27,7 @@ = dropdown_filter(_("Search branches")) = dropdown_content = dropdown_loading - .panel-footer + .card-footer .text-center= icon('spinner spin', class: 'js-source-loading') %ul.list-unstyled.mr_source_commit diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index bc247460d28..ccb83148ded 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -1,37 +1,34 @@ -#js-pipeline-header-vue.pipeline-header-container +.commit-box + %h3.commit-title + = markdown(commit.title, pipeline: :single_line) + - if commit.description.present? + %pre.commit-description< + = preserve(markdown(commit.description, pipeline: :single_line)) -- if @commit.present? - .commit-box - %h3.commit-title - = markdown(@commit.title, pipeline: :single_line) - - if @commit.description.present? - .commit-description< - = preserve(markdown(@commit.description, pipeline: :single_line)) +.info-well + - if commit.status + .well-segment.pipeline-info + .icon-container + = icon('clock-o') + = pluralize @pipeline.total_size, "job" + - if @pipeline.ref + from + = link_to @pipeline.ref, project_ref_path(@project, @pipeline.ref), class: "ref-name" + - if @pipeline.duration + in + = time_interval_in_words(@pipeline.duration) + - if @pipeline.queued_duration + = "(queued for #{time_interval_in_words(@pipeline.queued_duration)})" - .info-well - - if @commit.status - .well-segment.pipeline-info - .icon-container - = icon('clock-o') - = pluralize @pipeline.total_size, "job" - - if @pipeline.ref - from - = link_to @pipeline.ref, project_ref_path(@project, @pipeline.ref), class: "ref-name" - - if @pipeline.duration - in - = time_interval_in_words(@pipeline.duration) - - if @pipeline.queued_duration - = "(queued for #{time_interval_in_words(@pipeline.queued_duration)})" + .well-segment.branch-info + .icon-container.commit-icon + = custom_icon("icon_commit") + = link_to commit.short_id, project_commit_path(@project, @pipeline.sha), class: "commit-sha js-details-short" + = link_to("#", class: "js-details-expand d-none d-sm-none d-md-inline") do + %span.text-expander + = sprite_icon('ellipsis_h', size: 12) + %span.js-details-content.hide + = link_to @pipeline.sha, project_commit_path(@project, @pipeline.sha), class: "commit-sha commit-hash-full" + = clipboard_button(text: @pipeline.sha, title: "Copy commit SHA to clipboard") - .well-segment.branch-info - .icon-container.commit-icon - = custom_icon("icon_commit") - = link_to @commit.short_id, project_commit_path(@project, @pipeline.sha), class: "commit-sha js-details-short" - = link_to("#", class: "js-details-expand d-none d-sm-none d-md-inline") do - %span.text-expander - = sprite_icon('ellipsis_h', size: 12) - %span.js-details-content.hide - = link_to @pipeline.sha, project_commit_path(@project, @pipeline.sha), class: "commit-sha commit-hash-full" - = clipboard_button(text: @pipeline.sha, title: "Copy commit SHA to clipboard") - - = render_if_exists "projects/pipelines/info_extension", pipeline: @pipeline + = render_if_exists "projects/pipelines/info_extension", pipeline: @pipeline diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index a7d7c923957..ff0ed3ed30d 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -4,8 +4,10 @@ - page_title "Pipeline" .js-pipeline-container{ class: container_class, data: { controller_action: "#{controller.action_name}" } } - - if @commit - = render "projects/pipelines/info" + #js-pipeline-header-vue.pipeline-header-container + + - if @pipeline.commit.present? + = render "projects/pipelines/info", commit: @pipeline.commit = render "projects/pipelines/with_tabs", pipeline: @pipeline diff --git a/app/views/projects/project_templates/_built_in_templates.html.haml b/app/views/projects/project_templates/_built_in_templates.html.haml new file mode 100644 index 00000000000..e7636099be6 --- /dev/null +++ b/app/views/projects/project_templates/_built_in_templates.html.haml @@ -0,0 +1,17 @@ +- Gitlab::ProjectTemplate.all.each do |template| + .template-option.d-flex.align-items-center + .logo.append-right-10 + = custom_icon(template.logo, size: 40) + .description + %strong + = template.title + %br + .text-muted + = template.description + .controls.d-flex.align-items-center + %label.btn.btn-success.template-button.choose-template.append-right-10.append-bottom-0{ for: template.name } + %input{ type: "radio", autocomplete: "off", name: "project[template_name]", id: template.name, value: template.name } + %span + = _("Use template") + %a.btn.btn-default{ href: template.preview, rel: 'noopener noreferrer', target: '_blank' } + = _("Preview") diff --git a/app/views/projects/project_templates/_project_fields_form.html.haml b/app/views/projects/project_templates/_project_fields_form.html.haml new file mode 100644 index 00000000000..c96010550d8 --- /dev/null +++ b/app/views/projects/project_templates/_project_fields_form.html.haml @@ -0,0 +1,12 @@ +.row + .form-group.col-sm-12 + %label.label-bold + = _('Template') + .input-group.template-input-group + .input-group-prepend + .input-group-text + .selected-icon.append-right-10 + .selected-template + .input-group-append + %button.btn.btn-default.change-template{ type: "button" } + = _('Change template') diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index be22bbd7a9b..16961784e00 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -28,7 +28,9 @@ .settings-content = render 'autodevops_form' -%section.qa-runners-settings.settings.no-animate{ class: ('expanded' if expanded) } += render_if_exists 'projects/settings/ci_cd/protected_environments', expanded: expanded + +%section.qa-runners-settings.settings.no-animate#js-runners-settings{ class: ('expanded' if expanded) } .settings-header %h4 = _("Runners") diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 803ecca48f7..e011851be78 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -18,10 +18,11 @@ = render "home_panel" - if can?(current_user, :download_code, @project) - %nav.project-stats{ class: container_class } + %nav.project-stats{ class: [container_class, ("limit-container-width" unless fluid_layout)] } = render 'stat_anchor_list', anchors: @project.statistics_anchors(show_auto_devops_callout: show_auto_devops_callout) = render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout) - + - if Feature.enabled?(:repository_languages, @project.namespace.becomes(Namespace)) + = repository_languages_bar(@project.repository_languages) %div{ class: [container_class, ("limit-container-width" unless fluid_layout)] } - if @project.archived? diff --git a/app/views/projects/wikis/_main_links.html.haml b/app/views/projects/wikis/_main_links.html.haml index cadda0a33c2..8d91f411f89 100644 --- a/app/views/projects/wikis/_main_links.html.haml +++ b/app/views/projects/wikis/_main_links.html.haml @@ -4,6 +4,6 @@ = s_("Wiki|New page") = link_to project_wiki_history_path(@project, @page), class: "btn" do = s_("Wiki|Page history") - - if can?(current_user, :create_wiki, @project) && @page.latest? + - if can?(current_user, :create_wiki, @project) && @page.latest? && @valid_encoding = link_to project_wiki_edit_path(@project, @page), class: "btn js-wiki-edit" do = _("Edit") |