imio.actionspanel


Nameimio.actionspanel JSON
Version 1.65 PyPI version JSON
download
home_pagehttps://github.com/imio/imio.actionspanel
SummaryActions panel
upload_time2024-02-08 14:34:59
maintainer
docs_urlNone
authorIMIO
requires_python
licenseGPL
keywords actions panel buttons
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            imio.actionspanel
=================

This package provides a view and a sample viewlet that will display a table of different actions available on an element.

By default, so called sections available are :

- transitions
- edit
- own delete action management
- actions
- addable types
- object history

Transitions :
-------------
This will display different available workflow transitions and is managed by the section "renderTransitions".

Transitions to confirm :
^^^^^^^^^^^^^^^^^^^^^^^^
You can specify 'transitions to confirm' by overriding the '_transitionsToConfirm' method,
this will display a popup when the user trigger the transition that let's him add a
comment and accept/cancel workflow transition triggering.
The '_transitionsToConfirm' method must return a tuple that specify 'object_meta_type.transition_id' and could looks like :

def _transitionsToConfirm():
    return ('ATDocument.reject', 'ATDocument.publish', 'ATFolder.publish', 'Collection.retract', )

Edit :
------
This will display an edit action and his managed by the section "renderEdit".

By default, it is only available when useIcons is True as useIcons is supposed to be used in dashboards displaying several elements and not
on a particular element view.  On the element view, the edit action is not displayed as it is redundant with the already existing tab "Edit".

Own delete management :
-----------------------
This own delete management is made to surround behaviour where it is necessary to delete an object to have the "Delete objects" permission on the parent.  Here, it will do delete work even if user does not have the permission "Delete objects" on the object's parent.  Just having "Delete objects" on the object to delete will be enough.  You can also override the adapter "ContentDeletableAdapter" to be able to define a "mayDelete" method that will do anything you want to check if current user may delete the object.  It is managed by the section "renderOwnDelete".

Actions (portal_actions.object_buttons) :
-----------------------------------------
This will display different available actions coming from portal_actions.object_buttons and is managed by the section "renderActions".

Ignorable and acceptable actions :
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It is possible to override the IGNORABLE_ACTIONS and ACCEPTABLE_ACTIONS so you filter existing actions and avoid to display them.

If ACCEPTABLE_ACTIONS are defined, only these action will be considered.  If IGNORABLE_ACTIONS are defined, every available
actions will be considered except if the action id is in the IGNORABLE_ACTIONS.

Addable types :
---------------
This will display a combo list that will display types that are addable in the object if it is a container.  It is managed by the section "renderAddContent".

Object history :
----------------
Add a link to the object's history and will be displayed in a popup.  It is managed by the section "renderHistory".


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 <https://www.transifex.com/plone/plonegov-imio/>`_ into *Transifex.net* service with all world Plone translators community.


Changelog
=========

1.65 (2024-02-08)
-----------------

- Use `typeInfo.Title()` to get portal_type's title instead
  translating the `typeInfo.title`.
  [gbastien]

1.64 (2023-10-27)
-----------------

- Fixed profile version displayed in `portal_setup` by adding a step that
  reinstalls `imio.actionspanel`.
  [gbastien]

1.63 (2023-08-24)
-----------------

- Use `uid_catalog` if available for delete by uid view [SUP-31827]
  [mpeeters]

1.62 (2023-02-27)
-----------------

- Fixed rendering of error message when an exception occurs during a transition.
  [gbastien]
- Added new action `renderOwnDeleteWithComments=False` when deleting an element
  a comment may be entered, the deletion including comment will appear in the
  history of the parent of the element that was deleted.
  [gbastien]
- In JS function `deleteElement`, call event `ap_delete_givenuid` also when
  parameter `redirect=0`.
  [gbastien]

1.61 (2022-10-14)
-----------------

- Force by default redirect after transition just when use icons
  [fngaha]


1.60 (2022-02-04)
-----------------

- Added possibility to force refresh the page after a WF transition even if on a faceted.
  [gbastien]

1.59 (2022-01-24)
-----------------

- In `actions_panel_actions` displaying `object_buttons`, use the link_target
  defined on the action, only set it to `target="_parent"` if nothing defined
  on the action.
  [gbastien]

1.58 (2022-01-14)
-----------------

- Avoid init `member` in `__init__`, that can lead to member being `Anonymous`.
  [gbastien]
- Fixed detection if transition triggered from faceted, use `has_faceted`
  from `imio.helpers`.
  [gbastien]
- Define a with/height in CSS for icons so it can be reused by
  `collective.js.tooltipster` when it computes the size of the tooltipster.
  [gbastien]
- Added CSS id with context `UID` to the `actions_panel` table.
  [gbastien]

1.57 (2021-11-08)
-----------------

- Whenever an error occurs in `ActionsPanelView.triggerTransition`, make sure
  we get the error in the returned portal message and log the full traceback
  in the Zope log.
  [gbastien]

1.56 (2021-09-09)
-----------------

- Fixed arrow used in message explaining when a transition is not triggerable.
  [gbastien]
- Prevent double clicks when triggering a WF transition by disabling
  the link for 2 seconds.
  [gbastien]

1.55 (2021-06-04)
-----------------

- Implement method `show` when using async like it is already the case when not
  using async to know if viewlet must be shown.
  [gbastien]
- Added `saveHasActions` call in actions_panel_add_content.pt.
  [sgeulette]
- Fixed `actions_panel_arrows.pt` to display the arrows in a table so we avoid
  icons being one under others when there is not enough place to display it,
  actions have to be always on the same line.
  [gbastien]

1.54 (2021-04-26)
-----------------

- Fixed broken JS event on comment popup `Confirm` button to prevent default behavior,
  this probably leads to action not triggered from time to time on `Firefox`.
  [gbastien]

1.53 (2021-04-21)
-----------------

- Fixed `ActionsPanelView.getTransitions` check on transitions to confirm
  informations, do not consider that prefix of given transition to confirm is a
  `meta_type` but consider it as a `class name` as with `dexterity`, the
  `meta_type` is always the same an no more useable to discriminate content.
  [gbastien]
