Files
horizon/doc/source/ref/tables.rst
Ladislav Smola c77d9074f1 Inline Table editing
Implementation of inline-table-editing blueprint:

- Design from jcoufal is implemented with Bootstrap elements.
- Inline edit mode implemented, Django Form Field connected to table
  logic, using Django Form Widget to render. Table Cell can be updated
  and refreshed.
- Allowed method implemented for checking of cell edit permissions
- Validation process is taken from Django Form Field logic, so
  validation is defined as part of Django Form Field defined in table
  Column.
- Update method of the cell is defined as Table Action. For obtaining
  row data, UpdateRow functionality is used.
- Horizon Tests for inline editing implemented.
- Selenium Tests for inline editing of tenants implemented
- Documentation written in both ref and topics

Change-Id: Ib29b58da71d3a8abc9688bc942fe49917161e97a
Implements: blueprint inline-table-editing
2013-12-03 09:35:24 +01:00

91 lines
1.8 KiB
ReStructuredText

==================
Horizon DataTables
==================
.. module:: horizon.tables
Horizon includes a componentized API for programmatically creating tables
in the UI. Why would you want this? It means that every table renders
correctly and consistently, table- and row-level actions all have a consistent
API and appearance, and generally you don't have to reinvent the wheel or
copy-and-paste every time you need a new table!
.. seealso::
For usage information, tips & tricks and more examples check out the :doc:`DataTables Topic
Guide </topics/tables>`.
DataTable
=========
The core class which defines the high-level structure of the table being
represented. Example::
class MyTable(DataTable):
name = Column('name')
email = Column('email')
class Meta:
name = "my_table"
table_actions = (MyAction, MyOtherAction)
row_actions - (MyAction)
A full reference is included below:
.. autoclass:: DataTable
:members:
DataTable Options
=================
The following options can be defined in a ``Meta`` class inside a
:class:`.DataTable` class. Example::
class MyTable(DataTable):
class Meta:
name = "my_table"
verbose_name = "My Table"
.. autoclass:: horizon.tables.base.DataTableOptions
:members:
Table Components
================
.. autoclass:: Column
:members:
.. autoclass:: Row
:members:
Actions
=======
.. autoclass:: Action
:members:
.. autoclass:: LinkAction
:members:
.. autoclass:: FilterAction
:members:
.. autoclass:: BatchAction
:members:
.. autoclass:: DeleteAction
:members:
.. autoclass:: UpdateAction
:members:
Class-Based Views
=================
Several class-based views are provided to make working with DataTables
easier in your UI.
.. autoclass:: DataTableView
.. autoclass:: MultiTableView