Skip to main content

A generic tabbed view for plone content types.

Project description

Introduction
============

This package provides a generic view with multiple tabs for plone. It
provides a generic base tab for listing contents in a table, based on
`ftw.table`_.


Features
========

- Generic tabbed view
- Tabs are registered through FTI actions
- Base view for listing tabs
- Listing tabs are filterable
- Perform configurable actions on listed items
- `ftw.table`_'s `Ext JS`_ support works also in listing tables
- Fallback tables
- Drag'n drop multiple file upload functionality (using quickupload plugin)


Installation
============


**Default table implementation**

- Add ``ftw.tabbedview`` to your buildout (or as dependency to a custom egg):

::

[buildout]
parts =
instance
...

[instance]
...
eggs +=
Plone
ftw.tabbedview

- Install default profile in portal_setup.


**Ext JS table implementation**

- Add ``ftw.tabbedview`` to your buildout (or as dependency to a custom egg),
using the ``extjs`` extras require:

::

[buildout]
parts =
instance
...

[instance]
...
eggs +=
Plone
ftw.tabbedview[extjs]

- Install extjs profile in portal_setup.


Quickupload plugin implementation
---------------------------------

The quickupload plugin integrates the `collective.quickupload`_ packages in to the tabbedview.

- Add ``ftw.tabbedview`` to your buildout (or as dependency to a custom egg),
using the ``quickupload`` extras require:

::

[buildout]
parts =
instance
...

[instance]
...
eggs +=
Plone
ftw.tabbedview[quickupload]

- Install quickupload profile in portal_setup.

- For activating the quickupload plugin on a context, make sure the context provides the ITabbedviewUploadable Interface.

=====
Usage
=====

We use the package ``example.conference``_ as example for showing how to use ``ftw.tabbedview``.

- Use the ``@@tabbed_view`` on any container.

- Define actions on the content type FTI (Example: ``profiles/default/types/example.conference.program.xml``)::

<?xml version="1.0"?>
<object name="example.conference.program" meta_type="Dexterity FTI"
i18n:domain="example.conference" xmlns:i18n="http://xml.zope.org/namespaces/i18n">

<property name="default_view">tabbed_view</property>
<property name="view_methods">
<element value="tabbed_view"/>
</property>

<action title="Sessions" action_id="sessions" category="tabbedview-tabs"
condition_expr="" url_expr="string:${object_url}?view=sessions"
visible="True">
<permission value="View"/>
</action>

</object>

- Create the "tab" view (Example: ``browser/tabs.py``)::

>>> from ftw.tabbedview.browser.listing import CatalogListingView
>>> from ftw.table import helper
>>> from example.conference import _
>>>
>>> class SessionsTab(CatalogListingView):
... """A tabbed-view tab listing sessions on a program.
... """
...
... types = ['example.conference.session']
... sort_on = 'sortable_title'
...
... show_selects = False
...
... columns = (
... {'column': 'Title',
... 'sort_index': 'sortable_title',
... 'column_title': _(u'Title'),
... 'helper': helper.linked},
...
... {'column': 'Track',
... 'column_title': _(u"Track")},
... )

- Register the view using ZCML, be sure to name it ``tabbedview_view-${action id}``
(Example: ``browser/configure.zcml``)::

<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser">

<browser:page
for="example.conference.program.IProgram"
name="tabbedview_view-sessions"
class=".tabs.SessionsTab"
permission="zope2.View"
/>

</configure>


Alternative listing sources
===========================

It is possible to use alternative sources for listing tabs. The tables are generated
using `ftw.table`_ and the tab is a ``ftw.table.interfaces.ITableSourceConfig``, which
allows ``ftw.table`` to find an appropriate source. Subclassing ``ITableSourceConfig`` and
registering a custom ``ITableSource`` multi adapter makes it possible to use alternative
data sources such as sqlalchemy or structured python data (local roles for instance).
Take a look at the `ftw.table`_ documentation for more details.


