From 863efcc60437ccec67be6bd68af9ff3678141b89 Mon Sep 17 00:00:00 2001 From: dimitrieh Date: Mon, 23 Jan 2017 00:44:07 +0100 Subject: Improve pipeline status icon linking in widgets --- app/views/projects/commit/_commit_box.html.haml | 3 ++- app/views/projects/merge_requests/widget/_heading.html.haml | 3 ++- app/views/projects/pipelines/_info.html.haml | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 08eb0c57f66..2b1c4e28ce2 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -64,7 +64,8 @@ - if @commit.status .well-segment.pipeline-info %div{ class: "icon-container ci-status-icon-#{@commit.status}" } - = ci_icon_for_status(@commit.status) + = link_to pipelines_namespace_project_commit_path(@project.namespace, @project, @commit.id) do + = ci_icon_for_status(@commit.status) Pipeline = link_to "##{@commit.pipelines.last.id}", pipelines_namespace_project_commit_path(@project.namespace, @project, @commit.id), class: "monospace" for diff --git a/app/views/projects/merge_requests/widget/_heading.html.haml b/app/views/projects/merge_requests/widget/_heading.html.haml index c80dc33058d..cc939ab9441 100644 --- a/app/views/projects/merge_requests/widget/_heading.html.haml +++ b/app/views/projects/merge_requests/widget/_heading.html.haml @@ -2,7 +2,8 @@ .mr-widget-heading - %w[success success_with_warnings skipped canceled failed running pending].each do |status| .ci_widget{ class: "ci-#{status} ci-status-icon-#{status}", style: ("display:none" unless @pipeline.status == status) } - = ci_icon_for_status(status) + = link_to namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id) do + = ci_icon_for_status(status) %span Pipeline = link_to "##{@pipeline.id}", namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'pipeline' diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index ca76f13ef5e..6caa5f16dc6 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -23,8 +23,8 @@ .info-well - if @commit.status .well-segment.pipeline-info - %div{ class: "icon-container ci-status-icon-#{@commit.status}" } - = ci_icon_for_status(@commit.status) + .icon-container + = icon('clock-o') = pluralize @pipeline.statuses.count(:id), "build" - if @pipeline.ref from -- cgit v1.2.1 From d8b8168623ae780b72723546524cce0aae979556 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Mon, 30 Jan 2017 12:18:52 -0600 Subject: Remove underline style for icon hover --- app/views/projects/merge_requests/widget/_heading.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 cc939ab9441..ecd626872a5 100644 --- a/app/views/projects/merge_requests/widget/_heading.html.haml +++ b/app/views/projects/merge_requests/widget/_heading.html.haml @@ -2,7 +2,7 @@ .mr-widget-heading - %w[success success_with_warnings skipped canceled failed running pending].each do |status| .ci_widget{ class: "ci-#{status} ci-status-icon-#{status}", style: ("display:none" unless @pipeline.status == status) } - = link_to namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id) do + = link_to namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'icon-link' do = ci_icon_for_status(status) %span Pipeline -- cgit v1.2.1 From b61b45a7596b3f20aa1a0d264e6ba3c7af844bac Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Mon, 30 Jan 2017 14:01:02 -0600 Subject: Link to pipeline page from commit widget --- app/views/projects/commit/_commit_box.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 2b1c4e28ce2..56f2c1529fe 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -64,10 +64,10 @@ - if @commit.status .well-segment.pipeline-info %div{ class: "icon-container ci-status-icon-#{@commit.status}" } - = link_to pipelines_namespace_project_commit_path(@project.namespace, @project, @commit.id) do + = link_to namespace_project_pipeline_path(@project.namespace, @project, @commit.pipelines.last.id) do = ci_icon_for_status(@commit.status) Pipeline - = link_to "##{@commit.pipelines.last.id}", pipelines_namespace_project_commit_path(@project.namespace, @project, @commit.id), class: "monospace" + = link_to "##{@commit.pipelines.last.id}", namespace_project_pipeline_path(@project.namespace, @project, @commit.pipelines.last.id), class: "monospace" for = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit), class: "monospace" %span.ci-status-label -- cgit v1.2.1