Commit 6b223dc7 authored by Jérome Perrin's avatar Jérome Perrin

calendar: configure more columns in in calendar modules listboxs

* do not repeat columns in more columns
* let listbox decide which columns are searchable / sortable
* add owner_title in more column
* add group more columns for all group calendar assignments columns ( I had to use the infamous isDelivery hack to make them searchable / sortable )

(cherry picked from commit 9b0ad6a2)
parent 41727d49
......@@ -27,6 +27,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5.Document.PresencePeriod import PresencePeriod
class GroupCalendarAssignment(PresencePeriod):
......@@ -38,6 +39,10 @@ class GroupCalendarAssignment(PresencePeriod):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# XXX GroupCalendarAssignment are not a delivery, but we enable this to be able
# to search them by date in the module.
isDelivery = ConstantGetter('isDelivery', value=True)
security.declareProtected(Permissions.AccessContentsInformation,
'getPeriodList')
def getPeriodList(self):
......
......@@ -13,7 +13,6 @@
<string>all_columns</string>
<string>columns</string>
<string>portal_types</string>
<string>sort</string>
<string>title</string>
</list>
</value>
......@@ -80,16 +79,20 @@
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
<string>specialise_title</string>
<string>Group Calendar Assignment</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
<string>delivery.start_date</string>
<string>Start Date</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
<string>delivery.stop_date</string>
<string>Stop Date</string>
</tuple>
<tuple>
<string>owner_title</string>
<string>Owner</string>
</tuple>
<tuple>
<string>creation_date</string>
......@@ -116,6 +119,10 @@
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>destination_title</string>
<string>Destination</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
......@@ -146,17 +153,6 @@
</list>
</value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>title</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......
......@@ -10,14 +10,11 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>columns</string>
<string>all_columns</string>
<string>search_columns</string>
<string>sort_columns</string>
<string>sort</string>
<string>selection_name</string>
<string>columns</string>
<string>portal_types</string>
<string>selection_name</string>
<string>title</string>
</list>
</value>
</item>
......@@ -83,16 +80,8 @@
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
<string>owner_title</string>
<string>Owner</string>
</tuple>
<tuple>
<string>creation_date</string>
......@@ -149,75 +138,10 @@
</list>
</value>
</item>
<item>
<key> <string>search_columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
<tuple>
<string>modification_date</string>
<string>Modification Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>group_calendar_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>title</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>sort_columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
<tuple>
<string>modification_date</string>
<string>Modification Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......
......@@ -10,14 +10,11 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>columns</string>
<string>all_columns</string>
<string>search_columns</string>
<string>sort_columns</string>
<string>sort</string>
<string>selection_name</string>
<string>columns</string>
<string>portal_types</string>
<string>selection_name</string>
<string>title</string>
</list>
</value>
</item>
......@@ -83,24 +80,8 @@
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>destination_title</string>
<string>Person</string>
</tuple>
<tuple>
<string>Calendar_getDestinationSubordinationTitle</string>
<string>Organisation</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
<string>owner_title</string>
<string>Owner</string>
</tuple>
<tuple>
<string>creation_date</string>
......@@ -165,83 +146,10 @@
</list>
</value>
</item>
<item>
<key> <string>search_columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>destination_title</string>
<string>Person</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
<tuple>
<string>modification_date</string>
<string>Modification Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>leave_request_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>title</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>sort_columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>destination_title</string>
<string>Person</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
<tuple>
<string>modification_date</string>
<string>Modification Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......
......@@ -10,14 +10,11 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>columns</string>
<string>all_columns</string>
<string>search_columns</string>
<string>sort_columns</string>
<string>sort</string>
<string>selection_name</string>
<string>columns</string>
<string>portal_types</string>
<string>selection_name</string>
<string>title</string>
</list>
</value>
</item>
......@@ -83,24 +80,8 @@
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>destination_title</string>
<string>Person</string>
</tuple>
<tuple>
<string>Calendar_getDestinationSubordinationTitle</string>
<string>Organisation</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
<string>owner_title</string>
<string>Owner</string>
</tuple>
<tuple>
<string>creation_date</string>
......@@ -165,83 +146,10 @@
</list>
</value>
</item>
<item>
<key> <string>search_columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>destination_title</string>
<string>Person</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
<tuple>
<string>modification_date</string>
<string>Modification Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>presence_request_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>sort_columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>destination_title</string>
<string>Person</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
<tuple>
<string>modification_date</string>
<string>Modification Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment