Commit b65d3e11 authored by Mike Greiling's avatar Mike Greiling

move new snippet button to main snippet navigation block

parent 6b20ad36
%ul.nav-links .top-area
= nav_link(page: dashboard_snippets_path, html_options: {class: 'home'}) do %ul.nav-links
= link_to dashboard_snippets_path, title: 'Your snippets', data: {placement: 'right'} do = nav_link(page: dashboard_snippets_path, html_options: {class: 'home'}) do
Your Snippets = link_to dashboard_snippets_path, title: 'Your snippets', data: {placement: 'right'} do
= nav_link(page: explore_snippets_path) do Your Snippets
= link_to explore_snippets_path, title: 'Explore snippets', data: {placement: 'right'} do = nav_link(page: explore_snippets_path) do
Explore Snippets = link_to explore_snippets_path, title: 'Explore snippets', data: {placement: 'right'} do
Explore Snippets
- if current_user
.nav-controls.hidden-xs
= link_to new_snippet_path, class: "btn btn-new", title: "New snippet" do
New snippet
...@@ -3,38 +3,34 @@ ...@@ -3,38 +3,34 @@
= render 'dashboard/snippets_head' = render 'dashboard/snippets_head'
.nav-block .nav-links.snippet-scope-menu
.controls.hidden-xs %li{ class: ("active" unless params[:scope]) }
= link_to new_snippet_path, class: "btn btn-new", title: "New snippet" do = link_to dashboard_snippets_path do
New snippet All
%span.badge
.nav-links.snippet-scope-menu = current_user.snippets.count
%li{ class: ("active" unless params[:scope]) }
= link_to dashboard_snippets_path do %li{ class: ("active" if params[:scope] == "are_private") }
All = link_to dashboard_snippets_path(scope: 'are_private') do
%span.badge Private
= current_user.snippets.count %span.badge
= current_user.snippets.are_private.count
%li{ class: ("active" if params[:scope] == "are_private") }
= link_to dashboard_snippets_path(scope: 'are_private') do %li{ class: ("active" if params[:scope] == "are_internal") }
Private = link_to dashboard_snippets_path(scope: 'are_internal') do
%span.badge Internal
= current_user.snippets.are_private.count %span.badge
= current_user.snippets.are_internal.count
%li{ class: ("active" if params[:scope] == "are_internal") }
= link_to dashboard_snippets_path(scope: 'are_internal') do %li{ class: ("active" if params[:scope] == "are_public") }
Internal = link_to dashboard_snippets_path(scope: 'are_public') do
%span.badge Public
= current_user.snippets.are_internal.count %span.badge
= current_user.snippets.are_public.count
%li{ class: ("active" if params[:scope] == "are_public") }
= link_to dashboard_snippets_path(scope: 'are_public') do .visible-xs
Public  
%span.badge = link_to new_snippet_path, class: "btn btn-new btn-block", title: "New snippet" do
= current_user.snippets.are_public.count New snippet
.visible-xs
= link_to new_snippet_path, class: "btn btn-new btn-block", title: "New snippet" do
New snippet
= render 'snippets/snippets' = render 'snippets/snippets'
...@@ -6,12 +6,4 @@ ...@@ -6,12 +6,4 @@
- else - else
= render 'explore/head' = render 'explore/head'
.row-content-block
- if current_user
= link_to new_snippet_path, class: "btn btn-new btn-wide-on-sm pull-right", title: "New snippet" do
New snippet
.oneline
Public snippets created by you and other users are listed here
= render 'snippets/snippets' = render 'snippets/snippets'
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