summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-06-15 08:54:55 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-06-15 08:54:55 -0700
commitda400b215e455cdb255bfb0aed6648c2ac1a533b (patch)
tree8cfd94d87671a1c3e7953a0ca05dc002e8161872
parentb9ab93e1086b3b6e263bbb056241769e54fc4396 (diff)
parent482f1a7d19afc6a003e094d7fbb93193f6a742b3 (diff)
downloadgitlab-ce-da400b215e455cdb255bfb0aed6648c2ac1a533b.tar.gz
Merge pull request #931 from goshakkk/comments-anchors
Add HTML anchors for comments
-rw-r--r--app/views/notes/_show.html.haml7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views/notes/_show.html.haml b/app/views/notes/_show.html.haml
index 77b15738610..3cd72c38929 100644
--- a/app/views/notes/_show.html.haml
+++ b/app/views/notes/_show.html.haml
@@ -2,9 +2,10 @@
= image_tag gravatar_icon(note.author.email), :class => "left", :width => 40, :style => "padding-right:5px;"
%div.note-author
%strong= note.author_name
- %cite.cgray
- = time_ago_in_words(note.updated_at)
- ago
+ = link_to "##{dom_id(note)}", name: dom_id(note) do
+ %cite.cgray
+ = time_ago_in_words(note.updated_at)
+ ago
- if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project)
%strong= link_to "Remove", [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-note btn small"