Metadata-Version: 2.4
Name: redturtle.tiles.management
Version: 4.0.2
Summary: An alternative method for handling and showing tiles
Home-page: http://pypi.python.org/pypi/redturtle.tiles.management
Author: RedTurtle Technology
Author-email: sviluppoplone@redturtle.it
License: GPL version 2
Keywords: Python Plone
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Plone
Classifier: Framework :: Plone :: 6.1
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Requires-Python: >=3.11
Requires-Dist: plone.api
Requires-Dist: plone.app.blocks>=4.0.0
Requires-Dist: plone.app.tiles
Requires-Dist: setuptools
Requires-Dist: z3c.jbot
Provides-Extra: test
Requires-Dist: plone.app.testing; extra == "test"
Requires-Dist: plone.testing>=5.0.0; extra == "test"
Requires-Dist: plone.app.contenttypes[test]; extra == "test"
Requires-Dist: plone.restapi[test]; extra == "test"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

.. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.
   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide_addons.html
   This text does not appear on pypi or github. It is a comment.

==============================================================================
redturtle.tiles.management
==============================================================================

.. image:: https://travis-ci.org/RedTurtle/redturtle.tiles.management.svg?branch=master
    :target: https://travis-ci.org/RedTurtle/redturtle.tiles.management

A tiles management system, easier than plone.app.mosaic that uses
`plone.app.tiles`__ and `Mockup`__ functionalities to build a simple UI.

__ https://github.com/plone/plone.app.tiles
__ https://github.com/plone/mockup

Features
--------

- Simple UI to add/remove/edit registered tiles
- Tiles sorting with drag-and-drop (thanks to mockup)
- Tiles resizing (with default or custom CSS classes)
- Tile manager is a pattern that can be included in every custom page
- **plone.layoutaware** behavior enabled for Documents
- Example *tiles_view* view available for all objects with "plone.layoutaware" behavior enabled
- Customizable available tiles list from control panel

Usage
-----

Tiles manager works with plone.app.blocks features and its plone.layoutaware behavior, so you can use this functionality
only on Content Types with this behavior enabled.

Installing this product, a new pattern will be available: "*pat-tiles-management*", and you only need to insert a pattern-style tag into your view like this:

.. code-block:: html

  <div class="pat-tiles-management" data-pat-tiles-management="managerId:myManager" />

You need to provide a **managerId** attribute, because multiple managers can be instantiated in a view, and with this, the pattern can handle the tiles stored in each manager.


Available tiles list
--------------------

You can configure a list of addable tiles for this manager in Plone's control panel:
http://yoursite/@@tiles-management-settings

In the "Add new tile" menu you'll see this list filtered also by single tiles permission.


Tile resizing
-------------

If you want two tiles in a row, from tile control buttons select a style in the "resize" dropdown.
There are two default styles:

- reset (with no CSS classes)
- two tiles in a row (`half-width` class)

These CSS classes can be configured in control panel.

Patch for pattern settings
--------------------------

There is a patch for `get_relateditems_options` method to get the right context
for related items widgets (in Tiny and relation fields).


JS Development and bundling
---------------------------

If you need to develop this product's javascripts or styles, you need to compile the code
for the resource registry bundle. To do this, there are two grunt tasks.

First of all, you need to install grunt dependencies listed in package.json file in the root of this package:

.. code-block:: shell

  npm install

or if you prefer yarn:

.. code-block:: shell

  yarn

After that, you can use two different grunt tasks:

- `grunt`: the default task, that listen files changes with `watch` and re-build resources and bundles automatically
- `grunt compile`: to manually compile all resources and bundles


Translations
------------

This product has been translated into

- Italian


Installation
------------

Install redturtle.tiles.management by adding it to your buildout::

   [buildout]

    ...

    eggs =
        redturtle.tiles.management


and then running "bin/buildout"


Compatibility
-------------
This package is developed with mockup, so is fully compatible for Plone 5.

From 1.0.0 version, Plone 4 compatibility has been dropped, so you need to use the 0.x branch.

Contribute
----------

- Issue Tracker: https://github.com/RedTurtle/redturtle.tiles.management/issues
- Source Code: https://github.com/RedTurtle/redturtle.tiles.management


License
-------

The project is licensed under the GPLv2.

Contributors
============

- RedTurtle Technology, sviluppoplone@redturtle.it

Changelog
=========


4.0.2 (2026-06-19)
------------------

- Fix `managerId` routing when multiple `pat-tiles-management` instances are
  present on the same page (e.g. ``defaultManager`` and ``wideManager``).
  Replace the three global document listeners (``submit``, ``click``,
  ``formdata``) with a single click tracker per instance that records the last
  tile link clicked inside its own element. The MutationObserver now uses this
  information as the primary signal to decide which instance owns an incoming
  modal form, preventing the first-registered instance from overwriting the
  ``managerId`` of forms opened from a different manager slot.
  [cekk]


4.0.1 (2026-05-11)
------------------

- Fix `managerId` propagation in Plone 6.1 modal forms for add/delete tiles,
  including modal footer submit buttons outside the form.
  [cekk]
