From 82d16ccfd189f5bdc65090ac7af1d4eef1f1774e Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Tue, 1 Nov 2011 22:11:24 +0200 Subject: [PATCH] commits + tree in progress --- app/assets/stylesheets/projects.css.scss | 41 ++++++++++++++--- app/views/commits/index.html.haml | 45 +++++++++++++------ app/views/issues/_issues.html.haml | 2 +- app/views/layouts/_page_title.html.haml | 5 --- app/views/layouts/project.html.haml | 1 - app/views/projects/_team.html.haml | 2 +- app/views/projects/_tree.html.haml | 56 +++++++++++++++--------- 7 files changed, 104 insertions(+), 48 deletions(-) diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index 66db914a..d8e04318 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -335,11 +335,6 @@ input.ssh_project_url { border-width: 1px; } -tbody tr:nth-child(2n) td, tbody tr.even td { - background: none repeat scroll 0 0 #F7FBFC; - border-top: 1px solid #E2EAEE; - border-bottom: 1px solid #E2EAEE; -} .top_menu_count { background: none repeat scroll 0 0 white; @@ -672,6 +667,42 @@ tbody tr:nth-child(2n) td, tbody tr.even td { } .width-65p{ width:65%; +} pre.commit_message { white-space: pre-wrap; } + +#container { + min-height:100%; +} +.ui-selectmenu{ + @include round-borders-all(4px); + margin-right:10px; + font-size:1.5em; + height:auto; + font-weight:bold; + .ui-selectmenu-status { + padding:3px 10px; + } +} + +td.code { + width: 100%; + .highlight { + margin-left: 55px; + overflow:auto; + overflow-y:hidden; + } +} +.highlight pre { + white-space: pre; + word-wrap:normal; +} + +.highlighttable tr:hover { + background:white; +} +table.highlighttable pre{ + line-height:16px !important; + font-size:12px !important; +} diff --git a/app/views/commits/index.html.haml b/app/views/commits/index.html.haml index 92a382a9..f8928b6f 100644 --- a/app/views/commits/index.html.haml +++ b/app/views/commits/index.html.haml @@ -1,16 +1,33 @@ - content_for(:body_class, "project-page commits-page") -%div - %h3 - .left - = form_tag project_commits_path(@project), :method => :get do - = select_tag "branch", options_for_select(@repo.heads.map(&:name), @branch), :onchange => "this.form.submit();", :class => "", :prompt => "Branches" -   - .left.prepend-1 - = form_tag project_commits_path(@project), :method => :get do - = select_tag "tag", options_for_select(@project.tags, @tag), :onchange => "this.form.submit();", :class => "", :prompt => "Tags" - = text_field_tag "ssh", @project.url_to_repo, :class => ["ssh_project_url", "one_click_select"] - .clear + +.left + = form_tag project_commits_path(@project), :method => :get do + = select_tag "branch", options_for_select(@repo.heads.map(&:name), @branch), :onchange => "this.form.submit();", :class => "", :prompt => "Branches" +.left + = form_tag project_commits_path(@project), :method => :get do + = select_tag "tag", options_for_select(@project.tags, @tag), :onchange => "this.form.submit();", :class => "", :prompt => "Tags" +.clear + +%br + + +-#%a.right.button{:href => "#"} Download +-#-if can? current_user, :admin_project, @project + %a.right.button.blue{:href => "#"} EDIT +%h2.icon + %span + %a.project-name{:href => "#"} + %i.arrow> + Project +   + %d + %a{:href => "#"} + = @ref - if params[:path] - %h3{:style => "color:#555"} /#{params[:path]} - %div{:id => dom_id(@project)} - = render "commits" +   + %d + %a{:href => "#"}= params[:path].split("/").join(" / ") + + +%div{:id => dom_id(@project)} + = render "commits" diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml index 11e4c38e..a6a38e69 100644 --- a/app/views/issues/_issues.html.haml +++ b/app/views/issues/_issues.html.haml @@ -1,5 +1,5 @@ %table.round-borders#issues-table - %tr + %thead - if can?(current_user, :admin_issue, @project) && !params[:f] || params[:f] == "0" %th %th Assignee diff --git a/app/views/layouts/_page_title.html.haml b/app/views/layouts/_page_title.html.haml index ec8fa89d..ea72b25a 100644 --- a/app/views/layouts/_page_title.html.haml +++ b/app/views/layouts/_page_title.html.haml @@ -1,7 +1,2 @@ - if content_for?(:page_title) = yield :page_title -- else - .grid_4 - .container_3 - %h2.icon - %span= controller.controller_name.capitalize diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 619952f1..b4b51631 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -41,6 +41,5 @@ - if @commit = link_to truncate(commit_name(@project,@commit), :length => 15), project_commit_path(@project, :id => @commit.id), :class => current_page?(:controller => "commits", :action => "show", :project_id => @project, :id => @commit.id) ? "current" : nil - .project-content = yield diff --git a/app/views/projects/_team.html.haml b/app/views/projects/_team.html.haml index 4001c7a2..d12ccac7 100644 --- a/app/views/projects/_team.html.haml +++ b/app/views/projects/_team.html.haml @@ -2,7 +2,7 @@ %div#new-member-holder = link_to "Add new", new_project_team_member_path(@project), :remote => true, :class => "lbutton vm" %table.round-borders#team-table - %tr + %thead %th Name %th Email %th Web diff --git a/app/views/projects/_tree.html.haml b/app/views/projects/_tree.html.haml index 11b04a3b..2aca18e4 100644 --- a/app/views/projects/_tree.html.haml +++ b/app/views/projects/_tree.html.haml @@ -1,31 +1,45 @@ -%h3 - .left - = form_tag tree_project_path(@project), :method => :get do - = select_tag "branch", options_for_select(@repo.heads.map(&:name), @branch), :onchange => "this.form.submit();", :class => "", :prompt => "Branches" -   - .left.prepend-1 - = form_tag tree_project_path(@project), :method => :get do - = select_tag "tag", options_for_select(@project.tags, @tag), :onchange => "this.form.submit();", :class => "", :prompt => "Tags" - = text_field_tag "ssh", @project.url_to_repo, :class => ["ssh_project_url","one_click_select"] - .clear +.left + = form_tag tree_project_path(@project), :method => :get do + = select_tag "branch", options_for_select(@repo.heads.map(&:name), @branch), :onchange => "this.form.submit();", :class => "", :prompt => "Branches" +.left + = form_tag tree_project_path(@project), :method => :get do + = select_tag "tag", options_for_select(@project.tags, @tag), :onchange => "this.form.submit();", :class => "", :prompt => "Tags" +.clear + +%br + +-#%a.right.button{:href => "#"} Download +-#-if can? current_user, :admin_project, @project + %a.right.button.blue{:href => "#"} EDIT +#tree-breadcrumbs + %h2.icon + %span + = link_to tree_project_path(@project, :path => nil, :commit_id => @commit.try(:id)), :remote => true, :class => 'project-name' do + %i.arrow> + = @project.name +   + %d + %a{:href => "#"} + = @ref + + - if params[:path] + - part_path = "" + - params[:path].split("\/").each do |part| + - part_path = File.join(part_path, part) unless part_path.empty? + - if part_path.empty? + - part_path = part + \/ + = link_to truncate(part, :length => 40), tree_file_project_path(@project, :path => part_path, :commit_id => @commit.try(:id), :branch => @branch, :tag => @tag), :remote => :true + +.clear -%h3#tree-breadcrumbs - = link_to @project.name, tree_project_path(@project, :path => nil, :commit_id => @commit.try(:id)), :remote => true - - if params[:path] - - part_path = "" - - params[:path].split("\/").each do |part| - - part_path = File.join(part_path, part) unless part_path.empty? - - if part_path.empty? - - part_path = part - \/ - = link_to truncate(part, :length => 40), tree_file_project_path(@project, :path => part_path, :commit_id => @commit.try(:id), :branch => @branch, :tag => @tag), :remote => :true #tree-content-holder - if tree.is_a?(Grit::Blob) = render :partial => "projects/tree_file", :locals => { :name => tree.name, :content => tree.data, :file => tree } - else - contents = tree.contents %table#tree-slider.round-borders - %tr + %thead %th Name %th Last Update %th