diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-12-09 15:38:10 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2016-12-10 00:57:23 -0600 |
commit | 687872978100c168ce381448c0a9536fb53542ce (patch) | |
tree | 0703562ca713ca84098512a8ba166e2bfe023b8b /app/views/dashboard/snippets/index.html.haml | |
parent | adbc37804e49e1d3ba02bf61122696e135666ff3 (diff) | |
download | gitlab-ce-687872978100c168ce381448c0a9536fb53542ce.tar.gz |
implement snippets_scope_menu partial to reduce code duplication
Diffstat (limited to 'app/views/dashboard/snippets/index.html.haml')
-rw-r--r-- | app/views/dashboard/snippets/index.html.haml | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/app/views/dashboard/snippets/index.html.haml b/app/views/dashboard/snippets/index.html.haml index 81bfa44a665..85cbe0bf0e6 100644 --- a/app/views/dashboard/snippets/index.html.haml +++ b/app/views/dashboard/snippets/index.html.haml @@ -2,31 +2,7 @@ - header_title "Snippets", dashboard_snippets_path = render 'dashboard/snippets_head' - -.nav-links.snippet-scope-menu - %li{ class: ("active" unless params[:scope]) } - = link_to dashboard_snippets_path do - All - %span.badge - = current_user.snippets.count - - %li{ class: ("active" if params[:scope] == "are_private") } - = link_to dashboard_snippets_path(scope: 'are_private') do - Private - %span.badge - = current_user.snippets.are_private.count - - %li{ class: ("active" if params[:scope] == "are_internal") } - = link_to dashboard_snippets_path(scope: 'are_internal') do - Internal - %span.badge - = current_user.snippets.are_internal.count - - %li{ class: ("active" if params[:scope] == "are_public") } - = link_to dashboard_snippets_path(scope: 'are_public') do - Public - %span.badge - = current_user.snippets.are_public.count += render partial: 'snippets/snippets_scope_menu', locals: { include_private: true } .visible-xs |