2015-09-25 12:07:36 +05:30
|
|
|
- page_title "Snippets"
|
|
|
|
- header_title "Snippets", dashboard_snippets_path
|
|
|
|
|
|
|
|
= render 'dashboard/snippets_head'
|
|
|
|
|
2016-01-19 16:12:03 +05:30
|
|
|
.nav-block
|
|
|
|
.controls
|
2015-09-25 12:07:36 +05:30
|
|
|
= link_to new_snippet_path, class: "btn btn-new", title: "New Snippet" do
|
2015-11-26 14:37:03 +05:30
|
|
|
= icon('plus')
|
|
|
|
New Snippet
|
2015-09-25 12:07:36 +05:30
|
|
|
|
2016-01-19 16:12:03 +05:30
|
|
|
.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
|
2015-09-25 12:07:36 +05:30
|
|
|
|
2015-11-26 14:37:03 +05:30
|
|
|
= render 'snippets/snippets'
|
2015-09-25 12:07:36 +05:30
|
|
|
|