Commit 44df2012 authored by Douwe Maan's avatar Douwe Maan

Restore dashboard snippets tabs.

parent 946f00ed
...@@ -12,5 +12,27 @@ ...@@ -12,5 +12,27 @@
.oneline .oneline
Share code pastes with others out of git repository Share code pastes with others out of git repository
%ul.center-top-menu.no-top.no-bottom.snippet-scope-menu
= nav_tab :scope, nil do
= link_to dashboard_snippets_path do
All
%span.badge
= current_user.snippets.count
= nav_tab :scope, 'are_private' do
= link_to dashboard_snippets_path(scope: 'are_private') do
Private
%span.badge
= current_user.snippets.are_private.count
= nav_tab :scope, 'are_internal' do
= link_to dashboard_snippets_path(scope: 'are_internal') do
Internal
%span.badge
= current_user.snippets.are_internal.count
= nav_tab :scope, 'are_public' do
= link_to dashboard_snippets_path(scope: 'are_public') do
Public
%span.badge
= current_user.snippets.are_public.count
= render 'snippets/snippets' = render 'snippets/snippets'
...@@ -32,19 +32,19 @@ class Spinach::Features::SnippetsUser < Spinach::FeatureSteps ...@@ -32,19 +32,19 @@ class Spinach::Features::SnippetsUser < Spinach::FeatureSteps
end end
step 'I click "Internal" filter' do step 'I click "Internal" filter' do
page.within('.nav-tabs') do page.within('.snippet-scope-menu') do
click_link "Internal" click_link "Internal"
end end
end end
step 'I click "Private" filter' do step 'I click "Private" filter' do
page.within('.nav-tabs') do page.within('.snippet-scope-menu') do
click_link "Private" click_link "Private"
end end
end end
step 'I click "Public" filter' do step 'I click "Public" filter' do
page.within('.nav-tabs') do page.within('.snippet-scope-menu') do
click_link "Public" click_link "Public"
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment