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/dashboard/todos/index.html.haml | |
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/dashboard/todos/index.html.haml')
-rw-r--r-- | app/views/dashboard/todos/index.html.haml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index c4bf2c90cc2..16a5713948a 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -4,15 +4,13 @@ - if current_user.todos.any? .top-area %ul.nav-links - - todo_pending_active = ('active' if params[:state].blank? || params[:state] == 'pending') - %li{ class: "todos-pending #{todo_pending_active}" }> + %li.todos-pending{ class: active_when(params[:state].blank? || params[:state] == 'pending') }> = link_to todos_filter_path(state: 'pending') do %span To do %span.badge = number_with_delimiter(todos_pending_count) - - todo_done_active = ('active' if params[:state] == 'done') - %li{ class: "todos-done #{todo_done_active}" }> + %li.todos-done{ class: active_when(params[:state] == 'done') }> = link_to todos_filter_path(state: 'done') do %span Done |