Commit 69e0ea626540a18866b58944ae230f4278e91ab6

Authored by gitlabhq
1 parent 85265b1b

dashboard

app/assets/stylesheets/projects.css.scss
@@ -557,21 +557,44 @@ tbody tr:nth-child(2n) td, tbody tr.even td { @@ -557,21 +557,44 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
557 img { 557 img {
558 padding-right:10px; 558 padding-right:10px;
559 } 559 }
560 - background: #fff !important;  
561 - background: -webkit-gradient(linear,left top,left bottom,from(#fff),to(#EAEAEA)) !important;  
562 - background: -moz-linear-gradient(top,#fff,#EAEAEA) !important;  
563 - background: transparent 9 !important;  
564 560
565 float: left; 561 float: left;
566 margin: 0 20px 20px 0px; 562 margin: 0 20px 20px 0px;
567 - padding: 5px 5px;; 563 + padding: 5px 0px;;
568 width: 420px; 564 width: 420px;
569 565
  566 + &.dash_wall{
  567 + border-bottom: 2px solid orange;
  568 + span {
  569 + background: orange;
  570 + color:black;
  571 + }
  572 + }
  573 +
  574 + &.dash_issue{
  575 + border-bottom: 2px solid #ffbbbb;
  576 + span {
  577 + background: #ffbbbb;
  578 + color:black;
  579 + padding:2px;
  580 + }
  581 + }
  582 + &.dash_commit{
  583 + border-bottom: 2px solid #bbbbff;
  584 +
  585 + span{
  586 + background: #bbbbff;
  587 + color:black;
  588 + padding:2px;
  589 + }
  590 + }
  591 +
570 h4 { 592 h4 {
571 margin-bottom:3px; 593 margin-bottom:3px;
572 } 594 }
573 595
574 - span {  
575 - 596 + .author {
  597 + background: #eaeaea;
  598 + color: #333;
576 } 599 }
577 } 600 }
app/controllers/projects_controller.rb
@@ -64,11 +64,11 @@ class ProjectsController < ApplicationController @@ -64,11 +64,11 @@ class ProjectsController < ApplicationController
64 @date = case params[:view] 64 @date = case params[:view]
65 when "week" then Date.today - 7.days 65 when "week" then Date.today - 7.days
66 else Date.today 66 else Date.today
67 - end 67 + end.at_beginning_of_day
68 68
69 @heads = @project.repo.heads 69 @heads = @project.repo.heads
70 @commits = @heads.map do |h| 70 @commits = @heads.map do |h|
71 - @project.repo.log(h.name, nil, :since => @date - 1.day) 71 + @project.repo.log(h.name, nil, :since => @date)
72 end.flatten.uniq { |c| c.id } 72 end.flatten.uniq { |c| c.id }
73 73
74 @commits.sort! do |x, y| 74 @commits.sort! do |x, y|
app/views/projects/_recent_messages.html.haml
@@ -5,21 +5,24 @@ @@ -5,21 +5,24 @@
5 5
6 - case type 6 - case type
7 - when "Issue" 7 - when "Issue"
  8 + - css_class = "dash_issue"
8 - issue = parent 9 - issue = parent
9 - item_code = issue.author.email 10 - item_code = issue.author.email
10 - link_item_name = truncate(issue.title, :length => 50) 11 - link_item_name = truncate(issue.title, :length => 50)
11 - link_to_item = project_issue_path(@project, issue) 12 - link_to_item = project_issue_path(@project, issue)
12 - when "Commit" 13 - when "Commit"
  14 + - css_class = "dash_commit"
13 - commit = parent 15 - commit = parent
14 - item_code = commit.author.email 16 - item_code = commit.author.email
15 - link_item_name = truncate_commit_message(commit, 50) 17 - link_item_name = truncate_commit_message(commit, 50)
16 - link_to_item = project_commit_path(@project, :id => commit.id) 18 - link_to_item = project_commit_path(@project, :id => commit.id)
17 - else 19 - else
  20 + - css_class = "dash_wall"
18 - item_code = @project.name 21 - item_code = @project.name
19 - link_item_name = "Project Wall" 22 - link_item_name = "Project Wall"
20 - link_to_item = wall_project_path(@project) 23 - link_to_item = wall_project_path(@project)
21 24
22 - %div.recent_message_parent 25 + %div{ :class => "recent_message_parent #{css_class}"}
23 = image_tag gravatar_icon(item_code), :class => "left", :width => 40 26 = image_tag gravatar_icon(item_code), :class => "left", :width => 40
24 %h4 27 %h4
25 = link_to(link_item_name, link_to_item) 28 = link_to(link_item_name, link_to_item)
@@ -30,7 +33,7 @@ @@ -30,7 +33,7 @@
30 %div.message 33 %div.message
31 = image_tag gravatar_icon(note.author.email), :class => "left", :width => 24, :style => "padding-right:5px;" 34 = image_tag gravatar_icon(note.author.email), :class => "left", :width => 24, :style => "padding-right:5px;"
32 %p{:style => "margin-bottom: 3px;"} 35 %p{:style => "margin-bottom: 3px;"}
33 - = link_to truncate(note.note, :length => 50), "#" 36 + = link_to truncate(note.note, :length => 200), link_to_item + "#note_#{note.id}"
34 - if note.attachment.url 37 - if note.attachment.url
35 %br 38 %br
36 Attachment: 39 Attachment:
app/views/projects/show.html.haml
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 = form_tag project_path(@project), :method => :get do 4 = form_tag project_path(@project), :method => :get do
5 .span-2 5 .span-2
6 = radio_button_tag :view, "day", (params[:view] || "day") == "day", :onclick => "this.form.submit()", :id => "day_view" 6 = radio_button_tag :view, "day", (params[:view] || "day") == "day", :onclick => "this.form.submit()", :id => "day_view"
7 - = label_tag "day_view","Day" 7 + = label_tag "day_view","Today"
8 .span-2 8 .span-2
9 = radio_button_tag :view, "week", params[:view] == "week", :onclick => "this.form.submit()", :id => "week_view" 9 = radio_button_tag :view, "week", params[:view] == "week", :onclick => "this.form.submit()", :id => "week_view"
10 = label_tag "week_view","Week" 10 = label_tag "week_view","Week"
@@ -15,6 +15,6 @@ @@ -15,6 +15,6 @@
15 =render "projects/recent_commits" 15 =render "projects/recent_commits"
16 16
17 .span-11.right 17 .span-11.right
18 - %h3 Messages 18 + %h3 Talk
19 =render "projects/recent_messages" 19 =render "projects/recent_messages"
20 20