2012-01-15 18:10:50 +00:00
|
|
|
%a{ :name => "comments" }
|
|
|
|
.block#block-list
|
|
|
|
.content
|
|
|
|
%h2.title
|
|
|
|
= t("layout.issues.comments_header")
|
|
|
|
.inner
|
|
|
|
%ul.list
|
|
|
|
- list.each do |comment|
|
|
|
|
%li
|
|
|
|
.left
|
|
|
|
= link_to comment.user.uname, user_path(comment.user.uname)
|
|
|
|
.item
|
|
|
|
= comment.body
|
|
|
|
%br
|
|
|
|
%br
|
|
|
|
- if commentable.class == Issue
|
2012-01-17 09:52:46 +00:00
|
|
|
- edit_path = edit_project_issue_comment_path(project, commentable, comment)
|
|
|
|
- delete_path = project_issue_comment_path(project, commentable, comment)
|
2012-01-15 18:10:50 +00:00
|
|
|
- elsif commentable.class == Grit::Commit
|
2012-01-17 09:52:46 +00:00
|
|
|
- edit_path = edit_project_commit_comment_path(project, commentable, comment)
|
|
|
|
- delete_path = project_commit_comment_path(project, commentable, comment)
|
2012-01-15 18:10:50 +00:00
|
|
|
= link_to t("layout.edit"), edit_path if can? :update, comment
|
2012-02-15 16:30:56 +00:00
|
|
|
=# link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), delete_path, :method => "delete", :class => "button", :confirm => t("layout.comments.confirm_delete") if can? :delete, comment
|
|
|
|
= link_to t("layout.delete"), delete_path, :method => "delete", :confirm => t("layout.comments.confirm_delete") if can? :delete, comment
|
2012-01-15 18:10:50 +00:00
|
|
|
|
|
|
|
.block
|
|
|
|
.content
|
|
|
|
%h2.title
|
|
|
|
= t("layout.comments.new_header")
|
|
|
|
.inner
|
2012-01-17 09:52:46 +00:00
|
|
|
- new_path = project_issue_comments_path(project, commentable) if commentable.class == Issue
|
|
|
|
- new_path = project_commit_comments_path(project, commentable) if commentable.class == Grit::Commit
|
2012-01-15 18:10:50 +00:00
|
|
|
= form_for :comment, :url => new_path, :method => :post, :html => { :class => :form } do |f|
|
|
|
|
= render :partial => "comments/form", :locals => {:f => f}
|