Skip to content

Manage object history using a table and highlight history link when necessary

License

Notifications You must be signed in to change notification settings

plone-ve/imio.history

 
 

Repository files navigation

imio.history

Manage object history using a table and highlight history link when necessary

The goal is to be able to manage several histories for various needs on a content and display it together, merged in the same view.

Adapters implementing the IImioHistory interface

To do this, we must ensure that the histories use same structure. We base the work on the workflow_history, though a custom history may have additional keys if necessary.

The workflow_history could looks like :

{'my_custom_workflow': (
    {'action': None, 'review_state': 'private', 'actor': 'user_id1',
    'comments': '', 'time': DateTime('2018/03/27 09:51:55.303708 GMT+2')},
    {'action': 'publish', 'review_state': 'published',
    'comments': '', 'actor': 'user_id1', 'time': DateTime('2018/03/29 15:35:24.646745 GMT+2')},
    {'action': 'retract', 'review_state': 'private',
    'comments': 'My comments', 'actor': 'admin', 'time': DateTime('2018/03/29 15:35:27.246169 GMT+2')})}

Histories are made available thru a named adapter that implements the IImioHistory interface.

By default, adapters are provided for the workflow_history (ImioWfHistoryAdapter) and revisions history (ImioRevisionHistoryAdapter).

The @@historyview

The @@historyview will display the histories as a table with each information in a column : action, author, date/time, comments.

You define in the histories_to_handle attribute of the view, what histories (named adapters) it should display.

Every histories are sorted together on the time key as it uses the same structure.

Translations

This product has been translated into

  • French.
  • Spanish.

You can contribute for any message missing or other new languages, join us at PloneGov iMiO Team into Transifex.net service with all world Plone translators community.

About

Manage object history using a table and highlight history link when necessary

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 94.2%
  • Shell 5.4%
  • CSS 0.4%