Package: collective.tablepage
A new Plone content type similar to the standard Page but with atable as main content.Table of contentsIntroductionHow to useConfiguring the tableFilling the tableTable labels and sectionsDownload and Upload dataColumnsColumn cacheColumns of type “File” and “Files”Column of type “Link”Column of type “Computed”DataTables integrationSearching the tableLimitationsOther productsRequirementsCreditsAuthorsChangelog0.10.6 (2015-07-31)0.10.5 (2015-05-21)0.10.4 (2015-05-15)0.10.3 (2015-05-15)0.10.2 (2015-05-14)0.10.1 (2014-11-27)0.10 (2014-10-22)0.9 (2014-10-01)0.8.1 (2014-07-23)0.8 (2014-07-11)0.8b3 (2014-06-26)0.8b2 (2014-06-04)0.8b1 (2014-06-03)0.8a2 (2014-05-20)0.8a1 (2014-04-30)0.7 (2014-03-19)0.6 (2014-02-25)0.5 (2014-02-06)0.5b4 (2014-02-04)0.5b3 (2014-01-31)0.5b2 (2014-01-29)0.5b1 (2014-01-13)0.4.1 (2014-01-03)0.4 (2013-11-14)0.3 (2013-10-18)0.2 (2013-10-11)0.1.2 (2013-09-27)0.1.1 (2013-09-23)0.1 (2013-09-19)IntroductionThis product want to give to site members a simple way to manage a page with a table inside in a collaborative way.
To be more precise, it’s focused on contents where the table is the main scope of the page.The only other option is to create the page using the WYSIWYG editor (like TinyMCE), then leave
to editors power to modify it, but:using TinyMCE commands for table is not so easy (users sometimes mess up your pre-defined layout)you can’t prohibit users to delete or change rows added from other users, or adding new column you don’t want.If you need to beat those limits but you still simply need a Plone page, this product is probably what you need.If you need to store ahugeamount of data, you should probably look for other solutions.How to useAfter installation you will see a new addable content type: thePage with Table.Some fields of this new content types are very similar to Page ones, although the “Body Text” field is splitted
in two separated sections (text before and after the table).Configuring the tableThe most important field is “Columns”, where you can define the column structure of you table.For every column you can define some information like header’s content and other description, but you must also define
thetypeof data in the column.You can add as many columns as you want; users that will fill your table won’t be able to change what you have defined.Filling the tableConfiguration is not changing anything in your layout, but users withContributorrole on this document will see a
new tab: “Edit table”.When accessing the “Edit table data” view, users will be able to add new rows to the table and edit their own rows.
The form given to the user is generated using the configuration options that the document creator defined before.Some note:Every added row is put at the end of the table or at the end of section (see below)Every Contributor is able to edit or delete his own rowsUsers with “Editor” roles are able to edit or delete all rowsUsers with “Editor” roles are able change row orderWhen switching back to main document view the generated table is part of the document body text.Table labels and sectionsUsers with power of configuring the table can also add a special type or row:Label. Apart the UI changes,
labels break the table in groups of logical rows: every group start at the position of the label at end at
the next label (or at the end of the table).If one or more labels are used, contributors will be able to add new rows at the end of the section instead
of adding only at the end of the table.In the table configuration there’s a field named “Criteria for adding new rows”.
Changing this value from “At the end” (default) to “At the beginning” will change the adding method: new rows
will be added at the beginning of every groups.Download and Upload dataData stored  in the table can be downloaded, and optionally you can display a download link also to page visitors
(activate the “Show download link for data” inside “Settings”).
When the download icon is used in the “Edit table” view, downloaded data is compatible to the upload CSV feature
described above (columns ids are used instead of titles, contents uids instead of URL to referenced contents, …)Contributors can also upload data using a CSV file. The filemustprovide a row with column ids defined in the
configuration. Columns with an unknow id will be ignored.If the configuration has not already been defined, all CSV headers will be used to quickly init the configuration
(but columns types will always be “String”).ColumnsTable Page is distributed with a know set of columns. Right now you can choose from those types:StringA simple line of text, the most common (and default) type.TextA textarea, for saving more text and take care of carriage returns. Cached for 12 hours.SelectStill a simple line of text, but user must choose it from a vocabulary you will define in the
“Column configuration”.You can alternatively provide lines with…vocabulary:TAL expression…and the vocabulary values will be taken by evaluating the provided TAL expression.You can use vars likeportal,requestandcontext(the current TablePage).FileA link to a file in the site. Cached for 1 hour. See below.FilesSame asFileabove, but for multiple files.LinkA link to an URL, or an internal site document. It use Plone reference browser native widget.
Cached for 1 hour. See below.EmailAn e-mail address.NumericA string in numeric format.MonetaryA string in numeric format, but will be rendered as a monetary value, with locales settings.ComputedA column that will display a value based on a computed TAL espression you must put in the
“Column configuration”. For this reason it will not be putted in the edit row form.
Not cached by default but can be configured.
See below.DateandDate/TimeA string that store a date (or date and time).Adding new type of column is not hard (for a Plone developer), but remember to stay simple: we don’t want
to rewritePloneFormGenfrom scratch!Column cacheSome of the columns above enable apersistent cache. This can be needed for large tables, where a lot of those
columns can slow down the page.Cache is automatically invalidated when the column is modified, however is possible that invalid data is still shown
in the table. For example: you create a link to a file, so displaying it’s title, but meanwhile an editor changed
the title of the file.Columns of type “File” and “Files”Columns of type file(s) are the most complex.When adding or editing a row the user is able to upload new files, creating a new Plone File content, or selecting
existing files from the site.
In both cases permissions matters: the user must have permisson of adding new file in the storage folder or see it.
The storage folder is configured by the document creator.When rendering the table, a link to download the file is displayed.Column of type “Link”The link column can be used to store absolute links (externals) of links to site’s contents.
In that case: it’s automatically used the Plone native widgetarchetypes.referencebrowserwidgetYou can change how the link itself is displayed by adding some rows in the “Column configuration” section:title:somethingThe link text will be always “something”icon:url-or-relative-path-to-imageAn image will be displayed and, in case of an internal link, no text will be displayedColumn of type “Computed”When writing the TALES expression to be used in computed fields you can access general vars like:contextThe current page with tableportalThe Plone site rootindexThe index of the current rowrowThe current row. using this you can access data taken from other columns in the same row.Therowvar in the most powerful: based on the type of column you are referencing, you can read different data.
For example: accessing aFile,FilesandLinkcolumn, you can read information of the referenced object.Some examples:row/file_column/title(show the title of thefile_columncolumn in the same row)python:row['files_column'][0].Title(show the title of the first file in thefiles_columncolumn in the same row)row/link_column/absolute_url|row/link_column(show the link of thelink_columneven it’s an internal link or an absolute ones)Even if this column normally don’t implements any cache, you can specify a custom cache by defining an additional
configuration line in the “Column configuration” field.Just write something like…your/tal/espression
cache:3600…to cache column’s result for an hour.DataTables integrationDataTablesis a well-know jQuery plugin for getting advanced HTML table features using JavaScript.
The easyient way on integrating it into Plone is by usingcollective.js.datatables.TablePage has a soft-dependency on DataTables; if the jQuery plugin is installed, the table view try to use it for
getting some new features like:filtering/searching datasorting by columnspagination/batchingAlso, theRow Grouping Add-on, plugin is also registered (but disabled by default! You must activate thejquery.dataTables.rowGrouping.jsresource in the portal_javascript tool).
This enhance the labels feature with a better user experience.Searching the tableApart the live search filter that came from DataTables integration (see above) you can rely also on advanced search
features.
This will give to your users a search form automatically generated looking at search configurations.The search feature is based on a ZMI tool:tablepage_catalogreally similar to the same catalog used by
Plone for it’s search engine.
While some UI configuration are possibile through Plone, a ZMI access to that tool is required.For every “searchable” column you have defined, you can create a field in the search form, customizing the label
and the helper text. Plus, you can define one or more columns as searchable in full text search.When you users will perform searches from the table view, only rows that match the search will be displayed.The widget displayed in the form depends on the catalog index you user:for aZCTextIndexyou will get a text inputfor aFieldIndexyou will get a selection (bot single or multiple) on all possible valuesfor aDateIndexyou will be able to query range of dates (commonly for “Date” “Date/Time”
columns)Names of the indexes must be equals to columns ids.LimitationsYou have some important limitations:no other kind of indexes are supported right nowyou haveonecatalog, so you must handle (or avoid) columns ids used in more that one page with tableOther productsThere are at least two other products for Plone that are focused on table generation:collective.tableThis product is focused on the editing part (and the use of DataTables jQuery plugin is nice), but
it dowsn’t work on Plone 3 and you have no way of limit the power of users on the table.collective.pfg.soupVery powerful, modular and extensible. It’s using PloneFormGen as table configuration and can storea lotof data.
Unluckily it has a lot of dependencies and it won’t run on Plone 3.RequirementsThis product can be used with al version of Plone from 3.3 to 4.3.For Plone 3.3 you need some special configuration like:Acustom branch of DataGridFieldwhere we backported some new features from 1.8 branchAvailable table styles are taken from TinyMCE configuration, so you must use it instead of KupuNo versioning support is availableNo friendly installable DataTables product is available for Plone 3, so you probably can’t use itCreditsDeveloped with the support of:Azienda USL FerraraS. Anna Hospital, FerraraProvince of VicenzaGuardia di FinanzaAll of them supports thePloneGov initiative.AuthorsThis product was developed by RedTurtle Technology team.Changelog0.10.6 (2015-07-31)Fixed #21, SelectField validator always failed validating non-ascii
vocabulary characters
[petri]Updated Finnish translations
[petri]Removed theorphanusage in batching.
It’s leading to an error with plone.batching 1.0.4, and a strange behavior with 1.0.5.
[keul]0.10.5 (2015-05-21)Fixed versioning issue that force tablepages to be updated
(in AT edit) to see versioning working if versioning is enabled
during the document life-cycle
[keul]Files columns was not sorting attachments in any way
[keul]0.10.4 (2015-05-15)Numeric and Monetary fields were not selectable for searches
[keul]0.10.3 (2015-05-15)Fixed an issue introduced on version 0.10.1, that make tablepage impossible to be run
on Plone<4.3.
[keul]0.10.2 (2015-05-14)Do not show search form when table is empty
[keul]Search form was not working properly when “Single value search” was not
selected
[keul]Download as CSV was not taking care of applying search filters
[keul]Added a new “col-columnid” CSS class to every header and data cell
[keul]Multi page view was not applying any CSS class to table headers
[keul]0.10.1 (2014-11-27)Fixed issue when using date search without other search criteria
[keul]Row commands were not displayed properly on first row in subs page
if a label was present of first ones
[keul]When editing table redirect user to last page if we are in append mode
[keul]0.10 (2014-10-22)New columns: “Date” and “Date/Time”.
This close#7[keul]Some visual changes to very small tables
[keul]0.9 (2014-10-01)Special thanks toPetri Savolainenfor lot of stuff done in this releaseWhen editing table, row’s uuid is put ondata-uidattribute on row
[keul]Removed useless fieldset legend when editing a row.
This close#13[keul]Fixed updated row count message when using the refresh button
[keul]Caches are now pre-populated at write time, not when the first read
attempt happen. This will also fix a catalog index bug with Computed
columns
[keul]Fixed issue in Link and File columns: was not possible to delete submitted
data but only possible to change it
[keul]Fixed critical bug: when deleting a row, following rows were still indexed
with old (wrong) position value. This will lead to strage behavior when
searches are performed
[keul]Implemented the computed vocabulary feature: vocabulary source can be taken
from a TALES evaluation (close#10)
[petri, keul]Multi tables view was not using batchin or search
[keul]Search form method fromPOSTtoGET(batching was usingGETalready)
[keul]Removed min number of rows needed for enabling DataTables (close#16)
[keul]Usability improvements. When using DataTables and we don’t have any row groups,
move the (unique) “Add row” button in the lower section (close#11)
[keul]Fixed an issue that store icons absolute URL in the cache for “linkable”
columns (close#14)
[keul]0.8.1 (2014-07-23)Migration fixes from older releases
[keul]Some minimal JSHint cleanup on the 3rd partyjquery.dataTables.rowGrouping.jsfile that sometimes can create problems with compression. Also provided
a pre-minified version. See#14279).
[keul]0.8 (2014-07-11)Added Finnish translation
[petri]Fixed encoding issue with vocabulary values using selection column
(close#5)
[keul]0.8b3 (2014-06-26)Yet another Plone 3 compatibility fix
[keul]Fixed critical bug in search: path was not used for
finding labels
[keul]Fixing AdvancedQuery integration and removing unused indexes.
This fix critical bug that make query look for
“access inactive portal content” permission
[keul]Fixed an evil bug that populate caches of computed fields with
bad values when search are performed
[keul]0.8b2 (2014-06-04)Part of the migration step from 0.8a2 was missing
[keul]0.8b1 (2014-06-03)Purge cache command was only working for indexed columns
[keul]uuid was not provided when CSV upload feature was used
[keul]PreventBadRequestexception when uploading the same file twice
[keul]Restored usage of labels, also with search
[keul]Fixed a bug with labels and batching: starting item were
skipped if a label from previous page was present
[keul]0.8a2 (2014-05-20)Fix compatibility errors with documents created with version 0.7 and below
[keul]icon:andtitle:features also for internal links
[keul]Error migrating from 0.7: the catalog was created inside theportal_setuptool!
[keul]Added a new “refresh catalog” command on tables
[keul]Indexing of cached values is now trying to invalidating cache first.
This prevent infinite caching of computed columns
[keul]Changes to cache generation, to reduce ConflictError
[keul]0.8a1 (2014-04-30)Fixed a bug that break CSV export when computed columns are used
[keul]Added minimal Link colums diplay prefs (a fixed link text or icon)
[keul]Fixed wrong column configuration cache
[keul]Fixed appearence of “No rows” section on Plone that are not usingplone.batching[keul]Enable DataTables only if we have some rows to show. This fix visual
issues with some layouts
[keul]Link column: put theexternalvalue forrelfor external links and not
for internal ones
[keul]Added search features
[keul]0.7 (2014-03-19)Multiple tables view was unreachable on emtpy tables
[keul]The jquery.dataTables.rowGrouping.js plugin is disabled by default
[keul]Multiple multi-files columns in the same table was not working
[keul]Fixed minor JavaScript errors
[keul]Styles fixes: main column (HTML) label is a little bigger that default
Plone form labels
[keul]Prevent new label from load a wrong default text
[keul]Do not display empty icon in link column
[keul]New “insertType” configuration (new row at the end or beginning of groups)
[keul]New column type: “Computed”
[keul]Fixed a problem with link-like columns and cache. Do not return object absolute_url
because a backend URL could be cached. Instead use theresolveuidURL and run
table through portal_trasform when in view.
Drawback of the approach: when editing the table’s URLs still useresolveuid[keul]Added batching/pagination
[keul]0.6 (2014-02-25)Multiple tables view was not properly display HTML
[keul]Added caching for rendered columns. This will speed up
a little/lot table rendering
[keul]Moved inline JavaScript to separate resource files
[keul]Show/Hide command now act also on page header and footer
(Zen Mode!)
[keul]0.5 (2014-02-06)Theuniquevalidator was preventing record update
[keul]Monetary column will pad the final zero in less that 2 decimal
are supplied (123.5 will be 123.50)
[keul]0.5b4 (2014-02-04)Fixed a bug that break link columns when the linked content is no more
[keul]Fixed error when validating old rows, created before version 0.5
[keul]0.5b3 (2014-01-31)Do not use the HTML 5numbertype anymore because
ofGoogle Chrome stupidity[keul]Fixed a Python 2.4 bug in interpreting CSV format
[keul]Do not fail the whole import procedure if a CSV row is missing
some columns
[keul]0.5b2 (2014-01-29)Fixed error when editing old rows, created before version 0.5
[keul]The import from CSV form can be used when no configuration has been given.
A basical configuration will be guessed by columns headers
[keul]Select colum now enforce vocabulary values
[keul]New column type: “Monetary”
[keul]When exporting in CSV, always quote data. This prevent some fancy
Excel/OpenOffice interpretation
[keul]Column validator can be executed also when importing from CSV
[keul]0.5b1 (2014-01-13)Soft dependency on jQuery DataTables plus “Row Grouping Add-on”.
This add new features like live-search in table, batching and colum sorting.
[keul]Added a JavaScript command for expand/collapse available view when editing
(this can help in cases where you added a lot of columns)
[keul]Fixed critical error in the “Files” column; when selecting existing file
the column id was ignored
[keul]Added new feature: registering validators
[keul]Added validator for required field
[keul]Added validator for unique field
[keul]New field type: “Email”, for inserting an text in e-mail format
[keul]New field type: “Numeric”, for inserting an text in numerical format
[keul]0.4.1 (2014-01-03)Added uninstall profile
[keul]Fixed bug in finding duplicate rows when importing from CSV
(close#1) [keul]0.4 (2013-11-14)Do not display selection checkbox if I can’t delete a row
[keul]Raise lifecycle events properly when creating files
[keul]New field type: “Files”, for uploading a set of files to
be rendered in the same cell
[keul]Labels inside the table are now supported
[keul]New view for displaying data on multiple tables
[keul]New field type: “Link”, for inserting an URL or an internal
reference
[keul]CSV export done by backend get UUIDs when applicable
[keul]CSV import now validate data: do not import every text you
read from the file
[keul]CSV import now transform URL/path to valid content uuids
[keul]0.3 (2013-10-18)Different versioning message when a row is changed
or modified [keul]Added missing versioning attempt when using CSV upload
[keul]Fixed a performance/security problem: data inside text cells
were transformed to HTML without any check (and this was alsoreallyslow)
[keul]Can now delete multiple (or all) rows
[keul]CSV import is not importing anymore inside wrong colum when an
unknow header is found
[keul]0.2 (2013-10-11)Fixed missing translations [keul]Do not display “download as CSV” for empty tables [keul]Added an option for choosing when display headers [keul]Handle loading of duplicate file id: file is not loaded twice but
same reference is kept [keul]Do not display “Edit table” or row’s commands if no configuration
has been set [keul]0.1.2 (2013-09-27)fixed encoding error on columns headers [keul]fixed encoding error on editing rows [keul]0.1.1 (2013-09-23)Fixed UnicodeDecodeError problem with non-ASCII chars [keul]0.1 (2013-09-19)Initial release