From ed4dcf7484149c4432597c81b9ce1324010e036a Mon Sep 17 00:00:00 2001
From: Andrew8xx8 <avk@8xx8.ru>
Date: Mon, 25 Mar 2013 02:18:39 +0400
Subject: [PATCH] View improved. Pagination added

---
 app/views/snippets/_snippets.html.haml |  2 ++
 app/views/snippets/index.html.haml     | 12 +++---------
 app/views/snippets/show.html.haml      |  2 +-
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/app/views/snippets/_snippets.html.haml b/app/views/snippets/_snippets.html.haml
index 8162c546ea..192cb6aa94 100644
--- a/app/views/snippets/_snippets.html.haml
+++ b/app/views/snippets/_snippets.html.haml
@@ -11,3 +11,5 @@
     %tr
       %td{colspan: 4}
         %h3.nothing_here_message Nothing here.
+
+= paginate @snippets
diff --git a/app/views/snippets/index.html.haml b/app/views/snippets/index.html.haml
index 2c00dd465d..97f7b39877 100644
--- a/app/views/snippets/index.html.haml
+++ b/app/views/snippets/index.html.haml
@@ -1,17 +1,11 @@
 %h3.page_title
-  Snippets
+  Public snippets
   %small share code pastes with others out of git repository
   = link_to new_snippet_path, class: "btn btn-small add_new pull-right", title: "New Snippet" do
     Add new snippet
 
 %hr
 .row
-  .span3
-    %ul.nav.nav-pills.nav-stacked
-      = nav_tab :scope, nil do
-        = link_to "All", snippets_path
-      = nav_tab :scope, 'projects' do
-        = link_to "Projects", snippets_path(scope: 'projects')
-
-  .span9
+  .span12
     = render 'snippets'
+
diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml
index 18348fb106..37a1181dea 100644
--- a/app/views/snippets/show.html.haml
+++ b/app/views/snippets/show.html.haml
@@ -2,7 +2,7 @@
   - if @snippet.private?
     %i.icon-lock
   - else
-    %i.icon-globe
+    %i.icon-globe.public-snippet
 
   = @snippet.title
   %small= @snippet.file_name
-- 
2.30.9