Skip to content

Commit

Permalink
Adding conversation page link
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Villalba committed Sep 3, 2010
1 parent 9414941 commit f0187c2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
24 changes: 13 additions & 11 deletions app/views/comments/_comment.haml
Expand Up @@ -12,17 +12,19 @@
- unless rss?
.actions_menu
%span.actiondate= posted_date comment.created_at
- if can?(:update, comment) or can?(:destroy, comment)
= image_tag('triangle.png', :class => 'triangle')
.extra
- if can?(:update, comment)
= link_to t('comments.actions.edit'), [:edit, comment.project, comment.target, comment],
:rel => 'facebox', :'data-uneditable-message' => t('.cannot_edit')
- else
%span= t('.cannot_edit')
- if can?(:destroy, comment)
= link_to t('common.delete'), [comment.project, comment.target, comment], :'data-method' => 'delete',
:'data-confirm' => t('.confirm_delete'), :'data-remote' => true
= image_tag('triangle.png', :class => 'triangle')
.extra
- case comment.target
- when Conversation
= link_to t('comments.actions.conversation_url'), project_conversation_path(comment.project, comment.target)
- if can?(:update, comment)
= link_to t('comments.actions.edit'), [:edit, comment.project, comment.target, comment],
:rel => 'facebox', :'data-uneditable-message' => t('.cannot_edit')
- else
%span= t('.cannot_edit')
- if can?(:destroy, comment)
= link_to t('common.delete'), [comment.project, comment.target, comment], :'data-method' => 'delete',
:'data-confirm' => t('.confirm_delete'), :'data-remote' => true
.name
- if threaded || simpleconv
= link_to(comment.user.name, comment.user)
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Expand Up @@ -935,6 +935,7 @@ en:
errors:
cannot_update: You do not have permission to update this comment
actions:
conversation_url: Conversation page
confirm_delete: Are you sure you want to delete this comment?
convert_task: Convert to task
edit: Edit comment
Expand Down

0 comments on commit f0187c2

Please sign in to comment.