Cleanup SourceColumn invocations
Update the code of some SourceColumn invocations to be model methods instead of lambda wapped functions. Move the translated labels to the models too. Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -77,9 +77,9 @@ def document_link(document):
|
||||
)
|
||||
|
||||
|
||||
def widget_document_page_number(document):
|
||||
return mark_safe(s=_('Pages: %d') % document.pages.count())
|
||||
def widget_document_page_number(context):
|
||||
return context['object'].pages.count()
|
||||
|
||||
|
||||
def widget_document_version_page_number(document_version):
|
||||
return mark_safe(s=_('Pages: %d') % document_version.pages.count())
|
||||
def widget_document_version_page_number(context):
|
||||
return context['object'].pages.count()
|
||||
|
||||
Reference in New Issue
Block a user