Commit 5bc97fbd3f3c9194ece68d6458ee250ca1a9a53b

Authored by Dmitriy Zaporozhets
1 parent f34b1be2

middle panel

app/assets/stylesheets/projects.css.scss
... ... @@ -529,3 +529,41 @@ h4.dash-tabs {
529 529 background: #eaeaea;
530 530 }
531 531 }
  532 +
  533 +h4.middle-panel {
  534 + margin: 0;
  535 + border-bottom: 1px solid #ccc;
  536 + padding: 10px 10px;
  537 + font-size: 11px;
  538 + padding-left:20px;
  539 + background: #F7F7F7;
  540 + height:30px;
  541 +
  542 + .project_name {
  543 + float:left;
  544 + width:160px;
  545 + margin-right:30px;
  546 + font-size:16px;
  547 + font-weight:bold;
  548 + padding:5px 7px;
  549 + color:#777;
  550 + }
  551 +
  552 + .git_url_wrapper {
  553 + padding:0px;
  554 + margin:0px;
  555 + float:left;
  556 +
  557 + .git-url {
  558 + padding:0px;
  559 + margin:0px;
  560 + font-size: 12px;
  561 + border-radius: 5px;
  562 + color: #666;
  563 + box-shadow: 0 1px 2px rgba(0,0,0,.2) inset;
  564 + padding: 7px 0 5px 30px;
  565 + background: white url('images.png') no-repeat 8px -40px;
  566 + width: 250px;
  567 + }
  568 + }
  569 +}
... ...
app/assets/stylesheets/style.scss
... ... @@ -606,7 +606,6 @@ body.project-page .project-container{ position: relative; float: left; width: 10
606 606 body.project-page .page-title{margin-bottom: 0}
607 607 body.project-page .project-sidebar {width: 180px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #f7f7f7; float: left; display: inline-block; background: #f7f7f7; padding: 20px 0 20px 2%; margin: 0; }
608 608  
609   -body.project-page input.text.git-url,
610 609 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}
611 610 body.projects-page input.text.git-url {margin:10px 0 0 }
612 611 .git_url_wrapper { margin-right:50px }
... ...
app/helpers/application_helper.rb
... ... @@ -48,7 +48,7 @@ module ApplicationHelper
48 48  
49 49 def grouped_options_refs(destination = :tree)
50 50 options = [
51   - ["Branch", @repo.heads.map(&:name) ],
  51 + ["Branch", @project.repo.heads.map(&:name) ],
52 52 [ "Tag", @project.tags ]
53 53 ]
54 54  
... ...
app/views/commits/index.html.haml
... ... @@ -3,17 +3,15 @@
3 3 -#%a.right.button{:href => "#"} Download
4 4 -#-if can? current_user, :admin_project, @project
5 5 %a.right.button.blue{:href => "#"} EDIT
6   -%h2.icon
7   - %span
8   - %d
9   - = link_to project_commits_path(@project) do
10   - = @project.name
11   - - if params[:path]
  6 +- if params[:path]
  7 + %h2.icon
  8 + %span
  9 + %d
  10 + = link_to project_commits_path(@project) do
  11 + = @project.code
12 12 \/
13 13 %a{:href => "#"}= params[:path].split("/").join(" / ")
14 14  
15   -.right= render :partial => "projects/refs", :locals => { :destination => :commits }
16   -
17 15 %div{:id => dom_id(@project)}
18 16 #commits_list= render "commits"
19 17 .clear
... ...
app/views/layouts/_middle_panel.html.haml 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +%h4.middle-panel
  2 + .project_name= truncate @project.name, :length => 20
  3 + .git_url_wrapper
  4 + %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
  5 + - if @project.repo_exists?
  6 + .right= render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" }
  7 +
... ...
app/views/layouts/project.html.haml
... ... @@ -17,11 +17,10 @@
17 17 = render :partial => "layouts/flash"
18 18 #container
19 19 = render :partial => "layouts/head_panel"
  20 + = render :partial => "layouts/middle_panel" if @project && !@project.new_record?
20 21 .project-container
21 22 .project-sidebar
22 23 .fixed
23   - .git_url_wrapper
24   - %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
25 24 %aside
26 25 = link_to "Activities", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
27 26 = link_to "Tree", tree_project_ref_path(@project, @project.root_ref), :class => current_page?(:controller => "refs", :action => "tree", :project_id => @project, :id => @ref || @project.root_ref ) ? "current" : nil
... ...
app/views/refs/_tree.html.haml
... ... @@ -8,7 +8,6 @@
8 8 \/
9 9 = link
10 10  
11   - .right= render :partial => "projects/refs", :locals => { :destination => :tree }
12 11 .clear
13 12 #tree-content-holder
14 13 - if tree.is_blob?
... ...