From b1c1a3d3cc90de98f03482a4b41b39fe9a992cc6 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 20 Aug 2015 10:59:05 +0200 Subject: Refactor sidebar navigation for dashboard Signed-off-by: Dmitriy Zaporozhets --- app/views/snippets/_head.html.haml | 7 +++++++ app/views/snippets/current_user_index.html.haml | 1 + app/views/snippets/index.html.haml | 3 +-- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 app/views/snippets/_head.html.haml (limited to 'app/views/snippets') diff --git a/app/views/snippets/_head.html.haml b/app/views/snippets/_head.html.haml new file mode 100644 index 00000000000..0adf6b91f2c --- /dev/null +++ b/app/views/snippets/_head.html.haml @@ -0,0 +1,7 @@ +%ul.center-top-menu + = nav_link(page: user_snippets_path(current_user), html_options: {class: 'home'}) do + = link_to user_snippets_path(current_user), title: 'Your snippets', data: {placement: 'right'} do + Your Snippets + = nav_link(page: snippets_path) do + = link_to snippets_path, title: 'Explore snippets', data: {placement: 'right'} do + Explore Snippets diff --git a/app/views/snippets/current_user_index.html.haml b/app/views/snippets/current_user_index.html.haml index 0718f743828..a10069478f3 100644 --- a/app/views/snippets/current_user_index.html.haml +++ b/app/views/snippets/current_user_index.html.haml @@ -1,4 +1,5 @@ - page_title "Your Snippets" += render 'head' %h3.page-title Your Snippets .pull-right diff --git a/app/views/snippets/index.html.haml b/app/views/snippets/index.html.haml index e9bb6a908d3..dc45cfacd84 100644 --- a/app/views/snippets/index.html.haml +++ b/app/views/snippets/index.html.haml @@ -1,4 +1,5 @@ - page_title "Public Snippets" += render 'head' %h3.page-title Public snippets @@ -6,8 +7,6 @@ - if current_user = link_to new_snippet_path, class: "btn btn-new btn-grouped", title: "New Snippet" do Add new snippet - = link_to user_snippets_path(current_user), class: "btn btn-grouped" do - Your snippets %p.light Public snippets created by you and other users are listed here -- cgit v1.2.1