diff options
author | Phil Hughes <me@iamphill.com> | 2017-09-29 08:06:48 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-09-29 08:06:48 +0000 |
commit | 34da9a0f3784277555af91ed12ac6fe7d6e58fe6 (patch) | |
tree | e10d8a2cbbcf4741c233d9b311e269033d17c5bb | |
parent | 5e850d5bae3b451231f01b32c8f02ed918f8da7f (diff) | |
parent | 494926a1fb2f21f30b945095b06d5f4fa913300e (diff) | |
download | gitlab-ce-34da9a0f3784277555af91ed12ac6fe7d6e58fe6.tar.gz |
Merge branch '37335-counter-active-state' into 'master'
Add active states to nav bar counters
Closes #37335
See merge request gitlab-org/gitlab-ce!14569
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 6 | ||||
-rw-r--r-- | changelogs/unreleased/37335-counter-active-state.yml | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index d8fc371497d..aefed985af4 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -24,19 +24,19 @@ = link_to search_path, title: 'Search', aria: { label: "Search" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = icon('search') - if current_user - %li.user-counter + = nav_link(path: 'dashboard#issues', html_options: { class: "user-counter" }) do = link_to assigned_issues_dashboard_path, title: 'Issues', class: 'dashboard-shortcuts-issues', aria: { label: "Issues" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = custom_icon('issues') - issues_count = assigned_issuables_count(:issues) %span.badge.issues-count{ class: ('hidden' if issues_count.zero?) } = number_with_delimiter(issues_count) - %li.user-counter + = nav_link(path: 'dashboard#merge_requests', html_options: { class: "user-counter" }) do = link_to assigned_mrs_dashboard_path, title: 'Merge requests', class: 'dashboard-shortcuts-merge_requests', aria: { label: "Merge requests" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = custom_icon('mr_bold') - merge_requests_count = assigned_issuables_count(:merge_requests) %span.badge.merge-requests-count{ class: ('hidden' if merge_requests_count.zero?) } = number_with_delimiter(merge_requests_count) - %li.user-counter + = nav_link(controller: 'dashboard/todos', html_options: { class: "user-counter" }) do = link_to dashboard_todos_path, title: 'Todos', aria: { label: "Todos" }, class: 'shortcuts-todos', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = custom_icon('todo_done') %span.badge.todos-count{ class: ('hidden' if todos_pending_count.zero?) } diff --git a/changelogs/unreleased/37335-counter-active-state.yml b/changelogs/unreleased/37335-counter-active-state.yml new file mode 100644 index 00000000000..a9632201a89 --- /dev/null +++ b/changelogs/unreleased/37335-counter-active-state.yml @@ -0,0 +1,5 @@ +--- +title: Add active states to nav bar counters +merge_request: +author: +type: changed |