Commit 9b0ad6a2 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 )
parent 4ef33868
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5.Document.PresencePeriod import PresencePeriod from Products.ERP5.Document.PresencePeriod import PresencePeriod
class GroupCalendarAssignment(PresencePeriod): class GroupCalendarAssignment(PresencePeriod):
...@@ -38,6 +39,10 @@ class GroupCalendarAssignment(PresencePeriod): ...@@ -38,6 +39,10 @@ class GroupCalendarAssignment(PresencePeriod):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) 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, security.declareProtected(Permissions.AccessContentsInformation,
'getPeriodList') 'getPeriodList')
def getPeriodList(self): def getPeriodList(self):
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<string>all_columns</string> <string>all_columns</string>
<string>columns</string> <string>columns</string>
<string>portal_types</string> <string>portal_types</string>
<string>sort</string>
<string>title</string> <string>title</string>
</list> </list>
</value> </value>
...@@ -80,16 +79,20 @@ ...@@ -80,16 +79,20 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>title</string> <string>specialise_title</string>
<string>Title</string> <string>Group Calendar Assignment</string>
</tuple> </tuple>
<tuple> <tuple>
<string>description</string> <string>delivery.start_date</string>
<string>Description</string> <string>Start Date</string>
</tuple> </tuple>
<tuple> <tuple>
<string>translated_simulation_state_title</string> <string>delivery.stop_date</string>
<string>State</string> <string>Stop Date</string>
</tuple>
<tuple>
<string>owner_title</string>
<string>Owner</string>
</tuple> </tuple>
<tuple> <tuple>
<string>creation_date</string> <string>creation_date</string>
...@@ -116,6 +119,10 @@ ...@@ -116,6 +119,10 @@
<string>title</string> <string>title</string>
<string>Title</string> <string>Title</string>
</tuple> </tuple>
<tuple>
<string>destination_title</string>
<string>Destination</string>
</tuple>
<tuple> <tuple>
<string>description</string> <string>description</string>
<string>Description</string> <string>Description</string>
...@@ -146,17 +153,6 @@ ...@@ -146,17 +153,6 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>title</string>
</tuple>
</list>
</value>
</item>
<item> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <value> <string>Click to edit the target</string> </value>
......
...@@ -10,14 +10,11 @@ ...@@ -10,14 +10,11 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>title</string>
<string>columns</string>
<string>all_columns</string> <string>all_columns</string>
<string>search_columns</string> <string>columns</string>
<string>sort_columns</string>
<string>sort</string>
<string>selection_name</string>
<string>portal_types</string> <string>portal_types</string>
<string>selection_name</string>
<string>title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -83,16 +80,8 @@ ...@@ -83,16 +80,8 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>title</string> <string>owner_title</string>
<string>Title</string> <string>Owner</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple> </tuple>
<tuple> <tuple>
<string>creation_date</string> <string>creation_date</string>
...@@ -149,75 +138,10 @@ ...@@ -149,75 +138,10 @@
</list> </list>
</value> </value>
</item> </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> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string>group_calendar_selection</string> </value> <value> <string>group_calendar_selection</string> </value>
</item> </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> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <value> <string>Click to edit the target</string> </value>
......
...@@ -10,14 +10,11 @@ ...@@ -10,14 +10,11 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>title</string>
<string>columns</string>
<string>all_columns</string> <string>all_columns</string>
<string>search_columns</string> <string>columns</string>
<string>sort_columns</string>
<string>sort</string>
<string>selection_name</string>
<string>portal_types</string> <string>portal_types</string>
<string>selection_name</string>
<string>title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -83,24 +80,8 @@ ...@@ -83,24 +80,8 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>title</string> <string>owner_title</string>
<string>Title</string> <string>Owner</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>
</tuple> </tuple>
<tuple> <tuple>
<string>creation_date</string> <string>creation_date</string>
...@@ -165,83 +146,10 @@ ...@@ -165,83 +146,10 @@
</list> </list>
</value> </value>
</item> </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> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string>leave_request_selection</string> </value> <value> <string>leave_request_selection</string> </value>
</item> </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> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <value> <string>Click to edit the target</string> </value>
......
...@@ -10,14 +10,11 @@ ...@@ -10,14 +10,11 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>title</string>
<string>columns</string>
<string>all_columns</string> <string>all_columns</string>
<string>search_columns</string> <string>columns</string>
<string>sort_columns</string>
<string>sort</string>
<string>selection_name</string>
<string>portal_types</string> <string>portal_types</string>
<string>selection_name</string>
<string>title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -83,24 +80,8 @@ ...@@ -83,24 +80,8 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>title</string> <string>owner_title</string>
<string>Title</string> <string>Owner</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>
</tuple> </tuple>
<tuple> <tuple>
<string>creation_date</string> <string>creation_date</string>
...@@ -165,83 +146,10 @@ ...@@ -165,83 +146,10 @@
</list> </list>
</value> </value>
</item> </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> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string>presence_request_selection</string> </value> <value> <string>presence_request_selection</string> </value>
</item> </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> <item>
<key> <string>target</string> </key> <key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value> <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