background: #2c5c66;
color:white;
}
+ &.issue {
+ background: #D12F19;
+ color:white;
+ }
+ &.commit {
+ background: #2c5c66;
+ color:white;
+ }
}
def fresh_commits(n = 10)
commits = heads.map do |h|
- repo.commits(h.name, n)
+ repo.commits(h.name, n).each { |c| c.head = h }
end.flatten.uniq { |c| c.id }
commits.sort! do |x, y|
def commits_since(date)
commits = heads.map do |h|
- repo.log(h.name, nil, :since => date)
+ repo.log(h.name, nil, :since => date).each { |c| c.head = h }
end.flatten.uniq { |c| c.id }
commits.sort! do |x, y|
%a.project-update{:href => dashboard_feed_path(project, update)}
= image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
%span.update-title
+ - if update.kind_of?(Grit::Commit)
+ %span.tag.commit= update.head.name
= dashboard_feed_title(update)
%span.update-author
%strong= update.author_name
.git_url_wrapper
%input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
%aside
- = link_to "History", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
+ = link_to "Activities", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil
= link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil
= link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do
- else
= image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"
.title
- %p= link_to truncate(commit.safe_message, :length => 40), project_commit_path(@project, :id => commit.id)
+ %p
+ %span.tag.commit= commit.head.name
+ = link_to truncate(commit.safe_message, :length => 40), project_commit_path(@project, :id => commit.id)
%span
%span.author
module CommitExt
+ attr_accessor :head
+
def safe_message
message.encode("UTF-8",
:invalid => :replace,
it "should have news feed" do
within "#news-feed" do
+ page.should have_content("master")
page.should have_content(@project.commit.author.name)
page.should have_content(@project.commit.safe_message)
end
current_path.should == project_path(@project)
end
- it "should beahave like dashboard" do
- page.should have_content("History")
+ it "should beahave like activities page" do
+ within ".commit" do
+ page.should have_content("master")
+ page.should have_content(@project.commit.author.name)
+ page.should have_content(@project.commit.safe_message)
+ end
end
-
end
describe "GET /projects/team" do