提交 bed882e6 编写于 作者: D Dmitriy Zaporozhets

layout fixes

上级 60af43b9
......@@ -82,4 +82,11 @@ module ApplicationHelper
[projects, default_nav, project_nav].flatten.to_json
end
def project_layout
@project && !@project.new_record?
end
def profile_layout
controller.controller_name == "dashboard" || current_page?(projects_path) || controller.controller_name == "profile" || controller.controller_name == "keys"
end
end
......@@ -8,7 +8,7 @@
= image_tag "Gear-UI.PNG", :width => 20
- if @project && !@project.new_record?
- if project_layout
.project_name
= truncate @project.name, :length => 28
.git_url_wrapper
......@@ -18,7 +18,7 @@
= render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" }
= yield :rss_icon
- if controller.controller_name == "dashboard" || current_page?(projects_path)
- elsif profile_layout
= link_to "Activities", dashboard_path, :class => "dash_top_link #{"active" if current_page?(dashboard_path) || current_page?(root_path) }"
= link_to "Projects", projects_path, :class => "dash_top_link #{"active" if current_page?(projects_path)}"
= link_to "Issues", dashboard_issues_path, :class => "dash_top_link #{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册