summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2016-12-14 14:17:02 +0000
committerFilipa Lacerda <filipa@gitlab.com>2016-12-14 14:17:02 +0000
commit4ba48d6b05f66dfccc829db588312109b8b015a1 (patch)
treeec01ca2b83416c72336d79f8af6ba997f071b9d8 /app
parent863146d42ed8fd44ab0c0f11c873fcdbbfcb28fc (diff)
downloadgitlab-ce-4ba48d6b05f66dfccc829db588312109b8b015a1.tar.gz
Merge two partials into one. Rename it to match the other partials
Diffstat (limited to 'app')
-rw-r--r--app/views/ci/status/_badge_graph_icon_with_name_and_action.html.haml18
-rw-r--r--app/views/ci/status/_icon_with_name.html.haml11
-rw-r--r--app/views/ci/status/_icon_with_name_and_action.html.haml8
-rw-r--r--app/views/projects/stage/_graph.html.haml2
-rw-r--r--app/views/projects/stage/_in_stage_group.html.haml2
5 files changed, 20 insertions, 21 deletions
diff --git a/app/views/ci/status/_badge_graph_icon_with_name_and_action.html.haml b/app/views/ci/status/_badge_graph_icon_with_name_and_action.html.haml
new file mode 100644
index 00000000000..12a55735559
--- /dev/null
+++ b/app/views/ci/status/_badge_graph_icon_with_name_and_action.html.haml
@@ -0,0 +1,18 @@
+- detailed_status = subject.detailed_status(current_user)
+- details_path = detailed_status.details_path if detailed_status.has_details?
+- klass = "ci-status-icon ci-status-icon-#{detailed_status}"
+
+- if details_path
+ = link_to details_path, class: klass,
+ data: { toggle: 'tooltip', title: "#{subject.name} - #{detailed_status}" } do
+ %span{ class: klass }= custom_icon(detailed_status.icon)
+ .ci-status-text= subject.name
+- else
+ %span{ class: klass }= custom_icon(detailed_status.icon)
+ .ci-status-text= subject.name
+
+- if detailed_status.has_action?
+ = link_to detailed_status.action_path, method: detailed_status.action_method,
+ title: "#{subject.name}: #{detailed_status.action_title}", class: 'ci-action-icon-container' do
+ %i.ci-action-icon-wrapper
+ = icon(detailed_status.action_icon, class: detailed_status.action_class)
diff --git a/app/views/ci/status/_icon_with_name.html.haml b/app/views/ci/status/_icon_with_name.html.haml
deleted file mode 100644
index 028e1fe9402..00000000000
--- a/app/views/ci/status/_icon_with_name.html.haml
+++ /dev/null
@@ -1,11 +0,0 @@
-- detailed_status = subject.detailed_status(current_user)
-- details_path = detailed_status.details_path if detailed_status.has_details?
-- klass = "ci-status-icon ci-status-icon-#{detailed_status}"
-
-- if details_path
- = link_to details_path, class: klass, data: { toggle: 'tooltip', title: "#{subject.name} - #{detailed_status}" } do
- %span{ class: klass }= custom_icon(detailed_status.icon)
- .ci-status-text= subject.name
-- else
- %span{ class: klass }= custom_icon(detailed_status.icon)
- .ci-status-text= subject.name
diff --git a/app/views/ci/status/_icon_with_name_and_action.html.haml b/app/views/ci/status/_icon_with_name_and_action.html.haml
deleted file mode 100644
index 76db3b7f38a..00000000000
--- a/app/views/ci/status/_icon_with_name_and_action.html.haml
+++ /dev/null
@@ -1,8 +0,0 @@
-= render "ci/status/icon_with_name", subject: subject
-
-- detailed_status = subject.detailed_status(current_user)
-- if detailed_status.has_action?
- = link_to detailed_status.action_path, method: detailed_status.action_method,
- title: "#{subject.name}: #{detailed_status.action_title}", class: 'ci-action-icon-container' do
- %i.ci-action-icon-wrapper
- = icon(detailed_status.action_icon, class: detailed_status.action_class)
diff --git a/app/views/projects/stage/_graph.html.haml b/app/views/projects/stage/_graph.html.haml
index 6d280468262..ff86d93f354 100644
--- a/app/views/projects/stage/_graph.html.haml
+++ b/app/views/projects/stage/_graph.html.haml
@@ -13,7 +13,7 @@
%li.build
.curve
.build-content
- = render 'ci/status/icon_with_name_and_action', subject: status
+ = render 'ci/status/bagde_graph_icon_with_name_and_action', subject: status
- else
%li.build
.curve
diff --git a/app/views/projects/stage/_in_stage_group.html.haml b/app/views/projects/stage/_in_stage_group.html.haml
index 5c9b6549b37..e4a7613998d 100644
--- a/app/views/projects/stage/_in_stage_group.html.haml
+++ b/app/views/projects/stage/_in_stage_group.html.haml
@@ -10,4 +10,4 @@
%ul
- subject.each do |status|
%li.dropdown-build
- = render 'ci/status/icon_with_name_and_action', subject: status
+ = render 'ci/status/bagde_graph_icon_with_name_and_action', subject: status