Commit 9ad444f02efbeb30365cdf7f23f9b2f846b45a03

Authored by gitlabhq
1 parent 69e0ea62

dashboard updated, links from project to dasdhboard

app/assets/stylesheets/projects.css.scss
@@ -575,8 +575,6 @@ tbody tr:nth-child(2n) td, tbody tr.even td { @@ -575,8 +575,6 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
575 border-bottom: 2px solid #ffbbbb; 575 border-bottom: 2px solid #ffbbbb;
576 span { 576 span {
577 background: #ffbbbb; 577 background: #ffbbbb;
578 - color:black;  
579 - padding:2px;  
580 } 578 }
581 } 579 }
582 &.dash_commit{ 580 &.dash_commit{
@@ -584,17 +582,35 @@ tbody tr:nth-child(2n) td, tbody tr.even td { @@ -584,17 +582,35 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
584 582
585 span{ 583 span{
586 background: #bbbbff; 584 background: #bbbbff;
587 - color:black;  
588 - padding:2px;  
589 } 585 }
590 } 586 }
591 587
  588 + &.dash_snippet{
  589 + border-bottom: 2px solid #bbffbb;
  590 +
  591 + span{
  592 + background: #bbffbb;
  593 + }
  594 + }
  595 +
  596 +
  597 + span{
  598 + border: 1px solid #aaa;
  599 + color:black;
  600 + padding:1px 4px;
  601 + }
  602 +
592 h4 { 603 h4 {
593 margin-bottom:3px; 604 margin-bottom:3px;
594 } 605 }
595 606
  607 +}
  608 +.message{
596 .author { 609 .author {
597 background: #eaeaea; 610 background: #eaeaea;
598 color: #333; 611 color: #333;
  612 + border: 1px solid #aaa;
  613 + padding:1px 2px;
  614 + margin-right:5px;
599 } 615 }
600 } 616 }
app/helpers/projects_helper.rb
@@ -8,6 +8,7 @@ module ProjectsHelper @@ -8,6 +8,7 @@ module ProjectsHelper
8 case type 8 case type
9 when "Issue" then @project.issues.find(id) 9 when "Issue" then @project.issues.find(id)
10 when "Commit" then @project.repo.commits(id).first 10 when "Commit" then @project.repo.commits(id).first
  11 + when "Snippet" then @project.snippets.find(id)
11 else 12 else
12 true 13 true
13 end 14 end
app/views/projects/_recent_messages.html.haml
@@ -10,6 +10,11 @@ @@ -10,6 +10,11 @@
10 - item_code = issue.author.email 10 - item_code = issue.author.email
11 - link_item_name = truncate(issue.title, :length => 50) 11 - link_item_name = truncate(issue.title, :length => 50)
12 - link_to_item = project_issue_path(@project, issue) 12 - link_to_item = project_issue_path(@project, issue)
  13 + - when "Snippet"
  14 + - css_class = "dash_snippet"
  15 + - item_code = parent.author.email
  16 + - link_item_name = parent.title
  17 + - link_to_item = project_snippet_path(@project, parent)
13 - when "Commit" 18 - when "Commit"
14 - css_class = "dash_commit" 19 - css_class = "dash_commit"
15 - commit = parent 20 - commit = parent
@@ -33,13 +38,15 @@ @@ -33,13 +38,15 @@
33 %div.message 38 %div.message
34 = image_tag gravatar_icon(note.author.email), :class => "left", :width => 24, :style => "padding-right:5px;" 39 = image_tag gravatar_icon(note.author.email), :class => "left", :width => 24, :style => "padding-right:5px;"
35 %p{:style => "margin-bottom: 3px;"} 40 %p{:style => "margin-bottom: 3px;"}
  41 + %span.author
  42 + = note.author.name
36 = link_to truncate(note.note, :length => 200), link_to_item + "#note_#{note.id}" 43 = link_to truncate(note.note, :length => 200), link_to_item + "#note_#{note.id}"
37 - if note.attachment.url 44 - if note.attachment.url
38 %br 45 %br
39 Attachment: 46 Attachment:
40 = link_to note.attachment_identifier, note.attachment.url 47 = link_to note.attachment_identifier, note.attachment.url
41 %br 48 %br
42 - %span 49 + -#%span
43 %span 50 %span
44 [ #{note.author.name} ] 51 [ #{note.author.name} ]
45 %cite 52 %cite
app/views/projects/_tile.html.haml
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 %div{ :class => "project", :url => project_path(project) } 4 %div{ :class => "project", :url => project_path(project) }
5 %h2 5 %h2
6 = image_tag gravatar_icon(project.name), :class => "left", :width => 40, :style => "padding-right:5px;" 6 = image_tag gravatar_icon(project.name), :class => "left", :width => 40, :style => "padding-right:5px;"
7 - = "/" + project.code 7 + = link_to ("/" + project.code), project_path(project), :style => "text-decoration:none"
8 %p= project.name 8 %p= project.name
9 %p= project.url_to_repo 9 %p= project.url_to_repo
10 -#%p 10 -#%p
app/views/snippets/show.html.haml
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
15 = link_to 'Edit', edit_project_snippet_path(@project, @snippet), :class => "lbutton positive" 15 = link_to 'Edit', edit_project_snippet_path(@project, @snippet), :class => "lbutton positive"
16 - if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user 16 - if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
17 = link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{@snippet.id}" 17 = link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{@snippet.id}"
  18 +.clear
18 %br 19 %br
19 .snippet_notes= render "notes/notes" 20 .snippet_notes= render "notes/notes"
20 21