Commit 0ba081947deaf773fbc3d62186669c0e9a91e105

Authored by Dmitriy Zaporozhets
1 parent 74632d6a

prototype styled. home button added

app/assets/images/Gear-UI.PNG 0 → 100644

1.3 KB

app/assets/stylesheets/projects.css.scss
@@ -548,7 +548,7 @@ h4.middle-panel { @@ -548,7 +548,7 @@ h4.middle-panel {
548 font-size:16px; 548 font-size:16px;
549 font-weight:bold; 549 font-weight:bold;
550 padding:5px 7px; 550 padding:5px 7px;
551 - color:#777; 551 + color:#333;
552 } 552 }
553 553
554 .git_url_wrapper { 554 .git_url_wrapper {
@@ -560,12 +560,50 @@ h4.middle-panel { @@ -560,12 +560,50 @@ h4.middle-panel {
560 padding:0px; 560 padding:0px;
561 margin:0px; 561 margin:0px;
562 font-size: 12px; 562 font-size: 12px;
563 - border-radius: 5px; 563 +
  564 + border-radius: 0px;
  565 + -moz-border-radius: 0px;
  566 +
  567 + -moz-border-radius-bottomleft: 4px;
  568 + -moz-border-radius-topleft: 4px;
  569 +
  570 + border-top-left-radius: 4px;
  571 + border-bottom-left-radius: 4px;
  572 +
564 color: #666; 573 color: #666;
565 - box-shadow: 0 1px 2px rgba(0,0,0,.2) inset;  
566 - padding: 7px 0 5px 30px;  
567 - background: white url('images.png') no-repeat 8px -40px;  
568 - width: 250px; 574 + border: 1px solid #AAA;
  575 + padding: 0 0 0 30px;
  576 + background: white url('images.png') no-repeat 8px -42px;
  577 + width: 160px;
  578 + height:26px;
  579 + }
  580 + }
  581 +}
  582 +
  583 +.top_panel_holder .chzn-container {
  584 + position:relative;
  585 +
  586 + .chzn-drop {
  587 + margin:7px 0;
  588 + border: 1px solid #CCC;
  589 + min-width: 300px;
  590 +
  591 + .chzn-results {
  592 + max-height:300px;
  593 + }
  594 + }
  595 +
  596 + .chzn-single {
  597 + background:white;
  598 + -moz-border-radius: 0;
  599 + border-radius: 0;
  600 + -moz-border-radius-bottomright: 4px;
  601 + -moz-border-radius-topright: 4px;
  602 + border-top-right-radius: 4px;
  603 + border-bottom-right-radius: 4px;
  604 +
  605 + div {
  606 + background:white;
569 } 607 }
570 } 608 }
571 } 609 }
@@ -762,3 +800,32 @@ tr.line_notes_row { @@ -762,3 +800,32 @@ tr.line_notes_row {
762 } 800 }
763 } 801 }
764 } 802 }
  803 +.top_links_holder {
  804 + width:124px;
  805 + float:left;
  806 +
  807 + .top_link {
  808 + position: relative;
  809 + float:left;
  810 +
  811 + &.home {
  812 + width:28px;
  813 + height:27px;
  814 + top: -12px;
  815 + border: 1px solid #474D57;
  816 + border-radius: 3px;
  817 + background: #fff;
  818 +
  819 + margin-right:15px;
  820 + padding: 6px 7px;
  821 + }
  822 +
  823 + &.admin {
  824 + top: -3px;
  825 + padding: 3px;
  826 + width: 21px;
  827 + height: 21px;
  828 + }
  829 + }
  830 +}
  831 +
