Merge branch 'master' into feature/sane_source
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -5,7 +5,9 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from acls import ModelPermission
|
||||
from common import MayanAppConfig, menu_facet, menu_object, menu_sidebar
|
||||
from documents.search import document_page_search, document_search
|
||||
from navigation import SourceColumn
|
||||
from rest_api.classes import APIEndPoint
|
||||
|
||||
from .links import (
|
||||
link_comment_add, link_comment_delete, link_comments_for_document
|
||||
@@ -19,12 +21,15 @@ from .permissions import (
|
||||
class DocumentCommentsApp(MayanAppConfig):
|
||||
app_namespace = 'comments'
|
||||
app_url = 'comments'
|
||||
has_tests = True
|
||||
name = 'document_comments'
|
||||
verbose_name = _('Document comments')
|
||||
|
||||
def ready(self):
|
||||
super(DocumentCommentsApp, self).ready()
|
||||
|
||||
APIEndPoint(app=self, version_string='1')
|
||||
|
||||
Document = apps.get_model(
|
||||
app_label='documents', model_name='Document'
|
||||
)
|
||||
@@ -45,6 +50,15 @@ class DocumentCommentsApp(MayanAppConfig):
|
||||
)
|
||||
SourceColumn(source=Comment, label=_('Comment'), attribute='comment')
|
||||
|
||||
document_page_search.add_model_field(
|
||||
field='document_version__document__comments__comment',
|
||||
label=_('Comments')
|
||||
)
|
||||
document_search.add_model_field(
|
||||
field='comments__comment',
|
||||
label=_('Comments')
|
||||
)
|
||||
|
||||
menu_sidebar.bind_links(
|
||||
links=(link_comment_add,),
|
||||
sources=(
|
||||
|
||||
Reference in New Issue
Block a user