Commit 1afd93ee1a91232a14353c0fdcecd6ee7d4b3402

Authored by Dmitriy Zaporozhets
1 parent 29b5aa2c

Bootstrap: cleaning commits css

app/assets/stylesheets/commits.css.scss
@@ -113,46 +113,3 @@ ul.bordered-list li:last-child { border:none } @@ -113,46 +113,3 @@ ul.bordered-list li:last-child { border:none }
113 tr.line_notes_row { 113 tr.line_notes_row {
114 border-bottom:1px solid #DDD; 114 border-bottom:1px solid #DDD;
115 } 115 }
116 -  
117 -/**  
118 - *  
119 - * COMMIT LIST  
120 - *  
121 - */  
122 -  
123 -.commit-info{float: right;}  
124 -.commit-info data{  
125 - padding: 4px 10px;  
126 - font-size: 11px;  
127 -}  
128 -a.commit{padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;}  
129 -a.commit:last-child {border-bottom: 0}  
130 -a.commit img{float: left; margin-right: 10px;}  
131 -a.commit .commit-title{display: block;}  
132 -a.commit .commit-title{margin-bottom: 10px}  
133 -a.commit .commit-author{color: #999; font-weight: normal; font-style: italic;}  
134 -a.commit .commit-author strong{font-weight: bold; font-style: normal;}  
135 -  
136 -.commit-button{  
137 - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.192, #fff), to(#f4f4f4));  
138 - background-image: -webkit-linear-gradient(#fff 19.2%, #f4f4f4);  
139 - background-image: -moz-linear-gradient(#fff 19.2%, #f4f4f4);  
140 - background-image: -o-linear-gradient(#fff 19.2%, #f4f4f4);  
141 - box-shadow: 0 -1px 0 white inset;  
142 - display: block;  
143 - border: 1px solid #eee;  
144 - border-radius: 5px;  
145 - margin-bottom: 2px;  
146 - position: relative;  
147 - padding-right: 20px !important;  
148 -}  
149 -  
150 -.commit-button i{  
151 - background: url('images.png') no-repeat -138px -27px;  
152 - width: 6px;  
153 - height: 9px;  
154 - float: right;  
155 - position: absolute;  
156 - top: 6px;  
157 - right: 5px;  
158 -}  
app/assets/stylesheets/projects.css.scss
@@ -52,18 +52,19 @@ @@ -52,18 +52,19 @@
52 float:left; 52 float:left;
53 margin-right:10px; 53 margin-right:10px;
54 } 54 }
55 -.news-feed .project-updates a.project-update span.update-title,.dashboard-page .news-feed .project-updates li a span.update-author { 55 +span.update-title,
  56 +span.update-author {
56 display:block; 57 display:block;
57 } 58 }
58 -.news-feed .project-updates a.project-update span.update-title { 59 +span.update-title {
59 margin-bottom:10px 60 margin-bottom:10px
60 } 61 }
61 -.news-feed .project-updates a.project-update span.update-author { 62 +span.update-author {
62 color:#999; 63 color:#999;
63 font-weight:normal; 64 font-weight:normal;
64 font-style:italic; 65 font-style:italic;
65 } 66 }
66 -.news-feed .project-updates a.project-update span.update-author strong { 67 +span.update-author strong {
67 font-weight:bold; 68 font-weight:bold;
68 font-style: normal; 69 font-style: normal;
69 } 70 }
@@ -87,7 +88,8 @@ a.update-item img { @@ -87,7 +88,8 @@ a.update-item img {
87 float:left; 88 float:left;
88 margin-right:10px; 89 margin-right:10px;
89 } 90 }
90 -a.update-item span.update-title,.dashboard-page .news-feed .project-updates li a span.update-author { 91 +span.update-title,
  92 +span.update-author {
91 display:block; 93 display:block;
92 } 94 }
93 a.update-item span.update-title { 95 a.update-item span.update-title {
app/controllers/commits_controller.rb
@@ -29,6 +29,8 @@ class CommitsController < ApplicationController @@ -29,6 +29,8 @@ class CommitsController < ApplicationController
29 29
30 @line_notes = project.commit_line_notes(@commit) 30 @line_notes = project.commit_line_notes(@commit)
31 31
  32 + render_full_content
  33 +
32 respond_to do |format| 34 respond_to do |format|
33 format.html 35 format.html
34 format.js { respond_with_notes } 36 format.js { respond_with_notes }
app/views/commits/_commits.html.haml
@@ -5,21 +5,15 @@ @@ -5,21 +5,15 @@
5 %ul.unstyled 5 %ul.unstyled
6 - commits.each do |commit| 6 - commits.each do |commit|
7 %li 7 %li
8 - %a{ :class => "commit", :href => project_commit_path(@project, :id => commit.id) }  
9 - %span.commit-info  
10 - %data.commit-button  
11 - = truncate(commit.id.to_s, :length => 16)  
12 - %i  
13 - %data.commit-browse{ :onclick => "location.href='#{tree_project_ref_path(@project, commit.id)}';return false;"}  
14 - Browse Code  
15 - - if commit.author_email  
16 - = image_tag gravatar_icon(commit.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"  
17 - - else  
18 - = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"  
19 - %span.commit-title 8 + %a{ :class => "update-item", :href => project_commit_path(@project, :id => commit.id) }
  9 + .right.btn
  10 + = truncate(commit.id.to_s, :length => 10)
  11 + »
  12 + = image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 32
  13 + %div
20 %strong 14 %strong
21 - = truncate(commit.safe_message, :length => 70)  
22 - %span.commit-author 15 + = truncate(commit.safe_message, :length => 50)
  16 + %span.update-author
23 %strong= commit.author_name 17 %strong= commit.author_name
24 = time_ago_in_words(commit.committed_date) 18 = time_ago_in_words(commit.committed_date)
25 ago 19 ago