Screenshots
===========

Screenshot of a example tabbed view using the default table implementation:

.. image:: https://github.com/4teamwork/ftw.tabbedview/raw/master/docs/screenshot1.png

Screenshot of the same listing using the ``extjs`` table implementation:

.. image:: https://github.com/4teamwork/ftw.tabbedview/raw/master/docs/screenshot2.png



Links
=====

- Main github project repository: https://github.com/4teamwork/ftw.tabbedview
- Issue tracker: https://github.com/4teamwork/ftw.tabbedview/issues
- Package on pypi: http://pypi.python.org/pypi/ftw.tabbedview
- Continuous integration: https://jenkins.4teamwork.ch/search?q=ftw.tabbedview



Licensing
=========

This package is released under GPL Version 2.
Be aware, that when using the package with the ``extjs`` extras, it will
install `Ext JS`_, which has different license policies. See
http://www.sencha.com/products/extjs/license/ for details.


Copyright
=========

This package is copyright by `4teamwork <http://www.4teamwork.ch/>`_.

``ftw.tabbedview`` is licensed under GNU General Public License, version 2.


.. _ftw.table: https://github.com/4teamwork/ftw.table
.. _example.conference: https://github.com/collective/example.conference
.. _Ext JS: http://www.sencha.com/products/extjs/
.. _collective.quickupload: https://github.com/collective/collective.quickupload

Changelog
=========


3.2.5 (2012-05-24)
------------------

- Fix upload js for IE8.
[mathias.leimgruber]


3.2.4 (2012-05-22)
------------------

- Bugfix: fix sorting in grid state when it is wrong.
[jone]


3.2.3 (2012-05-09)
------------------

- Use same markup in batching like plone.
[Julian Infanger]

- Add meta:provides ftw.tabbedview3 for zcml:conditions.
[jone]

- Setting 'X-Theme-Disabled' header in ListingView response for HTML fragment
[lgraf]

- Added 'ajax_load' parameter to listing request.
[lgraf]

- Setting correct Content-Type header for JSON response from ListingView.
[lgraf]


3.2.2 (2012-04-23)
------------------

- Added CSS classes to brackets, which indicates the current page in
batching.pt
[mathias.leimgruber]


3.2.1 (2012-04-05)
------------------

- Replace some $ by jq in tabbedview.js.
[mathias.leimgruber]


3.2 (2012-04-02)
----------------

- Bugfix in check for quickupload is available.
[mathias.leimgruber]

- Added Quickupload plugin, wich provides drag'n drop multiple fileupload functionality.
[phgross]



3.1.5 (2012-03-28)
------------------

- Enable extjs in portal_registry with extjs GS profile.
[jone]


3.1.4 (2012-03-19)
------------------

- Removed integrated tooltips.
If you still wand tooltips, use ftw.tooltip
[mathias.leimgruber]


3.1.3 (2012-03-12)
------------------

- Disable tabbedview_search instead of hiding.
[Julian Infanger]

- Add new spinner, update spinner position and add helper functions.
[jone]


3.1.2 (2012-03-05)
------------------

- Switch tab after loading contents of new tab, add "loading_tab" class while loading.
[jone]

- Filtering listings: do not flush all params but flush pagenumber only.
[jone]

- Hide label of "Filter" box, but keep it for accessibility rasons.
[jone]

- Make search function more robust, so that it is possible to have a non-listing
view, switchin to a listing view when a search term is entered.
[jone]

- Fix bug in listing menu generator.
[jone]

- Add a default "reset table configuration" folder_contents action (which is only
visible on tabbedview tabs).
[jone]


3.1.1 (2012-02-28)
------------------

- Adjust MANIFEST.in: add include for rst files (reamde.rst).
[phgross]


3.1 (2012-02-27)
----------------

- Added some French translations
[ttschanz]

