[primary] Remove detailed assessments from subject primary view, see #3326417
authorVincent Michel <vincent.michel@logilab.fr>
Mon, 02 Dec 2013 17:00:15 +0100
changeset 537 739a244553b5
parent 536 fde786446f03
child 538 f76cf12ef75c
[primary] Remove detailed assessments from subject primary view, see #3326417
views/primary.py
--- a/views/primary.py	Mon Dec 02 15:53:34 2013 +0100
+++ b/views/primary.py	Mon Dec 02 17:00:15 2013 +0100
@@ -169,14 +169,14 @@
         return data
 
     def display_main_col(self, entity):
-        self.w(u'<div class="span6">')
-        # Detailled assessments
-        rset = self._cw.execute('Any X WHERE S concerned_by X, S eid %(e)s', {'e': entity.eid})
+        self.w(u'<div class="span10">')
+        # Detailed measures
+        rset = self._cw.execute('Any X WHERE X concerns S, S eid %(e)s', {'e': entity.eid})
         if rset:
-            self.w(u'<h3>%s</h3>' % self._cw._('Detailed Assessments'))
+            self.w(u'<h3>%s</h3>' % xml_escape(self._cw._('Measures')))
             self.wview('list', rset=rset)
         self.w(u'</div>')
-        self.w(u'<div class="span5">')
+        self.w(u'<div class="span10">')
         # Related external resources
         rset = self._cw.execute('Any E WHERE X external_resources E, S concerned_by X, S eid %(e)s, '
                                 'NOT EXISTS(X generates M)', {'e': entity.eid})
@@ -226,9 +226,9 @@
                 (self._cw._('Department'), entity.department),]
 
     def display_main_col(self, entity):
-        # Detailled assessments
+        # Detailed assessments
         # XXX Direct link to the measures/runs ?
-        self.w(u'<h3>%s</h3>' % self._cw._('Assessments conducted by this investigator'))
+        self.w(u'<h3>%s</h3>' % xml_escape(self._cw._('Assessments conducted by this investigator')))
         rset = self._cw.execute('Any A WHERE A conducted_by X, X eid %(e)s', {'e': entity.eid})
         if rset:
             self.wview('list', rset)
@@ -558,7 +558,8 @@
             possible_answers = question.displayable_possible_answers
             for value in (question.identifier, question.text, question.type, possible_answers):
                 w(u'<th>%s</th>' % value)
-            w(u'<th><a href="%s">%s</a></th>' % (question.absolute_url(), self._cw._('See detailled question')))
+            w(u'<th><a href="%s">%s</a></th>' % tuple(map(xml_escape,
+                                                          (question.absolute_url(), self._cw._('See detailed question')))))
             w(u'</tr>')
         w(u'</table>')