diff options
author | Semyon Pupkov <mail@semyonpupkov.com> | 2017-02-12 13:02:26 +0500 |
---|---|---|
committer | Semyon Pupkov <mail@semyonpupkov.com> | 2017-02-15 14:29:48 +0500 |
commit | 0dfccd995aa9bf560e59299f3a4f1705d6981115 (patch) | |
tree | c6ab80041dd2b83ed4c245b0824c2ace70872eb2 /app/views/shared/builds | |
parent | 1452729304393978ec93b712130dff6687db01b9 (diff) | |
download | gitlab-ce-0dfccd995aa9bf560e59299f3a4f1705d6981115.tar.gz |
Add active_when helper
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24036
Diffstat (limited to 'app/views/shared/builds')
-rw-r--r-- | app/views/shared/builds/_tabs.html.haml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/views/shared/builds/_tabs.html.haml b/app/views/shared/builds/_tabs.html.haml index b6047ece592..3baa956b910 100644 --- a/app/views/shared/builds/_tabs.html.haml +++ b/app/views/shared/builds/_tabs.html.haml @@ -1,23 +1,23 @@ %ul.nav-links - %li{ class: ('active' if scope.nil?) }> + %li{ class: active_when(scope.nil?) }> = link_to build_path_proc.call(nil) do All %span.badge.js-totalbuilds-count = number_with_delimiter(all_builds.count(:id)) - %li{ class: ('active' if scope == 'pending') }> + %li{ class: active_when(scope == 'pending') }> = link_to build_path_proc.call('pending') do Pending %span.badge = number_with_delimiter(all_builds.pending.count(:id)) - %li{ class: ('active' if scope == 'running') }> + %li{ class: active_when(scope == 'running') }> = link_to build_path_proc.call('running') do Running %span.badge = number_with_delimiter(all_builds.running.count(:id)) - %li{ class: ('active' if scope == 'finished') }> + %li{ class: active_when(scope == 'finished') }> = link_to build_path_proc.call('finished') do Finished %span.badge |