[schema] rename "subject_age" to "age_of_subject" (closes #5338024) draft default tip
authorDimitri Papadopoulos <dimitri.papadopoulos@cea.fr>
Mon, 11 May 2015 11:35:12 +0200
changeset 1220 26760f5af070
parent 1219 50b7da0706bb
[schema] rename "subject_age" to "age_of_subject" (closes #5338024) Additionaly age might be in days, not in years. As in the rest of the Brainomics cubes, do not assume years.
views/facets.py
views/secondary.py
--- a/views/facets.py	Tue Nov 25 18:47:13 2014 +0100
+++ b/views/facets.py	Mon May 11 11:35:12 2015 +0200
@@ -41,7 +41,7 @@
 class SubjectAgeFacet(AbstractRangeRQLPathFacet, facet.RangeFacet):
     __regid__ = 'subject-age-facet'
     __select__ = facet.RQLPathFacet.__select__ & is_instance('Subject')
-    path = ['A admission_of X', 'A subject_age V']
+    path = ['A admission_of X', 'A age_of_subject V']
     order = 3
     filter_variable = 'V'
     title = translatable(_('Age'))
--- a/views/secondary.py	Tue Nov 25 18:47:13 2014 +0100
+++ b/views/secondary.py	Mon May 11 11:35:12 2015 +0200
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
-# copyright 2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
-# copyright 2013 CEA (Saclay, FRANCE), all rights reserved.
+# copyright 2013-2015 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2013-2015 CEA (Saclay, FRANCE), all rights reserved.
 # contact http://www.logilab.fr -- mailto:contact@logilab.fr
 #
 # This program is free software: you can redistribute it and/or modify it under
@@ -50,7 +50,7 @@
                                                             self._cw._('see study'),
                                                             entity.admission_in[0].view('incontext')))
         w(u'<div class="panel-body">')
-        w(u'%s: %s %s' % (self._cw._('Subject age'), entity.subject_age, self._cw._('years')))
+        w(u'%s: %s' % (self._cw._('Subject age'), entity.age_of_subject))
         w(u'<ul>')
         for step in entity.reverse_step_of:
             w(u'<li>%s</li>' % step.dc_title())