Update document comments app
Add keyword arguments to the app links. Remove use of `raise_404`. Update URL parameters to use document_id and comment_id. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -13,17 +13,18 @@ from .permissions import (
|
||||
)
|
||||
|
||||
link_comment_add = Link(
|
||||
args='object.pk', icon_class=icon_comment_add,
|
||||
icon_class=icon_comment_add, kwargs={'document_id': 'object.pk'},
|
||||
permissions=(permission_comment_create,), text=_('Add comment'),
|
||||
view='comments:comment_add',
|
||||
)
|
||||
link_comment_delete = Link(
|
||||
args='object.pk', icon_class=icon_comment_delete,
|
||||
icon_class=icon_comment_delete, kwargs={'comment_id': 'object.pk'},
|
||||
permissions=(permission_comment_delete,), tags='dangerous',
|
||||
text=_('Delete'), view='comments:comment_delete',
|
||||
)
|
||||
link_comments_for_document = Link(
|
||||
args='resolved_object.pk', icon_class=icon_comments_for_document,
|
||||
icon_class=icon_comments_for_document,
|
||||
kwargs={'document_id': 'resolved_object.pk'},
|
||||
permissions=(permission_comment_view,), text=_('Comments'),
|
||||
view='comments:comments_for_document',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user