Commit a30ce86690025a57264b2e9f619a75ee8cdf4826

Authored by Dmitriy Zaporozhets
1 parent fa17712c

Improve commits list UI

app/assets/stylesheets/sections/commits.scss
@@ -345,46 +345,6 @@ @@ -345,46 +345,6 @@
345 } 345 }
346 346
347 347
348 -/**  
349 - * COMMIT ROW  
350 - */  
351 -.commit {  
352 - .browse_code_link_holder {  
353 - float: right;  
354 - }  
355 -  
356 - .committed_ago {  
357 - float: right;  
358 - @extend .cgray;  
359 - }  
360 -  
361 - .notes_count {  
362 - float: right;  
363 - margin-right: 10px;  
364 - }  
365 -  
366 - code {  
367 - background: #FCEEC1;  
368 - color: $style_color;  
369 - }  
370 -  
371 - .commit_short_id {  
372 - float: left;  
373 - @extend .lined;  
374 - min-width: 65px;  
375 - font-family: $monospace_font;  
376 - }  
377 -  
378 - .row_title {  
379 - font-weight: bold;  
380 - color: #444;  
381 - &:hover {  
382 - color: #444;  
383 - text-decoration: underline;  
384 - }  
385 - }  
386 -}  
387 -  
388 .file-stats a { 348 .file-stats a {
389 color: $style_color; 349 color: $style_color;
390 } 350 }
@@ -472,24 +432,6 @@ @@ -472,24 +432,6 @@
472 line-height: 2; 432 line-height: 2;
473 } 433 }
474 434
475 -li.commit {  
476 - .avatar {  
477 - width: 24px;  
478 - top:-5px;  
479 - margin-right: 5px;  
480 - margin-left: 10px;  
481 - }  
482 -  
483 - code {  
484 - padding: 2px 2px 0;  
485 - margin-top: -2px;  
486 - &:hover {  
487 - color: black;  
488 - border: 1px solid #ccc;  
489 - }  
490 - }  
491 -}  
492 -  
493 .commit-breadcrumb { 435 .commit-breadcrumb {
494 padding: 0; 436 padding: 0;
495 } 437 }
@@ -506,8 +448,50 @@ li.commit { @@ -506,8 +448,50 @@ li.commit {
506 } 448 }
507 } 449 }
508 450
509 -.commits-row {  
510 - padding-bottom: 10px;  
511 - margin-bottom: 10px;  
512 - border-bottom: 1px solid #DDD; 451 +.lists-separator {
  452 + margin: 10px 0;
  453 + border-top: 1px dashed #CCC;
  454 +}
  455 +
  456 +/**
  457 + * COMMIT ROW
  458 + */
  459 +li.commit {
  460 + padding: 8px;
  461 +
  462 + .commit-row-title {
  463 + font-size: 14px;
  464 + margin-bottom: 2px;
  465 +
  466 + .notes_count {
  467 + float: right;
  468 + margin-right: 10px;
  469 + }
  470 +
  471 + .commit_short_id {
  472 + float: left;
  473 + min-width: 65px;
  474 + font-family: $monospace_font;
  475 + }
  476 +
  477 + .commit-row-message {
  478 + color: #555;
  479 + font-weight: bolder;
  480 + &:hover {
  481 + color: #444;
  482 + text-decoration: underline;
  483 + }
  484 + }
  485 + }
  486 +
  487 + .commit-row-info {
  488 + a {
  489 + color: #777;
  490 + }
  491 +
  492 + .committed_ago {
  493 + float: right;
  494 + @extend .cgray;
  495 + }
  496 + }
513 } 497 }
app/views/projects/commits/_commit.html.haml
1 %li.commit 1 %li.commit
2 - .browse_code_link_holder  
3 - %p  
4 - %strong= link_to "Browse Code »", project_tree_path(project, commit), class: "right"  
5 - %p 2 + .commit-row-title
6 = link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id" 3 = link_to commit.short_id(8), project_commit_path(project, commit), class: "commit_short_id"
7 - = commit_author_link(commit, avatar: true, size: 24)  
8   4  
9 - = link_to_gfm truncate(commit.title, length: 70), project_commit_path(project, commit.id), class: "row_title"  
10 -  
11 - %time.committed_ago{ datetime: commit.committed_date, title: commit.committed_date.stamp("Aug 21, 2011 9:23pm") }  
12 - = time_ago_in_words(commit.committed_date)  
13 - ago  
14 -    
15 -  
16 - %span.notes_count 5 + = link_to_gfm truncate(commit.title, length: 70), project_commit_path(project, commit.id), class: "commit-row-message"
  6 + = link_to "Browse Code »", project_tree_path(project, commit), class: "pull-right"
  7 + .notes_count
17 - notes = project.notes.for_commit_id(commit.id) 8 - notes = project.notes.for_commit_id(commit.id)
18 - if notes.any? 9 - if notes.any?
19 %span.badge.badge-info 10 %span.badge.badge-info
20 %i.icon-comment 11 %i.icon-comment
21 = notes.count 12 = notes.count
  13 +
  14 + .commit-row-info
  15 + = commit_author_link(commit, avatar: true, size: 16)
  16 + %time.committed_ago{ datetime: commit.committed_date, title: commit.committed_date.stamp("Aug 21, 2011 9:23pm") }
  17 + = time_ago_in_words(commit.committed_date)
  18 + ago
  19 +  
app/views/projects/commits/_commits.html.haml
@@ -8,3 +8,4 @@ @@ -8,3 +8,4 @@
8 .span10 8 .span10
9 %ul.well-list 9 %ul.well-list
10 = render commits, project: @project 10 = render commits, project: @project
  11 + %hr.lists-separator