Add more new icons

Add new icons for the apps: Document comments, documents, file metadata,
parsing and OCR.

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2018-12-27 05:45:01 -04:00
parent e687430cf0
commit f96057b0fd
19 changed files with 138 additions and 99 deletions

View File

@@ -52,13 +52,7 @@ class DocumentPage(models.Model):
verbose_name_plural = _('Document pages')
def __str__(self):
return _(
'Page %(page_num)d out of %(total_pages)d of %(document)s'
) % {
'document': force_text(self.document),
'page_num': self.page_number,
'total_pages': self.document_version.pages.count()
}
return self.get_label()
@cached_property
def cache_partition(self):
@@ -222,6 +216,16 @@ class DocumentPage(models.Model):
return converter.get_page()
def get_label(self):
return _(
'Page %(page_num)d out of %(total_pages)d of %(document)s'
) % {
'document': force_text(self.document),
'page_num': self.page_number,
'total_pages': self.document_version.pages.count()
}
get_label.short_description = _('Label')
def invalidate_cache(self):
self.cache_partition.purge()