From e5e6c846ead9ea4cacc53c2308c5ca86ce1ab766 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 5 Oct 2015 20:20:27 +0200 Subject: Fix builds view --- app/views/ci/builds/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/ci/builds/show.html.haml b/app/views/ci/builds/show.html.haml index c42d11bf05d..be33c5e8aa4 100644 --- a/app/views/ci/builds/show.html.haml +++ b/app/views/ci/builds/show.html.haml @@ -1,7 +1,7 @@ #up-build-trace - if @commit.matrix_for_ref?(@build.ref) %ul.center-top-menu - - @commit.builds_without_retry_for_ref(build.ref).each do |build| + - @commit.builds_without_retry_for_ref(@build.ref).each do |build| %li{class: ('active' if build == @build) } = link_to ci_project_build_url(@project, build) do = ci_icon_for_status(build.status) -- cgit v1.2.1 From fc795d6ee2bdc1229f82c535222752364b5c9e44 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 5 Oct 2015 21:20:54 +0200 Subject: Fix graphical glitches --- app/views/ci/commits/_commit.html.haml | 3 ++- app/views/ci/commits/show.html.haml | 26 +++++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) (limited to 'app/views') diff --git a/app/views/ci/commits/_commit.html.haml b/app/views/ci/commits/_commit.html.haml index f8a1fa50851..6e6cc9b2c37 100644 --- a/app/views/ci/commits/_commit.html.haml +++ b/app/views/ci/commits/_commit.html.haml @@ -16,7 +16,8 @@ %td.build-branch - unless @ref %span - = link_to truncate(commit.last_ref, length: 25), ci_project_path(@project, ref: commit.last_ref) + - commit.refs.each do |ref| + = link_to truncate(ref, length: 25), ci_project_path(@project, ref: ref) %td.duration - if commit.duration > 0 diff --git a/app/views/ci/commits/show.html.haml b/app/views/ci/commits/show.html.haml index 7217671fe95..7ebef8c5e06 100644 --- a/app/views/ci/commits/show.html.haml +++ b/app/views/ci/commits/show.html.haml @@ -4,14 +4,22 @@ .gray-content-block.middle-block %pre.commit-message - #{@commit.git_commit_message} + - if @commit.git_commit_message + #{@commit.git_commit_message} + - else + No commit message .gray-content-block.second-block .row .col-sm-6 - %p - %span.attr-name Commit: - #{gitlab_commit_link(@project, @commit.sha)} + %p + %span.attr-name Commit: + #{gitlab_commit_link(@project, @commit.sha)} + %p + - if @commit.refs.present? + %span.attr-name Refs: + - @commit.refs.each do |ref| + #{gitlab_ref_link(@project, ref)} .col-sm-6 - if @commit.git_author_name || @commit.git_author_email %p @@ -22,10 +30,10 @@ %span.attr-name Created at: #{@commit.created_at.to_s(:short)} -- if current_user && can?(current_user, :manage_builds, gl_project) - .pull-right - - if @commit.builds.running_or_pending.any? - = link_to "Cancel", cancel_ci_project_commits_path(@project, @commit), class: 'btn btn-sm btn-danger' + - if current_user && can?(current_user, :manage_builds, gl_project) + - if @commit.builds.running_or_pending.any? + .pull-right + = link_to "Cancel", cancel_ci_project_commits_path(@project, @commit), class: 'btn btn-sm btn-danger' - if @commit.yaml_errors.present? @@ -41,7 +49,7 @@ - @commit.refs.each do |ref| %h3 - Builds for #{ref} + Builds for #{gitlab_ref_link(@project, ref)} - if @commit.duration_for_ref(ref) > 0 %small.pull-right %i.fa.fa-time -- cgit v1.2.1 From e6ab50a754d67ff38e1d358b2222b6db3dbdee80 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 6 Oct 2015 10:34:36 +0200 Subject: Use CI commit status for merge request widget For temporary compatibility with other services like Jenkins we ask for CI status via AJAX request if there is no commit status in GitLab database Signed-off-by: Dmitriy Zaporozhets --- .../merge_requests/widget/_heading.html.haml | 58 ++++++++++++++-------- 1 file changed, 36 insertions(+), 22 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/merge_requests/widget/_heading.html.haml b/app/views/projects/merge_requests/widget/_heading.html.haml index 10640f746f0..68dda1424cf 100644 --- a/app/views/projects/merge_requests/widget/_heading.html.haml +++ b/app/views/projects/merge_requests/widget/_heading.html.haml @@ -1,30 +1,44 @@ - if @merge_request.has_ci? - .mr-widget-heading - - [:success, :skipped, :canceled, :failed, :running, :pending].each do |status| - .ci_widget{class: "ci-#{status}", style: "display:none"} - - if status == :success - - status = "passed" - = icon("check-circle") - - else - = icon("circle") + - ci_commit = @merge_request.source_project.ci_commit(@merge_request.source_sha) + - if ci_commit + - status = ci_commit.status + .mr-widget-heading + .ci_widget{class: "ci-#{status}"} + = ci_status_icon(ci_commit) %span CI build #{status} for #{@merge_request.last_commit_short_sha}. %span.ci-coverage - - if ci_build_details_path(@merge_request) - = link_to "View build details", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink" + = link_to "View build details", ci_status_path(ci_commit) - .ci_widget - = icon("spinner spin") - Checking CI status for #{@merge_request.last_commit_short_sha}… + - else + - # Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX + - # Remove in later versions when services like Jenkins will set CI status via Commit status API + .mr-widget-heading + - [:success, :skipped, :canceled, :failed, :running, :pending].each do |status| + .ci_widget{class: "ci-#{status}", style: "display:none"} + - if status == :success + - status = "passed" + = icon("check-circle") + - else + = icon("circle") + %span CI build #{status} + for #{@merge_request.last_commit_short_sha}. + %span.ci-coverage + - if ci_build_details_path(@merge_request) + = link_to "View build details", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink" - .ci_widget.ci-not_found{style: "display:none"} - = icon("times-circle") - Could not find CI status for #{@merge_request.last_commit_short_sha}. + .ci_widget + = icon("spinner spin") + Checking CI status for #{@merge_request.last_commit_short_sha}… - .ci_widget.ci-error{style: "display:none"} - = icon("times-circle") - Could not connect to the CI server. Please check your settings and try again. + .ci_widget.ci-not_found{style: "display:none"} + = icon("times-circle") + Could not find CI status for #{@merge_request.last_commit_short_sha}. - :coffeescript - $ -> - merge_request_widget.getCiStatus() + .ci_widget.ci-error{style: "display:none"} + = icon("times-circle") + Could not connect to the CI server. Please check your settings and try again. + + :coffeescript + $ -> + merge_request_widget.getCiStatus() -- cgit v1.2.1 From 697b34d786bcbc9b4fdaef485ff4837b850ca5aa Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 6 Oct 2015 13:12:21 +0200 Subject: Render CI statuses on commit page Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/commit/_ci_menu.html.haml | 7 ++++ app/views/projects/commit/ci.html.haml | 62 ++++++++++++++++++++++++++++ app/views/projects/commit/show.html.haml | 1 + 3 files changed, 70 insertions(+) create mode 100644 app/views/projects/commit/_ci_menu.html.haml create mode 100644 app/views/projects/commit/ci.html.haml (limited to 'app/views') diff --git a/app/views/projects/commit/_ci_menu.html.haml b/app/views/projects/commit/_ci_menu.html.haml new file mode 100644 index 00000000000..a634ae5dfda --- /dev/null +++ b/app/views/projects/commit/_ci_menu.html.haml @@ -0,0 +1,7 @@ +%ul.center-top-menu.commit-ci-menu + = nav_link(path: 'commit#show') do + = link_to namespace_project_commit_path(@project.namespace, @project, @commit.id) do + Changes + = nav_link(path: 'commit#ci') do + = link_to ci_namespace_project_commit_path(@project.namespace, @project, @commit.id) do + Builds diff --git a/app/views/projects/commit/ci.html.haml b/app/views/projects/commit/ci.html.haml new file mode 100644 index 00000000000..bbb41a80268 --- /dev/null +++ b/app/views/projects/commit/ci.html.haml @@ -0,0 +1,62 @@ +- page_title "#{@commit.title} (#{@commit.short_id})", "Commits" += render "projects/commits/header_title" += render "commit_box" += render "ci_menu" + +- if @ci_project && current_user && can?(current_user, :manage_builds, @project) + .pull-right + - if @ci_commit.builds.running_or_pending.any? + = link_to "Cancel", cancel_ci_project_commits_path(@ci_project, @ci_commit), class: 'btn btn-sm btn-danger' + + +- if @ci_commit.yaml_errors.present? + .bs-callout.bs-callout-danger + %h4 Found errors in your .gitlab-ci.yml: + %ul + - @ci_commit.yaml_errors.split(",").each do |error| + %li= error + +- unless @ci_commit.ci_yaml_file + .bs-callout.bs-callout-warning + \.gitlab-ci.yml not found in this commit + +- @ci_commit.refs.each do |ref| + .gray-content-block.second-block + Builds for #{ref} + - if @ci_commit.duration_for_ref(ref) > 0 + %small.pull-right + %i.fa.fa-time + #{time_interval_in_words @ci_commit.duration_for_ref(ref)} + + %table.table.builds + %thead + %tr + %th Status + %th Build ID + %th Stage + %th Name + %th Duration + %th Finished at + - if @ci_project && @ci_project.coverage_enabled? + %th Coverage + %th + = render partial: "ci/builds/build", collection: @ci_commit.builds_without_retry.for_ref(ref), controls: true + +- if @ci_commit.retried_builds.any? + %h3 + Retried builds + + %table.table.builds + %thead + %tr + %th Status + %th Build ID + %th Ref + %th Stage + %th Name + %th Duration + %th Finished at + - if @ci_project && @ci_project.coverage_enabled? + %th Coverage + %th + = render partial: "ci/builds/build", collection: @ci_commit.retried_builds, ref: true diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml index f8681024d1b..30a3973828f 100644 --- a/app/views/projects/commit/show.html.haml +++ b/app/views/projects/commit/show.html.haml @@ -1,5 +1,6 @@ - page_title "#{@commit.title} (#{@commit.short_id})", "Commits" = render "projects/commits/header_title" = render "commit_box" += render "ci_menu" if @ci_commit = render "projects/diffs/diffs", diffs: @diffs, project: @project = render "projects/notes/notes_with_form", view: params[:view] -- cgit v1.2.1 From f6223ffb318d2e81ec50037810d23bbd86a400e8 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 6 Oct 2015 17:11:10 +0200 Subject: Move CI build page to CE project Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/builds/_build.html.haml | 50 +++++++++ app/views/projects/builds/show.html.haml | 159 +++++++++++++++++++++++++++++ app/views/projects/commit/ci.html.haml | 4 +- 3 files changed, 211 insertions(+), 2 deletions(-) create mode 100644 app/views/projects/builds/_build.html.haml create mode 100644 app/views/projects/builds/show.html.haml (limited to 'app/views') diff --git a/app/views/projects/builds/_build.html.haml b/app/views/projects/builds/_build.html.haml new file mode 100644 index 00000000000..21c543b38dd --- /dev/null +++ b/app/views/projects/builds/_build.html.haml @@ -0,0 +1,50 @@ +- gl_project = build.project.gl_project +%tr.build + %td.status + = ci_status_with_icon(build.status) + + %td.build-link + = link_to namespace_project_build_path(gl_project.namespace, gl_project, build) do + %strong Build ##{build.id} + + - if defined?(ref) + %td + = build.ref + + %td + = build.stage + + %td + = build.name + .pull-right + - if build.tags.any? + - build.tag_list.each do |tag| + %span.label.label-primary + = tag + - if build.trigger_request + %span.label.label-info triggered + - if build.allow_failure + %span.label.label-danger allowed to fail + + %td.duration + - if build.duration + #{duration_in_words(build.finished_at, build.started_at)} + + %td.timestamp + - if build.finished_at + %span #{time_ago_in_words build.finished_at} ago + + - if build.project.coverage_enabled? + %td.coverage + - if build.coverage + #{build.coverage}% + + %td + - if defined?(controls) && current_user && can?(current_user, :manage_builds, gl_project) + .pull-right + - if build.active? + = link_to cancel_ci_project_build_path(build.project, build, return_to: request.original_url), title: 'Cancel build' do + %i.fa.fa-remove.cred + - elsif build.commands.present? + = link_to retry_ci_project_build_path(build.project, build, return_to: request.original_url), method: :post, title: 'Retry build' do + %i.fa.fa-repeat diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml new file mode 100644 index 00000000000..93cd4dcfd93 --- /dev/null +++ b/app/views/projects/builds/show.html.haml @@ -0,0 +1,159 @@ +.build-page + .gray-content-block + Build for commit + %strong.monospace + = link_to @build.commit.short_sha, ci_status_path(@build.commit) + from + %code #{@build.ref} + + #up-build-trace + - if @commit.matrix_for_ref?(@build.ref) + %ul.center-top-menu.build-top-menu + - @commit.builds_without_retry_for_ref(@build.ref).each do |build| + %li{class: ('active' if build == @build) } + = link_to namespace_project_build_path(@project.namespace, @project, build) do + = ci_icon_for_status(build.status) + %span + - if build.name + = build.name + - else + = build.id + + + - unless @commit.builds_without_retry_for_ref(@build.ref).include?(@build) + %li.active + %a + Build ##{@build.id} + · + %i.fa.fa-warning-sign + This build was retried. + + .gray-content-block.second-block + .build-head + .clearfix + = ci_status_with_icon(@build.status) + - if @build.duration + %span + %i.fa.fa-time + #{duration_in_words(@build.finished_at, @build.started_at)} + .pull-right + = @build.updated_at.stamp('19:00 Aug 27') + + .row.prepend-top-default + .col-md-9 + .clearfix + - if @build.active? + .autoscroll-container + %button.btn.btn-success.btn-sm#autoscroll-button{:type => "button", :data => {:state => 'disabled'}} enable autoscroll + .clearfix + .scroll-controls + = link_to '#up-build-trace', class: 'btn' do + %i.fa.fa-angle-up + = link_to '#down-build-trace', class: 'btn' do + %i.fa.fa-angle-down + + %pre.trace#build-trace + %code.bash + = preserve do + = raw @build.trace_html + %div#down-build-trace + + .col-md-3 + - if @build.coverage + .build-widget + %h4.title + Test coverage + %h1 #{@build.coverage}% + + + .build-widget + %h4.title + Build + - if current_user && can?(current_user, :manage_builds, @project) + .pull-right + - if @build.active? + = link_to "Cancel", cancel_ci_project_build_path(@ci_project, @build), class: 'btn btn-sm btn-danger' + - elsif @build.commands.present? + = link_to "Retry", retry_ci_project_build_path(@ci_project, @build), class: 'btn btn-sm btn-primary', method: :post + + - if @build.duration + %p + %span.attr-name Duration: + #{duration_in_words(@build.finished_at, @build.started_at)} + %p + %span.attr-name Created: + #{time_ago_in_words(@build.created_at)} ago + - if @build.finished_at + %p + %span.attr-name Finished: + #{time_ago_in_words(@build.finished_at)} ago + %p + %span.attr-name Runner: + - if @build.runner && current_user && current_user.admin + \#{link_to "##{@build.runner.id}", ci_admin_runner_path(@build.runner.id)} + - elsif @build.runner + \##{@build.runner.id} + + - if @build.trigger_request + .build-widget + %h4.title + Trigger + + %p + %span.attr-name Token: + #{@build.trigger_request.trigger.short_token} + + - if @build.trigger_request.variables + %p + %span.attr-name Variables: + + %code + - @build.trigger_request.variables.each do |key, value| + #{key}=#{value} + + .build-widget + %h4.title + Commit + .pull-right + %small #{build_commit_link @build} + %p + %span.attr-name Branch: + #{build_ref_link @build} + %p + %span.attr-name Author: + #{@build.commit.git_author_name} + %p + %span.attr-name Message: + #{@build.commit.git_commit_message} + + - if @build.tags.any? + .build-widget + %h4.title + Tags + - @build.tag_list.each do |tag| + %span.label.label-primary + = tag + + - if @builds.present? + .build-widget + %h4.title #{pluralize(@builds.count, "other build")} for #{@build.short_sha}: + %table.table.builds + - @builds.each_with_index do |build, i| + %tr.build + %td + = ci_icon_for_status(build.status) + %td + = link_to namespace_project_build_path(@project.namespace, @project, @build) do + - if build.name + = build.name + - else + %span ##{build.id} + + %td.status= build.status + + + = paginate @builds + + + :javascript + new CiBuild("#{namespace_project_build_path(@project.namespace, @project, @build)}", "#{@build.status}") diff --git a/app/views/projects/commit/ci.html.haml b/app/views/projects/commit/ci.html.haml index bbb41a80268..f4382e88046 100644 --- a/app/views/projects/commit/ci.html.haml +++ b/app/views/projects/commit/ci.html.haml @@ -40,7 +40,7 @@ - if @ci_project && @ci_project.coverage_enabled? %th Coverage %th - = render partial: "ci/builds/build", collection: @ci_commit.builds_without_retry.for_ref(ref), controls: true + = render partial: "projects/builds/build", collection: @ci_commit.builds_without_retry.for_ref(ref), controls: true - if @ci_commit.retried_builds.any? %h3 @@ -59,4 +59,4 @@ - if @ci_project && @ci_project.coverage_enabled? %th Coverage %th - = render partial: "ci/builds/build", collection: @ci_commit.retried_builds, ref: true + = render partial: "projects/builds/build", collection: @ci_commit.retried_builds, ref: true -- cgit v1.2.1 From 04c7dc2a9e2385ce47a70205eafd4cf4f91a0bba Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 6 Oct 2015 20:15:06 +0200 Subject: Cleanup CI code after refactoring and fix several 500 errors Signed-off-by: Dmitriy Zaporozhets --- app/views/ci/admin/builds/_build.html.haml | 6 +- app/views/ci/admin/runners/show.html.haml | 10 +- app/views/ci/builds/_build.html.haml | 49 --------- app/views/ci/builds/show.html.haml | 165 ----------------------------- app/views/ci/commits/_commit.html.haml | 2 +- app/views/ci/commits/show.html.haml | 89 ---------------- app/views/layouts/ci/build.html.haml | 11 -- app/views/layouts/ci/commit.html.haml | 11 -- 8 files changed, 13 insertions(+), 330 deletions(-) delete mode 100644 app/views/ci/builds/_build.html.haml delete mode 100644 app/views/ci/builds/show.html.haml delete mode 100644 app/views/ci/commits/show.html.haml delete mode 100644 app/views/layouts/ci/build.html.haml delete mode 100644 app/views/layouts/ci/commit.html.haml (limited to 'app/views') diff --git a/app/views/ci/admin/builds/_build.html.haml b/app/views/ci/admin/builds/_build.html.haml index 778d51d03be..2df58713214 100644 --- a/app/views/ci/admin/builds/_build.html.haml +++ b/app/views/ci/admin/builds/_build.html.haml @@ -1,14 +1,16 @@ +- gl_project = build.project.gl_project - if build.commit && build.project %tr.build %td.build-link - = link_to ci_project_build_url(build.project, build) do + = link_to namespace_project_build_path(gl_project.namespace, gl_project, build) do %strong #{build.id} %td.status = ci_status_with_icon(build.status) %td.commit-link - = commit_link(build.commit) + = link_to ci_status_path(build.commit) do + %strong #{build.commit.short_sha} %td.runner - if build.runner diff --git a/app/views/ci/admin/runners/show.html.haml b/app/views/ci/admin/runners/show.html.haml index 09905e0eb47..5bb442cbf92 100644 --- a/app/views/ci/admin/runners/show.html.haml +++ b/app/views/ci/admin/runners/show.html.haml @@ -96,6 +96,7 @@ %table.builds.runner-builds %thead %tr + %th Build ID %th Status %th Project %th Commit @@ -103,6 +104,11 @@ - @builds.each do |build| %tr.build + %td.id + - gl_project = build.project.gl_project + = link_to namespace_project_build_path(gl_project.namespace, gl_project, build) do + = build.id + %td.status = ci_status_with_icon(build.status) @@ -110,8 +116,8 @@ = build.project.name %td.build-link - = link_to ci_project_build_path(build.project, build) do - %strong #{build.short_sha} + = link_to ci_status_path(build.commit) do + %strong #{build.commit.short_sha} %td.timestamp - if build.finished_at diff --git a/app/views/ci/builds/_build.html.haml b/app/views/ci/builds/_build.html.haml deleted file mode 100644 index 8ccc0dff2fb..00000000000 --- a/app/views/ci/builds/_build.html.haml +++ /dev/null @@ -1,49 +0,0 @@ -%tr.build - %td.status - = ci_status_with_icon(build.status) - - %td.build-link - = link_to ci_project_build_path(build.project, build) do - %strong Build ##{build.id} - - - if defined?(ref) - %td - = build.ref - - %td - = build.stage - - %td - = build.name - .pull-right - - if build.tags.any? - - build.tag_list.each do |tag| - %span.label.label-primary - = tag - - if build.trigger_request - %span.label.label-info triggered - - if build.allow_failure - %span.label.label-danger allowed to fail - - %td.duration - - if build.duration - #{duration_in_words(build.finished_at, build.started_at)} - - %td.timestamp - - if build.finished_at - %span #{time_ago_in_words build.finished_at} ago - - - if build.project.coverage_enabled? - %td.coverage - - if build.coverage - #{build.coverage}% - - %td - - if defined?(controls) && current_user && can?(current_user, :manage_builds, gl_project) - .pull-right - - if build.active? - = link_to cancel_ci_project_build_path(build.project, build, return_to: request.original_url), title: 'Cancel build' do - %i.fa.fa-remove.cred - - elsif build.commands.present? - = link_to retry_ci_project_build_path(build.project, build, return_to: request.original_url), method: :post, title: 'Retry build' do - %i.fa.fa-repeat diff --git a/app/views/ci/builds/show.html.haml b/app/views/ci/builds/show.html.haml deleted file mode 100644 index be33c5e8aa4..00000000000 --- a/app/views/ci/builds/show.html.haml +++ /dev/null @@ -1,165 +0,0 @@ -#up-build-trace -- if @commit.matrix_for_ref?(@build.ref) - %ul.center-top-menu - - @commit.builds_without_retry_for_ref(@build.ref).each do |build| - %li{class: ('active' if build == @build) } - = link_to ci_project_build_url(@project, build) do - = ci_icon_for_status(build.status) - %span - - if build.name - = build.name - - else - = build.id - - - - unless @commit.builds_without_retry_for_ref(@build.ref).include?(@build) - %li.active - %a - Build ##{@build.id} - · - %i.fa.fa-warning-sign - This build was retried. - -.gray-content-block - .build-head - %h4 - - if @build.commit.tag? - Build for tag - %code #{@build.ref} - - else - Build for commit - %strong.monospace= commit_link(@build.commit) - from - - = link_to ci_project_path(@build.project, ref: @build.ref) do - %strong.monospace= "#{@build.ref}" - - - if @build.duration - .pull-right - %span - %i.fa.fa-time - #{duration_in_words(@build.finished_at, @build.started_at)} - - .clearfix - = ci_status_with_icon(@build.status) - .pull-right - = @build.updated_at.stamp('19:00 Aug 27') - -.row.prepend-top-default - .col-md-9 - .clearfix - - if @build.active? - .autoscroll-container - %button.btn.btn-success.btn-sm#autoscroll-button{:type => "button", :data => {:state => 'disabled'}} enable autoscroll - .clearfix - .scroll-controls - = link_to '#up-build-trace', class: 'btn' do - %i.fa.fa-angle-up - = link_to '#down-build-trace', class: 'btn' do - %i.fa.fa-angle-down - - %pre.trace#build-trace - %code.bash - = preserve do - = raw @build.trace_html - %div#down-build-trace - - .col-md-3 - - if @build.coverage - .build-widget - %h4.title - Test coverage - %h1 #{@build.coverage}% - - - .build-widget - %h4.title - Build - - if current_user && can?(current_user, :manage_builds, gl_project) - .pull-right - - if @build.active? - = link_to "Cancel", cancel_ci_project_build_path(@project, @build), class: 'btn btn-sm btn-danger' - - elsif @build.commands.present? - = link_to "Retry", retry_ci_project_build_path(@project, @build), class: 'btn btn-sm btn-primary', method: :post - - - if @build.duration - %p - %span.attr-name Duration: - #{duration_in_words(@build.finished_at, @build.started_at)} - %p - %span.attr-name Created: - #{time_ago_in_words(@build.created_at)} ago - - if @build.finished_at - %p - %span.attr-name Finished: - #{time_ago_in_words(@build.finished_at)} ago - %p - %span.attr-name Runner: - - if @build.runner && current_user && current_user.admin - \#{link_to "##{@build.runner.id}", ci_admin_runner_path(@build.runner.id)} - - elsif @build.runner - \##{@build.runner.id} - - - if @build.trigger_request - .build-widget - %h4.title - Trigger - - %p - %span.attr-name Token: - #{@build.trigger_request.trigger.short_token} - - - if @build.trigger_request.variables - %p - %span.attr-name Variables: - - %code - - @build.trigger_request.variables.each do |key, value| - #{key}=#{value} - - .build-widget - %h4.title - Commit - .pull-right - %small #{build_commit_link @build} - %p - %span.attr-name Branch: - #{build_ref_link @build} - %p - %span.attr-name Author: - #{@build.commit.git_author_name} - %p - %span.attr-name Message: - #{@build.commit.git_commit_message} - - - if @build.tags.any? - .build-widget - %h4.title - Tags - - @build.tag_list.each do |tag| - %span.label.label-primary - = tag - - - if @builds.present? - .build-widget - %h4.title #{pluralize(@builds.count, "other build")} for #{@build.short_sha}: - %table.builds - - @builds.each_with_index do |build, i| - %tr.build - %td - = ci_icon_for_status(build.status) - %td - = link_to ci_project_build_url(@project, build) do - - if build.name - = build.name - - else - %span ##{build.id} - - %td.status= build.status - - - = paginate @builds - - -:javascript - new CiBuild("#{ci_project_build_url(@project, @build)}", "#{@build.status}") diff --git a/app/views/ci/commits/_commit.html.haml b/app/views/ci/commits/_commit.html.haml index 6e6cc9b2c37..b24a3b826cf 100644 --- a/app/views/ci/commits/_commit.html.haml +++ b/app/views/ci/commits/_commit.html.haml @@ -7,7 +7,7 @@ %td.build-link - = link_to ci_project_commits_path(commit.project, commit.sha) do + = link_to ci_status_path(commit) do %strong #{commit.short_sha} %td.build-message diff --git a/app/views/ci/commits/show.html.haml b/app/views/ci/commits/show.html.haml deleted file mode 100644 index 7ebef8c5e06..00000000000 --- a/app/views/ci/commits/show.html.haml +++ /dev/null @@ -1,89 +0,0 @@ -.commit-info - .append-bottom-20 - = ci_status_with_icon(@commit.status) - - .gray-content-block.middle-block - %pre.commit-message - - if @commit.git_commit_message - #{@commit.git_commit_message} - - else - No commit message - - .gray-content-block.second-block - .row - .col-sm-6 - %p - %span.attr-name Commit: - #{gitlab_commit_link(@project, @commit.sha)} - %p - - if @commit.refs.present? - %span.attr-name Refs: - - @commit.refs.each do |ref| - #{gitlab_ref_link(@project, ref)} - .col-sm-6 - - if @commit.git_author_name || @commit.git_author_email - %p - %span.attr-name Author: - #{@commit.git_author_name} (#{@commit.git_author_email}) - - if @commit.created_at - %p - %span.attr-name Created at: - #{@commit.created_at.to_s(:short)} - - - if current_user && can?(current_user, :manage_builds, gl_project) - - if @commit.builds.running_or_pending.any? - .pull-right - = link_to "Cancel", cancel_ci_project_commits_path(@project, @commit), class: 'btn btn-sm btn-danger' - - -- if @commit.yaml_errors.present? - .bs-callout.bs-callout-danger - %h4 Found errors in your .gitlab-ci.yml: - %ul - - @commit.yaml_errors.split(",").each do |error| - %li= error - -- unless @commit.ci_yaml_file - .bs-callout.bs-callout-warning - \.gitlab-ci.yml not found in this commit - -- @commit.refs.each do |ref| - %h3 - Builds for #{gitlab_ref_link(@project, ref)} - - if @commit.duration_for_ref(ref) > 0 - %small.pull-right - %i.fa.fa-time - #{time_interval_in_words @commit.duration_for_ref(ref)} - - %table.table.builds - %thead - %tr - %th Status - %th Build ID - %th Stage - %th Name - %th Duration - %th Finished at - - if @project.coverage_enabled? - %th Coverage - %th - = render @commit.builds_without_retry.for_ref(ref), controls: true - -- if @commit.retried_builds.any? - %h3 - Retried builds - - %table.table.builds - %thead - %tr - %th Status - %th Build ID - %th Ref - %th Stage - %th Name - %th Duration - %th Finished at - - if @project.coverage_enabled? - %th Coverage - %th - = render @commit.retried_builds, ref: true diff --git a/app/views/layouts/ci/build.html.haml b/app/views/layouts/ci/build.html.haml deleted file mode 100644 index a1356f0dc2e..00000000000 --- a/app/views/layouts/ci/build.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -!!! 5 -%html{ lang: "en"} - = render 'layouts/head' - %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page} - - header_title ci_commit_title(@commit) - - if current_user - = render "layouts/header/default", title: header_title - - else - = render "layouts/header/public", title: header_title - - = render 'layouts/ci/page', sidebar: 'nav_project' diff --git a/app/views/layouts/ci/commit.html.haml b/app/views/layouts/ci/commit.html.haml deleted file mode 100644 index a1356f0dc2e..00000000000 --- a/app/views/layouts/ci/commit.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -!!! 5 -%html{ lang: "en"} - = render 'layouts/head' - %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page} - - header_title ci_commit_title(@commit) - - if current_user - = render "layouts/header/default", title: header_title - - else - = render "layouts/header/public", title: header_title - - = render 'layouts/ci/page', sidebar: 'nav_project' -- cgit v1.2.1 From 8dcc8e5db61b602baaf6390c6cbbaa28d49b3ee1 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 7 Oct 2015 10:26:40 +0200 Subject: Fix routing in CI mailer Signed-off-by: Dmitriy Zaporozhets --- app/views/ci/notify/build_fail_email.html.haml | 2 +- app/views/ci/notify/build_fail_email.text.erb | 2 +- app/views/ci/notify/build_success_email.html.haml | 2 +- app/views/ci/notify/build_success_email.text.erb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/ci/notify/build_fail_email.html.haml b/app/views/ci/notify/build_fail_email.html.haml index 4ebdfa1b6c0..69689a75022 100644 --- a/app/views/ci/notify/build_fail_email.html.haml +++ b/app/views/ci/notify/build_fail_email.html.haml @@ -16,4 +16,4 @@ Message: #{@build.commit.git_commit_message} %p - Url: #{link_to @build.short_sha, ci_project_build_url(@project, @build)} + Url: #{link_to @build.short_sha, namespace_project_build_url(@build.gl_project.namespace, @build.gl_project, @build)} diff --git a/app/views/ci/notify/build_fail_email.text.erb b/app/views/ci/notify/build_fail_email.text.erb index 177827f9a3c..6de5dc10f17 100644 --- a/app/views/ci/notify/build_fail_email.text.erb +++ b/app/views/ci/notify/build_fail_email.text.erb @@ -6,4 +6,4 @@ Author: <%= @build.commit.git_author_name %> Branch: <%= @build.ref %> Message: <%= @build.commit.git_commit_message %> -Url: <%= ci_project_build_url(@build.project, @build) %> +Url: <%= namespace_project_build_url(@build.gl_project.namespace, @build.gl_project, @build) %> diff --git a/app/views/ci/notify/build_success_email.html.haml b/app/views/ci/notify/build_success_email.html.haml index 7cc43300e88..4e3015a356b 100644 --- a/app/views/ci/notify/build_success_email.html.haml +++ b/app/views/ci/notify/build_success_email.html.haml @@ -17,4 +17,4 @@ Message: #{@build.commit.git_commit_message} %p - Url: #{link_to @build.short_sha, ci_project_build_url(@project, @build)} + Url: #{link_to @build.short_sha, namespace_project_build_url(@build.gl_project.namespace, @build.gl_project, @build)} diff --git a/app/views/ci/notify/build_success_email.text.erb b/app/views/ci/notify/build_success_email.text.erb index 4d55c39b0fb..d0a43ae1c12 100644 --- a/app/views/ci/notify/build_success_email.text.erb +++ b/app/views/ci/notify/build_success_email.text.erb @@ -6,4 +6,4 @@ Author: <%= @build.commit.git_author_name %> Branch: <%= @build.ref %> Message: <%= @build.commit.git_commit_message %> -Url: <%= ci_project_build_url(@build.project, @build) %> +Url: <%= namespace_project_build_url(@build.gl_project.namespace, @build.gl_project, @build) %> -- cgit v1.2.1 From 0ab6ca93aadaf08f65f36e7fbdb5b837bac6e160 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Wed, 16 Sep 2015 22:45:22 -0700 Subject: Add directory feature button Change "+" icon under "Files" section to have three options: * Create file * Upload file * New directory Upload file is no longer accessible from the "Create file" page. Users can now select a target branch in upload file as well. Closes #2799: Fixes a bug where file modes were overwritten after a commit Closes https://github.com/gitlabhq/gitlabhq/issues/8253: Existing files can no longer be overwritten in the "Create file" section. Closes #2557 --- app/views/projects/blob/_new_dir.html.haml | 25 +++++++++++++++++++++++++ app/views/projects/blob/_upload.html.haml | 9 ++++++--- app/views/projects/blob/new.html.haml | 7 +------ app/views/projects/tree/_tree.html.haml | 26 ++++++++++++++++++++++---- 4 files changed, 54 insertions(+), 13 deletions(-) create mode 100644 app/views/projects/blob/_new_dir.html.haml (limited to 'app/views') diff --git a/app/views/projects/blob/_new_dir.html.haml b/app/views/projects/blob/_new_dir.html.haml new file mode 100644 index 00000000000..cb1567a2e68 --- /dev/null +++ b/app/views/projects/blob/_new_dir.html.haml @@ -0,0 +1,25 @@ +#modal-create-new-dir.modal + .modal-dialog + .modal-content + .modal-header + %a.close{href: "#", "data-dismiss" => "modal"} × + %h3.page-title Create New Directory + .modal-body + = form_tag namespace_project_create_dir_path(@project.namespace, @project, @id), method: :post, remote: false, id: 'dir-create-form', class: 'form-horizontal' do + .form-group + = label_tag :dir_name, 'Directory Name', class: 'control-label' + .col-sm-10 + = text_field_tag :dir_name, params[:dir_name], placeholder: "Directory name", required: true, class: 'form-control' + = render 'shared/commit_message_container', params: params, placeholder: '' + - unless @project.empty_repo? + .form-group + = label_tag :branch_name, 'Branch', class: 'control-label' + .col-sm-10 + = text_field_tag 'new_branch', @ref, class: "form-control" + .form-group + .col-sm-offset-2.col-sm-10 + = submit_tag "Create directory", class: 'btn btn-primary btn-create' + = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal" + +:coffeescript + disableButtonIfAnyEmptyField($("#dir-create-form"), ".form-control", ".btn-create"); diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml index 1a1df127703..e27f1707527 100644 --- a/app/views/projects/blob/_upload.html.haml +++ b/app/views/projects/blob/_upload.html.haml @@ -4,9 +4,6 @@ .modal-header %a.close{href: "#", "data-dismiss" => "modal"} × %h3.page-title #{title} - %p.light - From branch - %strong= @ref .modal-body = form_tag form_path, method: method, class: 'blob-file-upload-form-js form-horizontal' do .dropzone @@ -18,6 +15,12 @@ .dropzone-alerts{class: "alert alert-danger data", style: "display:none"} = render 'shared/commit_message_container', params: params, placeholder: placeholder + - unless @project.empty_repo? + .form-group.branch + = label_tag 'branch', class: 'control-label' do + Branch + .col-sm-10 + = text_field_tag 'new_branch', @ref, class: "form-control" .form-group .col-sm-offset-2.col-sm-10 = button_tag button_title, class: 'btn btn-small btn-primary btn-upload-file', id: 'submit-all' diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index 1950586b112..d7987e24ef3 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -2,12 +2,7 @@ = render "header_title" .gray-content-block.top-block - Create a new file or - = link_to 'upload', '#modal-upload-blob', - { class: 'upload-link', 'data-target' => '#modal-upload-blob', 'data-toggle' => 'modal'} - an existing one - -= render 'projects/blob/upload', title: 'Upload', placeholder: 'Upload new file', button_title: 'Upload file', form_path: namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post + Create a new file .file-editor = form_tag(namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post, class: 'form-horizontal form-new-file js-requires-input') do diff --git a/app/views/projects/tree/_tree.html.haml b/app/views/projects/tree/_tree.html.haml index 367a87927d7..457f8a4a585 100644 --- a/app/views/projects/tree/_tree.html.haml +++ b/app/views/projects/tree/_tree.html.haml @@ -8,11 +8,25 @@ = link_to truncate(title, length: 40), namespace_project_tree_path(@project.namespace, @project, path) - else = link_to title, '#' - - if current_user && can_push_branch?(@project, @ref) + - if allowed_tree_edit? %li - = link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'New file', id: 'new-file-link' do - %small - %i.fa.fa-plus + %span.dropdown + %a.dropdown-toggle.btn.btn-xs.add-to-tree{href: '#', "data-toggle" => "dropdown"} + = icon('plus') + %ul.dropdown-menu + %li + = link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'Create file', id: 'new-file-link' do + = icon('pencil fw') + Create file + %li + = link_to '#modal-upload-blob', { 'data-target' => '#modal-upload-blob', 'data-toggle' => 'modal'} do + = icon('file fw') + Upload file + %li.divider + %li + = link_to '#modal-create-new-dir', { 'data-target' => '#modal-create-new-dir', 'data-toggle' => 'modal'} do + = icon('folder fw') + New directory %div#tree-content-holder.tree-content-holder.prepend-top-20 %table#tree-slider{class: "table_#{@hex_path} tree-table" } @@ -46,6 +60,10 @@ %div.tree_progress +- if allowed_tree_edit? + = render 'projects/blob/upload', title: 'Upload', placeholder: 'Upload new file', button_title: 'Upload file', form_path: namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post + = render 'projects/blob/new_dir' + :javascript // Load last commit log for each file in tree $('#tree-slider').waitForImages(function() { -- cgit v1.2.1 From 6f6097713ca593c7a7177df0f06420b124d478aa Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 7 Oct 2015 14:26:07 +0200 Subject: Move status badge helper to CI project settings for now Signed-off-by: Dmitriy Zaporozhets --- app/views/ci/projects/show.html.haml | 16 ---------------- app/views/projects/ci_settings/_form.html.haml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'app/views') diff --git a/app/views/ci/projects/show.html.haml b/app/views/ci/projects/show.html.haml index 888b1ea41d5..f5244696c5d 100644 --- a/app/views/ci/projects/show.html.haml +++ b/app/views/ci/projects/show.html.haml @@ -19,22 +19,6 @@ %li.pull-right = link_to 'Go to project', project_path(gl_project), class: 'btn btn-sm' -- if @ref - %p - Paste build status image for #{@ref} with next link - = link_to '#', class: 'badge-codes-toggle btn btn-default btn-xs' do - Status Badge - .badge-codes-block.bs-callout.bs-callout-info.hide - %p - Status badge for - %span.label.label-info #{@ref} - branch - %div - %label Markdown: - = text_field_tag 'badge_md', markdown_badge_code(@project, @ref), readonly: true, class: 'form-control' - %label Html: - = text_field_tag 'badge_html', html_badge_code(@project, @ref), readonly: true, class: 'form-control' - diff --git a/app/views/projects/ci_settings/_form.html.haml b/app/views/projects/ci_settings/_form.html.haml index 9f891f557a9..34125550206 100644 --- a/app/views/projects/ci_settings/_form.html.haml +++ b/app/views/projects/ci_settings/_form.html.haml @@ -8,6 +8,22 @@ Edit your #{link_to ".gitlab-ci.yml using web-editor", yaml_web_editor_link(@ci_project)} +- if @repository + %p + Paste build status image for #{@repository.root_ref} with next link + = link_to '#', class: 'badge-codes-toggle btn btn-default btn-xs' do + Status Badge + .badge-codes-block.bs-callout.bs-callout-info.hide + %p + Status badge for + %span.label.label-info #{@ref} + branch + %div + %label Markdown: + = text_field_tag 'badge_md', markdown_badge_code(@ci_project, @repository.root_ref), readonly: true, class: 'form-control' + %label Html: + = text_field_tag 'badge_html', html_badge_code(@ci_project, @repository.root_ref), readonly: true, class: 'form-control' + = nested_form_for @ci_project, url: namespace_project_ci_settings_path(@project.namespace, @project), html: { class: 'form-horizontal' } do |f| - if @ci_project.errors.any? #error_explanation -- cgit v1.2.1 From c0b79a751c8cbf676900956b14b70edd5dca5010 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 7 Oct 2015 14:35:54 +0200 Subject: Move no runners alert to project ci settings Signed-off-by: Dmitriy Zaporozhets --- app/views/ci/projects/_info.html.haml | 2 -- app/views/ci/projects/_no_runners.html.haml | 8 -------- app/views/projects/ci_settings/_no_runners.html.haml | 8 ++++++++ app/views/projects/ci_settings/edit.html.haml | 3 +++ 4 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 app/views/ci/projects/_no_runners.html.haml create mode 100644 app/views/projects/ci_settings/_no_runners.html.haml (limited to 'app/views') diff --git a/app/views/ci/projects/_info.html.haml b/app/views/ci/projects/_info.html.haml index 1888e1bde93..e69de29bb2d 100644 --- a/app/views/ci/projects/_info.html.haml +++ b/app/views/ci/projects/_info.html.haml @@ -1,2 +0,0 @@ -- if no_runners_for_project?(@project) - = render 'no_runners' diff --git a/app/views/ci/projects/_no_runners.html.haml b/app/views/ci/projects/_no_runners.html.haml deleted file mode 100644 index c0a296fb17d..00000000000 --- a/app/views/ci/projects/_no_runners.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -.alert.alert-danger - %p - There are NO runners to build this project. - %br - You can add Specific runner for this project on Runners page - - - if current_user.is_admin - or add Shared runner for whole application in admin are. diff --git a/app/views/projects/ci_settings/_no_runners.html.haml b/app/views/projects/ci_settings/_no_runners.html.haml new file mode 100644 index 00000000000..33038c52978 --- /dev/null +++ b/app/views/projects/ci_settings/_no_runners.html.haml @@ -0,0 +1,8 @@ +.alert.alert-danger + %p + There are NO runners to build this project. + %br + You can add Specific runner for this project on Runners page + + - if current_user.admin + or add Shared runner for whole application in admin are. diff --git a/app/views/projects/ci_settings/edit.html.haml b/app/views/projects/ci_settings/edit.html.haml index e9040fe4337..eedf484bf00 100644 --- a/app/views/projects/ci_settings/edit.html.haml +++ b/app/views/projects/ci_settings/edit.html.haml @@ -6,6 +6,9 @@ yaml file which is based on your old jobs. Put this file to the root of your project and name it .gitlab-ci.yml +- if no_runners_for_project?(@ci_project) + = render 'no_runners' + = render 'form' - if @ci_project.generated_yaml_config -- cgit v1.2.1 From e52de6771f6bf9629fc85213b94ec60721354e80 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 7 Oct 2015 14:43:58 +0200 Subject: Remove Continuous Integration from project menu Signed-off-by: Dmitriy Zaporozhets --- app/views/ci/projects/_info.html.haml | 0 app/views/ci/projects/show.html.haml | 44 ----------------------- app/views/layouts/ci/_nav_project.html.haml | 6 ---- app/views/layouts/nav/_project.html.haml | 7 ---- app/views/layouts/nav/_project_settings.html.haml | 10 ++++++ 5 files changed, 10 insertions(+), 57 deletions(-) delete mode 100644 app/views/ci/projects/_info.html.haml delete mode 100644 app/views/ci/projects/show.html.haml (limited to 'app/views') diff --git a/app/views/ci/projects/_info.html.haml b/app/views/ci/projects/_info.html.haml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/app/views/ci/projects/show.html.haml b/app/views/ci/projects/show.html.haml deleted file mode 100644 index f5244696c5d..00000000000 --- a/app/views/ci/projects/show.html.haml +++ /dev/null @@ -1,44 +0,0 @@ -= render 'ci/shared/guide' unless @project.setup_finished? - -- if current_user && can?(current_user, :manage_project, gl_project) && !@project.any_runners? - .alert.alert-danger - Builds for this project wont be served unless you configure runners on - = link_to "Runners page", runners_path(@project.gl_project) - -%ul.nav.nav-tabs.append-bottom-20 - %li{class: ref_tab_class} - = link_to 'All commits', ci_project_path(@project) - - @project.tracked_refs.each do |ref| - %li{class: ref_tab_class(ref)} - = link_to ref, ci_project_path(@project, ref: ref) - - - if @ref && !@project.tracked_refs.include?(@ref) - %li{class: 'active'} - = link_to @ref, ci_project_path(@project, ref: @ref) - - %li.pull-right - = link_to 'Go to project', project_path(gl_project), class: 'btn btn-sm' - - - - -%table.table.builds - %thead - %tr - %th Status - %th Commit - %th Message - %th Branch - %th Total duration - %th Finished at - - if @project.coverage_enabled? - %th Coverage - - = render @commits - -= paginate @commits - -- if @commits.empty? - .bs-callout - %h4 No commits yet - diff --git a/app/views/layouts/ci/_nav_project.html.haml b/app/views/layouts/ci/_nav_project.html.haml index 545abc23d99..db631f24656 100644 --- a/app/views/layouts/ci/_nav_project.html.haml +++ b/app/views/layouts/ci/_nav_project.html.haml @@ -5,12 +5,6 @@ %span Back to project %li.separate-item - = nav_link path: ['projects#show', 'commits#show', 'builds#show'] do - = link_to ci_project_path(@project) do - = icon('list-alt fw') - %span - Commits - %span.count= @project.commits.count = nav_link path: ['services#index', 'services#edit'] do = link_to ci_project_services_path(@project) do = icon('share fw') diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml index a218ec7486c..8ce46d4865b 100644 --- a/app/views/layouts/nav/_project.html.haml +++ b/app/views/layouts/nav/_project.html.haml @@ -76,13 +76,6 @@ Merge Requests %span.count.merge_counter= @project.merge_requests.opened.count - - if @project.gitlab_ci? - = nav_link(controller: [:ci, :project]) do - = link_to ci_project_path(@project.gitlab_ci_project), title: 'Continuous Integration', data: {placement: 'right'} do - = icon('building fw') - %span - Continuous Integration - - if project_nav_tab? :settings = nav_link(controller: [:project_members, :teams]) do = link_to namespace_project_project_members_path(@project.namespace, @project), title: 'Members', class: 'team-tab tab', data: {placement: 'right'} do diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml index 9279a846623..f618a18870b 100644 --- a/app/views/layouts/nav/_project_settings.html.haml +++ b/app/views/layouts/nav/_project_settings.html.haml @@ -60,3 +60,13 @@ = icon('building fw') %span CI Settings + = nav_link path: ['ci/services#index', 'ci/services#edit'] do + = link_to ci_project_services_path(@project.gitlab_ci_project) do + = icon('share fw') + %span + CI Services + = nav_link path: 'events#index' do + = link_to ci_project_events_path(@project.gitlab_ci_project) do + = icon('book fw') + %span + CI Events -- cgit v1.2.1 From 7d220c1e7936b39affe1d819b7731c608795c7e9 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 7 Oct 2015 14:56:21 +0200 Subject: Remove test for removed page and add menu highlight for build page Signed-off-by: Dmitriy Zaporozhets --- app/views/layouts/nav/_project.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml index 8ce46d4865b..e4c285d8023 100644 --- a/app/views/layouts/nav/_project.html.haml +++ b/app/views/layouts/nav/_project.html.haml @@ -32,7 +32,7 @@ Files - if project_nav_tab? :commits - = nav_link(controller: %w(commit commits compare repositories tags branches)) do + = nav_link(controller: %w(commit commits compare repositories tags branches builds)) do = link_to project_commits_path(@project), title: 'Commits', class: 'shortcuts-commits', data: {placement: 'right'} do = icon('history fw') %span -- cgit v1.2.1 From 1e06cabf4a8fa4d4c7acb9898682a5b4b41a9f58 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 7 Oct 2015 15:24:32 +0200 Subject: Remove Ci::Commit and Ci::Build controllers Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/builds/_build.html.haml | 4 ++-- app/views/projects/builds/show.html.haml | 4 ++-- app/views/projects/commit/ci.html.haml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/builds/_build.html.haml b/app/views/projects/builds/_build.html.haml index 21c543b38dd..65fd9413b60 100644 --- a/app/views/projects/builds/_build.html.haml +++ b/app/views/projects/builds/_build.html.haml @@ -43,8 +43,8 @@ - if defined?(controls) && current_user && can?(current_user, :manage_builds, gl_project) .pull-right - if build.active? - = link_to cancel_ci_project_build_path(build.project, build, return_to: request.original_url), title: 'Cancel build' do + = link_to cancel_namespace_project_build_path(gl_project.namespace, gl_project, build, return_to: request.original_url), title: 'Cancel build' do %i.fa.fa-remove.cred - elsif build.commands.present? - = link_to retry_ci_project_build_path(build.project, build, return_to: request.original_url), method: :post, title: 'Retry build' do + = link_to retry_namespace_project_build_path(gl_project.namespace, gl_project, build, return_to: request.original_url), method: :post, title: 'Retry build' do %i.fa.fa-repeat diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 93cd4dcfd93..b561078e8c7 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -72,9 +72,9 @@ - if current_user && can?(current_user, :manage_builds, @project) .pull-right - if @build.active? - = link_to "Cancel", cancel_ci_project_build_path(@ci_project, @build), class: 'btn btn-sm btn-danger' + = link_to "Cancel", cancel_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-danger' - elsif @build.commands.present? - = link_to "Retry", retry_ci_project_build_path(@ci_project, @build), class: 'btn btn-sm btn-primary', method: :post + = link_to "Retry", retry_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-primary', method: :post - if @build.duration %p diff --git a/app/views/projects/commit/ci.html.haml b/app/views/projects/commit/ci.html.haml index f4382e88046..26ab38445c2 100644 --- a/app/views/projects/commit/ci.html.haml +++ b/app/views/projects/commit/ci.html.haml @@ -6,7 +6,7 @@ - if @ci_project && current_user && can?(current_user, :manage_builds, @project) .pull-right - if @ci_commit.builds.running_or_pending.any? - = link_to "Cancel", cancel_ci_project_commits_path(@ci_project, @ci_commit), class: 'btn btn-sm btn-danger' + = link_to "Cancel", cancel_builds_namespace_project_commit_path(@project.namespace, @project, @commit.sha), class: 'btn btn-sm btn-danger' - if @ci_commit.yaml_errors.present? -- cgit v1.2.1 From 75bb1087df785e75fb343a9e8721e8d636f7ce81 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 6 Oct 2015 21:08:27 -0700 Subject: Allow removing of project without confirmation when JavaScript is disabled Closes #2485 --- app/views/projects/edit.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 90dce739992..1882a82fba5 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -193,13 +193,13 @@ .panel.panel-default.panel.panel-danger .panel-heading Remove project .panel-body - = form_tag(namespace_project_path(@project.namespace, @project), method: :delete, html: { class: 'form-horizontal'}) do + = form_tag(namespace_project_path(@project.namespace, @project), method: :delete, class: 'form-horizontal') do %p Removing the project will delete its repository and all related resources including issues, merge requests etc. %br %strong Removed projects cannot be restored! - = link_to 'Remove project', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_project_message(@project) } + = button_to 'Remove project', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_project_message(@project) } - else .nothing-here-block Only project owner can remove a project -- cgit v1.2.1 From a30b68fe1ded96c5aafe4348d1afec269354c469 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 7 Oct 2015 16:20:31 +0200 Subject: Move CI services to project settings area Signed-off-by: Dmitriy Zaporozhets --- app/views/ci/services/_form.html.haml | 57 ----------------------- app/views/ci/services/edit.html.haml | 1 - app/views/ci/services/index.html.haml | 22 --------- app/views/layouts/ci/_nav_project.html.haml | 5 -- app/views/layouts/nav/_project_settings.html.haml | 4 +- app/views/projects/ci_services/_form.html.haml | 54 +++++++++++++++++++++ app/views/projects/ci_services/edit.html.haml | 1 + app/views/projects/ci_services/index.html.haml | 22 +++++++++ 8 files changed, 79 insertions(+), 87 deletions(-) delete mode 100644 app/views/ci/services/_form.html.haml delete mode 100644 app/views/ci/services/edit.html.haml delete mode 100644 app/views/ci/services/index.html.haml create mode 100644 app/views/projects/ci_services/_form.html.haml create mode 100644 app/views/projects/ci_services/edit.html.haml create mode 100644 app/views/projects/ci_services/index.html.haml (limited to 'app/views') diff --git a/app/views/ci/services/_form.html.haml b/app/views/ci/services/_form.html.haml deleted file mode 100644 index 9110aaa0528..00000000000 --- a/app/views/ci/services/_form.html.haml +++ /dev/null @@ -1,57 +0,0 @@ -%h3.page-title - = @service.title - = boolean_to_icon @service.activated? - -%p= @service.description - -.back-link - = link_to ci_project_services_path(@project) do - ← to services - -%hr - -= form_for(@service, as: :service, url: ci_project_service_path(@project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |f| - - if @service.errors.any? - .alert.alert-danger - %ul - - @service.errors.full_messages.each do |msg| - %li= msg - - - if @service.help.present? - .bs-callout - = @service.help - - .form-group - = f.label :active, "Active", class: "control-label" - .col-sm-10 - = f.check_box :active - - - @service.fields.each do |field| - - name = field[:name] - - label = field[:label] || name - - value = @service.send(name) - - type = field[:type] - - placeholder = field[:placeholder] - - choices = field[:choices] - - default_choice = field[:default_choice] - - help = field[:help] - - .form-group - = f.label label, class: "control-label" - .col-sm-10 - - if type == 'text' - = f.text_field name, class: "form-control", placeholder: placeholder - - elsif type == 'textarea' - = f.text_area name, rows: 5, class: "form-control", placeholder: placeholder - - elsif type == 'checkbox' - = f.check_box name - - elsif type == 'select' - = f.select name, options_for_select(choices, value ? value : default_choice), {}, { class: "form-control" } - - if help - .light #{help} - - .form-actions - = f.submit 'Save', class: 'btn btn-save' -   - - if @service.valid? && @service.activated? && @service.can_test? - = link_to 'Test settings', test_ci_project_service_path(@project, @service.to_param), class: 'btn' diff --git a/app/views/ci/services/edit.html.haml b/app/views/ci/services/edit.html.haml deleted file mode 100644 index bcc5832792f..00000000000 --- a/app/views/ci/services/edit.html.haml +++ /dev/null @@ -1 +0,0 @@ -= render 'form' diff --git a/app/views/ci/services/index.html.haml b/app/views/ci/services/index.html.haml deleted file mode 100644 index 37e5723b541..00000000000 --- a/app/views/ci/services/index.html.haml +++ /dev/null @@ -1,22 +0,0 @@ -%h3.page-title Project services -%p.light Project services allow you to integrate GitLab CI with other applications - -%table.table - %thead - %tr - %th - %th Service - %th Desription - %th Last edit - - @services.sort_by(&:title).each do |service| - %tr - %td - = boolean_to_icon service.activated? - %td - = link_to edit_ci_project_service_path(@project, service.to_param) do - %strong= service.title - %td - = service.description - %td.light - = time_ago_in_words service.updated_at - ago diff --git a/app/views/layouts/ci/_nav_project.html.haml b/app/views/layouts/ci/_nav_project.html.haml index db631f24656..f094edbfa87 100644 --- a/app/views/layouts/ci/_nav_project.html.haml +++ b/app/views/layouts/ci/_nav_project.html.haml @@ -5,11 +5,6 @@ %span Back to project %li.separate-item - = nav_link path: ['services#index', 'services#edit'] do - = link_to ci_project_services_path(@project) do - = icon('share fw') - %span - Services = nav_link path: 'events#index' do = link_to ci_project_events_path(@project) do = icon('book fw') diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml index f618a18870b..954dbe5d2b9 100644 --- a/app/views/layouts/nav/_project_settings.html.haml +++ b/app/views/layouts/nav/_project_settings.html.haml @@ -60,8 +60,8 @@ = icon('building fw') %span CI Settings - = nav_link path: ['ci/services#index', 'ci/services#edit'] do - = link_to ci_project_services_path(@project.gitlab_ci_project) do + = nav_link controller: 'ci_services' do + = link_to namespace_project_ci_services_path(@project.namespace, @project) do = icon('share fw') %span CI Services diff --git a/app/views/projects/ci_services/_form.html.haml b/app/views/projects/ci_services/_form.html.haml new file mode 100644 index 00000000000..397832e56db --- /dev/null +++ b/app/views/projects/ci_services/_form.html.haml @@ -0,0 +1,54 @@ +%h3.page-title + = @service.title + = boolean_to_icon @service.activated? + +%p= @service.description + + +%hr + += form_for(@service, as: :service, url: namespace_project_ci_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |f| + - if @service.errors.any? + .alert.alert-danger + %ul + - @service.errors.full_messages.each do |msg| + %li= msg + + - if @service.help.present? + .bs-callout + = @service.help + + .form-group + = f.label :active, "Active", class: "control-label" + .col-sm-10 + = f.check_box :active + + - @service.fields.each do |field| + - name = field[:name] + - label = field[:label] || name + - value = @service.send(name) + - type = field[:type] + - placeholder = field[:placeholder] + - choices = field[:choices] + - default_choice = field[:default_choice] + - help = field[:help] + + .form-group + = f.label label, class: "control-label" + .col-sm-10 + - if type == 'text' + = f.text_field name, class: "form-control", placeholder: placeholder + - elsif type == 'textarea' + = f.text_area name, rows: 5, class: "form-control", placeholder: placeholder + - elsif type == 'checkbox' + = f.check_box name + - elsif type == 'select' + = f.select name, options_for_select(choices, value ? value : default_choice), {}, { class: "form-control" } + - if help + .light #{help} + + .form-actions + = f.submit 'Save', class: 'btn btn-save' +   + - if @service.valid? && @service.activated? && @service.can_test? + = link_to 'Test settings', test_namespace_project_ci_service_path(@project.namespace, @project, @service.to_param), class: 'btn' diff --git a/app/views/projects/ci_services/edit.html.haml b/app/views/projects/ci_services/edit.html.haml new file mode 100644 index 00000000000..bcc5832792f --- /dev/null +++ b/app/views/projects/ci_services/edit.html.haml @@ -0,0 +1 @@ += render 'form' diff --git a/app/views/projects/ci_services/index.html.haml b/app/views/projects/ci_services/index.html.haml new file mode 100644 index 00000000000..c78b21884a3 --- /dev/null +++ b/app/views/projects/ci_services/index.html.haml @@ -0,0 +1,22 @@ +%h3.page-title Project services +%p.light Project services allow you to integrate GitLab CI with other applications + +%table.table + %thead + %tr + %th + %th Service + %th Desription + %th Last edit + - @services.sort_by(&:title).each do |service| + %tr + %td + = boolean_to_icon service.activated? + %td + = link_to edit_namespace_project_ci_service_path(@project.namespace, @project, service.to_param) do + %strong= service.title + %td + = service.description + %td.light + = time_ago_in_words service.updated_at + ago -- cgit v1.2.1 From dfbbc80611fbdafe6f5ed809f98fc63987d104a6 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 6 Oct 2015 09:57:13 -0700 Subject: Support filtering by "Any" milestone or issue and fix "No Milestone" and "No Label" filters Closes #2619 Closes https://github.com/gitlabhq/gitlabhq/issues/9631 --- app/views/shared/issuable/_filter.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml index 8f16773077e..6e6d497c1d2 100644 --- a/app/views/shared/issuable/_filter.html.haml +++ b/app/views/shared/issuable/_filter.html.haml @@ -39,13 +39,13 @@ .filter-item.inline.milestone-filter = select_tag('milestone_title', projects_milestones_options, - class: 'select2 trigger-submit', include_blank: true, + class: 'select2 trigger-submit', include_blank: 'Any', data: {placeholder: 'Milestone'}) - if @project .filter-item.inline.labels-filter = select_tag('label_name', project_labels_options(@project), - class: 'select2 trigger-submit', include_blank: true, + class: 'select2 trigger-submit', include_blank: 'Any', data: {placeholder: 'Label'}) .pull-right -- cgit v1.2.1 From 7ad4521f66b578c0aecf9afb09194626a4c2aa6a Mon Sep 17 00:00:00 2001 From: Andrey Date: Mon, 5 Oct 2015 21:18:21 +0200 Subject: Fixes to dropdown, font colors for new project and merge request --- app/views/projects/merge_requests/_show.html.haml | 2 +- app/views/projects/new.html.haml | 20 ++++++++++---------- app/views/projects/notes/_form.html.haml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml index 0b0f52c653c..58d8478744e 100644 --- a/app/views/projects/merge_requests/_show.html.haml +++ b/app/views/projects/merge_requests/_show.html.haml @@ -24,7 +24,7 @@ %ul.dropdown-menu %li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch) %li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff) - .light + .normal %span Request to merge %span.label-branch #{source_branch_with_namespace(@merge_request)} %span into diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index bccea21e7a8..1b093c8f514 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -8,7 +8,7 @@ = form_for @project, html: { class: 'new_project form-horizontal js-requires-input' } do |f| .form-group.project-name-holder = f.label :path, class: 'control-label' do - %strong Project path + Project path .col-sm-10 .input-group = f.text_field :path, placeholder: "my-awesome-project", class: "form-control", tabindex: 1, autofocus: true, required: true @@ -23,7 +23,6 @@ = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'select2', tabindex: 2} - if import_sources_enabled? - %hr .project-import.js-toggle-container .form-group @@ -35,7 +34,7 @@ %i.fa.fa-github GitHub - else - = link_to '#', class: 'how_to_import_link light btn import_github' do + = link_to '#', class: 'how_to_import_link btn import_github' do %i.fa.fa-github GitHub = render 'github_import_modal' @@ -46,7 +45,7 @@ %i.fa.fa-bitbucket Bitbucket - else - = link_to status_import_bitbucket_path, class: 'how_to_import_link light btn import_bitbucket', "data-no-turbolink" => "true" do + = link_to status_import_bitbucket_path, class: 'how_to_import_link btn import_bitbucket', "data-no-turbolink" => "true" do %i.fa.fa-bitbucket Bitbucket = render 'bitbucket_import_modal' @@ -57,7 +56,7 @@ %i.fa.fa-heart GitLab.com - else - = link_to status_import_gitlab_path, class: 'how_to_import_link light btn import_gitlab' do + = link_to status_import_gitlab_path, class: 'how_to_import_link btn import_gitlab' do %i.fa.fa-heart GitLab.com = render 'gitlab_import_modal' @@ -97,7 +96,7 @@ %li To migrate an SVN repository, check out #{link_to "this document", "http://doc.gitlab.com/ce/workflow/importing/migrating_from_svn.html"}. - %hr.prepend-botton-10 + .prepend-botton-10 .form-group = f.label :description, class: 'control-label' do @@ -112,10 +111,11 @@ - if current_user.can_create_group? .pull-right - .light - Need a group for several dependent projects? - = link_to new_group_path, class: "btn btn-xs" do - Create a group + .light.in-line + .space-right + Need a group for several dependent projects? + = link_to new_group_path, class: "btn btn-xs" do + Create a group .save-project-loader.hide .center diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index d99445da59a..512ccd48b38 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -14,6 +14,6 @@ .note-form-actions .buttons.clearfix - = f.submit 'Add Comment', class: "btn comment-btn btn-grouped js-comment-button" + = f.submit 'Add Comment', class: "btn btn-green comment-btn btn-grouped js-comment-button" = yield(:note_actions) %a.btn.grouped.js-close-discussion-note-form Cancel -- cgit v1.2.1 From 7f63a8787ce454a61f72393ccbe22fc283ba8313 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 7 Oct 2015 17:54:49 +0200 Subject: Fix tests and few CI features Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/ci_settings/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/ci_settings/_form.html.haml b/app/views/projects/ci_settings/_form.html.haml index 34125550206..d711413c6b9 100644 --- a/app/views/projects/ci_settings/_form.html.haml +++ b/app/views/projects/ci_settings/_form.html.haml @@ -8,7 +8,7 @@ Edit your #{link_to ".gitlab-ci.yml using web-editor", yaml_web_editor_link(@ci_project)} -- if @repository +- unless @project.empty_repo? %p Paste build status image for #{@repository.root_ref} with next link = link_to '#', class: 'badge-codes-toggle btn btn-default btn-xs' do -- cgit v1.2.1 From de3ff174e70a9048fc8f23cd5ee0c709471f3651 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Mon, 5 Oct 2015 18:20:43 -0400 Subject: Quick Submit all the things! Adds quick submit behavior to the forms for: - Blobs ("new file") - Commit messages - Issuables - Notes - Labels - Milestones - Wikis --- app/views/projects/blob/_editor.html.haml | 2 +- app/views/projects/blob/new.html.haml | 2 +- app/views/projects/labels/_form.html.haml | 2 +- app/views/projects/milestones/_form.html.haml | 4 ++-- app/views/projects/notes/_edit_form.html.haml | 2 +- app/views/projects/notes/_form.html.haml | 2 +- app/views/projects/wikis/_form.html.haml | 2 +- app/views/shared/_commit_message_container.html.haml | 2 +- app/views/shared/issuable/_form.html.haml | 4 ++-- 9 files changed, 11 insertions(+), 11 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 9c3e1703c89..f1ad0c3c403 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -11,7 +11,7 @@ - if current_action?(:new) || current_action?(:create) \/ = text_field_tag 'file_name', params[:file_name], placeholder: "File name", - required: true, class: 'form-control new-file-name' + required: true, class: 'form-control new-file-name js-quick-submit' .pull-right = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'form-control' diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index d7987e24ef3..7975137c37f 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -15,7 +15,7 @@ = label_tag 'branch', class: 'control-label' do Branch .col-sm-10 - = text_field_tag 'new_branch', @ref, class: "form-control" + = text_field_tag 'new_branch', @ref, class: "form-control js-quick-submit" = hidden_field_tag 'content', '', id: 'file-content' = render 'projects/commit_button', ref: @ref, diff --git a/app/views/projects/labels/_form.html.haml b/app/views/projects/labels/_form.html.haml index 534c545329b..4cf13492e99 100644 --- a/app/views/projects/labels/_form.html.haml +++ b/app/views/projects/labels/_form.html.haml @@ -10,7 +10,7 @@ .form-group = f.label :title, class: 'control-label' .col-sm-10 - = f.text_field :title, class: "form-control", required: true + = f.text_field :title, class: "form-control js-quick-submit", required: true .form-group = f.label :color, "Background Color", class: 'control-label' .col-sm-10 diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index 74e9668052d..255ddab479f 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -16,13 +16,13 @@ .form-group = f.label :title, "Title", class: "control-label" .col-sm-10 - = f.text_field :title, maxlength: 255, class: "form-control", required: true + = f.text_field :title, maxlength: 255, class: "form-control js-quick-submit", required: true %p.hint Required .form-group.milestone-description = f.label :description, "Description", class: "control-label" .col-sm-10 = render layout: 'projects/md_preview', locals: { preview_class: "md-preview" } do - = render 'projects/zen', f: f, attr: :description, classes: 'description form-control' + = render 'projects/zen', f: f, attr: :description, classes: 'description form-control js-quick-submit' .hint .pull-left Milestones are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}. .pull-left Attach files by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }. diff --git a/app/views/projects/notes/_edit_form.html.haml b/app/views/projects/notes/_edit_form.html.haml index a0e26f9827e..a21c019986a 100644 --- a/app/views/projects/notes/_edit_form.html.haml +++ b/app/views/projects/notes/_edit_form.html.haml @@ -2,7 +2,7 @@ = form_for note, url: namespace_project_note_path(@project.namespace, @project, note), method: :put, remote: true, authenticity_token: true do |f| = note_target_fields(note) = render layout: 'projects/md_preview', locals: { preview_class: 'md-preview' } do - = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field' + = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field js-quick-submit' = render 'projects/notes/hints' .note-form-actions diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index 512ccd48b38..13dfa0a1bb3 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -8,7 +8,7 @@ = f.hidden_field :noteable_type = render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do - = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text' + = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-quick-submit' = render 'projects/notes/hints' .error-alert diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml index 05d754adbe5..261d4a92d7d 100644 --- a/app/views/projects/wikis/_form.html.haml +++ b/app/views/projects/wikis/_form.html.haml @@ -22,7 +22,7 @@ = f.label :content, class: 'control-label' .col-sm-10 = render layout: 'projects/md_preview', locals: { preview_class: "md-preview" } do - = render 'projects/zen', f: f, attr: :content, classes: 'description form-control' + = render 'projects/zen', f: f, attr: :content, classes: 'description form-control js-quick-submit' .col-sm-12.hint .pull-left Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'} .pull-right Attach files by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }. diff --git a/app/views/shared/_commit_message_container.html.haml b/app/views/shared/_commit_message_container.html.haml index 5071ff640f1..cc3f1268f8b 100644 --- a/app/views/shared/_commit_message_container.html.haml +++ b/app/views/shared/_commit_message_container.html.haml @@ -6,7 +6,7 @@ .max-width-marker = text_area_tag 'commit_message', (params[:commit_message] || local_assigns[:text]), - class: 'form-control', placeholder: local_assigns[:placeholder], + class: 'form-control js-quick-submit', placeholder: local_assigns[:placeholder], required: true, rows: (local_assigns[:rows] || 3) - if local_assigns[:hint] %p.hint diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 33ec726e93c..594e54f404c 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -10,7 +10,7 @@ %strong= 'Title *' .col-sm-10 = f.text_field :title, maxlength: 255, autofocus: true, autocomplete: 'off', - class: 'form-control pad js-gfm-input', required: true + class: 'form-control pad js-gfm-input js-quick-submit', required: true - if issuable.is_a?(MergeRequest) %p.help-block @@ -26,7 +26,7 @@ = render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do = render 'projects/zen', f: f, attr: :description, - classes: 'description form-control' + classes: 'description form-control js-quick-submit' .col-sm-12.hint .pull-left Parsed with -- cgit v1.2.1 From 057b1c317bd27461cce93d93399909e67869b159 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 8 Oct 2015 13:29:14 +0200 Subject: Add new GitLab colors Signed-off-by: Dmitriy Zaporozhets --- app/views/help/ui.html.haml | 1 + app/views/projects/merge_requests/_show.html.haml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/help/ui.html.haml b/app/views/help/ui.html.haml index 7c89457ace3..1bd271477e4 100644 --- a/app/views/help/ui.html.haml +++ b/app/views/help/ui.html.haml @@ -107,6 +107,7 @@ .example %button.btn.btn-default{:type => "button"} Default + %button.btn.btn-gray{:type => "button"} Gray %button.btn.btn-primary{:type => "button"} Primary %button.btn.btn-success{:type => "button"} Success %button.btn.btn-info{:type => "button"} Info diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml index 58d8478744e..e7ac7a0eaa4 100644 --- a/app/views/projects/merge_requests/_show.html.haml +++ b/app/views/projects/merge_requests/_show.html.haml @@ -34,7 +34,7 @@ = render "projects/merge_requests/widget/show.html.haml" - if @merge_request.open? && @merge_request.can_be_merged? - .light + .light.append-bottom-20 You can also accept this merge request manually using the = link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal" -- cgit v1.2.1 From dc400a7414e5b26893d002ce42bfaf15c0ccae79 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 8 Oct 2015 13:47:59 +0200 Subject: Improve help/ui page Signed-off-by: Dmitriy Zaporozhets --- app/views/help/ui.html.haml | 51 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/help/ui.html.haml b/app/views/help/ui.html.haml index 1bd271477e4..2169a821fb2 100644 --- a/app/views/help/ui.html.haml +++ b/app/views/help/ui.html.haml @@ -14,6 +14,8 @@ = link_to 'Lists', '#lists' %li = link_to 'Tables', '#tables' + %li + = link_to 'Nav', '#nav' %li = link_to 'Buttons', '#buttons' %li @@ -30,16 +32,31 @@ %h2#blocks Blocks %h3 - %code .well + %code .gray-content-block + - .well - %h4 Something + .gray-content-block.middle-block + %h4 Normal block inside content + = lorem + + .gray-content-block.second-block + %h4 Second block = lorem %h2#lists Lists + %h3 + %code .content-list + %ul.content-list + %li + One item + %li + One item + %li + One item + %h3 %code .well-list %ul.well-list @@ -102,6 +119,34 @@ %td the Bird %td @twitter + %h2#navs Navigation + + %h3 + %code .center-top-menu + .example + %ul.center-top-menu + %li.active + %a Open + %li + %a Closed + + %h3 + %code .btn-group.btn-group-next + .example + %div.btn-group.btn-group-next + %a.btn.active Open + %a.btn Closed + + + %h3 + %code .nav.nav-tabs + .example + %ul.nav.nav-tabs + %li.active + %a Open + %li + %a Closed + %h2#buttons Buttons -- cgit v1.2.1 From fce4f1380319d3436e66cc530f272e25350c3cf9 Mon Sep 17 00:00:00 2001 From: Drew Blessing Date: Fri, 25 Sep 2015 13:38:12 -0500 Subject: Show message if user tries to fork and has no available namespaces --- app/views/projects/forks/new.html.haml | 63 ++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 29 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml index cd5f3a5d39e..f0b0a11c04a 100644 --- a/app/views/projects/forks/new.html.haml +++ b/app/views/projects/forks/new.html.haml @@ -1,36 +1,41 @@ - page_title "Fork project" -%h3.page-title Fork project -%p.lead - Click to fork the project to a user or group -%hr +- if @namespaces.present? + %h3.page-title Fork project + %p.lead + Click to fork the project to a user or group + %hr -.fork-namespaces - - @namespaces.in_groups_of(6, false) do |group| - .row - - group.each do |namespace| - .col-md-2.col-sm-3 - - if fork = namespace.find_fork_of(@project) - .fork-thumbnail - = link_to project_path(fork), title: "Visit project fork", class: 'has_tooltip' do - = image_tag namespace_icon(namespace, 100) - .caption - %strong - = namespace.human_name - %div.text-primary - Already forked + .fork-namespaces + - @namespaces.in_groups_of(6, false) do |group| + .row + - group.each do |namespace| + .col-md-2.col-sm-3 + - if fork = namespace.find_fork_of(@project) + .fork-thumbnail + = link_to project_path(fork), title: "Visit project fork", class: 'has_tooltip' do + = image_tag namespace_icon(namespace, 100) + .caption + %strong + = namespace.human_name + %div.text-primary + Already forked - - else - .fork-thumbnail - = link_to namespace_project_fork_path(@project.namespace, @project, namespace_key: namespace.id), title: "Fork here", method: "POST", class: 'has_tooltip' do - = image_tag namespace_icon(namespace, 100) - .caption - %strong - = namespace.human_name + - else + .fork-thumbnail + = link_to namespace_project_fork_path(@project.namespace, @project, namespace_key: namespace.id), title: "Fork here", method: "POST", class: 'has_tooltip' do + = image_tag namespace_icon(namespace, 100) + .caption + %strong + = namespace.human_name - %p.light - Fork is a copy of a project repository. - %br - Forking a repository allows you to do changes without affecting the original project. + %p.light + Fork is a copy of a project repository. + %br + Forking a repository allows you to do changes without affecting the original project. +- else + %h3 No available namespaces to fork the project + %p.slead + You must have permission to create a project in a namespace before forking. .save-project-loader.hide .center -- cgit v1.2.1 From b60bc655f2e1318f448f3a3d884437677c1135b7 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 8 Oct 2015 21:24:55 -0700 Subject: Restore placeholders in issue filters from "Any" to "Milestone" and "Label" 1f11096c included new filters but made it hard to determine which dropdown did what. This patch restores the original placeholders. --- app/views/shared/issuable/_filter.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml index 6e6d497c1d2..8f16773077e 100644 --- a/app/views/shared/issuable/_filter.html.haml +++ b/app/views/shared/issuable/_filter.html.haml @@ -39,13 +39,13 @@ .filter-item.inline.milestone-filter = select_tag('milestone_title', projects_milestones_options, - class: 'select2 trigger-submit', include_blank: 'Any', + class: 'select2 trigger-submit', include_blank: true, data: {placeholder: 'Milestone'}) - if @project .filter-item.inline.labels-filter = select_tag('label_name', project_labels_options(@project), - class: 'select2 trigger-submit', include_blank: 'Any', + class: 'select2 trigger-submit', include_blank: true, data: {placeholder: 'Label'}) .pull-right -- cgit v1.2.1 From b5d9a613d98dc5ae629bdc004f19be7c8e5fcd8e Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 8 Oct 2015 13:22:34 -0700 Subject: Make diff file view easier to use on mobile screens --- app/views/projects/diffs/_file.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index 4617b188150..9698921f6da 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -16,7 +16,7 @@ - if diff_file.mode_changed? %span.file-mode= "#{diff_file.diff.a_mode} → #{diff_file.diff.b_mode}" - .diff-btn-group + .diff-controls - if blob.text? = link_to '#', class: 'js-toggle-diff-comments btn btn-sm active has_tooltip', title: "Toggle comments for this file" do %i.fa.fa-comments -- cgit v1.2.1 From 972b6370819f61eb04d1f0e795b4b6c4ddc2327a Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Fri, 9 Oct 2015 05:30:42 -0700 Subject: In SSH key detailed view, align the "Remove" button with the right container --- app/views/profiles/keys/_key_details.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/profiles/keys/_key_details.html.haml b/app/views/profiles/keys/_key_details.html.haml index e0ae4d9720f..0ca8bd95157 100644 --- a/app/views/profiles/keys/_key_details.html.haml +++ b/app/views/profiles/keys/_key_details.html.haml @@ -18,5 +18,6 @@ %code.key-fingerprint= @key.fingerprint %pre.well-pre = @key.key - .pull-right - = link_to 'Remove', path_to_key(@key, is_admin), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key" + .col-md-12 + .pull-right + = link_to 'Remove', path_to_key(@key, is_admin), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key" -- cgit v1.2.1 From a972ce17caadc64fc6fa1888301e99c149848f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A7=D0=B8=D0=BD=D0=B3=D0=B8=D0=B7=20=D0=90=D1=83=D0=B0?= =?UTF-8?q?=D0=BD=D0=B0=D1=81=D0=BE=D0=B2?= Date: Sat, 10 Oct 2015 14:07:12 +0600 Subject: + and Titleize New Project button on dashboard --- app/views/dashboard/projects/_projects.html.haml | 2 +- app/views/groups/_projects.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/dashboard/projects/_projects.html.haml b/app/views/dashboard/projects/_projects.html.haml index e09e032a7f1..30372e98430 100644 --- a/app/views/dashboard/projects/_projects.html.haml +++ b/app/views/dashboard/projects/_projects.html.haml @@ -5,6 +5,6 @@ - if current_user.can_create_project? %span.input-group-btn = link_to new_project_path, class: 'btn btn-green' do - New project + + New Project = render 'shared/projects/list', projects: @projects, ci: true diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml index 2b27a88794d..9c73f7a0ef7 100644 --- a/app/views/groups/_projects.html.haml +++ b/app/views/groups/_projects.html.haml @@ -5,6 +5,6 @@ - if can? current_user, :create_projects, @group %span.input-group-btn = link_to new_project_path(namespace_id: @group.id), class: 'btn btn-green' do - New project + + New Project = render 'shared/projects/list', projects: @projects, projects_limit: 20, stars: false -- cgit v1.2.1 From 78de79d779c1eb8b462fd1b5beb9f9e38bfb6f36 Mon Sep 17 00:00:00 2001 From: Jerry Lukins Date: Thu, 8 Oct 2015 07:53:05 -0400 Subject: Persist filters when sorting on user admin page --- app/views/admin/users/index.html.haml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index e3698ac1c46..97e4bb2fd73 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -54,19 +54,19 @@ %b.caret %ul.dropdown-menu %li - = link_to admin_users_path(sort: sort_value_name) do + = link_to admin_users_path(sort: sort_value_name, filter: params[:filter]) do = sort_title_name - = link_to admin_users_path(sort: sort_value_recently_signin) do + = link_to admin_users_path(sort: sort_value_recently_signin, filter: params[:filter]) do = sort_title_recently_signin - = link_to admin_users_path(sort: sort_value_oldest_signin) do + = link_to admin_users_path(sort: sort_value_oldest_signin, filter: params[:filter]) do = sort_title_oldest_signin - = link_to admin_users_path(sort: sort_value_recently_created) do + = link_to admin_users_path(sort: sort_value_recently_created, filter: params[:filter]) do = sort_title_recently_created - = link_to admin_users_path(sort: sort_value_oldest_created) do + = link_to admin_users_path(sort: sort_value_oldest_created, filter: params[:filter]) do = sort_title_oldest_created - = link_to admin_users_path(sort: sort_value_recently_updated) do + = link_to admin_users_path(sort: sort_value_recently_updated, filter: params[:filter]) do = sort_title_recently_updated - = link_to admin_users_path(sort: sort_value_oldest_updated) do + = link_to admin_users_path(sort: sort_value_oldest_updated, filter: params[:filter]) do = sort_title_oldest_updated = link_to 'New User', new_admin_user_path, class: "btn btn-new btn-sm" -- cgit v1.2.1 From 914cfbd2f154ed3154a7dc3cee3309713eea786f Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 6 Oct 2015 12:01:16 +0200 Subject: Implement Commit Status API --- app/views/projects/builds/_build.html.haml | 50 --------------------- app/views/projects/builds/show.html.haml | 6 +-- app/views/projects/commit/ci.html.haml | 36 ++++++++++++--- .../commit_statuses/_commit_status.html.haml | 52 ++++++++++++++++++++++ 4 files changed, 84 insertions(+), 60 deletions(-) delete mode 100644 app/views/projects/builds/_build.html.haml create mode 100644 app/views/projects/commit_statuses/_commit_status.html.haml (limited to 'app/views') diff --git a/app/views/projects/builds/_build.html.haml b/app/views/projects/builds/_build.html.haml deleted file mode 100644 index 65fd9413b60..00000000000 --- a/app/views/projects/builds/_build.html.haml +++ /dev/null @@ -1,50 +0,0 @@ -- gl_project = build.project.gl_project -%tr.build - %td.status - = ci_status_with_icon(build.status) - - %td.build-link - = link_to namespace_project_build_path(gl_project.namespace, gl_project, build) do - %strong Build ##{build.id} - - - if defined?(ref) - %td - = build.ref - - %td - = build.stage - - %td - = build.name - .pull-right - - if build.tags.any? - - build.tag_list.each do |tag| - %span.label.label-primary - = tag - - if build.trigger_request - %span.label.label-info triggered - - if build.allow_failure - %span.label.label-danger allowed to fail - - %td.duration - - if build.duration - #{duration_in_words(build.finished_at, build.started_at)} - - %td.timestamp - - if build.finished_at - %span #{time_ago_in_words build.finished_at} ago - - - if build.project.coverage_enabled? - %td.coverage - - if build.coverage - #{build.coverage}% - - %td - - if defined?(controls) && current_user && can?(current_user, :manage_builds, gl_project) - .pull-right - - if build.active? - = link_to cancel_namespace_project_build_path(gl_project.namespace, gl_project, build, return_to: request.original_url), title: 'Cancel build' do - %i.fa.fa-remove.cred - - elsif build.commands.present? - = link_to retry_namespace_project_build_path(gl_project.namespace, gl_project, build, return_to: request.original_url), method: :post, title: 'Retry build' do - %i.fa.fa-repeat diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index b561078e8c7..66e668f3771 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -7,9 +7,9 @@ %code #{@build.ref} #up-build-trace - - if @commit.matrix_for_ref?(@build.ref) + - if @commit.matrix?(@build.ref) %ul.center-top-menu.build-top-menu - - @commit.builds_without_retry_for_ref(@build.ref).each do |build| + - @commit.builds_without_retry(@build.ref).each do |build| %li{class: ('active' if build == @build) } = link_to namespace_project_build_path(@project.namespace, @project, build) do = ci_icon_for_status(build.status) @@ -20,7 +20,7 @@ = build.id - - unless @commit.builds_without_retry_for_ref(@build.ref).include?(@build) + - unless @commit.builds_without_retry(@build.ref).include?(@build) %li.active %a Build ##{@build.id} diff --git a/app/views/projects/commit/ci.html.haml b/app/views/projects/commit/ci.html.haml index 26ab38445c2..7f106631cac 100644 --- a/app/views/projects/commit/ci.html.haml +++ b/app/views/projects/commit/ci.html.haml @@ -20,13 +20,35 @@ .bs-callout.bs-callout-warning \.gitlab-ci.yml not found in this commit -- @ci_commit.refs.each do |ref| +- if @ci_commit.refs.blank? + .gray-content-block.second-block + Latest builds + - if @ci_commit.duration > 0 + %small.pull-right + %i.fa.fa-time + #{time_interval_in_words @ci_commit.duration} + + %table.table.builds + %thead + %tr + %th Status + %th Build ID + %th Stage + %th Name + %th Duration + %th Finished at + - if @ci_project && @ci_project.coverage_enabled? + %th Coverage + %th + = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.statuses.latest, coverage: @ci_project.try(:coverage_enabled?), controls: true + +- @ci_commit.refs.sort.each do |ref| .gray-content-block.second-block Builds for #{ref} - - if @ci_commit.duration_for_ref(ref) > 0 + - if @ci_commit.duration(ref) > 0 %small.pull-right %i.fa.fa-time - #{time_interval_in_words @ci_commit.duration_for_ref(ref)} + #{time_interval_in_words @ci_commit.duration(ref)} %table.table.builds %thead @@ -40,10 +62,10 @@ - if @ci_project && @ci_project.coverage_enabled? %th Coverage %th - = render partial: "projects/builds/build", collection: @ci_commit.builds_without_retry.for_ref(ref), controls: true + = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.statuses.for_ref(ref).latest, coverage: @ci_project.try(:coverage_enabled?), controls: true -- if @ci_commit.retried_builds.any? - %h3 +- if @ci_commit.retried.any? + .gray-content-block.second-block Retried builds %table.table.builds @@ -59,4 +81,4 @@ - if @ci_project && @ci_project.coverage_enabled? %th Coverage %th - = render partial: "projects/builds/build", collection: @ci_commit.retried_builds, ref: true + = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.retried, coverage: @ci_project.try(:coverage_enabled?), ref: true diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml new file mode 100644 index 00000000000..f79929c70bf --- /dev/null +++ b/app/views/projects/commit_statuses/_commit_status.html.haml @@ -0,0 +1,52 @@ +%tr.commit_status + %td.status + = ci_status_with_icon(commit_status.status) + + %td.commit_status-link + - if commit_status.target_url + = link_to commit_status.target_url do + %strong Build ##{commit_status.id} + - else + %strong Build ##{commit_status.id} + + - if defined?(ref) + %td + = commit_status.ref + + %td + = commit_status.stage + + %td + = commit_status.description + .pull-right + - if commit_status.tags.any? + - commit_status.tags.each do |tag| + %span.label.label-primary + = tag + - if commit_status.try(:trigger_request) + %span.label.label-info triggered + - if commit_status.try(:allow_failure) + %span.label.label-danger allowed to fail + + %td.duration + - if commit_status.duration + #{duration_in_words(commit_status.finished_at, commit_status.started_at)} + + %td.timestamp + - if commit_status.finished_at + %span #{time_ago_in_words commit_status.finished_at} ago + + - if defined?(coverage) + %td.coverage + - if commit_status.try(:coverage) + #{commit_status.coverage}% + + %td + - if defined?(controls) && current_user && can?(current_user, :manage_builds, gl_project) + .pull-right + - if commit_status.active? + = link_to cancel_namespace_project_build_path(gl_project.namespace, gl_project, commit_status, return_to: request.original_url), title: 'Cancel commit_status' do + %i.fa.fa-remove.cred + - elsif commit_status.commands.present? + = link_to retry_namespace_project_build_path(gl_project.namespace, gl_project, commit_status, return_to: request.original_url), method: :post, title: 'Retry commit_status' do + %i.fa.fa-repeat -- cgit v1.2.1 From d805c5dbb3c2fde0a3b97f86a2dd3abc35e72bd9 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Fri, 9 Oct 2015 19:08:37 +0300 Subject: Add spellcheck=false to certain input fields --- app/views/admin/users/index.html.haml | 2 +- app/views/ci/admin/runners/index.html.haml | 2 +- app/views/ci/admin/runners/show.html.haml | 2 +- app/views/dashboard/projects/_projects.html.haml | 2 +- app/views/explore/groups/index.html.haml | 2 +- app/views/explore/projects/_filter.html.haml | 2 +- app/views/groups/_projects.html.haml | 2 +- app/views/groups/group_members/index.html.haml | 2 +- app/views/layouts/_search.html.haml | 2 +- app/views/projects/project_members/index.html.haml | 2 +- app/views/search/_form.html.haml | 2 +- app/views/shared/issuable/_search_form.html.haml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index e3698ac1c46..71e15d555d3 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -32,7 +32,7 @@ %hr = form_tag admin_users_path, method: :get, class: 'form-inline' do .form-group - = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control' + = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control', spellcheck: false = hidden_field_tag "filter", params[:filter] = button_tag class: 'btn btn-primary' do %i.fa.fa-search diff --git a/app/views/ci/admin/runners/index.html.haml b/app/views/ci/admin/runners/index.html.haml index b9d6703ff41..01ce81b4476 100644 --- a/app/views/ci/admin/runners/index.html.haml +++ b/app/views/ci/admin/runners/index.html.haml @@ -27,7 +27,7 @@ .pull-left = form_tag ci_admin_runners_path, id: 'runners-search', class: 'form-inline', method: :get do .form-group - = search_field_tag :search, params[:search], class: 'form-control', placeholder: 'Runner description or token' + = search_field_tag :search, params[:search], class: 'form-control', placeholder: 'Runner description or token', spellcheck: false = submit_tag 'Search', class: 'btn' .pull-right.light diff --git a/app/views/ci/admin/runners/show.html.haml b/app/views/ci/admin/runners/show.html.haml index 5bb442cbf92..92787b2e6ac 100644 --- a/app/views/ci/admin/runners/show.html.haml +++ b/app/views/ci/admin/runners/show.html.haml @@ -76,7 +76,7 @@ %td = form_tag ci_admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do .form-group - = search_field_tag :search, params[:search], class: 'form-control' + = search_field_tag :search, params[:search], class: 'form-control', spellcheck: false = submit_tag 'Search', class: 'btn' %td diff --git a/app/views/dashboard/projects/_projects.html.haml b/app/views/dashboard/projects/_projects.html.haml index e09e032a7f1..d0194a17b01 100644 --- a/app/views/dashboard/projects/_projects.html.haml +++ b/app/views/dashboard/projects/_projects.html.haml @@ -1,7 +1,7 @@ .projects-list-holder .projects-search-form .input-group - = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control' + = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false - if current_user.can_create_project? %span.input-group-btn = link_to new_project_path, class: 'btn btn-green' do diff --git a/app/views/explore/groups/index.html.haml b/app/views/explore/groups/index.html.haml index 83d4d321c83..fcb07b04083 100644 --- a/app/views/explore/groups/index.html.haml +++ b/app/views/explore/groups/index.html.haml @@ -11,7 +11,7 @@ = form_tag explore_groups_path, method: :get, class: 'form-inline form-tiny' do |f| = hidden_field_tag :sort, @sort .form-group - = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "groups_search" + = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "groups_search", spellcheck: false .form-group = button_tag 'Search', class: "btn btn-default" diff --git a/app/views/explore/projects/_filter.html.haml b/app/views/explore/projects/_filter.html.haml index 5a3d689d1e5..2761272aa8a 100644 --- a/app/views/explore/projects/_filter.html.haml +++ b/app/views/explore/projects/_filter.html.haml @@ -1,7 +1,7 @@ .pull-left = form_tag explore_projects_filter_path, method: :get, class: 'form-inline form-tiny' do |f| .form-group - = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "projects_search" + = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "projects_search", spellcheck: false .form-group = button_tag 'Search', class: "btn btn-success" diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml index 2b27a88794d..76da3276e47 100644 --- a/app/views/groups/_projects.html.haml +++ b/app/views/groups/_projects.html.haml @@ -1,7 +1,7 @@ .panel.panel-default.projects-list-holder .panel-heading.clearfix .input-group - = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control' + = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false - if can? current_user, :create_projects, @group %span.input-group-btn = link_to new_project_path(namespace_id: @group.id), class: 'btn btn-green' do diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index 3a6d07ebddf..fee4b0052b5 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -12,7 +12,7 @@ .clearfix.js-toggle-container = form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form' do .form-group - = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input' } + = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input', spellcheck: false } = button_tag 'Search', class: 'btn' - if current_user && current_user.can?(:admin_group_member, @group) diff --git a/app/views/layouts/_search.html.haml b/app/views/layouts/_search.html.haml index e2d2dec7ab8..ceb64ce3157 100644 --- a/app/views/layouts/_search.html.haml +++ b/app/views/layouts/_search.html.haml @@ -1,6 +1,6 @@ .search = form_tag search_path, method: :get, class: 'navbar-form pull-left' do |f| - = search_field_tag "search", nil, placeholder: search_placeholder, class: "search-input form-control" + = search_field_tag "search", nil, placeholder: search_placeholder, class: "search-input form-control", spellcheck: false = hidden_field_tag :group_id, @group.try(:id) - if @project && @project.persisted? = hidden_field_tag :project_id, @project.id diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 9a0a824b811..82809bec5b8 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -5,7 +5,7 @@ .clearfix.js-toggle-container = form_tag namespace_project_project_members_path(@project.namespace, @project), method: :get, class: 'form-inline member-search-form' do .form-group - = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input' } + = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input', spellcheck: false } = button_tag 'Search', class: 'btn' - if can?(current_user, :admin_project_member, @project) diff --git a/app/views/search/_form.html.haml b/app/views/search/_form.html.haml index 3938c545cad..17b0981f073 100644 --- a/app/views/search/_form.html.haml +++ b/app/views/search/_form.html.haml @@ -6,7 +6,7 @@ .search-holder.clearfix .input-group - = search_field_tag :search, params[:search], placeholder: "Search for projects, issues etc", class: "form-control search-text-input", id: "dashboard_search", autofocus: true + = search_field_tag :search, params[:search], placeholder: "Search for projects, issues etc", class: "form-control search-text-input", id: "dashboard_search", autofocus: true, spellcheck: false %span.input-group-btn = button_tag 'Search', class: "btn btn-primary" - unless params[:snippets].eql? 'true' diff --git a/app/views/shared/issuable/_search_form.html.haml b/app/views/shared/issuable/_search_form.html.haml index 58c3de64b77..3a5ad00aa91 100644 --- a/app/views/shared/issuable/_search_form.html.haml +++ b/app/views/shared/issuable/_search_form.html.haml @@ -1,6 +1,6 @@ = form_tag(path, method: :get, id: "issue_search_form", class: 'pull-left issue-search-form') do .append-right-10.hidden-xs.hidden-sm - = search_field_tag :issue_search, params[:issue_search], { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input' } + = search_field_tag :issue_search, params[:issue_search], { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input', spellcheck: false } = hidden_field_tag :state, params['state'] = hidden_field_tag :scope, params['scope'] = hidden_field_tag :assignee_id, params['assignee_id'] -- cgit v1.2.1 From 69c04498ef0a49186a667fd44383b9b43690a91e Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 12 Oct 2015 15:45:46 +0200 Subject: Small bug fixes --- .../projects/commit_statuses/_commit_status.html.haml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml index f79929c70bf..14b814bb0d6 100644 --- a/app/views/projects/commit_statuses/_commit_status.html.haml +++ b/app/views/projects/commit_statuses/_commit_status.html.haml @@ -9,7 +9,7 @@ - else %strong Build ##{commit_status.id} - - if defined?(ref) + - if defined?(ref) && ref %td = commit_status.ref @@ -17,7 +17,7 @@ = commit_status.stage %td - = commit_status.description + = commit_status.name .pull-right - if commit_status.tags.any? - commit_status.tags.each do |tag| @@ -36,17 +36,17 @@ - if commit_status.finished_at %span #{time_ago_in_words commit_status.finished_at} ago - - if defined?(coverage) + - if defined?(coverage) && coverage %td.coverage - if commit_status.try(:coverage) #{commit_status.coverage}% %td - - if defined?(controls) && current_user && can?(current_user, :manage_builds, gl_project) + - if defined?(controls) && controls && current_user && can?(current_user, :manage_builds, gl_project) .pull-right - - if commit_status.active? - = link_to cancel_namespace_project_build_path(gl_project.namespace, gl_project, commit_status, return_to: request.original_url), title: 'Cancel commit_status' do + - if commit_status.cancel_url + = link_to commit_status.cancel_url, title: 'Cancel' do %i.fa.fa-remove.cred - - elsif commit_status.commands.present? - = link_to retry_namespace_project_build_path(gl_project.namespace, gl_project, commit_status, return_to: request.original_url), method: :post, title: 'Retry commit_status' do + - elsif commit_status.retry_url + = link_to commit_status.retry_url, method: :post, title: 'Retry' do %i.fa.fa-repeat -- cgit v1.2.1 From 789fe7b4899fb97c48ad363c5ecb1969d78d1536 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 12 Oct 2015 16:32:58 +0200 Subject: Update rendering --- app/views/projects/builds/show.html.haml | 6 +- app/views/projects/commit/ci.html.haml | 67 ++++++++-------------- .../commit_statuses/_commit_status.html.haml | 5 +- 3 files changed, 28 insertions(+), 50 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 66e668f3771..b561078e8c7 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -7,9 +7,9 @@ %code #{@build.ref} #up-build-trace - - if @commit.matrix?(@build.ref) + - if @commit.matrix_for_ref?(@build.ref) %ul.center-top-menu.build-top-menu - - @commit.builds_without_retry(@build.ref).each do |build| + - @commit.builds_without_retry_for_ref(@build.ref).each do |build| %li{class: ('active' if build == @build) } = link_to namespace_project_build_path(@project.namespace, @project, build) do = ci_icon_for_status(build.status) @@ -20,7 +20,7 @@ = build.id - - unless @commit.builds_without_retry(@build.ref).include?(@build) + - unless @commit.builds_without_retry_for_ref(@build.ref).include?(@build) %li.active %a Build ##{@build.id} diff --git a/app/views/projects/commit/ci.html.haml b/app/views/projects/commit/ci.html.haml index 7f106631cac..585f012fe04 100644 --- a/app/views/projects/commit/ci.html.haml +++ b/app/views/projects/commit/ci.html.haml @@ -20,49 +20,28 @@ .bs-callout.bs-callout-warning \.gitlab-ci.yml not found in this commit -- if @ci_commit.refs.blank? - .gray-content-block.second-block - Latest builds - - if @ci_commit.duration > 0 - %small.pull-right - %i.fa.fa-time - #{time_interval_in_words @ci_commit.duration} - - %table.table.builds - %thead - %tr - %th Status - %th Build ID - %th Stage - %th Name - %th Duration - %th Finished at - - if @ci_project && @ci_project.coverage_enabled? - %th Coverage - %th - = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.statuses.latest, coverage: @ci_project.try(:coverage_enabled?), controls: true - -- @ci_commit.refs.sort.each do |ref| - .gray-content-block.second-block - Builds for #{ref} - - if @ci_commit.duration(ref) > 0 - %small.pull-right - %i.fa.fa-time - #{time_interval_in_words @ci_commit.duration(ref)} - - %table.table.builds - %thead - %tr - %th Status - %th Build ID - %th Stage - %th Name - %th Duration - %th Finished at - - if @ci_project && @ci_project.coverage_enabled? - %th Coverage - %th - = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.statuses.for_ref(ref).latest, coverage: @ci_project.try(:coverage_enabled?), controls: true +.gray-content-block.second-block + Latest + - if @ci_commit.duration > 0 + %small.pull-right + %i.fa.fa-time + #{time_interval_in_words @ci_commit.duration} + +%table.table.builds + %thead + %tr + %th Status + %th Build ID + %th Ref + %th Stage + %th Name + %th Duration + %th Finished at + - if @ci_project && @ci_project.coverage_enabled? + %th Coverage + %th + - @ci_commit.refs.each do |ref| + = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.statuses.for_ref(ref).latest.ordered, coverage: @ci_project.try(:coverage_enabled?), controls: true - if @ci_commit.retried.any? .gray-content-block.second-block @@ -81,4 +60,4 @@ - if @ci_project && @ci_project.coverage_enabled? %th Coverage %th - = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.retried, coverage: @ci_project.try(:coverage_enabled?), ref: true + = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.retried, coverage: @ci_project.try(:coverage_enabled?) diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml index 14b814bb0d6..e3a17faf0bd 100644 --- a/app/views/projects/commit_statuses/_commit_status.html.haml +++ b/app/views/projects/commit_statuses/_commit_status.html.haml @@ -9,9 +9,8 @@ - else %strong Build ##{commit_status.id} - - if defined?(ref) && ref - %td - = commit_status.ref + %td + = commit_status.ref %td = commit_status.stage -- cgit v1.2.1 From 5cd504ed331dd23d17709285237945fb867978a8 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 12 Oct 2015 16:39:08 +0200 Subject: Rename builds_without_retry to latest_builds --- app/views/projects/builds/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index b561078e8c7..9c3ae622b72 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -9,7 +9,7 @@ #up-build-trace - if @commit.matrix_for_ref?(@build.ref) %ul.center-top-menu.build-top-menu - - @commit.builds_without_retry_for_ref(@build.ref).each do |build| + - @commit.latest_builds_for_ref(@build.ref).each do |build| %li{class: ('active' if build == @build) } = link_to namespace_project_build_path(@project.namespace, @project, build) do = ci_icon_for_status(build.status) @@ -20,7 +20,7 @@ = build.id - - unless @commit.builds_without_retry_for_ref(@build.ref).include?(@build) + - unless @commit.latest_builds_for_ref(@build.ref).include?(@build) %li.active %a Build ##{@build.id} -- cgit v1.2.1 From 4bf69b0bd9a27e675c98eee998f24c0122030731 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 12 Oct 2015 23:59:21 +0200 Subject: Fix feature tests --- app/views/projects/commit/ci.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/commit/ci.html.haml b/app/views/projects/commit/ci.html.haml index 585f012fe04..4a1ef378a30 100644 --- a/app/views/projects/commit/ci.html.haml +++ b/app/views/projects/commit/ci.html.haml @@ -21,7 +21,7 @@ \.gitlab-ci.yml not found in this commit .gray-content-block.second-block - Latest + Latest builds - if @ci_commit.duration > 0 %small.pull-right %i.fa.fa-time -- cgit v1.2.1 From 42fb52adf4460682c35d70930bcb2379ccb26171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A7=D0=B8=D0=BD=D0=B3=D0=B8=D0=B7=20=D0=90=D1=83=D0=B0?= =?UTF-8?q?=D0=BD=D0=B0=D1=81=D0=BE=D0=B2?= Date: Tue, 13 Oct 2015 04:41:51 +0600 Subject: Use css style --- app/views/dashboard/projects/_projects.html.haml | 3 ++- app/views/groups/_projects.html.haml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/dashboard/projects/_projects.html.haml b/app/views/dashboard/projects/_projects.html.haml index 30372e98430..e641b82f819 100644 --- a/app/views/dashboard/projects/_projects.html.haml +++ b/app/views/dashboard/projects/_projects.html.haml @@ -5,6 +5,7 @@ - if current_user.can_create_project? %span.input-group-btn = link_to new_project_path, class: 'btn btn-green' do - + New Project + %i.fa.fa-plus + New Project = render 'shared/projects/list', projects: @projects, ci: true diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml index 9c73f7a0ef7..53c11a471b0 100644 --- a/app/views/groups/_projects.html.haml +++ b/app/views/groups/_projects.html.haml @@ -5,6 +5,7 @@ - if can? current_user, :create_projects, @group %span.input-group-btn = link_to new_project_path(namespace_id: @group.id), class: 'btn btn-green' do - + New Project + %i.fa.fa-plus + New Project = render 'shared/projects/list', projects: @projects, projects_limit: 20, stars: false -- cgit v1.2.1 From 7816488a8967d4c87e84a35027499c1a5cb5406e Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 12 Oct 2015 23:02:27 -0700 Subject: Add "New Page" button to Wiki Pages tab Closes #2998 --- app/views/projects/wikis/pages.html.haml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views') diff --git a/app/views/projects/wikis/pages.html.haml b/app/views/projects/wikis/pages.html.haml index 03e6a522b25..d179a1abec1 100644 --- a/app/views/projects/wikis/pages.html.haml +++ b/app/views/projects/wikis/pages.html.haml @@ -3,6 +3,7 @@ = render 'nav' .gray-content-block + = render 'main_links' %h3.page-title All Pages %ul.content-list -- cgit v1.2.1 From 0e34154d214c0e470b7783b5086a70b4fe4cb08f Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Fri, 9 Oct 2015 19:35:09 +0300 Subject: Project names are not fully shown if group name is too big, even on group page view --- app/views/groups/_projects.html.haml | 2 +- app/views/shared/projects/_list.html.haml | 3 ++- app/views/shared/projects/_project.html.haml | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml index 76da3276e47..133f3e2d5a8 100644 --- a/app/views/groups/_projects.html.haml +++ b/app/views/groups/_projects.html.haml @@ -7,4 +7,4 @@ = link_to new_project_path(namespace_id: @group.id), class: 'btn btn-green' do New project - = render 'shared/projects/list', projects: @projects, projects_limit: 20, stars: false + = render 'shared/projects/list', projects: @projects, projects_limit: 20, stars: false, skip_namespace: true diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml index 16e1d8421de..357cfd6a370 100644 --- a/app/views/shared/projects/_list.html.haml +++ b/app/views/shared/projects/_list.html.haml @@ -2,11 +2,12 @@ - avatar = true unless local_assigns[:avatar] == false - stars = true unless local_assigns[:stars] == false - ci = false unless local_assigns[:ci] == true +- skip_namespace = false unless local_assigns[:skip_namespace] == true %ul.projects-list - projects.each_with_index do |project, i| - css_class = (i >= projects_limit) ? 'hide' : nil - = render "shared/projects/project", project: project, + = render "shared/projects/project", project: project, skip_namespace: skip_namespace, avatar: avatar, stars: stars, css_class: css_class, ci: ci - if projects.size > projects_limit diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index e67e5a8a638..aee839b44e7 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -1,6 +1,7 @@ - avatar = true unless local_assigns[:avatar] == false - stars = true unless local_assigns[:stars] == false - ci = false unless local_assigns[:ci] == true +- skip_namespace = false unless local_assigns[:skip_namespace] == true - css_class = '' unless local_assigns[:css_class] - css_class += " no-description" unless project.description.present? %li.project-row{ class: css_class } @@ -11,7 +12,7 @@ = project_icon(project, alt: '', class: 'avatar project-avatar s46') %span.project-full-name %span.namespace-name - - if project.namespace + - if project.namespace && !skip_namespace = project.namespace.human_name \/ %span.project-name.filter-title -- cgit v1.2.1 From 219451241a92ff9e81dcb77914e6d659ea2f7376 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 13 Oct 2015 13:03:27 +0200 Subject: Fix UI issue on project page with no ssh key message Signed-off-by: Dmitriy Zaporozhets --- app/views/layouts/_page.html.haml | 3 ++- app/views/projects/show.html.haml | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index 2468687b56d..1a883e20e89 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -6,7 +6,7 @@ = brand_header_logo .gitlab-text-container %h3 GitLab - + - if defined?(sidebar) && sidebar = render "layouts/nav/#{sidebar}" - elsif current_user @@ -23,6 +23,7 @@ = current_user.username .content-wrapper = render "layouts/flash" + = yield :flash_message %div{ class: container_class } .content .clearfix diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index efa119edd5a..e95d987d74c 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -2,9 +2,10 @@ - if current_user = auto_discovery_link_tag(:atom, namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "#{@project.name} activity") -- if current_user && can?(current_user, :download_code, @project) - = render 'shared/no_ssh' - = render 'shared/no_password' += content_for :flash_message do + - if current_user && can?(current_user, :download_code, @project) + = render 'shared/no_ssh' + = render 'shared/no_password' - if prefer_readme? = render 'projects/last_push' -- cgit v1.2.1 From 2f68fb9cc3622eb90c955b6936e91ea766f262b6 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 13 Oct 2015 14:38:38 +0200 Subject: Small css cleanup Signed-off-by: Dmitriy Zaporozhets --- app/views/dashboard/_activities.html.haml | 7 +++---- app/views/groups/show.html.haml | 8 +++----- app/views/projects/_activity.html.haml | 7 +++---- app/views/projects/buttons/_notifications.html.haml | 2 +- app/views/projects/new.html.haml | 4 ++-- 5 files changed, 12 insertions(+), 16 deletions(-) (limited to 'app/views') diff --git a/app/views/dashboard/_activities.html.haml b/app/views/dashboard/_activities.html.haml index 19d919f9b6a..f98fd9f06ba 100644 --- a/app/views/dashboard/_activities.html.haml +++ b/app/views/dashboard/_activities.html.haml @@ -3,10 +3,9 @@ .gray-content-block - if current_user - %ul.nav.nav-pills.event_filter.pull-right - %li.pull-right - = link_to dashboard_projects_path(:atom, { private_token: current_user.private_token }), class: 'rss-btn' do - %i.fa.fa-rss + .pull-right + = link_to dashboard_projects_path(:atom, { private_token: current_user.private_token }), class: 'btn rss-btn' do + %i.fa.fa-rss = render 'shared/event_filter' .content_list diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index a9ba9d2ba10..dc8e81323a6 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -25,11 +25,9 @@ .hidden-xs - if current_user = render "events/event_last_push", event: @last_push - - %ul.nav.nav-pills.event_filter.pull-right - %li - = link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed", class: 'rss-btn' do - %i.fa.fa-rss + .pull-right + = link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed", class: 'btn rss-btn' do + %i.fa.fa-rss = render 'shared/event_filter' %hr diff --git a/app/views/projects/_activity.html.haml b/app/views/projects/_activity.html.haml index 1261f6254d7..c2683bc6219 100644 --- a/app/views/projects/_activity.html.haml +++ b/app/views/projects/_activity.html.haml @@ -1,10 +1,9 @@ = render 'projects/last_push' .gray-content-block.activity-filter-block - if current_user - %ul.nav.nav-pills.event_filter.pull-right - %li - = link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "Feed", class: 'rss-btn' do - %i.fa.fa-rss + .pull-right + = link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "Feed", class: 'btn rss-btn' do + %i.fa.fa-rss = render 'shared/event_filter' .content_list{:"data-href" => activity_project_path(@project)} diff --git a/app/views/projects/buttons/_notifications.html.haml b/app/views/projects/buttons/_notifications.html.haml index 4b69a6d7a6f..3bc2daeec4e 100644 --- a/app/views/projects/buttons/_notifications.html.haml +++ b/app/views/projects/buttons/_notifications.html.haml @@ -1,6 +1,6 @@ - return unless @membership -= form_tag profile_notifications_path, method: :put, remote: true, class: 'inline-form', id: 'notification-form' do += form_tag profile_notifications_path, method: :put, remote: true, class: 'inline', id: 'notification-form' do = hidden_field_tag :notification_type, 'project' = hidden_field_tag :notification_id, @membership.id = hidden_field_tag :notification_level diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 1b093c8f514..daab2326bc7 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -111,10 +111,10 @@ - if current_user.can_create_group? .pull-right - .light.in-line + .light.inline .space-right Need a group for several dependent projects? - = link_to new_group_path, class: "btn btn-xs" do + = link_to new_group_path, class: "btn" do Create a group .save-project-loader.hide -- cgit v1.2.1 From a0a488ed13e2a07e0dd42e8795c50ea762917f20 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 13 Oct 2015 16:41:48 +0200 Subject: Apply new design to files page Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/blob/_blob.html.haml | 2 +- .../repositories/_download_archive.html.haml | 4 +- app/views/projects/tree/_readme.html.haml | 13 +-- app/views/projects/tree/_tree.html.haml | 106 +++++++++++---------- 4 files changed, 64 insertions(+), 61 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml index b4c7d8b9b71..a1ae1397584 100644 --- a/app/views/projects/blob/_blob.html.haml +++ b/app/views/projects/blob/_blob.html.haml @@ -19,7 +19,7 @@ - blob_commit = @repository.last_commit_for_path(@commit.id, blob.path) = render blob_commit, project: @project -%div#tree-content-holder.tree-content-holder +%div#blob-content-holder.blob-content-holder %article.file-holder .file-title = blob_icon blob.mode, blob.name diff --git a/app/views/projects/repositories/_download_archive.html.haml b/app/views/projects/repositories/_download_archive.html.haml index b9486a9b492..07c24950ee2 100644 --- a/app/views/projects/repositories/_download_archive.html.haml +++ b/app/views/projects/repositories/_download_archive.html.haml @@ -3,10 +3,10 @@ - split_button = split_button || false - if split_button == true %span.btn-group{class: btn_class} - = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn col-xs-10', rel: 'nofollow' do + = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn btn-success col-xs-10', rel: 'nofollow' do %i.fa.fa-download %span Download zip - %a.col-xs-2.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' } + %a.col-xs-2.btn.btn-success.dropdown-toggle{ 'data-toggle' => 'dropdown' } %span.caret %span.sr-only Select Archive Format diff --git a/app/views/projects/tree/_readme.html.haml b/app/views/projects/tree/_readme.html.haml index f082d711865..7e9af19c8ba 100644 --- a/app/views/projects/tree/_readme.html.haml +++ b/app/views/projects/tree/_readme.html.haml @@ -1,7 +1,8 @@ -%article.readme-holder#README - = link_to '#README' do - %h4.readme-file-title - %i.fa.fa-file - = readme.name - .wiki +%article.file-holder.readme-holder#README + .file-title + = link_to '#README' do + %strong + %i.fa.fa-file + = readme.name + .file-content.wiki = render_readme(readme) diff --git a/app/views/projects/tree/_tree.html.haml b/app/views/projects/tree/_tree.html.haml index 457f8a4a585..7ff48e32e60 100644 --- a/app/views/projects/tree/_tree.html.haml +++ b/app/views/projects/tree/_tree.html.haml @@ -1,59 +1,61 @@ -%ul.breadcrumb.repo-breadcrumb - %li - = link_to namespace_project_tree_path(@project.namespace, @project, @ref) do - = @project.path - - tree_breadcrumbs(tree, 6) do |title, path| +.gray-content-block + %ul.breadcrumb.repo-breadcrumb %li - - if path - = link_to truncate(title, length: 40), namespace_project_tree_path(@project.namespace, @project, path) - - else - = link_to title, '#' - - if allowed_tree_edit? - %li - %span.dropdown - %a.dropdown-toggle.btn.btn-xs.add-to-tree{href: '#', "data-toggle" => "dropdown"} - = icon('plus') - %ul.dropdown-menu - %li - = link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'Create file', id: 'new-file-link' do - = icon('pencil fw') - Create file - %li - = link_to '#modal-upload-blob', { 'data-target' => '#modal-upload-blob', 'data-toggle' => 'modal'} do - = icon('file fw') - Upload file - %li.divider - %li - = link_to '#modal-create-new-dir', { 'data-target' => '#modal-create-new-dir', 'data-toggle' => 'modal'} do - = icon('folder fw') - New directory + = link_to namespace_project_tree_path(@project.namespace, @project, @ref) do + = @project.path + - tree_breadcrumbs(tree, 6) do |title, path| + %li + - if path + = link_to truncate(title, length: 40), namespace_project_tree_path(@project.namespace, @project, path) + - else + = link_to title, '#' + - if allowed_tree_edit? + %li + %span.dropdown + %a.dropdown-toggle.btn.add-to-tree{href: '#', "data-toggle" => "dropdown"} + = icon('plus') + %ul.dropdown-menu + %li + = link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'Create file', id: 'new-file-link' do + = icon('pencil fw') + Create file + %li + = link_to '#modal-upload-blob', { 'data-target' => '#modal-upload-blob', 'data-toggle' => 'modal'} do + = icon('file fw') + Upload file + %li.divider + %li + = link_to '#modal-create-new-dir', { 'data-target' => '#modal-create-new-dir', 'data-toggle' => 'modal'} do + = icon('folder fw') + New directory -%div#tree-content-holder.tree-content-holder.prepend-top-20 - %table#tree-slider{class: "table_#{@hex_path} tree-table" } - %thead - %tr - %th Name - %th Last Update - %th.hidden-xs - .pull-left Last Commit - .last-commit.hidden-sm.pull-left -   - %i.fa.fa-angle-right -   - %small.light - = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit) - – - = truncate(@commit.title, length: 50) - = link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'pull-right' +%div#tree-content-holder.tree-content-holder + .tree-table-holder + %table.table#tree-slider{class: "table_#{@hex_path} tree-table table-striped" } + %thead + %tr + %th Name + %th Last Update + %th.hidden-xs + .pull-left Last Commit + .last-commit.hidden-sm.pull-left +   + %i.fa.fa-angle-right +   + %small.light + = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit) + – + = truncate(@commit.title, length: 50) + = link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'pull-right' - - if @path.present? - %tr.tree-item - %td.tree-item-file-name - = link_to "..", namespace_project_tree_path(@project.namespace, @project, up_dir_path), class: 'prepend-left-10' - %td - %td.hidden-xs + - if @path.present? + %tr.tree-item + %td.tree-item-file-name + = link_to "..", namespace_project_tree_path(@project.namespace, @project, up_dir_path), class: 'prepend-left-10' + %td + %td.hidden-xs - = render_tree(tree) + = render_tree(tree) - if tree.readme = render "projects/tree/readme", readme: tree.readme -- cgit v1.2.1 From 33c9d6e45c0800fd5a312af2c286826764fd7589 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Tue, 13 Oct 2015 16:51:13 +0200 Subject: Fix retry and cancel for build --- app/views/projects/commit/ci.html.haml | 22 +++++++++++++--------- .../commit_statuses/_commit_status.html.haml | 6 +++--- 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/commit/ci.html.haml b/app/views/projects/commit/ci.html.haml index 4a1ef378a30..ca71a91af15 100644 --- a/app/views/projects/commit/ci.html.haml +++ b/app/views/projects/commit/ci.html.haml @@ -3,11 +3,6 @@ = render "commit_box" = render "ci_menu" -- if @ci_project && current_user && can?(current_user, :manage_builds, @project) - .pull-right - - if @ci_commit.builds.running_or_pending.any? - = link_to "Cancel", cancel_builds_namespace_project_commit_path(@project.namespace, @project, @commit.sha), class: 'btn btn-sm btn-danger' - - if @ci_commit.yaml_errors.present? .bs-callout.bs-callout-danger @@ -22,11 +17,18 @@ .gray-content-block.second-block Latest builds - - if @ci_commit.duration > 0 - %small.pull-right + + .pull-right + - if @ci_commit.duration > 0 %i.fa.fa-time #{time_interval_in_words @ci_commit.duration} +   + + - if @ci_project && current_user && can?(current_user, :manage_builds, @project) + - if @ci_commit.builds.running_or_pending.any? + = link_to "Cancel all", cancel_builds_namespace_project_commit_path(@project.namespace, @project, @commit.sha), class: 'btn btn-xs btn-danger' + %table.table.builds %thead %tr @@ -41,7 +43,8 @@ %th Coverage %th - @ci_commit.refs.each do |ref| - = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.statuses.for_ref(ref).latest.ordered, coverage: @ci_project.try(:coverage_enabled?), controls: true + = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.statuses.for_ref(ref).latest.ordered, + locals: { coverage: @ci_project.try(:coverage_enabled?), allow_retry: true } - if @ci_commit.retried.any? .gray-content-block.second-block @@ -60,4 +63,5 @@ - if @ci_project && @ci_project.coverage_enabled? %th Coverage %th - = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.retried, coverage: @ci_project.try(:coverage_enabled?) + = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.retried, + locals: { coverage: @ci_project.try(:coverage_enabled?) } diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml index e3a17faf0bd..7314f8e79d3 100644 --- a/app/views/projects/commit_statuses/_commit_status.html.haml +++ b/app/views/projects/commit_statuses/_commit_status.html.haml @@ -41,11 +41,11 @@ #{commit_status.coverage}% %td - - if defined?(controls) && controls && current_user && can?(current_user, :manage_builds, gl_project) - .pull-right + .pull-right + - if current_user && can?(current_user, :manage_builds, commit_status.gl_project) - if commit_status.cancel_url = link_to commit_status.cancel_url, title: 'Cancel' do %i.fa.fa-remove.cred - - elsif commit_status.retry_url + - elsif defined?(allow_retry) && allow_retry && commit_status.retry_url = link_to commit_status.retry_url, method: :post, title: 'Retry' do %i.fa.fa-repeat -- cgit v1.2.1 From 7af4f5215e28927830cbc74d383cdfeb9e4ef587 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 12 Oct 2015 21:12:31 +0200 Subject: Show warning if build doesn't have runners with specified tags or runners didn't connect recently Slightly refactor runner status detection: moving it to Runner class Signed-off-by: Kamil Trzcinski --- app/views/projects/builds/show.html.haml | 21 +++++++++++++++++++++ .../commit_statuses/_commit_status.html.haml | 4 ++++ 2 files changed, 25 insertions(+) (limited to 'app/views') diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 9c3ae622b72..70a93eb5976 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -39,6 +39,27 @@ .pull-right = @build.updated_at.stamp('19:00 Aug 27') + - if @build.show_warning? + - unless @build.any_runners_online? + .bs-callout.bs-callout-warning + %p + - if no_runners_for_project?(@build.project) + This build is stuck, because the project doesn't have runners assigned. + - elsif @build.tags.any? + This build is stuck. + %br + This build is stuck, because you don't have any active runners online with these tags assigned to the project: + - @build.tags.each do |tag| + %span.label.label-primary + = tag + - else + This build is stuck, because you don't have any active runners online that can run this build. + + %br + Go to + = link_to namespace_project_runners_path(@build.gl_project.namespace, @build.gl_project) do + Runners page + .row.prepend-top-default .col-md-9 .clearfix diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml index 7314f8e79d3..99fdde45402 100644 --- a/app/views/projects/commit_statuses/_commit_status.html.haml +++ b/app/views/projects/commit_statuses/_commit_status.html.haml @@ -2,6 +2,10 @@ %td.status = ci_status_with_icon(commit_status.status) + - if commit_status.show_warning? + .pull-right + %i.fa.fa-warning-sign.text-warning + %td.commit_status-link - if commit_status.target_url = link_to commit_status.target_url do -- cgit v1.2.1 From d9e2232f6393a1627847c9f6c2be3c4f987d0797 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 14 Oct 2015 13:51:29 +0200 Subject: Fix warning sign --- app/views/projects/builds/show.html.haml | 2 +- app/views/projects/commit_statuses/_commit_status.html.haml | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 70a93eb5976..91c1b16c9f6 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -25,7 +25,7 @@ %a Build ##{@build.id} · - %i.fa.fa-warning-sign + %i.fa.fa-warning This build was retried. .gray-content-block.second-block diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml index 99fdde45402..637154f56aa 100644 --- a/app/views/projects/commit_statuses/_commit_status.html.haml +++ b/app/views/projects/commit_statuses/_commit_status.html.haml @@ -2,10 +2,6 @@ %td.status = ci_status_with_icon(commit_status.status) - - if commit_status.show_warning? - .pull-right - %i.fa.fa-warning-sign.text-warning - %td.commit_status-link - if commit_status.target_url = link_to commit_status.target_url do @@ -13,6 +9,9 @@ - else %strong Build ##{commit_status.id} + - if commit_status.show_warning? + %i.fa.fa-warning.text-warning + %td = commit_status.ref -- cgit v1.2.1