diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-10-18 15:33:30 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-10-18 15:33:30 +0400 |
commit | 961eceda69e9eaac24728cdf27e20e5b28c78471 (patch) | |
tree | 1642a25ada15c3071fe147ca94083718069984a8 /app/views | |
parent | 65608b6aaa2101ec74cc64824bef6544aa052480 (diff) |
project dashboard
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/_top_menu.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/show.html.haml | 49 |
2 files changed, 48 insertions, 4 deletions
diff --git a/app/views/projects/_top_menu.html.haml b/app/views/projects/_top_menu.html.haml index fe4b72da681..e281b93b287 100644 --- a/app/views/projects/_top_menu.html.haml +++ b/app/views/projects/_top_menu.html.haml @@ -1,7 +1,8 @@ %div.top_project_menu -#%span= link_to @project.code.capitalize, @project, :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil - if @project.repo_exists? - %span= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) || current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil + %span= link_to image_tag("home.png", :width => 20), project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil + %span= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil %span= link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil %span = link_to team_project_path(@project), :class => current_page?(:controller => "projects", :action => "team", :id => @project) ? "current" : nil do diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 0fd9c8ead19..b8e660d72f6 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,3 +1,46 @@ -%div - %div#tree-holder - = render :partial => "tree", :locals => {:repo => @repo, :commit => @commit, :tree => @commit.tree} +.span-12 + %h2 Recent commits + %hr + - @commits.each do |commit| + %div.commit + - if commit.author.email + = image_tag gravatar_icon(commit.author.email), :class => "left", :width => 40, :style => "padding-right:5px;" + - else + = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;" + %p{:style => "margin-bottom: 3px;"} + %strong + = link_to truncate_commit_message(commit, 60), project_commit_path(@project, :id => commit.id) + + %span + %span + [ #{commit.author} ] + %cite + = time_ago_in_words(commit.committed_date) + ago + %br +.span-11 + %h2 Recent Messages + %hr + - @messages.group_by{ |x| [x.noteable_id, x.noteable_type]}.each do |item, notes| + %h3 + = noteable_link(item[0], item[1], @project) + - notes.each do |note| + %div.message + .span-2 + + = image_tag gravatar_icon(note.author.email), :class => "left", :width => 40, :style => "padding-right:5px;" + %p{:style => "margin-bottom: 3px;"} + = link_to truncate(note.note, :length => 50), "#" + - if note.attachment.url + %br + Attachment: + = link_to note.attachment_identifier, note.attachment.url + %br + %span + %span + [ #{note.author.name} ] + %cite + = time_ago_in_words(note.created_at) + ago + %br + |