Commit 69e0ea626540a18866b58944ae230f4278e91ab6
1 parent
85265b1b
Exists in
master
and in
4 other branches
dashboard
Showing
4 changed files
with
39 additions
and
13 deletions
Show diff stats
app/assets/stylesheets/projects.css.scss
... | ... | @@ -557,21 +557,44 @@ tbody tr:nth-child(2n) td, tbody tr.even td { |
557 | 557 | img { |
558 | 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 | 561 | float: left; |
566 | 562 | margin: 0 20px 20px 0px; |
567 | - padding: 5px 5px;; | |
563 | + padding: 5px 0px;; | |
568 | 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 | 592 | h4 { |
571 | 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 | 64 | @date = case params[:view] |
65 | 65 | when "week" then Date.today - 7.days |
66 | 66 | else Date.today |
67 | - end | |
67 | + end.at_beginning_of_day | |
68 | 68 | |
69 | 69 | @heads = @project.repo.heads |
70 | 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 | 72 | end.flatten.uniq { |c| c.id } |
73 | 73 | |
74 | 74 | @commits.sort! do |x, y| | ... | ... |
app/views/projects/_recent_messages.html.haml
... | ... | @@ -5,21 +5,24 @@ |
5 | 5 | |
6 | 6 | - case type |
7 | 7 | - when "Issue" |
8 | + - css_class = "dash_issue" | |
8 | 9 | - issue = parent |
9 | 10 | - item_code = issue.author.email |
10 | 11 | - link_item_name = truncate(issue.title, :length => 50) |
11 | 12 | - link_to_item = project_issue_path(@project, issue) |
12 | 13 | - when "Commit" |
14 | + - css_class = "dash_commit" | |
13 | 15 | - commit = parent |
14 | 16 | - item_code = commit.author.email |
15 | 17 | - link_item_name = truncate_commit_message(commit, 50) |
16 | 18 | - link_to_item = project_commit_path(@project, :id => commit.id) |
17 | 19 | - else |
20 | + - css_class = "dash_wall" | |
18 | 21 | - item_code = @project.name |
19 | 22 | - link_item_name = "Project Wall" |
20 | 23 | - link_to_item = wall_project_path(@project) |
21 | 24 | |
22 | - %div.recent_message_parent | |
25 | + %div{ :class => "recent_message_parent #{css_class}"} | |
23 | 26 | = image_tag gravatar_icon(item_code), :class => "left", :width => 40 |
24 | 27 | %h4 |
25 | 28 | = link_to(link_item_name, link_to_item) |
... | ... | @@ -30,7 +33,7 @@ |
30 | 33 | %div.message |
31 | 34 | = image_tag gravatar_icon(note.author.email), :class => "left", :width => 24, :style => "padding-right:5px;" |
32 | 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 | 37 | - if note.attachment.url |
35 | 38 | %br |
36 | 39 | Attachment: | ... | ... |
app/views/projects/show.html.haml
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | = form_tag project_path(@project), :method => :get do |
5 | 5 | .span-2 |
6 | 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 | 8 | .span-2 |
9 | 9 | = radio_button_tag :view, "week", params[:view] == "week", :onclick => "this.form.submit()", :id => "week_view" |
10 | 10 | = label_tag "week_view","Week" |
... | ... | @@ -15,6 +15,6 @@ |
15 | 15 | =render "projects/recent_commits" |
16 | 16 | |
17 | 17 | .span-11.right |
18 | - %h3 Messages | |
18 | + %h3 Talk | |
19 | 19 | =render "projects/recent_messages" |
20 | 20 | ... | ... |