diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-20 11:59:05 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-08-20 11:59:05 +0300 |
commit | b1c1a3d3cc90de98f03482a4b41b39fe9a992cc6 (patch) | |
tree | 3a36233e0fee6fa22a9213732a44f65943c08ebe /app/views/snippets | |
parent | 55fc58bda4a5592f2f8deaecec9526fbe4eecd6f (diff) |
Refactor sidebar navigation for dashboard
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/snippets')
-rw-r--r-- | app/views/snippets/_head.html.haml | 7 | ||||
-rw-r--r-- | app/views/snippets/current_user_index.html.haml | 1 | ||||
-rw-r--r-- | app/views/snippets/index.html.haml | 3 |
3 files changed, 9 insertions, 2 deletions
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 |