BigW Consortium Gitlab

index.html.haml 1.27 KB
Newer Older
1 2 3 4 5
- page_title    "Snippets"
- header_title  "Snippets", dashboard_snippets_path

= render 'dashboard/snippets_head'

6
.nav-block
7 8
  .controls.hidden-xs
    = link_to new_snippet_path, class: "btn btn-new", title: "New snippet" do
9
      = icon('plus')
10
      New snippet
11

12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
  .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
36

37 38 39 40
    .visible-xs
      = link_to new_snippet_path, class: "btn btn-new btn-block", title: "New snippet" do
        = icon('plus')
        New snippet
41

42
= render 'snippets/snippets'