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:
Roberto Rosario
2019-01-19 04:08:45 -04:00
parent 53f3261dae
commit 6376445cc4
14 changed files with 49 additions and 64 deletions

View File

@@ -60,18 +60,18 @@ class DocumentCommentsApp(MayanAppConfig):
SourceColumn(source=Comment, label=_('Date'), attribute='submit_date')
SourceColumn(
source=Comment, label=_('User'),
func=lambda context: context['object'].user.get_full_name() if context['object'].user.get_full_name() else context['object'].user
func=lambda context: context['object'].user.get_full_name() if context['object'].user.get_full_name() else context['object'].user,
label=_('User'), source=Comment
)
SourceColumn(source=Comment, label=_('Comment'), attribute='comment')
document_page_search.add_model_field(
label=_('Comments'),
field='document_version__document__comments__comment',
label=_('Comments')
)
document_search.add_model_field(
field='comments__comment',
label=_('Comments')
label=_('Comments'),
field='comments__comment'
)
menu_sidebar.bind_links(