equal
deleted
inserted
replaced
32 build_COLNAME_cell methods |
32 build_COLNAME_cell methods |
33 |
33 |
34 header_for_COLNAME methods allow to customize header's label |
34 header_for_COLNAME methods allow to customize header's label |
35 """ |
35 """ |
36 |
36 |
37 id = 'progress_table_view' |
37 __regid__ = 'progress_table_view' |
38 title = _('task progression') |
38 title = _('task progression') |
39 __select__ = implements(IMileStone) |
39 __select__ = implements(IMileStone) |
40 |
40 |
41 # default columns of the table |
41 # default columns of the table |
42 columns = (_('project'), _('milestone'), _('state'), _('eta_date'), |
42 columns = (_('project'), _('milestone'), _('state'), _('eta_date'), |
163 |
163 |
164 class InContextProgressTableView(ProgressTableView): |
164 class InContextProgressTableView(ProgressTableView): |
165 """this views redirects to ``progress_table_view`` but removes |
165 """this views redirects to ``progress_table_view`` but removes |
166 the ``project`` column |
166 the ``project`` column |
167 """ |
167 """ |
168 id = 'ic_progress_table_view' |
168 __regid__ = 'ic_progress_table_view' |
169 |
169 |
170 def call(self, columns=None): |
170 def call(self, columns=None): |
171 view = self.vreg['views'].select('progress_table_view', self.req, |
171 view = self.vreg['views'].select('progress_table_view', self.req, |
172 rset=self.rset) |
172 rset=self.rset) |
173 columns = list(columns or view.columns) |
173 columns = list(columns or view.columns) |
178 view.render(w=self.w, columns=columns) |
178 view.render(w=self.w, columns=columns) |
179 |
179 |
180 |
180 |
181 class ProgressBarView(EntityView): |
181 class ProgressBarView(EntityView): |
182 """displays a progress bar""" |
182 """displays a progress bar""" |
183 id = 'progressbar' |
183 __regid__ = 'progressbar' |
184 title = _('progress bar') |
184 title = _('progress bar') |
185 __select__ = implements(IProgress) |
185 __select__ = implements(IProgress) |
186 |
186 |
187 def cell_call(self, row, col): |
187 def cell_call(self, row, col): |
188 self.req.add_css('cubicweb.iprogress.css') |
188 self.req.add_css('cubicweb.iprogress.css') |