summaryrefslogtreecommitdiff
path: root/app/views/ci
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/views/ci
parent863146d42ed8fd44ab0c0f11c873fcdbbfcb28fc (diff)
downloadgitlab-ce-4ba48d6b05f66dfccc829db588312109b8b015a1.tar.gz
Merge two partials into one. Rename it to match the other partials
Diffstat (limited to 'app/views/ci')
-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
3 files changed, 18 insertions, 19 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)