Commit f87f0201f0e3386d1e0408a217650b545f57029a
1 parent
1d1b5186
Exists in
master
and in
4 other branches
link to author on tree view item
Showing
4 changed files
with
19 additions
and
3 deletions
Show diff stats
app/assets/stylesheets/projects.css.scss
| ... | ... | @@ -667,6 +667,15 @@ table.highlighttable pre{ |
| 667 | 667 | .cred { color:#D12F19; } |
| 668 | 668 | .cgreen { color:#44aa22; } |
| 669 | 669 | |
| 670 | +body.project-page table .commit { | |
| 671 | + a.tree-commit-link { | |
| 672 | + color:gray; | |
| 673 | + &:hover { | |
| 674 | + text-decoration:underline; | |
| 675 | + } | |
| 676 | + } | |
| 677 | +} | |
| 678 | + | |
| 670 | 679 | body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} |
| 671 | 680 | body.project-page #notes-list .note {padding: 10px; border-bottom: 1px solid #eee; overflow: hidden; display: block;} |
| 672 | 681 | body.project-page #notes-list .note img{float: left; margin-right: 10px;} | ... | ... |
app/helpers/application_helper.rb
| ... | ... | @@ -4,6 +4,10 @@ module ApplicationHelper |
| 4 | 4 | "http://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user_email)}?s=40&d=identicon" |
| 5 | 5 | end |
| 6 | 6 | |
| 7 | + def fixed_mode? | |
| 8 | + @view_mode == :fixed | |
| 9 | + end | |
| 10 | + | |
| 7 | 11 | def body_class(default_class = nil) |
| 8 | 12 | main = content_for(:body_class).blank? ? |
| 9 | 13 | default_class : | ... | ... |
app/views/commits/_commits.html.haml
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" |
| 18 | 18 | %span.commit-title |
| 19 | 19 | %strong |
| 20 | - = truncate(commit.safe_message, :length => 60) | |
| 20 | + = truncate(commit.safe_message, :length => fixed_mode? ? 60 : 120) | |
| 21 | 21 | %span.commit-author |
| 22 | 22 | %strong= commit.author_name |
| 23 | 23 | = time_ago_in_words(commit.committed_date) | ... | ... |
app/views/projects/_tree_item.html.haml
| ... | ... | @@ -11,5 +11,8 @@ |
| 11 | 11 | %td |
| 12 | 12 | = time_ago_in_words(content_commit.committed_date) |
| 13 | 13 | ago |
| 14 | - %td | |
| 15 | - = link_to truncate(content_commit.safe_message, :length => 40), project_commit_path(@project, content_commit) | |
| 14 | + %td.commit | |
| 15 | + = link_to truncate(content_commit.safe_message, :length => fixed_mode? ? 40 : 80), project_commit_path(@project, content_commit), :class => "tree-commit-link" | |
| 16 | + - user = @project.users.find_by_email(content_commit.author_email) | |
| 17 | + - if user | |
| 18 | + = link_to "[#{user.name}]", project_team_member_path(@project, @project.users_projects.find_by_user_id(user.id)) | ... | ... |