diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 6e17a9b9c46d2b1013e91aef392a337ba3403aee..8a672407f7be56697627afa6b163e0fbf54a0434 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -78,29 +78,63 @@ a { margin-top:62px; } -.container-fluid > .sidebar { - width: 140px; - border-right: 1px solid $border_color; +.container-fluid .sidebar { + width: 250px; + border-left: 1px solid $lite_border_color; height:100%; min-height:450px; + float:right; +} - .fixed { - position:fixed; +nav.main_menu { + border-radius: 4px; + box-shadow: 0 1px 2px black; + width: 100%; + margin: auto; + margin-top:20px; + margin-bottom:20px; + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#31363e)); + background-image: -webkit-linear-gradient(#595d63 6.6%, #31363e); + background-image: -moz-linear-gradient(#595d63 6.6%, #31363e); + background-image: -o-linear-gradient(#595d63 6.6%, #31363e); + + .label { + background:$hover; + text-shadow:none; + color:$style_color; } - aside a { - display:block; - position:relative; - padding:12px 10px; - margin:10px 0 0 0; - font-size:13px; + a { + font-weight:bold; - color:$style_color; + &:first-child{ + -webkit-border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-topleft: 4px; + -moz-border-radius-bottomleft: 4px; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + } + padding: 10px 25px; + display: inline-block; + color: #D6DADF; + border-right: 1px solid #31363E; + position: relative; + box-shadow: 1px 0 0 rgba(255, 255, 255, 0.1); + margin: 0; + text-shadow: 0 -1px 0 black; + &.current { + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595d63), to(#2c2f35)); + background-image: -webkit-linear-gradient(#595d63 6.6%, #2c2f35); + background-image: -moz-linear-gradient(#595d63 6.6%, #202227); + background-image: -o-linear-gradient(#595d63 6.6%, #202227); + } } } + .container-fluid > .content { - margin-left: 160px; + margin-left: 0px; margin-top:20px; } diff --git a/app/views/layouts/_app_menu.html.haml b/app/views/layouts/_app_menu.html.haml new file mode 100644 index 0000000000000000000000000000000000000000..75e8a9bfe7f6eceabd95d469895d293aef437ea8 --- /dev/null +++ b/app/views/layouts/_app_menu.html.haml @@ -0,0 +1,6 @@ +%nav.main_menu + -#= link_to "Activities", dashboard_path, :class => "#{"active" if current_page?(dashboard_path) || current_page?(root_path) }" + = link_to "Projects", projects_path, :class => "#{"active" if current_page?(projects_path)}" + = link_to "Issues", dashboard_issues_path, :class => "#{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide" + = link_to "Requests", dashboard_merge_requests_path, :class => "#{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide" + = link_to "Help", help_path, :class => "#{"active" if controller.controller_name == "help"}" diff --git a/app/views/layouts/_app_side.html.haml b/app/views/layouts/_app_side.html.haml deleted file mode 100644 index 3c34f18880fd1e517dcfea09459c9c2975fa789e..0000000000000000000000000000000000000000 --- a/app/views/layouts/_app_side.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -.fixed - %aside - -#= link_to "Activities", dashboard_path, :class => "#{"active" if current_page?(dashboard_path) || current_page?(root_path) }" - = link_to "Projects", projects_path, :class => "#{"active" if current_page?(projects_path)}" - = link_to "Issues", dashboard_issues_path, :class => "#{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide" - = link_to "Requests", dashboard_merge_requests_path, :class => "#{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide" - = link_to "Help", help_path, :class => "#{"active" if controller.controller_name == "help"}" diff --git a/app/views/layouts/_project_menu.html.haml b/app/views/layouts/_project_menu.html.haml new file mode 100644 index 0000000000000000000000000000000000000000..721544da398acf0d69d92549ef1d3e67392a13e2 --- /dev/null +++ b/app/views/layouts/_project_menu.html.haml @@ -0,0 +1,22 @@ +%nav.main_menu + = link_to project_path(@project), :class => project_tab_class do + Project + + - if @project.repo_exists? + = link_to "Repository", project_repository_path(@project), :class => repository_tab_class + = link_to "Files", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class + = link_to "Commits", project_commits_path(@project), :class => (controller.controller_name == "commits") ? "current" : nil + + = link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil + - if @project.issues_enabled + = link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do + Issues + - if @project.merge_requests_enabled + = link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do + Merge Requests + + - if @project.wall_enabled + = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do + @Wall + - if @project.common_notes.today.count > 0 + %span.label= @project.common_notes.today.count diff --git a/app/views/layouts/_project_side.html.haml b/app/views/layouts/_project_side.html.haml deleted file mode 100644 index efb251934f88b796d3a429bdc6dc4795db31cbd6..0000000000000000000000000000000000000000 --- a/app/views/layouts/_project_side.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -.project-sidebar - .fixed - %aside - = link_to project_path(@project), :class => project_tab_class do - Project - - - if @project.repo_exists? - = link_to "Repository", project_repository_path(@project), :class => repository_tab_class - = link_to "Files", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class - = link_to "Commits", project_commits_path(@project), :class => (controller.controller_name == "commits") ? "current" : nil - - = link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil - - if @project.issues_enabled - = link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do - Issues - - if @project.merge_requests_enabled - = link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do - Merge Requests - - - if @project.wall_enabled - = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do - @Wall - - if @project.common_notes.today.count > 0 - %span.label= @project.common_notes.today.count diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml index 18eb9972e4055fa7600a0e854176dd0914504d6e..d651a50c98793c433e4dce0eb4256559a7549b55 100644 --- a/app/views/layouts/admin.html.haml +++ b/app/views/layouts/admin.html.haml @@ -5,12 +5,10 @@ = render "layouts/flash" = render "layouts/head_panel", :title => "Admin area" .container-fluid - .sidebar - .fixed - %aside - = link_to "Users", admin_users_path, :class => controller.controller_name == "users" ? "current" : nil - = link_to "Projects", admin_projects_path, :class => controller.controller_name == "projects" ? "current" : nil - = link_to "Emails", admin_emails_path, :class => controller.controller_name == "mailer" ? "current" : nil - = link_to "Resque", "/info/resque" + %nav.main_menu + = link_to "Users", admin_users_path, :class => controller.controller_name == "users" ? "current" : nil + = link_to "Projects", admin_projects_path, :class => controller.controller_name == "projects" ? "current" : nil + = link_to "Emails", admin_emails_path, :class => controller.controller_name == "mailer" ? "current" : nil + = link_to "Resque", "/info/resque" .content= yield diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index ca4e71b8935574e60f7e28d822d9a89e4496d455..1619090dc139099e5372ab18ee7ad44bb6e5f144 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -5,9 +5,8 @@ = render "layouts/flash" = render "layouts/head_panel", :title => "Dashboard" .container-fluid - .sidebar - = render :partial => "layouts/app_side" + = render :partial => "layouts/app_menu" .content .row - .span10= yield - .span4= render "layouts/projects_side" + .span12= yield + .sidebar= render "layouts/projects_side" diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml index 445a873b7436a7655e747e78d5be67e75552c1d2..0cf9fc88322a14f8c6ee704ed651889cc4fcc41a 100644 --- a/app/views/layouts/profile.html.haml +++ b/app/views/layouts/profile.html.haml @@ -5,16 +5,15 @@ = render "layouts/flash" = render "layouts/head_panel", :title => "Profile" .container-fluid - .sidebar - %aside - = link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil - = link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil - = link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil - = link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do - Keys - - unless current_user.keys.empty? - %span.label= current_user.keys.count + %nav.main_menu + = link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil + = link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil + = link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil + = link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do + Keys + - unless current_user.keys.empty? + %span.label= current_user.keys.count .content .row - .span10= yield - .span4= render "layouts/projects_side" + .span12= yield + .sidebar= render "layouts/projects_side" diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index cd5ca7142354b4de453ef6a2b3d4c0f787029828..965a40cd8b8106e4ca2b20c5002a3c2bfaf7c0f1 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -5,12 +5,12 @@ = render "layouts/flash" = render "layouts/head_panel", :title => @project.name .container-fluid - .sidebar= render :partial => "layouts/project_side" + = render :partial => "layouts/project_menu" .content - if @full_content = yield - else .row - .span10= yield - .span4= render "layouts/project_side_right" + .span12= yield + .sidebar= render "layouts/project_side_right" diff --git a/app/views/projects/_tile.html.haml b/app/views/projects/_tile.html.haml index 360cf340170a6a5efaee023f9b44cd8a5e1820b3..e5fa597d0dadc4988023a43327b34934b391763b 100644 --- a/app/views/projects/_tile.html.haml +++ b/app/views/projects/_tile.html.haml @@ -1,7 +1,7 @@ - @projects.in_groups_of(2, false) do |projects| .row - projects.each_with_index do |project, i| - .span4.well + .span5.well = link_to project_path(project) do %h3= truncate(project.name, :length => 20) %p.title.repository.git_url_wrapper diff --git a/app/views/refs/_tree.html.haml b/app/views/refs/_tree.html.haml index 9a17bb80a5e88e8689d198c25c1f3538a5d6ce11..74d194d32f0ddf4337d1b437a92ad36b4db8e380 100644 --- a/app/views/refs/_tree.html.haml +++ b/app/views/refs/_tree.html.haml @@ -19,7 +19,7 @@ = render :partial => "refs/tree_file", :locals => { :name => tree.name, :content => tree.data, :file => tree } - else - contents = tree.contents - %table#tree-slider + %table#tree-slider.bordered-table.zebra-striped %thead %th Name %th Last Update