Commit bed882e647fbef00305eb1db792c1e3b49849baf
1 parent
60af43b9
Exists in
master
and in
4 other branches
layout fixes
Showing
2 changed files
with
9 additions
and
2 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -82,4 +82,11 @@ module ApplicationHelper |
82 | 82 | [projects, default_nav, project_nav].flatten.to_json |
83 | 83 | end |
84 | 84 | |
85 | + def project_layout | |
86 | + @project && !@project.new_record? | |
87 | + end | |
88 | + | |
89 | + def profile_layout | |
90 | + controller.controller_name == "dashboard" || current_page?(projects_path) || controller.controller_name == "profile" || controller.controller_name == "keys" | |
91 | + end | |
85 | 92 | end | ... | ... |
app/views/layouts/_head_panel.html.haml
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | = image_tag "Gear-UI.PNG", :width => 20 |
9 | 9 | |
10 | 10 | |
11 | - - if @project && !@project.new_record? | |
11 | + - if project_layout | |
12 | 12 | .project_name |
13 | 13 | = truncate @project.name, :length => 28 |
14 | 14 | .git_url_wrapper |
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | = render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" } |
19 | 19 | = yield :rss_icon |
20 | 20 | |
21 | - - if controller.controller_name == "dashboard" || current_page?(projects_path) | |
21 | + - elsif profile_layout | |
22 | 22 | = link_to "Activities", dashboard_path, :class => "dash_top_link #{"active" if current_page?(dashboard_path) || current_page?(root_path) }" |
23 | 23 | = link_to "Projects", projects_path, :class => "dash_top_link #{"active" if current_page?(projects_path)}" |
24 | 24 | = link_to "Issues", dashboard_issues_path, :class => "dash_top_link #{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide" | ... | ... |