# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1234951865 -3600 # Node ID b094cf8535b44c2f992af5c2e37d700d5d8d24e7 # Parent 33ede72b22b8fa00d8dd7dc8302ba093420bc8fc cleanup diff -r 33ede72b22b8 -r b094cf8535b4 interfaces.py --- a/interfaces.py Wed Feb 18 11:10:28 2009 +0100 +++ b/interfaces.py Wed Feb 18 11:11:05 2009 +0100 @@ -1,7 +1,7 @@ """Specific views for entities implementing IDownloadable :organization: Logilab -:copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved. :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr """ @@ -193,8 +193,8 @@ """embed action interface""" class ICalendarable(Interface): - """interface for itms that do have a begin date 'start' and an end -date 'stop'""" + """interface for items that do have a begin date 'start' and an end date 'stop' + """ class ICalendarViews(Interface): """calendar views interface""" diff -r 33ede72b22b8 -r b094cf8535b4 web/action.py --- a/web/action.py Wed Feb 18 11:10:28 2009 +0100 +++ b/web/action.py Wed Feb 18 11:11:05 2009 +0100 @@ -95,8 +95,7 @@ __redirectvid=self.req.form.get('__redirectvid', '')) class EntityAction(Action): - """DEPRECATED / BACKWARD COMPAT - """ + """DEPRECATED / BACKWARD COMPAT""" registered = deprecate(accepts_compat(condition_compat(Action.registered)), msg='EntityAction is deprecated, use Action with ' 'appropriate selectors') diff -r 33ede72b22b8 -r b094cf8535b4 web/views/calendar.py --- a/web/views/calendar.py Wed Feb 18 11:10:28 2009 +0100 +++ b/web/views/calendar.py Wed Feb 18 11:11:05 2009 +0100 @@ -14,9 +14,9 @@ from cubicweb.interfaces import ICalendarable from cubicweb.selectors import implements -from cubicweb.common.utils import date_range +from cubicweb.utils import date_range +from cubicweb.view import EntityView from cubicweb.common.uilib import ajax_replace_url -from cubicweb.common.view import EntityView # For backward compatibility @@ -67,7 +67,8 @@ task.view('oneline', w=self.w) if dates: if task.start and task.stop: - self.w('
from %s'%self.format_date(task.start)) + self.w('
' % self.req._('from %(date)s' % {'date': self.format_date(task.start)})) + self.w('
' % self.req._('to %(date)s' % {'date': self.format_date(task.stop)})) self.w('
to %s'%self.format_date(task.stop)) class CalendarLargeItemView(CalendarItemView): @@ -110,11 +111,11 @@ Does apply to ICalendarable compatible entities """ + id = 'hcal' __select__ = implements(ICalendarable) need_navigation = False title = _('hCalendar') #templatable = False - id = 'hcal' def call(self): self.w(u'
') @@ -140,9 +141,9 @@ class OneMonthCal(EntityView): """At some point, this view will probably replace ampm calendars""" + id = 'onemonthcal' __select__ = implements(ICalendarable) need_navigation = False - id = 'onemonthcal' title = _('one month') def call(self): @@ -323,9 +324,9 @@ class OneWeekCal(EntityView): """At some point, this view will probably replace ampm calendars""" + id = 'oneweekcal' __select__ = implements(ICalendarable) need_navigation = False - id = 'oneweekcal' title = _('one week') def call(self):