Convert the document version list view to item view mode.

Add document version preview and thumbnail widgets.
Update the new version upload event have the version
as the target and the document as the action object.

Backported from the development branch.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-08-02 03:54:21 -04:00
parent 17b79e4114
commit 0ba84f256d
8 changed files with 164 additions and 35 deletions

View File

@@ -142,10 +142,26 @@ link_document_multiple_update_page_count = Link(
link_document_multiple_restore = Link(
text=_('Restore'), view='documents:document_multiple_restore'
)
# Versions
link_document_version_download = Link(
args='resolved_object.pk', permissions=(permission_document_download,),
text=_('Download version'), view='documents:document_version_download_form'
)
link_document_version_return_document = Link(
icon='fa fa-file', permissions=(permission_document_view,),
text=_('Document'), view='documents:document_preview',
args='resolved_object.document.pk'
)
link_document_version_return_list = Link(
icon='fa fa-code-fork', permissions=(permission_document_version_view,),
text=_('Versions'), view='documents:document_version_list',
args='resolved_object.document.pk'
)
link_document_version_view = Link(
args='resolved_object.pk', permissions=(permission_document_version_view,),
text=_('Details'), view='documents:document_version_view'
)
# Views
link_document_list = Link(