diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-10-19 21:41:14 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-10-19 21:41:14 +0400 |
commit | 0443346e8cc88f2051751111ba0005b860ad483d (patch) | |
tree | 97e19a557e427f1e78c49159d384e72934a14acd | |
parent | 181486649facc8d4b985470356746035b67e18c6 (diff) |
dashboard updated, links from project to dasdhboard
-rw-r--r-- | app/assets/stylesheets/projects.css.scss | 24 | ||||
-rw-r--r-- | app/helpers/projects_helper.rb | 1 | ||||
-rw-r--r-- | app/views/projects/_recent_messages.html.haml | 9 | ||||
-rw-r--r-- | app/views/projects/_tile.html.haml | 2 | ||||
-rw-r--r-- | app/views/snippets/show.html.haml | 1 |
5 files changed, 31 insertions, 6 deletions
diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index 8d5454357ff..860523b046a 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -575,8 +575,6 @@ tbody tr:nth-child(2n) td, tbody tr.even td { border-bottom: 2px solid #ffbbbb; span { background: #ffbbbb; - color:black; - padding:2px; } } &.dash_commit{ @@ -584,17 +582,35 @@ tbody tr:nth-child(2n) td, tbody tr.even td { span{ 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 { margin-bottom:3px; } +} +.message{ .author { background: #eaeaea; color: #333; + border: 1px solid #aaa; + padding:1px 2px; + margin-right:5px; } } diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 02e1df5d0b6..4a6923afd09 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -8,6 +8,7 @@ module ProjectsHelper case type when "Issue" then @project.issues.find(id) when "Commit" then @project.repo.commits(id).first + when "Snippet" then @project.snippets.find(id) else true end diff --git a/app/views/projects/_recent_messages.html.haml b/app/views/projects/_recent_messages.html.haml index 166123508ed..03f723da877 100644 --- a/app/views/projects/_recent_messages.html.haml +++ b/app/views/projects/_recent_messages.html.haml @@ -10,6 +10,11 @@ - item_code = issue.author.email - link_item_name = truncate(issue.title, :length => 50) - 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" - css_class = "dash_commit" - commit = parent @@ -33,13 +38,15 @@ %div.message = image_tag gravatar_icon(note.author.email), :class => "left", :width => 24, :style => "padding-right:5px;" %p{:style => "margin-bottom: 3px;"} + %span.author + = note.author.name = link_to truncate(note.note, :length => 200), link_to_item + "#note_#{note.id}" - if note.attachment.url %br Attachment: = link_to note.attachment_identifier, note.attachment.url %br - %span + -#%span %span [ #{note.author.name} ] %cite diff --git a/app/views/projects/_tile.html.haml b/app/views/projects/_tile.html.haml index 037aeccb228..b2466d932ce 100644 --- a/app/views/projects/_tile.html.haml +++ b/app/views/projects/_tile.html.haml @@ -4,7 +4,7 @@ %div{ :class => "project", :url => project_path(project) } %h2 = 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.url_to_repo -#%p diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index d29e0f8c7ab..bb444efec79 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -15,6 +15,7 @@ = link_to 'Edit', edit_project_snippet_path(@project, @snippet), :class => "lbutton positive" - 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}" +.clear %br .snippet_notes= render "notes/notes" |