--- a/src/pyams_scheduler/zmi/scheduler.py Wed Mar 11 11:54:35 2015 +0100
+++ b/src/pyams_scheduler/zmi/scheduler.py Wed Mar 11 17:16:21 2015 +0100
@@ -102,14 +102,12 @@
attributes['table'] = table_attrs
return attributes
-
-@adapter_config(name='name', context=(Interface, IAdminLayer, SchedulerTasksTable), provides=IColumn)
-class SchedulerTasksNameColumn(I18nColumn, GetAttrColumn):
- """Scheduler tasks name column"""
-
- _header = _("Name")
- attrName = 'name'
- weight = 10
+ def getCSSHighlightClass(self, column, item, cssClass):
+ if column.__name__ == 'name':
+ info = item.get_scheduling_info(self.request.registry)
+ if info and not info.active:
+ cssClass = 'text-dashed'
+ return super(SchedulerTasksTable, self).getCSSHighlightClass(column, item, cssClass)
@adapter_config(name='settings', context=(Interface, IAdminLayer, SchedulerTasksTable), provides=IColumn)
@@ -140,6 +138,15 @@
weight = 2
+@adapter_config(name='name', context=(Interface, IAdminLayer, SchedulerTasksTable), provides=IColumn)
+class SchedulerTasksNameColumn(I18nColumn, GetAttrColumn):
+ """Scheduler tasks name column"""
+
+ _header = _("Name")
+ attrName = 'name'
+ weight = 10
+
+
@adapter_config(name='run', context=(Interface, IAdminLayer, SchedulerTasksTable), provides=IColumn)
class SchedulerTasksRunColumn(ActionColumn):
"""Scheduler tasks run column"""