equal
deleted
inserted
replaced
54 |
54 |
55 .. image:: ../../images/views-table-filter-shadow.png |
55 .. image:: ../../images/views-table-filter-shadow.png |
56 |
56 |
57 By the same way, you can display additional actions for the selected entities |
57 By the same way, you can display additional actions for the selected entities |
58 by setting `add_view_actions` layout option to `True`. This will add actions |
58 by setting `add_view_actions` layout option to `True`. This will add actions |
59 returned by the view's :meth:`~cubicweb.web.views.TableMixIn.table_actions`. |
59 returned by the view's :meth:`~cubicweb.web.views.tableview.TableMixIn.table_actions`. |
60 |
60 |
61 You can notice that all columns of the result set are not displayed. This is |
61 You can notice that all columns of the result set are not displayed. This is |
62 because of given `headers`, implying to display only columns from 0 to |
62 because of given `headers`, implying to display only columns from 0 to |
63 len(headers). |
63 len(headers). |
64 |
64 |
70 |
70 |
71 |
71 |
72 So another option would be to write this view using |
72 So another option would be to write this view using |
73 :class:`~cubicweb.web.views.tableview.EntityTableView`, as below. |
73 :class:`~cubicweb.web.views.tableview.EntityTableView`, as below. |
74 |
74 |
|
75 .. sourcecode:: python |
75 |
76 |
76 class ResourcesTable(EntityTableView): |
77 class ResourcesTable(EntityTableView): |
77 __regid__ = 'resource.table' |
78 __regid__ = 'resource.table' |
78 __select__ = is_instance('Resource') |
79 __select__ = is_instance('Resource') |
79 # table columns definition |
80 # table columns definition |