Commit 213e117a52d40a74c380c01dc7e84b938ad32ff8

Authored by Dmitriy Zaporozhets
1 parent bcc4e4dc

Fixed ability and modify UI a bit

app/models/ability.rb
@@ -68,7 +68,7 @@ class Ability @@ -68,7 +68,7 @@ class Ability
68 def project_report_rules 68 def project_report_rules
69 project_guest_rules + [ 69 project_guest_rules + [
70 :download_code, 70 :download_code,
71 - :fork_project 71 + :fork_project,
72 :write_project_snippet 72 :write_project_snippet
73 ] 73 ]
74 end 74 end
app/views/layouts/_head_panel.html.haml
@@ -18,6 +18,9 @@ @@ -18,6 +18,9 @@
18 %li 18 %li
19 = link_to public_root_path, title: "Public area", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do 19 = link_to public_root_path, title: "Public area", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
20 %i.icon-globe 20 %i.icon-globe
  21 + %li
  22 + = link_to snippets_path, title: "Snippets area", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
  23 + %i.icon-paste
21 - if current_user.is_admin? 24 - if current_user.is_admin?
22 %li 25 %li
23 = link_to admin_root_path, title: "Admin area", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do 26 = link_to admin_root_path, title: "Admin area", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do
app/views/layouts/snippets.html.haml
@@ -4,19 +4,20 @@ @@ -4,19 +4,20 @@
4 %body{class: "#{app_theme} application"} 4 %body{class: "#{app_theme} application"}
5 = render "layouts/head_panel", title: "Snippets" 5 = render "layouts/head_panel", title: "Snippets"
6 = render "layouts/flash" 6 = render "layouts/flash"
  7 + %nav.main-nav
  8 + .container
  9 + %ul
  10 + = nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do
  11 + = link_to root_path, title: "Back to dashboard" do
  12 + %i.icon-home
  13 + = nav_link(path: 'snippet#new') do
  14 + = link_to new_snippet_path do
  15 + New snippet
  16 + = nav_link(path: 'snippets#user_index') do
  17 + = link_to user_snippets_path(@current_user) do
  18 + My snippets
  19 + = nav_link(path: 'snippets#index') do
  20 + = link_to snippets_path do
  21 + Discover snippets
7 .container 22 .container
8 - %ul.main_menu  
9 - = nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do  
10 - = link_to root_path, title: "Back to dashboard" do  
11 - %i.icon-arrow-left  
12 - = nav_link(path: 'snippet#new') do  
13 - = link_to new_snippet_path do  
14 - New snippet  
15 - = nav_link(path: 'snippets#user_index') do  
16 - = link_to user_snippets_path(@current_user) do  
17 - My snippets  
18 - = nav_link(path: 'snippets#index') do  
19 - = link_to snippets_path do  
20 - Discover snippets  
21 -  
22 .content= yield 23 .content= yield