- Ensure `managerId` is submitted in POST body while avoiding duplicate
  propagation in form action querystring.
  [cekk]
- Refactor and simplify `tiles-management` frontend handlers without changing
  behavior.
  [cekk]


4.0.0 (2026-03-26)
------------------

- Plone 6 compatibility.
  [cekk]


3.0.1 (2023-05-31)
------------------

- Fix context where to check permission in vocabulary.py customization.
  [cekk]


3.0.0 (2022-09-16)
------------------

- Prepare package for pip.
  [eikichi18]


2.2.0 (2021-01-27)
------------------

- Customize add, edit and delete forms to handle BIG data in non persistent tiles:
  do not add all the data in querystring because GET calls have a character limit.
  [cekk]


2.1.3 (2020-10-29)
------------------

- Patch @getSource view for relatedItems widget to get the correct context
  also with multilingual sites.
  [cekk]


2.1.2 (2020-09-17)
------------------

- Fix patched method parameters.
  [cekk]


2.1.1 (2020-09-14)
------------------

- Add `get_relateditems_options` patch to get the right context in patterns
  that need relations (Tiny and related contents).
  [cekk]


2.1.0 (2020-02-18)
------------------

- Add Python3 compatibility.
  [cekk]
- Add support for custom managerId passed in view call.
  [cekk]


2.0.0 (2020-02-12)
------------------

- Removed use of grids to avoid Chrome 80 bug
  [nzambello]


1.2.6 (2019-09-03)
------------------

- Avoid to cache tiles_management ajax call if we are anonymous. In this way
  an HTTP acceletator like varnish could cache calls if caller is anonymous
  [lucabel]
- Fix tileWrapper class when the tile is hidden
  [pnicolli]


1.2.5 (2019-03-13)
------------------

- Added server side rendering of tiles when not logged in
  [pnicolli]


1.2.4 (2018-09-14)
------------------

- Increase modal timeout.
  [cekk]


1.2.3 (2018-09-13)
------------------

- Added styles for tile size button dropdown [nzambello]


1.2.2 (2018-09-12)
------------------

- Fix code-style
  [cekk]

1.2.1 (2018-09-12)
------------------

- Sorting not enabled on mobile while adding new tile, too [nzambello]
- Fix for IE: used width/float instead of grid [nzambello]


1.2.0 (2018-08-21)
------------------

BREAKING CHANGES:

- Handled tile sizing with a new button with styles given in controlpanel [nzambello]


Other changes:

- Fix IE11 compatibility in js.
  [cekk]
- Sorting not enabled on mobile [nzambello]
- Removed container margin, it should be styled by themes, if needed [pnicolli]
- Fix z-index of tileEditButtons [fdelia]


1.1.3 (2018-04-30)
------------------

- Fix data-tile urls generation to don't break subrequest rendering when there
  is a reverse proxy configuration with _vh_ (https://github.com/plone/plone.subrequest/issues/17).
  [cekk]


1.1.2 (2018-03-16)
------------------

- Fix permission checks in addable tiles vocabulary.
  Now use correct permission (name) and not the id.
  [cekk]


1.1.1 (2018-03-12)
------------------

- Fix pypi brown bag release
  [cekk]

1.1.0 (2018-03-12)
------------------

- Add a loader when tiles are fetched
  [cekk]
- Remove empty managers when user can't add tiles
  [cekk]
- Refactor manager render view. Now is lighter (no more unused Plone body macros)
  and can be used also in static renders
  [cekk]

1.0.2 (2017-12-21)
------------------

- Fix IE11 compatibility: add babel-polyfill to correctly handle CustomEvent raise
  [cekk]


1.0.1 (2017-09-13)
------------------

- Fix README code syntax
  [cekk]

1.0.0 (2017-09-13)
------------------

- Massive changes in tiles storing (with p.a.blocks plone.layoutaware behavior)
  and in tiles management: now it's a pattern that can be instantiated several
  times in the view
  [cekk]
- Add controlpanel to configure a list of addable tiles from registered ones.
  [cekk]
- Add icon and button color for action hide tile [nekorin]
- Handle error message when there are problems fetching tiles
  [cekk]
- Added an event dispatched when tiles are added to the DOM [nzambello]
- Drop support for Plone4. Use branch 0.x for Plone 4
  [cekk]

0.2.1 (2017-04-12)
------------------

- Fixed resources import in tiles_view [pnicolli]
- Fixed rolemap. Permission to edit tiles given to 'Editor' #10460 [arsenico13]
- .DS_Store added to .gitignore and MANIFEST [arsenico13]
- Fixed tiles edit link. This fixes the edit capability when a page is a default view for a folder. [arsenico13]


0.2.0 (2016-12-09)
------------------

- Replaced unused plone.app.tiles.AddTile permission with "cmf.ModifyPortalContent"
  [cekk]
- Add Plone4 compatibility
  [cekk]
- Fix permission for add tile to "cmf.ModifyPortalContent"
  [arsenico13]
- Add italian translations
  [cekk]


0.1.0 (2016-09-19)
------------------

- Initial release.
  [cekk]