app/assets/stylesheets/style.scss
@@ -611,7 +611,7 @@ body.project-page h2.icon .project-name i.arrow{float: right; @@ -611,7 +611,7 @@ body.project-page h2.icon .project-name i.arrow{float: right;
611 body.project-page h2.icon span{ background-position: -78px -68px; } 611 body.project-page h2.icon span{ background-position: -78px -68px; }
612 body.project-page .project-container{ position: relative; float: left; width: 100%; height: 100%; padding-bottom: 10px;} 612 body.project-page .project-container{ position: relative; float: left; width: 100%; height: 100%; padding-bottom: 10px;}
613 body.project-page .page-title{margin-bottom: 0} 613 body.project-page .page-title{margin-bottom: 0}
614 -body.project-page .project-sidebar {width: 110px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #eee; float: left; display: inline-block; background: #eee; padding: 20px 0 20px 2%; margin: 0; } 614 +body.project-page .project-sidebar {width: 110px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #eee; float: left; display: inline-block; background: #eee; padding: 20px 0 20px 2%; margin: 0; border-right: 1px solid #ddd; }
615 615
616 body.projects-page input.text.git-url { font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 0 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px; width: 136px} 616 body.projects-page input.text.git-url { font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 0 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px; width: 136px}
617 body.projects-page input.text.git-url {margin:10px 0 0 } 617 body.projects-page input.text.git-url {margin:10px 0 0 }
@@ -621,13 +621,14 @@ body.projects-page input.text.git-url {margin:10px 0 0 } @@ -621,13 +621,14 @@ body.projects-page input.text.git-url {margin:10px 0 0 }
621 621
622 body.project-page .project-sidebar aside{width: 109px} 622 body.project-page .project-sidebar aside{width: 109px}
623 body.project-page .project-sidebar aside a{ 623 body.project-page .project-sidebar aside a{
624 - display: block; position: relative; background: white; padding: 15px 10px; border-bottom: 1px solid #eee; margin: 10px 20px 0 0; 624 + display: block; position: relative; background: #F5F5F5; padding: 15px 10px;
  625 + border: 1px solid #ccc; margin: 10px 20px 0 0;
625 border-radius:5px; 626 border-radius:5px;
626 } 627 }
627 body.project-page .project-sidebar aside a:hover{background-color: #eee;} 628 body.project-page .project-sidebar aside a:hover{background-color: #eee;}
628 body.project-page .project-sidebar aside a span.number{float: right; border-radius: 5px; text-shadow: none; background: rgba(0,0,0,.12); text-align: center; padding: 5px 8px; position: absolute; top: 10px; right: 10px} 629 body.project-page .project-sidebar aside a span.number{float: right; border-radius: 5px; text-shadow: none; background: rgba(0,0,0,.12); text-align: center; padding: 5px 8px; position: absolute; top: 10px; right: 10px}
629 -body.project-page .project-sidebar aside a.current{border: 2px solid #79c3e0; }  
630 -body.project-page .project-content{ padding: 20px; display: block; margin-left: 125px; min-height: 600px} 630 +body.project-page .project-sidebar aside a.current{border: 2px solid #79c3e0; background:white; }
  631 +body.project-page .project-content{ padding: 20px; display: block; margin-left: 130px; min-height: 600px}
631 body.project-page .project-content h2{ margin-top: 6px} 632 body.project-page .project-content h2{ margin-top: 6px}
632 body.project-page .project-content .button.right{margin-left: 20px} 633 body.project-page .project-content .button.right{margin-left: 20px}
633 body.project-page table .commit a{color: #{$blue_link}} 634 body.project-page table .commit a{color: #{$blue_link}}
app/views/layouts/_head_panel.html.haml
1 / Page Header 1 / Page Header
2 -%header 2 +%header.top_panel_holder
  3 + %div.top_links_holder
  4 + = link_to root_path, :class => "top_link home", :title => "Home" do
  5 + = image_tag "Home-UI.PNG", :width => 26
  6 + - if current_user.is_admin?
  7 + = link_to admin_root_path, :class => "top_link admin", :title => "Admin" do
  8 + = image_tag "Gear-UI.PNG", :width => 20
  9 +
  10 +
3 - if @project && !@project.new_record? 11 - if @project && !@project.new_record?
4 .project_name 12 .project_name
5 = truncate @project.name, :length => 20 13 = truncate @project.name, :length => 20
6 .git_url_wrapper 14 .git_url_wrapper
7 %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"} 15 %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
8 - = yield :rss_icon  
9 -  
10 - if @project.repo_exists? 16 - if @project.repo_exists?
11 .left{:style => "margin-left:5px;"} 17 .left{:style => "margin-left:5px;"}
12 = render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" } 18 = render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" }
  19 + = yield :rss_icon
  20 +
13 .account-box 21 .account-box
14 = link_to profile_path, :class => "pic" do 22 = link_to profile_path, :class => "pic" do
15 = image_tag gravatar_icon(current_user.email) 23 = image_tag gravatar_icon(current_user.email)
app/views/layouts/project.html.haml
@@ -24,8 +24,7 @@ @@ -24,8 +24,7 @@
24 .fixed 24 .fixed
25 %aside 25 %aside
26 = link_to project_path(@project), :class => project_tab_class do 26 = link_to project_path(@project), :class => project_tab_class do
27 - = image_tag "Home-UI.PNG", :width => 26  
28 - %span{ :class => "number" } Pr 27 + Project
29 28
30 = link_to "Repository", project_repository_path(@project), :class => repository_tab_class 29 = link_to "Repository", project_repository_path(@project), :class => repository_tab_class
31 = link_to "Tree", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class 30 = link_to "Tree", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class