[views] Backport subject primary view to medical exp
authorVincent Michel <vincent.michel@logilab.fr>
Fri, 11 Jan 2013 09:57:59 +0100
changeset 30 1204303d90bf
parent 29 cdb83802f32b
child 31 4be2388b201b
[views] Backport subject primary view to medical exp
views/primary.py
--- a/views/primary.py	Fri Jan 11 09:15:07 2013 +0100
+++ b/views/primary.py	Fri Jan 11 09:57:59 2013 +0100
@@ -16,44 +16,3 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 
 """cubicweb-opencat views/forms/actions/components for web ui"""
-
-from cubicweb.selectors import is_instance
-from cubicweb.web.views.primary import PrimaryView
-
-
-class SubjectPrimaryView(PrimaryView):
-    __select__ = PrimaryView.__select__ & is_instance('Subject')
-
-    def call(self, rset=None):
-        entity = self.cw_rset.get_entity(0,0)
-        self.w(u'<div class="well">')
-        self.w(u'<div class="page-header">')
-        # Header
-        self.w(u'<h1>%s</h1>' % entity.dc_title())
-        self.w(u'</div>')
-        self.w(u'<dl class="dl-horizontal">')
-        self.w(u'<dt>%s</dt><dd>%s</dd>' % (self._cw._('Age'), entity.age))
-        self.w(u'<dt>%s</dt><dd>%s</dd>' % (self._cw._('Handedness'), entity.handedness))
-        self.w(u'<dt>%s</dt><dd>%s</dd>' % (self._cw._('Gender'), entity.gender))
-        self.w(u'</dl>')
-        # Resources
-        self.w(u'<div class="row-fluid">')
-        # Scans
-        self.w(u'<div class="span4">')
-        url = self._cw.build_url(rql='Any S WHERE S is Scan, S concerns X, X eid %s' % entity.eid)
-        self.w(u'<a href="%s"><button class="btn btn-info" type="button">%s</button></a>'
-               % (url, self._cw._('NeuroImaging')))
-        self.w(u'</div>')
-        self.w(u'<div class="span4">')
-        url = self._cw.build_url(rql='Any S WHERE S is GenomicMeasure, S concerns X, X eid %s' % entity.eid)
-        self.w(u'<a href="%s"><button class="btn btn-info" type="button">%s</button></a>'
-               % (url, self._cw._('Genetics')))
-        self.w(u'</div>')
-        self.w(u'<div class="span4">')
-        url = self._cw.build_url(rql='Any S WHERE S is QuestionnaireRun, S concerns X, X eid %s' % entity.eid)
-        self.w(u'<a href="%s"><button class="btn btn-info" type="button">%s</button></a>'
-               % (url, self._cw._('Questionnaire')))
-        self.w(u'</div>')
-        self.w(u'</div>')
-        self.w(u'</div>')
-        self.w(u'</div>')