Commit 84397ce88c09d30e14fef5d8e6a6e559ae0dcb7c
1 parent
09039323
Exists in
master
and in
4 other branches
commits page
Showing
4 changed files
with
29 additions
and
73 deletions
Show diff stats
app/assets/stylesheets/projects.css.scss
| ... | ... | @@ -102,54 +102,6 @@ table.round-borders { |
| 102 | 102 | float:left; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | -.day-commits-table { | |
| 106 | - @include round-borders-all(4px); | |
| 107 | - padding: 4px 0px; | |
| 108 | - margin-bottom:10px; | |
| 109 | - display:block; | |
| 110 | - width:100%; | |
| 111 | - background: #E6F1F6; | |
| 112 | - | |
| 113 | - .day-header { | |
| 114 | - padding:10px; | |
| 115 | - h3 { | |
| 116 | - margin:0px; | |
| 117 | - } | |
| 118 | - } | |
| 119 | - | |
| 120 | - ul { | |
| 121 | - display:block; | |
| 122 | - list-style:none; | |
| 123 | - margin:0px; | |
| 124 | - padding:0px; | |
| 125 | - | |
| 126 | - li.commit { | |
| 127 | - display:list-item; | |
| 128 | - padding:8px; | |
| 129 | - margin:0px; | |
| 130 | - background: #F7FBFC; | |
| 131 | - border-top: 1px solid #E2EAEE; | |
| 132 | - | |
| 133 | - &:first-child { | |
| 134 | - border-top: 1px solid #E2EAEE; | |
| 135 | - } | |
| 136 | - &:nth-child(2n+1) { | |
| 137 | - background: white; | |
| 138 | - } | |
| 139 | - | |
| 140 | - a.button { | |
| 141 | - width:85px; | |
| 142 | - padding:10px; | |
| 143 | - margin:0px; | |
| 144 | - float:right; | |
| 145 | - } | |
| 146 | - p { | |
| 147 | - margin-bottom: 3px; | |
| 148 | - font-size: 13px; | |
| 149 | - } | |
| 150 | - } | |
| 151 | - } | |
| 152 | -} | |
| 153 | 105 | @mixin panel-color { |
| 154 | 106 | background: #111 !important; |
| 155 | 107 | background: -webkit-gradient(linear,left top,left bottom,from(#333),to(#111)) !important; | ... | ... |
app/views/commits/_commits.html.haml
| 1 | 1 | - @commits.group_by { |c| c.committed_date.to_date }.each do |day, commits| |
| 2 | - .day-commits-table | |
| 3 | - .day-header | |
| 2 | + %div{ :class => "commits-date ui-box ui-box-small ui-box-big" } | |
| 3 | + .day-commits-table | |
| 4 | 4 | %h3= day.stamp("28 Aug, 2010") |
| 5 | - %ul | |
| 6 | - - commits.each do |commit| | |
| 7 | - %li{ :class => "commit", :url => project_commit_path(@project, :id => commit.id) } | |
| 8 | - - if commit.author.email | |
| 9 | - = image_tag gravatar_icon(commit.author.email), :class => "left", :width => 40, :style => "padding-right:5px;" | |
| 10 | - - else | |
| 11 | - = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" | |
| 12 | - %p | |
| 13 | - %strong | |
| 14 | - = truncate(commit.safe_message, :length => 60) | |
| 15 | - = link_to "Browse Code", tree_project_path(@project, :commit_id => commit.id), :class => "lite_button", :style => "float:right" | |
| 16 | - = link_to truncate(commit.id.to_s, :length => 16), project_commit_path(@project, :id => commit.id), :class => "lite_button", :style => "width:120px;float:right" | |
| 17 | - %span | |
| 18 | - %span.author | |
| 19 | - = commit.author | |
| 20 | - = time_ago_in_words(commit.committed_date) | |
| 21 | - ago | |
| 5 | + .data | |
| 6 | + - commits.each do |commit| | |
| 7 | + %a{ :class => "commit", :href => project_commit_path(@project, :id => commit.id) } | |
| 8 | + %span.commit-info | |
| 9 | + %data.commit-button | |
| 10 | + = truncate(commit.id.to_s, :length => 16) | |
| 11 | + %i | |
| 12 | + %data.commit-browse{ :onclick => "location.href='#{tree_project_path(@project, :commit_id => commit.id)}';return false;"} | |
| 13 | + Browse Code | |
| 14 | + - if commit.author.email | |
| 15 | + = image_tag gravatar_icon(commit.author.email), :class => "left", :width => 40, :style => "padding-right:5px;" | |
| 16 | + - else | |
| 17 | + = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" | |
| 18 | + %span.commit-title | |
| 19 | + %strong | |
| 20 | + = truncate(commit.safe_message, :length => 60) | |
| 21 | + %span.commit-author | |
| 22 | + %strong= commit.author | |
| 23 | + = time_ago_in_words(commit.committed_date) | |
| 24 | + ago | |
| 22 | 25 | = more_commits_link if @commits.size > 99 | ... | ... |
app/views/commits/index.html.haml
app/views/layouts/project.html.haml
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | = javascript_tag do |
| 11 | 11 | REQ_URI = "#{request.env["REQUEST_URI"]}"; |
| 12 | 12 | REQ_REFFER = "#{request.env["HTTP_REFERER"]}"; |
| 13 | - %body.project-page | |
| 13 | + %body{ :class => content_for?(:body_class) ? yield(:body_class) : 'project-page', :id => yield(:boyd_id)} | |
| 14 | 14 | #container |
| 15 | 15 | = render :partial => "layouts/flash" |
| 16 | 16 | = render :partial => "layouts/head_panel" |
| ... | ... | @@ -19,25 +19,25 @@ |
| 19 | 19 | .fixed |
| 20 | 20 | %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo} |
| 21 | 21 | %aside |
| 22 | - = link_to image_tag("home.png", :width => 20), project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil | |
| 22 | + = link_to "History", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil | |
| 23 | 23 | = link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil |
| 24 | 24 | = link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil |
| 25 | 25 | = link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do |
| 26 | 26 | Team |
| 27 | 27 | - if @project.users_projects.count > 0 |
| 28 | - %span{ :class => "top_menu_count" }= @project.users_projects.count | |
| 28 | + %span{ :class => "number" }= @project.users_projects.count | |
| 29 | 29 | = link_to project_issues_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do |
| 30 | 30 | Issues |
| 31 | 31 | - if @project.issues.opened.count > 0 |
| 32 | - %span{ :class => "top_menu_count" }= @project.issues.opened.count | |
| 32 | + %span{ :class => "number" }= @project.issues.opened.count | |
| 33 | 33 | = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do |
| 34 | 34 | Wall |
| 35 | 35 | - if @project.common_notes.count > 0 |
| 36 | - %span{ :class => "top_menu_count" }= @project.common_notes.count | |
| 36 | + %span{ :class => "number" }= @project.common_notes.count | |
| 37 | 37 | = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do |
| 38 | 38 | Snippets |
| 39 | 39 | - if @project.snippets.count > 0 |
| 40 | - %span{ :class => "top_menu_count" }= @project.snippets.non_expired.count | |
| 40 | + %span{ :class => "number" }= @project.snippets.non_expired.count | |
| 41 | 41 | - if @commit |
| 42 | 42 | = 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 |
| 43 | 43 | ... | ... |