- Added parameter `forceRedirectOnOwnDelete=False` to `ActionsPanelView.__call__`,
  when deleting an element, by default if current context is a faceted,
  the user is not redirected but the page is reloaded, if we are removing the
  page that holds the faceted then we need to redirect.
  [gbastien]
- In JS function `deleteElement`, set `async:true` for the XHR request.
  [gbastien]
- Fixed bug in Firefox not executing the JS `triggerTransition` XHR request when
  `async:true`, this was due to `preventDefaultClickTransition` not applied when
  using the `@@async_actions_panel` in the viewlet displaying actions,
  it was producing a `NS_BINDING_ERROR` because 2 click events were triggered.
  [gbastien]
- When not using the `useIcons` mode (so when using viewlet displaying buttons),
  if no action at all, do not return an empty HTML table, just return nothing.
  This let's hide the entire viewlet when using the `@@async_actions_panel`.
  [gbastien]

1.52 (2021-01-26)
-----------------

- Fixed behavior of just reloading the faceted when deleting an element,
  this was broken because behavior between JS and python code changed and the
  user was redirected to the default dashboard.
  [gbastien]

1.51 (2020-12-07)
-----------------

- Added parameter `view_name="@@delete_givenuid"` to JS functions
  `confirmDeleteObject` and `deleteElement` so it is possible to call another
  view when deleting an element.
  It is also possible to avoid refresh and manage it manually.
  [gbastien]
- Make sure table containing actions does not have any border especially on `<tr>`.
  [gbastien]

1.50 (2020-08-18)
-----------------

- Make CSS rule for `input[type="button"].notTriggerableTransitionButton` more
  specific so it is taken into account.
  [gbastien]
- Fix message (tag title) displayed on a not triggerable WF transition when
  displayed as a button, the transition title was not included in the message.
  [gbastien]

1.49 (2020-06-24)
-----------------

- Fixed broken functionnality, when an action url was a `javascript` action,
  it was not always taken into account because tag <a> `href` was not disabled
  using `event.preventDefault()`.
  [gbastien]

1.48.1 (2020-05-26)
-------------------

- Requires `imio.helpers`.
  [gbastien]

1.48 (2020-05-26)
-----------------

- In `DeleteGivenUidView.__call__`, use `imio.helpers.content.uuidsToObjects`
  with parameter `check_contained_uids=True` to get the object to delete,
  so if not found querying with `UID` index, it will use the `contained_uids`
  index if it exists in the `portal_catalog`.
  [gbastien]

1.47 (2020-04-29)
-----------------

- Add Transifex.net service integration to manage the translation process.
  [macagua]
- Add Spanish translation
  [macagua]
- In `actions_panel_actions.pt`, added `<form>` around `<input>`
  to be able to use `overlays`.
  [gbastien]

1.46 (2020-02-18)
-----------------

- Added renderFolderContents section, rendered following flag and/or interface.
  [sgeulette]
- In `views.AsyncActionsPanelView.__call__`, remove random value `'_' (ajax_load)`
  from `**kwargs` before calling the `@@actions_panel` or `ram_cached`
  `@@actions_panel.__call__` never work as kwargs are always different.
  [gbastien]

1.45 (2019-11-25)
-----------------

- Changed sections order.
  [sgeulette]

1.44 (2019-09-13)
-----------------

- By default, do not display the `Edit` action when calling
  `@@async_actions_panel`.
  [gbastien]

1.43 (2019-09-12)
-----------------

- Disabled first option of add content button list.
  [sgeulette]
- Added apButtonSelect class on select button
  [sgeulette]
- Do not link anymore showEdit to showIcons.
  Disabled by default showEdit in viewlet.
  Render edit as button too.
  [sgeulette]

1.42 (2019-06-28)
-----------------

- Store result of `ActionsPanelView.getTransitions` in `self._transitions` as
  it is called several times to make sure transitions are computed only one time.
  [gbastien]
- In `ConfirmTransitionView`, store the actionspanel view instead instanciating
  it several times as call to `actionspanel.getTransitions` is cached on the
  actionspanel view.
  [gbastien]

1.41 (2019-06-07)
-----------------

- In `load_actions_panel JS function`, do not reload in case of error or the
  page is reloaded ad vitam.  Display an error message instead.
  [gbastien]
