Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarzyna Kobierska <kkobierska@gmail.com>2016-09-07 16:27:48 +0300
committerKatarzyna Kobierska <kkobierska@gmail.com>2016-09-13 10:05:07 +0300
commit80c86bcc5b778306825e7650ccaa3c01bfd75ac0 (patch)
tree092aff77d635586a3229cc8f91fa775808cedc45 /app/views/shared/builds/_tabs.html.haml
parent27c3a87194a3a29c06cf8a2dd489d28ca0b552ab (diff)
Create shared partial for project and admin builds
Diffstat (limited to 'app/views/shared/builds/_tabs.html.haml')
-rw-r--r--app/views/shared/builds/_tabs.html.haml24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/views/shared/builds/_tabs.html.haml b/app/views/shared/builds/_tabs.html.haml
new file mode 100644
index 00000000000..9c3173f7a1a
--- /dev/null
+++ b/app/views/shared/builds/_tabs.html.haml
@@ -0,0 +1,24 @@
+%ul.nav-links
+ %li{class: ('active' if scope.nil?)}
+ = link_to build_path[nil] do
+ All
+ %span.badge.js-totalbuilds-count
+ = number_with_delimiter(all_builds.count(:id))
+
+ %li{class: ('active' if scope == 'pending')}
+ = link_to build_path[:pending] do
+ Pending
+ %span.badge
+ = number_with_delimiter(all_builds.pending.count(:id))
+
+ %li{class: ('active' if scope == 'running')}
+ = link_to build_path[:running] do
+ Running
+ %span.badge
+ = number_with_delimiter(all_builds.running.count(:id))
+
+ %li{class: ('active' if scope == 'finished')}
+ = link_to build_path[:finished] do
+ Finished
+ %span.badge
+ = number_with_delimiter(all_builds.finished.count(:id))