- Fix submenu click event binding. Dont use live(click).
[mathias.leimgruber]

- Implemented show_menu condition.
[mathias.leimgruber]

- Add form authenticator to listing forms.
[jone]

- Fix bug where the persistent ext-js grid state when trying to acces the sort information.
The sort information may not be there in some cases.
[jone]

- Remove old i18n directory. #3
[jone]

- Make both JS implementation (default and extjs) work on same branch:

- Better use of ftwtable jquery plugin in tabbed view.
- Register a default tabbedview dictstorage, stored on the plone site.
- Fix markup for extjs implementation.
- Implement selecting and menu support for default implementation.
- Respect extjs-config in registry for deciding if the extjs JS should be loaded.
- Remove non-ftw.tabbedview translations added from custom projects.
- Various cleanup and minor bug fixes.

[jone]


3.0 (2011-11-17)
----------------

- Moved hidden input element *into* tabbedview_form so it always gets
submitted.
[lgraf]

- Implements a dynamic batchbox for batched listing views, which allows to
change the batchsize (hits per site) dynamically.
[phgross]

- Automaticly reset batching while filtering (with the textfilter)
[phgross]

- Made it possible to set a empty dict as gridstate configuration
[phgross]

- Add possibility to call javascript functions from tabbeview-menu actions.
By default every tabbedview_menu link just submit the form.
Used for the reset_tableconfiguration action.
[phgross]


3.0b9 (2011-10-04)
------------------

- added morelink (show all link) support, for overview listings with boxes.
Every show all link loads now autmaticly the corresponding tab.
[phgross]


3.0b8 (2011-107-12)
-------------------

- fixed select_all method (works now also with direct call)
[phgross]

- removed half-implemented variable batching_enabled
fixed select_all function
[phgross]


3.0b7
-----

- removed some translations which don't belong here
[ttschanz]


3.0b6
-----

- slightly changed html structure to make it easier to style
[fsprenger]


3.0b5
-----

- Fixed translation files
[jbaumann]


3.0b4
-----

- Show amount of matching in "select-all" link.
[jbaumann]


3.0b3
-----

- Enable batching when grouping is enabled. This solves performance issues
on heavy tables.
[jbaumann]

- Fixed bug where grouping in the state broke the table.
[jbaumann]


3.0b2
-----

- Read sort_on attribute from grid storage
[jbaumann]


3.0b1
-----

- Implemented grid state storage stuff with `ftw.dictstorage`
[jbaumann]

- Implemented server side grouping of listing tables
[jbaumann]

- added action permission check
[mathias.leimgruber]


2.1
---

- tagged from master instead of plone4 compatibility branch
Your should realy use this one
[mathias.leimgruber]


1.0c2
-----

- Changed the minimum pagesize to 1. A small pagesize is necessary for easy
testing.
[jbaumann]

- Fixed select-all: It does now select all items in the tab, not only the
visibles. Fixed also ordering and duplicity.
[jbaumann]

- Using jqueryui is now optional. Use the "jqueryui" extras_require for
enabling UI.
[jbaumann]

- rebuild tabbedview, so that in only done the tabbedview js stuff,
when the tabbedview is displayed

- Added maintainer properly in setup.py
[jbaumann]


1.0c1
-----

- Remove toLoverCase since its not really needed and error-prone
[vbaumann]


1.0a5
-----

- timesheet-tabbedview: added some translations
[phgross]


1.0a4
-----

- Translations
[fsprenger]

- added translations
[phgross]


1.0a3
-----

- Filter boxes Functionality (with a accordian view)
[phgross]

- Auto Filter boxes Functionality (with a accordian view)
[phgross]

- Auto Count Functionality
[phgross]

- Corrected the select all action
[phgross]

- Added sort functionality for the SolrListingView
[phgross]

- Translation for tab's titles added
[jbaumann]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ftw.tabbedview-3.2.5.tar.gz (126.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page