- When using `string:` expressions, do not insert a blank space like
  `string: `` or it is kept once rendered.
  [gbastien]
- Manage `IGNORABLE_ACTIONS` the same way `ACCEPTABLE_ACTIONS` so we filter out
  first every non relevant actions then we evaluate it.
  Removed management of `IGNORABLE_CATEGORIES` and `IGNORABLE_PROVIDERS`, we
  only keep `object_buttons` and providers `portal_actions/portal_types`.
  [gbastien]

1.40 (2019-05-16)
-----------------

- Fixed message `KeyError: 'confirm'` in Zope log when a transition is
  triggered on an element for which it is not available anymore
  (already triggered in another browser tab for example).  In this case,
  we just refresh the page.
  [gbastien]
- Fix `saveHasActions` is not called when only untriggerable transitions.
  [gbastien]

1.39 (2019-03-27)
-----------------

- When showing actions and ACCEPTABLE_ACTIONS is defined, directly worked
  with those restricted set. Faster method.
  [sgeulette]
- Added parameter ActionsPanelViewlet.async (set to False by default) to be
  able to render the actions panel viewlet asynchronously using a JS Ajax
  request.  Set every JS ajax request with async:false to be sure that screen
  is refreshed when state changed.
  [gbastien]
- Disabled showOwnDelete when 'delete' is in acceptable actions
  [sgeulette]

1.38 (2019-01-31)
-----------------

- Install `collective.fingerpointing` as we rely on it.
  [gbastien]
- By default, do not render the viewlet in overlays.
  [gbastien]

1.37 (2018-11-06)
-----------------

- Use safely unicoded transition title.
  [sgeulette]

1.36 (2018-08-22)
-----------------

- Moved `views._redirectToViewableUrl` logic to `utils.findViewableURL` so it
  can be used by external code.
  [gbastien]
- Don't nullify margin of actionspanel-no-style-table.
  [sgeulette]

1.35 (2018-05-22)
-----------------

- In `triggerTransition`, do not only catch `WorkflowException` as raised error
  could be of another type.
  [gbastien]
- When an error occurs during a workflow transition, make sure we
  `transaction.abort()` or `review_state` is changed nevertheless.
  [gbastien]

1.34 (2018-04-20)
-----------------

- Use a real arrow character `🡒` instead `->` when building the transition not
  triggerable icon help message.
  [gbastien]
- Fixed call to unexisting method `actionspanel_view._gotoReferer()` when
  cancelling transition confirmation popup (only happens if popup is not
  correctly opened as an overlay).
  [gbastien]

1.33 (2018-03-19)
-----------------

- Rely on imio.history IHContentHistoryView.show_history to know if the history
  icon must be shown.  We need imio.history >= 1.17.
  [gbastien]

1.32 (2018-01-06)
-----------------

- Added possibility to define a target on the edit action. To do this,
  pass the value for `edit_action_target` in the kwargs.
  [sgeulette]

1.31 (2017-11-10)
-----------------

- Added icon on object buttons.
  [sgeulette]
- Added separate external edit button
  [sgeulette]

1.30 (2017-10-03)
-----------------

- Rely on `collective.fingerpointing` for logging capabilities, this replace the
  log message when an element is deleted.
  [gbastien]
- Call `transaction.abort` when an error occurs during deletion in
  `DeleteGivenUidView` to avoid leaving portal in an unconsitent state.
  [gbastien]

1.29 (2017-08-30)
-----------------

- Trigger JS event `ap_delete_givenuid` when an element is removed from a
  faceted page.
  [gbastien]
- Only show the actions panel viewlet on the view of the element, not on the
  other templates like `folder_contents` because it also displays buttons and
  user could be confused about that.
  [gbastien]
- Use same class `apButton` for buttons and select (add content) displayed on
  the actions panel viewlet.
  [gbastien]

1.28 (2017-05-24)
-----------------

- Added parameter `catch_before_delete_exception=True` to the
  `DeleteGivenUidView`.  By default it will catch `BeforeDeleteException`
  but when set to False, it will not be catch it.  This let's catch
  the exception in another method.
  [gbastien]
- Call `reindexObject` when the BeforeDeleteException is catched because at
  this moment, object has already been unindexed.
  [gbastien]

1.27 (2017-05-10)
-----------------

- Use api.adopt_roles rather than create a super user to execute a "own" delete
  action.
  [sdelcourt]
- Use plone.api.
  [gbastien]
- Pass `**kwargs` to ContentDeletableAdapter.mayDelete.
  [gbastien]

1.26 (2017-04-13)
-----------------

- Make sure action title is translated.
  [gbastien]

1.25 (2017-03-22)
-----------------

- Display the description of actions while displayed as input.
  [gbastien]

1.24 (2017-02-14)
-----------------

- Added class on form button.
  Changed select translation.
  [sgeulette]
- The transition reason for which a transition can not be triggered now contains
  the msg as a `zope.i18nmessageid.message.Message` instance, so translate it.
  This is done because the appy `No` msg attribute can not be unicode...
  [gbastien]

1.23 (2017-01-30)
-----------------

- Fix workflow guard check on group conditions.
  [sdelcourt]


1.22 (2017-01-23)
-----------------

- Corrected code to work with collective.externaleditor >= 1.0.3.
  [sgeulette]

1.21 (2016-12-21)
-----------------

- Implemented method `getGroups` for the APOmnipotentUser
  that returns an empty list because default implementation
  will raise an `AttributeError` on `portal_groups`.
  [gbastien]

1.20 (2016-12-05)
-----------------

- Added possibility to define a CSS class on the edit action.  To do this,
  pass the value for `edit_action_class` in the kwargs.  This make it possible
  to use a class that will enable an overlay for the edit action.
  [gbastien]
- Added section that renders arrows to move elements to top/up/down/bottom,
  this only appears if useIcons is True.
  [gbastien]
- While rendering transition button including portal_type title, translate
  portal_type title in the domain defined on the typeInfo of portal_types,
  not systematically in the "plone" domain.
  [gbastien]
- When an element is deleted, check if response received by JS method
  `deleteElement` is an url or a page content.  In case a Redirect exception
  is raised, we receive the entire page content and not an url to redirect to.
  [gbastien]
- Use permission `ManageProperties` to protect the `renderArrows` section.
  Make sure `saveHasActions` is called correctly in the
  `actions_panel_arrows.pt` template.
  [gbastien]
- Check if current context is a folderish in `addableContents` used for the
  `deleteElement` section because `folder_factories` return parent's addable
  content_types if current context is not folderish, this makes the button
  appear when you can not add content, and if used, content is actually added
  to the parent.
  [gbastien]
- Translate workflow transition title and no more id
  [sgeulette]

1.19 (2016-06-22)
-----------------

- Take external edition into account when rendering the `edit` action.
  [sdelcourt]

1.18 (2016-06-17)
-----------------

- Use window.open(url, `_parent`) to manage actions instead of window.location
  so new location is opened in the `_parent` frame, this way, when opened from
  an iframe, the location is not opened in the iframe but in the parent/full
  frame.
  [gbastien]
- Fixed CSS style for the notTriggerableTransition CSS class so it is displayed
  correctly in Chrome.
  [gbastien]

1.17 (2016-04-15)
-----------------

- Made a transitions sort method, that can be overrided.
  [sgeulette]

1.16 (2016-01-21)
-----------------

- Message when deleting an element (delete_confirm_message) is now more
  clear to specify that element will be deleted from the system definitively.
  [gbastien]
- When a WorkflowException is raised during a WF transition, display the exception
  message, this way a beforeTransition event may raise this exception and display
  a particular message to the user.
  [gbastien]


1.15 (2015-12-03)
-----------------

- Use an onClick instead of the `href` on the actions rendered by the
  `actions_panel_actions.pt` to be able to use a javascript method for
  the action URL.
  [gbastien]
- Use `async:false` for jQuery.ajax calls so the ajax loader image (spinner)
  is displayed in IE and Chrome.
  [gbastien]


1.14 (2015-10-06)
-----------------

- Use `POST` as type of jQuery.ajax used to add a comment to a workflow
  transition or it fails when the comment is too long.
  [gbastien]


1.13 (2015-09-04)
-----------------

- CSS for buttons displayed on the transition confirmation popup
  [gbastien]


1.12 (2015-07-14)
-----------------

- Make trigger transition and own delete aware of faceted navigation.
  If the action is made in a faceted navigation, only the faceted page
  is reloaded, not the entire page
  [gbastien]
- Hide the Add menu if no addable content
  [sgeulette]


1.11 (2015-04-23)
-----------------

- Do not generate the image name to use for a transition but
  use the actbox_icon defined on the transition
  [gbastien]


1.10 (2015-04-01)
-----------------

- Use translated transition title in transition confirmation popup
  [gbastien]
- Simplified @@triggertransition view by not using objectUID anymore, we use the context
  as the view is called on it, objectUID was legacy and useless
  [gbastien]


1.9 (2015-03-30)
----------------

- Store transitions to confirm in the registry
  [sgeulette]
- Add a small margin-left to the `notTriggerableTransitionImage` class so if several not
  triggerable transition actions are displayed, it is not stuck together
  [gbastien]
- Rely on imio.history to manage history related section
  [gbastien]

1.8 (2014-11-05)
----------------

- Removed IObjectWillBeRemovedEvent, either use same event from OFS.interfaces or in case we use
  AT, we could need to override manage_beforeDelete as it is called before IObjectWillBeRemovedEvent
  in the OFS object removal machinery.
- Do only rely on `mayDelete` method instead of checking `Delete objects` and mayDelete method,
  this way, we may handle case where user does not have the `Delete objects` but we want him
  to be able to delete an element nevertheless, in this case, the all logic is managed by mayDelete.


1.7 (2014-09-04)
----------------

- Sort transitions by transition title, more easy to use when displaying several transitons.
- Corrected bug where the link to trigger a transition that did not need to be confirmed,
  did not contain the view name, only parameters.  This made the user being redirected to the object
  view and not able to trigger the transition from another place.


1.6 (2014-08-21)
----------------

- Added submethod _findViewablePlace in _computeBackURL where we can manage
  where to redirect the member when he was on the object he just deleted.
  This makes it possible to override only the _findViewable method
  and keep the other part of _computeBackURL that does manage the case when
  the member was not on the object he just deleted.
- Custom action_panels views can now be registered with a different name
  than `actions_panel`.


1.5 (2014-08-20)
----------------

- Adpated _transitionsToConfirm method to be also able to provide custom
  view name to use as confirmation popup.


1.4 (2014-08-19)
----------------

- Moved complete computation of back url when an object is removed to
  _computeBackURL, not only the case when we were on the object we just removed.
- Added CSS class `actionspanel-no-style-table` on the main actions_panel table
  and defined styles for it to remove any border/margin/padding.


1.3 (2014-08-19)
----------------
- Added section that render a link to the object's history if useIcons is True
- Not triggerable transitions are now also displayed using icon if useIcons is True,
  before, not triggerable transitions were always displayed as button, no mater useIcons
  was True or False
- Simplified method that compute addable contents, the default `folder_factories`
  does all the job
- Manage the fact that if after a transition has been triggered on an object,
  this object is not accessible anymore to the current user, it is redirected
  to a viewable place

1.2 (2014-07-01)
----------------
- Do not lookup an object UID in the uid_catalog,
  this fails when using dexterity, use portal_catalog or
  check context UID if element is not indexed
- Do not display a `-` when no actions to display and not using icons
- Implement `__call__` instead of `render` on the actions panel view
  so calling the view is simpler
- Display AddContent actions.

1.1 (2014-04-03)
----------------
- Optimized to be `listing-aware` do some caching by storing not changing parameters
  into the request and so avoid to recompute it each time the view is instanciated
- Corrected bug when a transition was triggered using the confirmation popup and
  resulting object was no more accessible, the popup was recomputed and it raised Unauthorized

1.0 (2014-02-12)
----------------
- Initial release
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/imio/imio.actionspanel",
    "name": "imio.actionspanel",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "actions panel buttons",
    "author": "IMIO",
    "author_email": "dev@imio.be",
    "download_url": "https://files.pythonhosted.org/packages/14/14/595fa75f1063096f4fe8d02cd368f64a19be6e82191cc978cb48e65fea3b/imio.actionspanel-1.65.tar.gz",
    "platform": null,
    "description": "imio.actionspanel\n=================\n\nThis package provides a view and a sample viewlet that will display a table of different actions available on an element.\n\nBy default, so called sections available are :\n\n- transitions\n- edit\n- own delete action management\n- actions\n- addable types\n- object history\n\nTransitions :\n-------------\nThis will display different available workflow transitions and is managed by the section \"renderTransitions\".\n\nTransitions to confirm :\n^^^^^^^^^^^^^^^^^^^^^^^^\nYou can specify 'transitions to confirm' by overriding the '_transitionsToConfirm' method,\nthis will display a popup when the user trigger the transition that let's him add a\ncomment and accept/cancel workflow transition triggering.\nThe '_transitionsToConfirm' method must return a tuple that specify 'object_meta_type.transition_id' and could looks like :\n\ndef _transitionsToConfirm():\n    return ('ATDocument.reject', 'ATDocument.publish', 'ATFolder.publish', 'Collection.retract', )\n\nEdit :\n------\nThis will display an edit action and his managed by the section \"renderEdit\".\n\nBy default, it is only available when useIcons is True as useIcons is supposed to be used in dashboards displaying several elements and not\non a particular element view.  On the element view, the edit action is not displayed as it is redundant with the already existing tab \"Edit\".\n\nOwn delete management :\n-----------------------\nThis own delete management is made to surround behaviour where it is necessary to delete an object to have the \"Delete objects\" permission on the parent.  Here, it will do delete work even if user does not have the permission \"Delete objects\" on the object's parent.  Just having \"Delete objects\" on the object to delete will be enough.  You can also override the adapter \"ContentDeletableAdapter\" to be able to define a \"mayDelete\" method that will do anything you want to check if current user may delete the object.  It is managed by the section \"renderOwnDelete\".\n\nActions (portal_actions.object_buttons) :\n-----------------------------------------\nThis will display different available actions coming from portal_actions.object_buttons and is managed by the section \"renderActions\".\n\nIgnorable and acceptable actions :\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nIt is possible to override the IGNORABLE_ACTIONS and ACCEPTABLE_ACTIONS so you filter existing actions and avoid to display them.\n\nIf ACCEPTABLE_ACTIONS are defined, only these action will be considered.  If IGNORABLE_ACTIONS are defined, every available\nactions will be considered except if the action id is in the IGNORABLE_ACTIONS.\n\nAddable types :\n---------------\nThis will display a combo list that will display types that are addable in the object if it is a container.  It is managed by the section \"renderAddContent\".\n\nObject history :\n----------------\nAdd a link to the object's history and will be displayed in a popup.  It is managed by the section \"renderHistory\".\n\n\nTranslations\n------------\n\nThis product has been translated into\n\n- French.\n\n- Spanish.\n\nYou can contribute for any message missing or other new languages, join us at `PloneGov iMiO Team <https://www.transifex.com/plone/plonegov-imio/>`_ into *Transifex.net* service with all world Plone translators community.\n\n\nChangelog\n=========\n\n1.65 (2024-02-08)\n-----------------\n\n- Use `typeInfo.Title()` to get portal_type's title instead\n  translating the `typeInfo.title`.\n  [gbastien]\n\n1.64 (2023-10-27)\n-----------------\n\n- Fixed profile version displayed in `portal_setup` by adding a step that\n  reinstalls `imio.actionspanel`.\n  [gbastien]\n\n1.63 (2023-08-24)\n-----------------\n\n- Use `uid_catalog` if available for delete by uid view [SUP-31827]\n  [mpeeters]\n\n1.62 (2023-02-27)\n-----------------\n\n- Fixed rendering of error message when an exception occurs during a transition.\n  [gbastien]\n- Added new action `renderOwnDeleteWithComments=False` when deleting an element\n  a comment may be entered, the deletion including comment will appear in the\n  history of the parent of the element that was deleted.\n  [gbastien]\n- In JS function `deleteElement`, call event `ap_delete_givenuid` also when\n  parameter `redirect=0`.\n  [gbastien]\n\n1.61 (2022-10-14)\n-----------------\n\n- Force by default redirect after transition just when use icons\n  [fngaha]\n\n\n1.60 (2022-02-04)\n-----------------\n\n- Added possibility to force refresh the page after a WF transition even if on a faceted.\n  [gbastien]\n\n1.59 (2022-01-24)\n-----------------\n\n- In `actions_panel_actions` displaying `object_buttons`, use the link_target\n  defined on the action, only set it to `target=\"_parent\"` if nothing defined\n  on the action.\n  [gbastien]\n\n1.58 (2022-01-14)\n-----------------\n\n- Avoid init `member` in `__init__`, that can lead to member being `Anonymous`.\n  [gbastien]\n- Fixed detection if transition triggered from faceted, use `has_faceted`\n  from `imio.helpers`.\n  [gbastien]\n- Define a with/height in CSS for icons so it can be reused by\n  `collective.js.tooltipster` when it computes the size of the tooltipster.\n  [gbastien]\n- Added CSS id with context `UID` to the `actions_panel` table.\n  [gbastien]\n\n1.57 (2021-11-08)\n-----------------\n\n- Whenever an error occurs in `ActionsPanelView.triggerTransition`, make sure\n  we get the error in the returned portal message and log the full traceback\n  in the Zope log.\n  [gbastien]\n\n1.56 (2021-09-09)\n-----------------\n\n- Fixed arrow used in message explaining when a transition is not triggerable.\n  [gbastien]\n- Prevent double clicks when triggering a WF transition by disabling\n  the link for 2 seconds.\n  [gbastien]\n\n1.55 (2021-06-04)\n-----------------\n\n- Implement method `show` when using async like it is already the case when not\n  using async to know if viewlet must be shown.\n  [gbastien]\n- Added `saveHasActions` call in actions_panel_add_content.pt.\n  [sgeulette]\n- Fixed `actions_panel_arrows.pt` to display the arrows in a table so we avoid\n  icons being one under others when there is not enough place to display it,\n  actions have to be always on the same line.\n  [gbastien]\n\n1.54 (2021-04-26)\n-----------------\n\n- Fixed broken JS event on comment popup `Confirm` button to prevent default behavior,\n  this probably leads to action not triggered from time to time on `Firefox`.\n  [gbastien]\n\n1.53 (2021-04-21)\n-----------------\n\n- Fixed `ActionsPanelView.getTransitions` check on transitions to confirm\n  informations, do not consider that prefix of given transition to confirm is a\n  `meta_type` but consider it as a `class name` as with `dexterity`, the\n  `meta_type` is always the same an no more useable to discriminate content.\n  [gbastien]\n- Added parameter `forceRedirectOnOwnDelete=False` to `ActionsPanelView.__call__`,\n  when deleting an element, by default if current context is a faceted,\n  the user is not redirected but the page is reloaded, if we are removing the\n  page that holds the faceted then we need to redirect.\n  [gbastien]\n- In JS function `deleteElement`, set `async:true` for the XHR request.\n  [gbastien]\n- Fixed bug in Firefox not executing the JS `triggerTransition` XHR request when\n  `async:true`, this was due to `preventDefaultClickTransition` not applied when\n  using the `@@async_actions_panel` in the viewlet displaying actions,\n  it was producing a `NS_BINDING_ERROR` because 2 click events were triggered.\n  [gbastien]\n- When not using the `useIcons` mode (so when using viewlet displaying buttons),\n  if no action at all, do not return an empty HTML table, just return nothing.\n  This let's hide the entire viewlet when using the `@@async_actions_panel`.\n  [gbastien]\n\n1.52 (2021-01-26)\n-----------------\n\n- Fixed behavior of just reloading the faceted when deleting an element,\n  this was broken because behavior between JS and python code changed and the\n  user was redirected to the default dashboard.\n  [gbastien]\n\n1.51 (2020-12-07)\n-----------------\n\n- Added parameter `view_name=\"@@delete_givenuid\"` to JS functions\n  `confirmDeleteObject` and `deleteElement` so it is possible to call another\n  view when deleting an element.\n  It is also possible to avoid refresh and manage it manually.\n  [gbastien]\n- Make sure table containing actions does not have any border especially on `<tr>`.\n  [gbastien]\n\n1.50 (2020-08-18)\n-----------------\n\n- Make CSS rule for `input[type=\"button\"].notTriggerableTransitionButton` more\n  specific so it is taken into account.\n  [gbastien]\n- Fix message (tag title) displayed on a not triggerable WF transition when\n  displayed as a button, the transition title was not included in the message.\n  [gbastien]\n\n1.49 (2020-06-24)\n-----------------\n\n- Fixed broken functionnality, when an action url was a `javascript` action,\n  it was not always taken into account because tag <a> `href` was not disabled\n  using `event.preventDefault()`.\n  [gbastien]\n\n1.48.1 (2020-05-26)\n-------------------\n\n- Requires `imio.helpers`.\n  [gbastien]\n\n1.48 (2020-05-26)\n-----------------\n\n- In `DeleteGivenUidView.__call__`, use `imio.helpers.content.uuidsToObjects`\n  with parameter `check_contained_uids=True` to get the object to delete,\n  so if not found querying with `UID` index, it will use the `contained_uids`\n  index if it exists in the `portal_catalog`.\n  [gbastien]\n\n1.47 (2020-04-29)\n-----------------\n\n- Add Transifex.net service integration to manage the translation process.\n  [macagua]\n- Add Spanish translation\n  [macagua]\n- In `actions_panel_actions.pt`, added `<form>` around `<input>`\n  to be able to use `overlays`.\n  [gbastien]\n\n1.46 (2020-02-18)\n-----------------\n\n- Added renderFolderContents section, rendered following flag and/or interface.\n  [sgeulette]\n- In `views.AsyncActionsPanelView.__call__`, remove random value `'_' (ajax_load)`\n  from `**kwargs` before calling the `@@actions_panel` or `ram_cached`\n  `@@actions_panel.__call__` never work as kwargs are always different.\n  [gbastien]\n\n1.45 (2019-11-25)\n-----------------\n\n- Changed sections order.\n  [sgeulette]\n\n1.44 (2019-09-13)\n-----------------\n\n- By default, do not display the `Edit` action when calling\n  `@@async_actions_panel`.\n  [gbastien]\n\n1.43 (2019-09-12)\n-----------------\n\n- Disabled first option of add content button list.\n  [sgeulette]\n- Added apButtonSelect class on select button\n  [sgeulette]\n- Do not link anymore showEdit to showIcons.\n  Disabled by default showEdit in viewlet.\n  Render edit as button too.\n  [sgeulette]\n\n1.42 (2019-06-28)\n-----------------\n\n- Store result of `ActionsPanelView.getTransitions` in `self._transitions` as\n  it is called several times to make sure transitions are computed only one time.\n  [gbastien]\n- In `ConfirmTransitionView`, store the actionspanel view instead instanciating\n  it several times as call to `actionspanel.getTransitions` is cached on the\n  actionspanel view.\n  [gbastien]\n\n1.41 (2019-06-07)\n-----------------\n\n- In `load_actions_panel JS function`, do not reload in case of error or the\n  page is reloaded ad vitam.  Display an error message instead.\n  [gbastien]\n- When using `string:` expressions, do not insert a blank space like\n  `string: `` or it is kept once rendered.\n  [gbastien]\n- Manage `IGNORABLE_ACTIONS` the same way `ACCEPTABLE_ACTIONS` so we filter out\n  first every non relevant actions then we evaluate it.\n  Removed management of `IGNORABLE_CATEGORIES` and `IGNORABLE_PROVIDERS`, we\n  only keep `object_buttons` and providers `portal_actions/portal_types`.\n  [gbastien]\n\n1.40 (2019-05-16)\n-----------------\n\n- Fixed message `KeyError: 'confirm'` in Zope log when a transition is\n  triggered on an element for which it is not available anymore\n  (already triggered in another browser tab for example).  In this case,\n  we just refresh the page.\n  [gbastien]\n- Fix `saveHasActions` is not called when only untriggerable transitions.\n  [gbastien]\n\n1.39 (2019-03-27)\n-----------------\n\n- When showing actions and ACCEPTABLE_ACTIONS is defined, directly worked\n  with those restricted set. Faster method.\n  [sgeulette]\n- Added parameter ActionsPanelViewlet.async (set to False by default) to be\n  able to render the actions panel viewlet asynchronously using a JS Ajax\n  request.  Set every JS ajax request with async:false to be sure that screen\n  is refreshed when state changed.\n  [gbastien]\n- Disabled showOwnDelete when 'delete' is in acceptable actions\n  [sgeulette]\n\n1.38 (2019-01-31)\n-----------------\n\n- Install `collective.fingerpointing` as we rely on it.\n  [gbastien]\n- By default, do not render the viewlet in overlays.\n  [gbastien]\n\n1.37 (2018-11-06)\n-----------------\n\n- Use safely unicoded transition title.\n  [sgeulette]\n\n1.36 (2018-08-22)\n-----------------\n\n- Moved `views._redirectToViewableUrl` logic to `utils.findViewableURL` so it\n  can be used by external code.\n  [gbastien]\n- Don't nullify margin of actionspanel-no-style-table.\n  [sgeulette]\n\n1.35 (2018-05-22)\n-----------------\n\n- In `triggerTransition`, do not only catch `WorkflowException` as raised error\n  could be of another type.\n  [gbastien]\n- When an error occurs during a workflow transition, make sure we\n  `transaction.abort()` or `review_state` is changed nevertheless.\n  [gbastien]\n\n1.34 (2018-04-20)\n-----------------\n\n- Use a real arrow character `\ud83e\udc52` instead `->` when building the transition not\n  triggerable icon help message.\n  [gbastien]\n- Fixed call to unexisting method `actionspanel_view._gotoReferer()` when\n  cancelling transition confirmation popup (only happens if popup is not\n  correctly opened as an overlay).\n  [gbastien]\n\n1.33 (2018-03-19)\n-----------------\n\n- Rely on imio.history IHContentHistoryView.show_history to know if the history\n  icon must be shown.  We need imio.history >= 1.17.\n  [gbastien]\n\n1.32 (2018-01-06)\n-----------------\n\n- Added possibility to define a target on the edit action. To do this,\n  pass the value for `edit_action_target` in the kwargs.\n  [sgeulette]\n\n1.31 (2017-11-10)\n-----------------\n\n- Added icon on object buttons.\n  [sgeulette]\n- Added separate external edit button\n  [sgeulette]\n\n1.30 (2017-10-03)\n-----------------\n\n- Rely on `collective.fingerpointing` for logging capabilities, this replace the\n  log message when an element is deleted.\n  [gbastien]\n- Call `transaction.abort` when an error occurs during deletion in\n  `DeleteGivenUidView` to avoid leaving portal in an unconsitent state.\n  [gbastien]\n\n1.29 (2017-08-30)\n-----------------\n\n- Trigger JS event `ap_delete_givenuid` when an element is removed from a\n  faceted page.\n  [gbastien]\n- Only show the actions panel viewlet on the view of the element, not on the\n  other templates like `folder_contents` because it also displays buttons and\n  user could be confused about that.\n  [gbastien]\n- Use same class `apButton` for buttons and select (add content) displayed on\n  the actions panel viewlet.\n  [gbastien]\n\n1.28 (2017-05-24)\n-----------------\n\n- Added parameter `catch_before_delete_exception=True` to the\n  `DeleteGivenUidView`.  By default it will catch `BeforeDeleteException`\n  but when set to False, it will not be catch it.  This let's catch\n  the exception in another method.\n  [gbastien]\n- Call `reindexObject` when the BeforeDeleteException is catched because at\n  this moment, object has already been unindexed.\n  [gbastien]\n\n1.27 (2017-05-10)\n-----------------\n\n- Use api.adopt_roles rather than create a super user to execute a \"own\" delete\n  action.\n  [sdelcourt]\n- Use plone.api.\n  [gbastien]\n- Pass `**kwargs` to ContentDeletableAdapter.mayDelete.\n  [gbastien]\n\n1.26 (2017-04-13)\n-----------------\n\n- Make sure action title is translated.\n  [gbastien]\n\n1.25 (2017-03-22)\n-----------------\n\n- Display the description of actions while displayed as input.\n  [gbastien]\n\n1.24 (2017-02-14)\n-----------------\n\n- Added class on form button.\n  Changed select translation.\n  [sgeulette]\n- The transition reason for which a transition can not be triggered now contains\n  the msg as a `zope.i18nmessageid.message.Message` instance, so translate it.\n  This is done because the appy `No` msg attribute can not be unicode...\n  [gbastien]\n\n1.23 (2017-01-30)\n-----------------\n\n- Fix workflow guard check on group conditions.\n  [sdelcourt]\n\n\n1.22 (2017-01-23)\n-----------------\n\n- Corrected code to work with collective.externaleditor >= 1.0.3.\n  [sgeulette]\n\n1.21 (2016-12-21)\n-----------------\n\n- Implemented method `getGroups` for the APOmnipotentUser\n  that returns an empty list because default implementation\n  will raise an `AttributeError` on `portal_groups`.\n  [gbastien]\n\n1.20 (2016-12-05)\n-----------------\n\n- Added possibility to define a CSS class on the edit action.  To do this,\n  pass the value for `edit_action_class` in the kwargs.  This make it possible\n  to use a class that will enable an overlay for the edit action.\n  [gbastien]\n- Added section that renders arrows to move elements to top/up/down/bottom,\n  this only appears if useIcons is True.\n  [gbastien]\n- While rendering transition button including portal_type title, translate\n  portal_type title in the domain defined on the typeInfo of portal_types,\n  not systematically in the \"plone\" domain.\n  [gbastien]\n- When an element is deleted, check if response received by JS method\n  `deleteElement` is an url or a page content.  In case a Redirect exception\n  is raised, we receive the entire page content and not an url to redirect to.\n  [gbastien]\n- Use permission `ManageProperties` to protect the `renderArrows` section.\n  Make sure `saveHasActions` is called correctly in the\n  `actions_panel_arrows.pt` template.\n  [gbastien]\n- Check if current context is a folderish in `addableContents` used for the\n  `deleteElement` section because `folder_factories` return parent's addable\n  content_types if current context is not folderish, this makes the button\n  appear when you can not add content, and if used, content is actually added\n  to the parent.\n  [gbastien]\n- Translate workflow transition title and no more id\n  [sgeulette]\n\n1.19 (2016-06-22)\n-----------------\n\n- Take external edition into account when rendering the `edit` action.\n  [sdelcourt]\n\n1.18 (2016-06-17)\n-----------------\n\n- Use window.open(url, `_parent`) to manage actions instead of window.location\n  so new location is opened in the `_parent` frame, this way, when opened from\n  an iframe, the location is not opened in the iframe but in the parent/full\n  frame.\n  [gbastien]\n- Fixed CSS style for the notTriggerableTransition CSS class so it is displayed\n  correctly in Chrome.\n  [gbastien]\n\n1.17 (2016-04-15)\n-----------------\n\n- Made a transitions sort method, that can be overrided.\n  [sgeulette]\n\n1.16 (2016-01-21)\n-----------------\n\n- Message when deleting an element (delete_confirm_message) is now more\n  clear to specify that element will be deleted from the system definitively.\n  [gbastien]\n- When a WorkflowException is raised during a WF transition, display the exception\n  message, this way a beforeTransition event may raise this exception and display\n  a particular message to the user.\n  [gbastien]\n\n\n1.15 (2015-12-03)\n-----------------\n\n- Use an onClick instead of the `href` on the actions rendered by the\n  `actions_panel_actions.pt` to be able to use a javascript method for\n  the action URL.\n  [gbastien]\n- Use `async:false` for jQuery.ajax calls so the ajax loader image (spinner)\n  is displayed in IE and Chrome.\n  [gbastien]\n\n\n1.14 (2015-10-06)\n-----------------\n\n- Use `POST` as type of jQuery.ajax used to add a comment to a workflow\n  transition or it fails when the comment is too long.\n  [gbastien]\n\n\n1.13 (2015-09-04)\n-----------------\n\n- CSS for buttons displayed on the transition confirmation popup\n  [gbastien]\n\n\n1.12 (2015-07-14)\n-----------------\n\n- Make trigger transition and own delete aware of faceted navigation.\n  If the action is made in a faceted navigation, only the faceted page\n  is reloaded, not the entire page\n  [gbastien]\n- Hide the Add menu if no addable content\n  [sgeulette]\n\n\n1.11 (2015-04-23)\n-----------------\n\n- Do not generate the image name to use for a transition but\n  use the actbox_icon defined on the transition\n  [gbastien]\n\n\n1.10 (2015-04-01)\n-----------------\n\n- Use translated transition title in transition confirmation popup\n  [gbastien]\n- Simplified @@triggertransition view by not using objectUID anymore, we use the context\n  as the view is called on it, objectUID was legacy and useless\n  [gbastien]\n\n\n1.9 (2015-03-30)\n----------------\n\n- Store transitions to confirm in the registry\n  [sgeulette]\n- Add a small margin-left to the `notTriggerableTransitionImage` class so if several not\n  triggerable transition actions are displayed, it is not stuck together\n  [gbastien]\n- Rely on imio.history to manage history related section\n  [gbastien]\n\n1.8 (2014-11-05)\n----------------\n\n- Removed IObjectWillBeRemovedEvent, either use same event from OFS.interfaces or in case we use\n  AT, we could need to override manage_beforeDelete as it is called before IObjectWillBeRemovedEvent\n  in the OFS object removal machinery.\n- Do only rely on `mayDelete` method instead of checking `Delete objects` and mayDelete method,\n  this way, we may handle case where user does not have the `Delete objects` but we want him\n  to be able to delete an element nevertheless, in this case, the all logic is managed by mayDelete.\n\n\n1.7 (2014-09-04)\n----------------\n\n- Sort transitions by transition title, more easy to use when displaying several transitons.\n- Corrected bug where the link to trigger a transition that did not need to be confirmed,\n  did not contain the view name, only parameters.  This made the user being redirected to the object\n  view and not able to trigger the transition from another place.\n\n\n1.6 (2014-08-21)\n----------------\n\n- Added submethod _findViewablePlace in _computeBackURL where we can manage\n  where to redirect the member when he was on the object he just deleted.\n  This makes it possible to override only the _findViewable method\n  and keep the other part of _computeBackURL that does manage the case when\n  the member was not on the object he just deleted.\n- Custom action_panels views can now be registered with a different name\n  than `actions_panel`.\n\n\n1.5 (2014-08-20)\n----------------\n\n- Adpated _transitionsToConfirm method to be also able to provide custom\n  view name to use as confirmation popup.\n\n\n1.4 (2014-08-19)\n----------------\n\n- Moved complete computation of back url when an object is removed to\n  _computeBackURL, not only the case when we were on the object we just removed.\n- Added CSS class `actionspanel-no-style-table` on the main actions_panel table\n  and defined styles for it to remove any border/margin/padding.\n\n\n1.3 (2014-08-19)\n----------------\n- Added section that render a link to the object's history if useIcons is True\n- Not triggerable transitions are now also displayed using icon if useIcons is True,\n  before, not triggerable transitions were always displayed as button, no mater useIcons\n  was True or False\n- Simplified method that compute addable contents, the default `folder_factories`\n  does all the job\n- Manage the fact that if after a transition has been triggered on an object,\n  this object is not accessible anymore to the current user, it is redirected\n  to a viewable place\n\n1.2 (2014-07-01)\n----------------\n- Do not lookup an object UID in the uid_catalog,\n  this fails when using dexterity, use portal_catalog or\n  check context UID if element is not indexed\n- Do not display a `-` when no actions to display and not using icons\n- Implement `__call__` instead of `render` on the actions panel view\n  so calling the view is simpler\n- Display AddContent actions.\n\n1.1 (2014-04-03)\n----------------\n- Optimized to be `listing-aware` do some caching by storing not changing parameters\n  into the request and so avoid to recompute it each time the view is instanciated\n- Corrected bug when a transition was triggered using the confirmation popup and\n  resulting object was no more accessible, the popup was recomputed and it raised Unauthorized\n\n1.0 (2014-02-12)\n----------------\n- Initial release",
    "bugtrack_url": null,
    "license": "GPL",
    "summary": "Actions panel",
    "version": "1.65",
    "project_urls": {
        "Download": "https://pypi.org/project/imio.actionspanel",
        "Homepage": "https://github.com/imio/imio.actionspanel"
    },
    "split_keywords": [
        "actions",
        "panel",
        "buttons"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1414595fa75f1063096f4fe8d02cd368f64a19be6e82191cc978cb48e65fea3b",
                "md5": "353e84e67be7411ef791ea2223de467a",
                "sha256": "2f0f0095bf86b9947996f90edbc16d4bb0ad161876334f007b1cd6f44051e35e"
            },
            "downloads": -1,
            "filename": "imio.actionspanel-1.65.tar.gz",
            "has_sig": false,
            "md5_digest": "353e84e67be7411ef791ea2223de467a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 60438,
            "upload_time": "2024-02-08T14:34:59",
            "upload_time_iso_8601": "2024-02-08T14:34:59.543751Z",
            "url": "https://files.pythonhosted.org/packages/14/14/595fa75f1063096f4fe8d02cd368f64a19be6e82191cc978cb48e65fea3b/imio.actionspanel-1.65.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-08 14:34:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "imio",
    "github_project": "imio.actionspanel",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "imio.actionspanel"
}
        
Elapsed time: 0.20393s