# HG changeset patch # User Sylvain Thénault # Date 1251734666 -7200 # Node ID 921fdbf8b3038dc27a2ec5398a0fbcbc5b9ba4be # Parent ff83ccd612cef83aca12c0085101df4e35dc435a# Parent 3fbcdf220ce9ddda69e168cd540a274477eb048b merge diff -r ff83ccd612ce -r 921fdbf8b303 cwconfig.py --- a/cwconfig.py Mon Aug 31 16:29:10 2009 +0200 +++ b/cwconfig.py Mon Aug 31 18:04:26 2009 +0200 @@ -134,6 +134,9 @@ 'float' : 'Float', } +_forced_mode = os.environ.get('CW_MODE') +assert _forced_mode in (None, 'system', 'user') + class CubicWebNoAppConfiguration(ConfigurationMixIn): """base class for cubicweb configuration without a specific instance directory """ @@ -150,7 +153,7 @@ CUBES_DIR = '%(APYCOT_ROOT)s/local/share/cubicweb/cubes/' % os.environ # create __init__ file file(join(CUBES_DIR, '__init__.py'), 'w').close() - elif exists(join(CW_SOFTWARE_ROOT, '.hg')) or os.environ.get('CW_MODE') == 'user': + elif (exists(join(CW_SOFTWARE_ROOT, '.hg')) and _forced_mode != 'system') or _forced_mode == 'user': mode = 'dev' CUBES_DIR = abspath(normpath(join(CW_SOFTWARE_ROOT, '../cubes'))) else: diff -r ff83ccd612ce -r 921fdbf8b303 web/views/editforms.py --- a/web/views/editforms.py Mon Aug 31 16:29:10 2009 +0200 +++ b/web/views/editforms.py Mon Aug 31 18:04:26 2009 +0200 @@ -371,6 +371,8 @@ entity """ id = 'copy' + warning_message = _('Please note that this is only a shallow copy') + def render_form(self, entity): """fetch and render the form""" # make a copy of entity to avoid altering the entity in the @@ -381,7 +383,7 @@ self.initialize_varmaker() self.newentity.eid = self.varmaker.next() self.w(u'\n' - % self.req._('Please note that this is only a shallow copy')) + % self.req._(self.warning_message)) super(CopyFormView, self).render_form(self.newentity) del self.newentity diff -r ff83ccd612ce -r 921fdbf8b303 web/views/primary.py --- a/web/views/primary.py Mon Aug 31 16:29:10 2009 +0200 +++ b/web/views/primary.py Mon Aug 31 18:04:26 2009 +0200 @@ -51,6 +51,7 @@ boxes = self._prepare_side_boxes(entity) if boxes or hasattr(self, 'render_side_related'): self.w(u'
') + self.render_entity_summary(entity) self.w(u'
') self.content_navigation_components('navcontenttop') self.render_entity_attributes(entity) @@ -90,6 +91,8 @@ def render_entity_metadata(self, entity): entity.view('metadata', w=self.w) + + def render_entity_summary(self, entity): summary = self.summary(entity) # deprecate summary? if summary: self.w(u'
%s
' % summary)