dashboard updated, links from project to dasdhboard
This commit is contained in:
parent
69e0ea6265
commit
9ad444f02e
|
@ -575,8 +575,6 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
|
||||||
border-bottom: 2px solid #ffbbbb;
|
border-bottom: 2px solid #ffbbbb;
|
||||||
span {
|
span {
|
||||||
background: #ffbbbb;
|
background: #ffbbbb;
|
||||||
color:black;
|
|
||||||
padding:2px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.dash_commit{
|
&.dash_commit{
|
||||||
|
@ -584,17 +582,35 @@ tbody tr:nth-child(2n) td, tbody tr.even td {
|
||||||
|
|
||||||
span{
|
span{
|
||||||
background: #bbbbff;
|
background: #bbbbff;
|
||||||
color:black;
|
|
||||||
padding:2px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.dash_snippet{
|
||||||
|
border-bottom: 2px solid #bbffbb;
|
||||||
|
|
||||||
|
span{
|
||||||
|
background: #bbffbb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
span{
|
||||||
|
border: 1px solid #aaa;
|
||||||
|
color:black;
|
||||||
|
padding:1px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
margin-bottom:3px;
|
margin-bottom:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.message{
|
||||||
.author {
|
.author {
|
||||||
background: #eaeaea;
|
background: #eaeaea;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
border: 1px solid #aaa;
|
||||||
|
padding:1px 2px;
|
||||||
|
margin-right:5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ module ProjectsHelper
|
||||||
case type
|
case type
|
||||||
when "Issue" then @project.issues.find(id)
|
when "Issue" then @project.issues.find(id)
|
||||||
when "Commit" then @project.repo.commits(id).first
|
when "Commit" then @project.repo.commits(id).first
|
||||||
|
when "Snippet" then @project.snippets.find(id)
|
||||||
else
|
else
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,6 +10,11 @@
|
||||||
- item_code = issue.author.email
|
- item_code = issue.author.email
|
||||||
- link_item_name = truncate(issue.title, :length => 50)
|
- link_item_name = truncate(issue.title, :length => 50)
|
||||||
- link_to_item = project_issue_path(@project, issue)
|
- link_to_item = project_issue_path(@project, issue)
|
||||||
|
- when "Snippet"
|
||||||
|
- css_class = "dash_snippet"
|
||||||
|
- item_code = parent.author.email
|
||||||
|
- link_item_name = parent.title
|
||||||
|
- link_to_item = project_snippet_path(@project, parent)
|
||||||
- when "Commit"
|
- when "Commit"
|
||||||
- css_class = "dash_commit"
|
- css_class = "dash_commit"
|
||||||
- commit = parent
|
- commit = parent
|
||||||
|
@ -33,13 +38,15 @@
|
||||||
%div.message
|
%div.message
|
||||||
= image_tag gravatar_icon(note.author.email), :class => "left", :width => 24, :style => "padding-right:5px;"
|
= image_tag gravatar_icon(note.author.email), :class => "left", :width => 24, :style => "padding-right:5px;"
|
||||||
%p{:style => "margin-bottom: 3px;"}
|
%p{:style => "margin-bottom: 3px;"}
|
||||||
|
%span.author
|
||||||
|
= note.author.name
|
||||||
= link_to truncate(note.note, :length => 200), link_to_item + "#note_#{note.id}"
|
= link_to truncate(note.note, :length => 200), link_to_item + "#note_#{note.id}"
|
||||||
- if note.attachment.url
|
- if note.attachment.url
|
||||||
%br
|
%br
|
||||||
Attachment:
|
Attachment:
|
||||||
= link_to note.attachment_identifier, note.attachment.url
|
= link_to note.attachment_identifier, note.attachment.url
|
||||||
%br
|
%br
|
||||||
%span
|
-#%span
|
||||||
%span
|
%span
|
||||||
[ #{note.author.name} ]
|
[ #{note.author.name} ]
|
||||||
%cite
|
%cite
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
%div{ :class => "project", :url => project_path(project) }
|
%div{ :class => "project", :url => project_path(project) }
|
||||||
%h2
|
%h2
|
||||||
= image_tag gravatar_icon(project.name), :class => "left", :width => 40, :style => "padding-right:5px;"
|
= image_tag gravatar_icon(project.name), :class => "left", :width => 40, :style => "padding-right:5px;"
|
||||||
= "/" + project.code
|
= link_to ("/" + project.code), project_path(project), :style => "text-decoration:none"
|
||||||
%p= project.name
|
%p= project.name
|
||||||
%p= project.url_to_repo
|
%p= project.url_to_repo
|
||||||
-#%p
|
-#%p
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
= link_to 'Edit', edit_project_snippet_path(@project, @snippet), :class => "lbutton positive"
|
= link_to 'Edit', edit_project_snippet_path(@project, @snippet), :class => "lbutton positive"
|
||||||
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
|
- if can?(current_user, :admin_snippet, @project) || @snippet.author == current_user
|
||||||
= link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{@snippet.id}"
|
= link_to 'Destroy', [@project, @snippet], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{@snippet.id}"
|
||||||
|
.clear
|
||||||
%br
|
%br
|
||||||
.snippet_notes= render "notes/notes"
|
.snippet_notes= render "notes/notes"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue