From d4ad362387d94e78a4722e070d7a267414bff6b2 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 27 Jan 2012 01:46:32 +0200 Subject: [PATCH] Bootstrap: commits page + tree --- app/assets/stylesheets/common.scss | 7 ++- .../stylesheets/highlight.black.css.scss | 1 + app/assets/stylesheets/highlight.css.scss | 6 ++ app/assets/stylesheets/tree.scss | 1 + app/views/commits/_commits.html.haml | 3 +- app/views/commits/index.html.haml | 14 +++-- app/views/commits/show.html.haml | 1 - app/views/profile/show.html.haml | 59 ++++++++----------- app/views/refs/_tree.html.haml | 2 +- 9 files changed, 47 insertions(+), 47 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 70504019..38d43ea8 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -101,6 +101,7 @@ $blue_link: "#2fa0bb"; width: 140px; border-right: 1px solid $border_color; height:100%; + min-height:450px; } .container-fluid > .content { @@ -111,6 +112,7 @@ $blue_link: "#2fa0bb"; @import "top_panel.scss"; @import "projects.css.scss"; @import "commits.css.scss"; +@import "tree.scss"; //@import "style.scss"; //@import "notes.css.scss"; @@ -120,11 +122,10 @@ $blue_link: "#2fa0bb"; //@import "commits.css.scss"; //@import "dashboard.scss"; -//@import "tree.scss"; //@import "tags.scss"; //@import "buttons.scss"; /** CODE HIGHTLIGHT **/ -//@import "highlight.css.scss"; -//@import "highlight.black.css.scss"; +@import "highlight.css.scss"; +@import "highlight.black.css.scss"; diff --git a/app/assets/stylesheets/highlight.black.css.scss b/app/assets/stylesheets/highlight.black.css.scss index e094e48f..e63e08c8 100644 --- a/app/assets/stylesheets/highlight.black.css.scss +++ b/app/assets/stylesheets/highlight.black.css.scss @@ -1,5 +1,6 @@ .black .highlighttable { background: #333; + td.linenos { border:none; } pre { color: #eee } .highlight { background: #333; border-left:1px solid #555; } diff --git a/app/assets/stylesheets/highlight.css.scss b/app/assets/stylesheets/highlight.css.scss index d65865ec..459ae81c 100644 --- a/app/assets/stylesheets/highlight.css.scss +++ b/app/assets/stylesheets/highlight.css.scss @@ -25,7 +25,13 @@ td.linenos{ padding:10px 0px 0px 10px; margin-left:0px; } + +.linenodiv pre, .highlight pre{ + margin:0; + padding:0; + background:none; + border:none; } .linenodiv pre { diff --git a/app/assets/stylesheets/tree.scss b/app/assets/stylesheets/tree.scss index 57070871..854d75be 100644 --- a/app/assets/stylesheets/tree.scss +++ b/app/assets/stylesheets/tree.scss @@ -117,5 +117,6 @@ table.highlighttable .linenodiv pre { .tree-item { &:hover { background: #FFFFCF; + cursor:pointer; } } diff --git a/app/views/commits/_commits.html.haml b/app/views/commits/_commits.html.haml index 108d1b4c..c5fd8453 100644 --- a/app/views/commits/_commits.html.haml +++ b/app/views/commits/_commits.html.haml @@ -1,7 +1,8 @@ - @commits.group_by { |c| c.committed_date.to_date }.each do |day, commits| %div{ :class => "commits-date ui-box ui-box-small ui-box-big" } .day-commits-table - %h3= day.stamp("28 Aug, 2010") + %div.alert-message.info + %p= day.stamp("28 Aug, 2010") .data - commits.each do |commit| %a{ :class => "commit", :href => project_commit_path(@project, :id => commit.id) } diff --git a/app/views/commits/index.html.haml b/app/views/commits/index.html.haml index 5a760b3a..735b77e1 100644 --- a/app/views/commits/index.html.haml +++ b/app/views/commits/index.html.haml @@ -1,4 +1,3 @@ -- content_for(:body_class, "project-page commits-page") - if current_user.private_token = content_for :rss_icon do .rss-icon @@ -6,11 +5,14 @@ = image_tag "Rss-UI.PNG", :width => 22, :title => "feed" - if params[:path] - %h2 - = link_to project_commits_path(@project) do - = @project.code - \/ - %a{:href => "#"}= params[:path].split("/").join(" / ") + %ul.breadcrumb + %li + = link_to project_commits_path(@project) do + = @project.code + %span.divider + \/ + %li + %a{:href => "#"}= params[:path].split("/").join(" / ") %div{:id => dom_id(@project)} #commits_list= render "commits" diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml index 6010f01f..b2e9c12e 100644 --- a/app/views/commits/show.html.haml +++ b/app/views/commits/show.html.haml @@ -1,4 +1,3 @@ -- content_for(:body_class, "project-page commits-page") .commit %span.commit-info = link_to tree_project_ref_path(@project, @commit.id) do diff --git a/app/views/profile/show.html.haml b/app/views/profile/show.html.haml index 8ebb4dcb..cb933e60 100644 --- a/app/views/profile/show.html.haml +++ b/app/views/profile/show.html.haml @@ -1,38 +1,27 @@ -.ui-box.width-100p - %h3= @user.name - = form_for @user, :url => profile_update_path, :method => :put do |f| - .data - .left - -if @user.errors.any? - #error_explanation - %ul - - @user.errors.full_messages.each do |msg| - %li= msg +%h3= @user.name - .form-row - = f.label :name - %br - = f.text_field :name - .form-row - = f.label :email - %br - = f.text_field :email - .form-row - = f.label :skype - %br - = f.text_field :skype - .form-row - = f.label :linkedin - %br - = f.text_field :linkedin - .form-row - = f.label :twitter - %br - = f.text_field :twitter += form_for @user, :url => profile_update_path, :method => :put do |f| + -if @user.errors.any? + %div.alert-message.block-message.error + %ul + - @user.errors.full_messages.each do |msg| + %li= msg - .right - = image_tag gravatar_icon(current_user.email,64), :width => 64, :style => "margin:5px; border:5px solid #eee;" - .clear - .buttons - = f.submit 'Save', :class => "grey-button" + .clearfix + = f.label :name + .input= f.text_field :name + .clearfix + = f.label :email + .input= f.text_field :email + .clearfix + = f.label :skype + .input= f.text_field :skype + .clearfix + = f.label :linkedin + .input= f.text_field :linkedin + .clearfix + = f.label :twitter + .input= f.text_field :twitter + + = f.submit 'Save', :class => "primary btn" diff --git a/app/views/refs/_tree.html.haml b/app/views/refs/_tree.html.haml index 67ac6ed4..37537de7 100644 --- a/app/views/refs/_tree.html.haml +++ b/app/views/refs/_tree.html.haml @@ -12,7 +12,7 @@ = render :partial => "refs/tree_file", :locals => { :name => tree.name, :content => tree.data, :file => tree } - else - contents = tree.contents - %table#tree-slider.no-borders + %table#tree-slider %thead %th Name %th Last Update